mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 18:52:39 +03:00
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
|
||||
* \param group the 'global' in a gtk sense accelerator reference
|
||||
*/
|
||||
|
||||
static struct nsgtk_toolbars_submenu *nsgtk_menu_toolbars_submenu(
|
||||
GtkAccelGroup *group)
|
||||
* creates a toolbars submenu
|
||||
*
|
||||
* \param group the 'global' in a gtk sense accelerator reference
|
||||
*/
|
||||
static struct nsgtk_toolbars_submenu *
|
||||
nsgtk_menu_toolbars_submenu(GtkAccelGroup *group)
|
||||
{
|
||||
struct nsgtk_toolbars_submenu *ret =
|
||||
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)
|
||||
if (ret->toolbar_menuitem != NULL)
|
||||
gtk_check_menu_item_set_active(ret->toolbar_menuitem, TRUE);
|
||||
ADD_SEP(toolbars, ret);
|
||||
IMAGE_ITEM(toolbars, customize, gtkCustomize, ret, group);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -124,6 +124,7 @@ struct nsgtk_toolbars_submenu {
|
||||
GtkMenu *toolbars_menu;
|
||||
GtkCheckMenuItem *menubar_menuitem;
|
||||
GtkCheckMenuItem *toolbar_menuitem;
|
||||
GtkWidget *customize_menuitem;
|
||||
};
|
||||
|
||||
struct nsgtk_developer_submenu {
|
||||
|
@ -757,19 +757,16 @@ static void nsgtk_menu_connect_signals(struct nsgtk_scaffolding *g)
|
||||
"toggled",
|
||||
G_CALLBACK(nsgtk_on_menubar_activate_menu),
|
||||
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,
|
||||
"toggled",
|
||||
G_CALLBACK(nsgtk_on_toolbar_activate_menu),
|
||||
g);
|
||||
g_signal_connect(g->burger_menu->view_submenu->toolbars_submenu->toolbar_menuitem,
|
||||
"toggled",
|
||||
G_CALLBACK(nsgtk_on_toolbar_activate_menu),
|
||||
g_signal_connect(g->menu_bar->view_submenu->toolbars_submenu->customize_menuitem,
|
||||
"activate",
|
||||
G_CALLBACK(nsgtk_on_customize_activate_menu),
|
||||
g);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -791,6 +788,18 @@ create_scaffolding_burger_menu(struct nsgtk_scaffolding *gs,
|
||||
if (nmenu == 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user