From 0181675f00186e4ecbe1cdf3f4c23ed6e78af7fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunter=20K=C3=B6nigsmann?= Date: Sat, 1 Feb 2020 08:29:58 +0100 Subject: [PATCH] Two missing icons. --- src/ToolBar.cpp | 10 +++++++--- src/ToolBar.h | 1 + src/wxMaximaFrame.cpp | 26 +++++++++++++++++++------- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/ToolBar.cpp b/src/ToolBar.cpp index c4962e165e..9fba9bea7c 100644 --- a/src/ToolBar.cpp +++ b/src/ToolBar.cpp @@ -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(), @@ -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()); @@ -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); diff --git a/src/ToolBar.h b/src/ToolBar.h index b4e51eca24..7992a69e38 100644 --- a/src/ToolBar.h +++ b/src/ToolBar.h @@ -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)); diff --git a/src/wxMaximaFrame.cpp b/src/wxMaximaFrame.cpp index 3d2ff1bf19..8559bec00e 100644 --- a/src/wxMaximaFrame.cpp +++ b/src/wxMaximaFrame.cpp @@ -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); @@ -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..."),