Skip to content

Commit

Permalink
Two missing icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunterkoenigsmann committed Feb 1, 2020
1 parent da2eb87 commit 0181675
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
10 changes: 7 additions & 3 deletions src/ToolBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ void ToolBar::AddTools()
_("Send the current cell to maxima"));

AddTool(tb_eval_all, _("Evaluate all"),
GetBitmap(wxT("go-jump"),
go_jump_svg_gz,go_jump_svg_gz_len),
GetEvalAllBitmap(),
_("Send all cells to maxima"));

AddTool(tb_evaltillhere, _("Evaluate to point"), GetEvalTillHereBitmap(),
Expand Down Expand Up @@ -356,6 +355,7 @@ void ToolBar::UpdateBitmaps()
m_ppi = ppi;

SetToolBitmap(tb_eval,GetEvalBitmap());
SetToolBitmap(tb_eval_all,GetEvalAllBitmap());
SetToolBitmap(wxID_NEW,GetNewBitmap());
SetToolBitmap(wxID_OPEN,GetOpenBitmap());
SetToolBitmap(wxID_SAVE,GetSaveBitmap());
Expand Down Expand Up @@ -385,7 +385,11 @@ void ToolBar::UpdateBitmaps()
SetToolBitmap(tb_help,GetHelpBitmap());
Realize();
}


wxBitmap ToolBar::GetEvalAllBitmap(wxSize siz)
{
return GetBitmap(wxT("go-next"), go_jump_svg_gz, go_jump_svg_gz_len, siz);
}
wxBitmap ToolBar::GetEvalBitmap(wxSize siz)
{
return GetBitmap(wxT("go-next"), go_next_svg_gz, go_next_svg_gz_len, siz);
Expand Down
1 change: 1 addition & 0 deletions src/ToolBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ class ToolBar : public wxAuiToolBar
//! Update the bitmaps on ppi changes.
void UpdateBitmaps();

wxBitmap GetEvalAllBitmap(wxSize siz = wxSize(-1, -1));
wxBitmap GetEvalBitmap(wxSize siz = wxSize(-1, -1));
wxBitmap GetNewBitmap(wxSize siz = wxSize(-1, -1));
wxBitmap GetOpenBitmap(wxSize siz = wxSize(-1, -1));
Expand Down
26 changes: 19 additions & 7 deletions src/wxMaximaFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,12 @@ void wxMaximaFrame::SetupMenu()
}
m_CellMenu->Append(menu_evaluate_all_visible, _("Evaluate All Visible Cells\tCtrl+R"),
_("Evaluate all visible cells in the document"), wxITEM_NORMAL);
m_CellMenu->Append(menu_evaluate_all, _("Evaluate All Cells\tCtrl+Shift+R"),
_("Evaluate all cells in the document"), wxITEM_NORMAL);
{
wxMenuItem *it = new wxMenuItem(m_CellMenu, menu_evaluate_all, _("Evaluate All Cells\tCtrl+Shift+R"),
_("Evaluate all cells in the document"), wxITEM_NORMAL);
it->SetBitmap(m_worksheet->m_mainToolBar->GetEvalAllBitmap(wxRendererNative::Get().GetCheckBoxSize(this)));
m_CellMenu->Append(it);
}
{
wxMenuItem *it = new wxMenuItem(m_CellMenu, ToolBar::tb_evaltillhere, _("Evaluate Cells Above\tCtrl+Shift+P"),
_("Re-evaluate all cells above the one the cursor is in"), wxITEM_NORMAL);
Expand Down Expand Up @@ -879,11 +883,19 @@ void wxMaximaFrame::SetupMenu()
// Maxima menu
m_MaximaMenu = new wxMenu;

APPEND_MENU_ITEM(m_MaximaMenu, menu_interrupt_id,
_("&Interrupt\tCtrl+G"),
_("Interrupt current computation"), wxT("gtk-stop"));
APPEND_MENU_ITEM(m_MaximaMenu, ToolBar::menu_restart_id,
_("&Restart Maxima"), _("Restart Maxima"), wxT("gtk-refresh"));
{
wxMenuItem *it = new wxMenuItem(m_MaximaMenu, menu_interrupt_id, _("&Interrupt\tCtrl+G"),
_("Interrupt current computation"), wxITEM_NORMAL);
it->SetBitmap(m_worksheet->m_mainToolBar->GetInterruptBitmap(wxRendererNative::Get().GetCheckBoxSize(this)));
m_MaximaMenu->Append(it);
}

{
wxMenuItem *it = new wxMenuItem(m_MaximaMenu, ToolBar::menu_restart_id, _("&Restart Maxima"),
_("Restart Maxima"), wxITEM_NORMAL);
it->SetBitmap(m_worksheet->m_mainToolBar->GetRestartBitmap(wxRendererNative::Get().GetCheckBoxSize(this)));
m_MaximaMenu->Append(it);
}
m_MaximaMenu->Append(menu_soft_restart, _("&Clear Memory"),
_("Delete all values from memory"), wxITEM_NORMAL);
APPEND_MENU_ITEM(m_MaximaMenu, menu_add_path, _("Add to &Path..."),
Expand Down

0 comments on commit 0181675

Please sign in to comment.