Commit f45d78f7 authored by Claes Sjofors's avatar Claes Sjofors

Wb, view all toplevel in configurator menu

parent 4371075e
......@@ -1437,6 +1437,19 @@ void WttGtk::activate_twowindows( GtkWidget *w, gpointer data)
wtt->activate_twowindows();
}
void WttGtk::activate_set_alltoplevel(GtkWidget *w, gpointer data)
{
Wtt *wtt = (Wtt *)data;
int set = (int) gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM( ((WttGtk *)wtt)->view_alltoplevel_w));
if ( w != ((WttGtk *)wtt)->view_alltoplevel_w) {
set = !set;
gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM( ((WttGtk *)wtt)->view_alltoplevel_w), set ? TRUE : FALSE);
}
wtt->activate_set_alltoplevel( set);
}
void WttGtk::activate_messages( GtkWidget *w, gpointer data)
{
Wtt *wtt = (Wtt *)data;
......@@ -2716,6 +2729,10 @@ WttGtk::WttGtk(
't', GdkModifierType(GDK_CONTROL_MASK),
GTK_ACCEL_VISIBLE);
view_alltoplevel_w = gtk_check_menu_item_new_with_mnemonic( "V_iew all toplevel");
g_signal_connect( view_alltoplevel_w, "activate",
G_CALLBACK(activate_set_alltoplevel), this);
GtkWidget *view_messages = gtk_menu_item_new_with_mnemonic( "_Messages");
g_signal_connect( view_messages, "activate",
G_CALLBACK(WttGtk::activate_messages), this);
......@@ -2726,6 +2743,7 @@ WttGtk::WttGtk(
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_zoom_out);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_zoom_reset);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_twowindows);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_alltoplevel_w);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_messages);
GtkWidget *view = gtk_menu_item_new_with_mnemonic("_View");
......@@ -3479,4 +3497,4 @@ void WttGtk::disable_focus()
void WttGtk::update_title()
{
CoWowGtk::update_title( toplevel, editmode);
}
\ No newline at end of file
}
......@@ -132,6 +132,7 @@ class WttGtk : public Wtt {
GtkWidget *tools_edit_w;
GtkWidget *tools_buildnode_w;
GtkWidget *tools_save_w;
GtkWidget *view_alltoplevel_w;
GtkAccelGroup *accel_g;
int set_focus_disabled;
gint disfocus_timerid;
......@@ -255,6 +256,7 @@ class WttGtk : public Wtt {
static void activate_zoom_out( GtkWidget *w, gpointer data);
static void activate_zoom_reset( GtkWidget *w, gpointer data);
static void activate_twowindows( GtkWidget *w, gpointer data);
static void activate_set_alltoplevel(GtkWidget *w, gpointer data);
static void activate_messages( GtkWidget *w, gpointer data);
static void activate_view( GtkWidget *w, gpointer data);
static void activate_savesettings( GtkWidget *w, gpointer data);
......@@ -303,4 +305,4 @@ class WttGtk : public Wtt {
GtkWidget *wtt_create_popup_menu( Wtt *wtt, pwr_sAttrRef aref, pwr_tCid cid,
void (*message_cb)(void *, char, char *));
#endif
\ No newline at end of file
#endif
......@@ -2227,6 +2227,19 @@ void Wtt::activate_scriptbase()
focused_wnav->command( cmd);
}
void Wtt::activate_set_alltoplevel( int view)
{
char cmd[80];
if ( view)
strcpy( cmd, "set alltoplevel");
else
strcpy( cmd, "set noalltoplevel");
wnav->command( cmd);
wnavnode->command( cmd);
}
void Wtt::activate_help()
{
char cmd[80] = "help overview /base";
......@@ -2666,4 +2679,4 @@ int WttApplList::find( wb_eUtility type, const char *name, void **ctx)
}
}
return 0;
}
\ No newline at end of file
}
......@@ -270,6 +270,7 @@ class Wtt : public WUtility {
void activate_messages();
void activate_scriptproj();
void activate_scriptbase();
void activate_set_alltoplevel( int view);
void activate_help();
void activate_help_project();
void activate_help_proview();
......@@ -363,4 +364,4 @@ class Wtt : public WUtility {
virtual ~Wtt();
};
#endif
\ No newline at end of file
#endif
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