add toolbar customize to main and burger menu
This commit is contained in:
parent
5f5b94c2ae
commit
1119707410
|
@ -217,12 +217,12 @@ static struct nsgtk_tabs_submenu *nsgtk_menu_tabs_submenu(GtkAccelGroup *group)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates a toolbars submenu
|
* creates a toolbars submenu
|
||||||
* \param group the 'global' in a gtk sense accelerator reference
|
*
|
||||||
*/
|
* \param group the 'global' in a gtk sense accelerator reference
|
||||||
|
*/
|
||||||
static struct nsgtk_toolbars_submenu *nsgtk_menu_toolbars_submenu(
|
static struct nsgtk_toolbars_submenu *
|
||||||
GtkAccelGroup *group)
|
nsgtk_menu_toolbars_submenu(GtkAccelGroup *group)
|
||||||
{
|
{
|
||||||
struct nsgtk_toolbars_submenu *ret =
|
struct nsgtk_toolbars_submenu *ret =
|
||||||
malloc(sizeof(struct nsgtk_toolbars_submenu));
|
malloc(sizeof(struct nsgtk_toolbars_submenu));
|
||||||
|
@ -242,6 +242,9 @@ static struct nsgtk_toolbars_submenu *nsgtk_menu_toolbars_submenu(
|
||||||
CHECK_ITEM(toolbars, toolbar, gtkToolBar, ret)
|
CHECK_ITEM(toolbars, toolbar, gtkToolBar, ret)
|
||||||
if (ret->toolbar_menuitem != NULL)
|
if (ret->toolbar_menuitem != NULL)
|
||||||
gtk_check_menu_item_set_active(ret->toolbar_menuitem, TRUE);
|
gtk_check_menu_item_set_active(ret->toolbar_menuitem, TRUE);
|
||||||
|
ADD_SEP(toolbars, ret);
|
||||||
|
IMAGE_ITEM(toolbars, customize, gtkCustomize, ret, group);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,7 @@ struct nsgtk_toolbars_submenu {
|
||||||
GtkMenu *toolbars_menu;
|
GtkMenu *toolbars_menu;
|
||||||
GtkCheckMenuItem *menubar_menuitem;
|
GtkCheckMenuItem *menubar_menuitem;
|
||||||
GtkCheckMenuItem *toolbar_menuitem;
|
GtkCheckMenuItem *toolbar_menuitem;
|
||||||
|
GtkWidget *customize_menuitem;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nsgtk_developer_submenu {
|
struct nsgtk_developer_submenu {
|
||||||
|
|
|
@ -757,19 +757,16 @@ static void nsgtk_menu_connect_signals(struct nsgtk_scaffolding *g)
|
||||||
"toggled",
|
"toggled",
|
||||||
G_CALLBACK(nsgtk_on_menubar_activate_menu),
|
G_CALLBACK(nsgtk_on_menubar_activate_menu),
|
||||||
g);
|
g);
|
||||||
g_signal_connect(g->burger_menu->view_submenu->toolbars_submenu->menubar_menuitem,
|
|
||||||
"toggled",
|
|
||||||
G_CALLBACK(nsgtk_on_menubar_activate_menu),
|
|
||||||
g);
|
|
||||||
|
|
||||||
g_signal_connect(g->menu_bar->view_submenu->toolbars_submenu->toolbar_menuitem,
|
g_signal_connect(g->menu_bar->view_submenu->toolbars_submenu->toolbar_menuitem,
|
||||||
"toggled",
|
"toggled",
|
||||||
G_CALLBACK(nsgtk_on_toolbar_activate_menu),
|
G_CALLBACK(nsgtk_on_toolbar_activate_menu),
|
||||||
g);
|
g);
|
||||||
g_signal_connect(g->burger_menu->view_submenu->toolbars_submenu->toolbar_menuitem,
|
g_signal_connect(g->menu_bar->view_submenu->toolbars_submenu->customize_menuitem,
|
||||||
"toggled",
|
"activate",
|
||||||
G_CALLBACK(nsgtk_on_toolbar_activate_menu),
|
G_CALLBACK(nsgtk_on_customize_activate_menu),
|
||||||
g);
|
g);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -791,6 +788,18 @@ create_scaffolding_burger_menu(struct nsgtk_scaffolding *gs,
|
||||||
if (nmenu == NULL) {
|
if (nmenu == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
g_signal_connect(nmenu->view_submenu->toolbars_submenu->menubar_menuitem,
|
||||||
|
"toggled",
|
||||||
|
G_CALLBACK(nsgtk_on_menubar_activate_menu),
|
||||||
|
gs);
|
||||||
|
g_signal_connect(nmenu->view_submenu->toolbars_submenu->toolbar_menuitem,
|
||||||
|
"toggled",
|
||||||
|
G_CALLBACK(nsgtk_on_toolbar_activate_menu),
|
||||||
|
gs);
|
||||||
|
g_signal_connect(nmenu->view_submenu->toolbars_submenu->customize_menuitem,
|
||||||
|
"activate",
|
||||||
|
G_CALLBACK(nsgtk_on_customize_activate_menu),
|
||||||
|
gs);
|
||||||
return nmenu;
|
return nmenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue