Commit aac4be4e authored by Christoffer Ackelman's avatar Christoffer Ackelman Committed by Esteban Blanc

QT: Change the 'View all toplevel' menu button in the workbench to a checkbox.

parent 69c2b407
...@@ -1294,13 +1294,8 @@ void WttQtWidget::activate_twowindows() ...@@ -1294,13 +1294,8 @@ void WttQtWidget::activate_twowindows()
wtt->activate_twowindows(); wtt->activate_twowindows();
} }
void WttQtWidget::activate_set_alltoplevel() void WttQtWidget::activate_set_alltoplevel(bool set)
{ {
int set = ((int)((WttQt*)wtt)->view_alltoplevel_w->isChecked());
if (sender() != ((WttQt*)wtt)->view_alltoplevel_w) {
set = !set;
((WttQt*)wtt)->view_alltoplevel_w->setChecked(set);
}
wtt->activate_set_alltoplevel(set); wtt->activate_set_alltoplevel(set);
} }
...@@ -2057,8 +2052,8 @@ WttQt::WttQt(void* wt_parent_ctx, const char* wt_name, const char* iconname, ...@@ -2057,8 +2052,8 @@ WttQt::WttQt(void* wt_parent_ctx, const char* wt_name, const char* iconname,
"$pwr_exe/xtt_zoom_reset.png"); "$pwr_exe/xtt_zoom_reset.png");
addMenuItem( addMenuItem(
toplevel, view, "T&wo Windows", SLOT(activate_twowindows()), "CTRL+T"); toplevel, view, "T&wo Windows", SLOT(activate_twowindows()), "CTRL+T");
view_alltoplevel_w = addMenuItem( view_alltoplevel_w = addCheckableMenuItem(
toplevel, view, "V&iew all toplevel", SLOT(activate_set_alltoplevel())); toplevel, view, "V&iew all toplevel", SLOT(activate_set_alltoplevel(bool)));
addMenuItem(toplevel, view, "&Messages", SLOT(activate_messages())); addMenuItem(toplevel, view, "&Messages", SLOT(activate_messages()));
// Options menu // Options menu
......
...@@ -287,7 +287,7 @@ public slots: ...@@ -287,7 +287,7 @@ public slots:
void activate_zoom_out(); void activate_zoom_out();
void activate_zoom_reset(); void activate_zoom_reset();
void activate_twowindows(); void activate_twowindows();
void activate_set_alltoplevel(); void activate_set_alltoplevel(bool set);
void activate_messages(); void activate_messages();
void activate_view(); void activate_view();
void activate_savesettings(); void activate_savesettings();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment