Commit 2f99dd88 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Change "View all toplevel" to a checkbox.

parent 10945ff6
...@@ -1292,13 +1292,8 @@ void WttQtWidget::activate_twowindows() ...@@ -1292,13 +1292,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);
} }
...@@ -2055,8 +2050,8 @@ WttQt::WttQt(void* wt_parent_ctx, const char* wt_name, const char* iconname, ...@@ -2055,8 +2050,8 @@ WttQt::WttQt(void* wt_parent_ctx, const char* wt_name, const char* iconname,
"zoom-original"); "zoom-original");
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();
...@@ -310,4 +310,4 @@ private: ...@@ -310,4 +310,4 @@ private:
WttQt* wtt; WttQt* wtt;
}; };
#endif #endif
\ No newline at end of file
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