aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-tabs-menu.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-09-14 04:46:14 +0800
committerChristian Persch <chpe@src.gnome.org>2004-09-14 04:46:14 +0800
commitbf60b7ae05e75e10a8f15ec8ca2635874c4dab90 (patch)
tree141774e6817ed54e8bab9e6a0ea362f3cc19b148 /src/ephy-tabs-menu.c
parent816da20fe31c6186a80ef92fe824ccd9088f9a15 (diff)
downloadgsoc2013-epiphany-bf60b7ae05e75e10a8f15ec8ca2635874c4dab90.tar
gsoc2013-epiphany-bf60b7ae05e75e10a8f15ec8ca2635874c4dab90.tar.gz
gsoc2013-epiphany-bf60b7ae05e75e10a8f15ec8ca2635874c4dab90.tar.bz2
gsoc2013-epiphany-bf60b7ae05e75e10a8f15ec8ca2635874c4dab90.tar.lz
gsoc2013-epiphany-bf60b7ae05e75e10a8f15ec8ca2635874c4dab90.tar.xz
gsoc2013-epiphany-bf60b7ae05e75e10a8f15ec8ca2635874c4dab90.tar.zst
gsoc2013-epiphany-bf60b7ae05e75e10a8f15ec8ca2635874c4dab90.zip
Add ephy_window_get_ui_manager(), and remove the manager from the public
2004-09-13 Christian Persch <chpe@cvs.gnome.org> * data/art/epiphany-entry.png: * src/bookmarks/ephy-bookmarks-menu.c: (ephy_bookmarks_menu_set_window): * src/bookmarks/ephy-bookmarksbar.c: (ephy_bookmarksbar_set_window): * src/bookmarks/ephy-favorites-menu.c: (ephy_favorites_menu_clean), (ephy_favorites_menu_rebuild): * src/ephy-encoding-menu.c: (ephy_encoding_menu_set_window): * src/ephy-tabs-menu.c: (ephy_tabs_menu_set_window), (ephy_tabs_menu_clean), (ephy_tabs_menu_update): * src/ephy-window.c: (add_widget), (sync_chromes_visibility), (ephy_window_key_press_event), (init_menu_updaters), (setup_ui_manager), (show_embed_popup), (ephy_window_init), (ephy_window_finalize), (ephy_window_set_print_preview), (ephy_window_get_ui_manager): * src/ephy-window.h: * src/ppview-toolbar.c: (ppview_toolbar_set_window): * src/toolbar.c: (toolbar_set_window), (toolbar_new): * src/window-commands.c: (window_cmd_edit_toolbar): Add ephy_window_get_ui_manager(), and remove the manager from the public EphyWindow struct.
Diffstat (limited to 'src/ephy-tabs-menu.c')
-rw-r--r--src/ephy-tabs-menu.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c
index c780144ea..6d59d2ba8 100644
--- a/src/ephy-tabs-menu.c
+++ b/src/ephy-tabs-menu.c
@@ -142,13 +142,13 @@ static void
ephy_tabs_menu_set_window (EphyTabsMenu *menu, EphyWindow *window)
{
GtkWidget *notebook;
- GtkUIManager *merge;
+ GtkUIManager *manager;
menu->priv->window = window;
- merge = GTK_UI_MANAGER (window->ui_merge);
+ manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window));
menu->priv->action_group = gtk_action_group_new ("TabsActions");
- gtk_ui_manager_insert_action_group (merge, menu->priv->action_group, -1);
+ gtk_ui_manager_insert_action_group (manager, menu->priv->action_group, -1);
g_object_unref (menu->priv->action_group);
g_signal_connect (menu->priv->action_group, "connect-proxy",
@@ -229,12 +229,12 @@ static void
ephy_tabs_menu_clean (EphyTabsMenu *menu)
{
EphyTabsMenuPrivate *p = menu->priv;
- GtkUIManager *merge = GTK_UI_MANAGER (p->window->ui_merge);
+ GtkUIManager *manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (p->window));
if (p->ui_id > 0)
{
- gtk_ui_manager_remove_ui (merge, p->ui_id);
- gtk_ui_manager_ensure_update (merge);
+ gtk_ui_manager_remove_ui (manager, p->ui_id);
+ gtk_ui_manager_ensure_update (manager);
p->ui_id = 0;
}
}
@@ -294,17 +294,13 @@ tab_set_action_accelerator (GtkActionGroup *action_group,
void
ephy_tabs_menu_update (EphyTabsMenu *menu)
{
- EphyTabsMenuPrivate *p;
- GtkUIManager *merge;
+ EphyTabsMenuPrivate *p = menu->priv;
+ GtkUIManager *manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (p->window));
EphyTab *tab;
GtkAction *action;
guint i = 0;
GList *tabs = NULL, *l;
- g_return_if_fail (EPHY_IS_TABS_MENU (menu));
- p = menu->priv;
- merge = GTK_UI_MANAGER (p->window->ui_merge);
-
LOG ("Rebuilding open tabs menu")
START_PROFILER ("Rebuilding tabs menu")
@@ -315,7 +311,7 @@ ephy_tabs_menu_update (EphyTabsMenu *menu)
if (g_list_length (tabs) == 0) return;
- p->ui_id = gtk_ui_manager_new_merge_id (merge);
+ p->ui_id = gtk_ui_manager_new_merge_id (manager);
for (l = tabs; l != NULL; l = l->next)
{
@@ -329,7 +325,7 @@ ephy_tabs_menu_update (EphyTabsMenu *menu)
tab_set_action_accelerator (p->action_group, action, i++);
- gtk_ui_manager_add_ui (merge, p->ui_id,
+ gtk_ui_manager_add_ui (manager, p->ui_id,
"/menubar/TabsMenu/TabsOpen",
name, action_name,
GTK_UI_MANAGER_MENUITEM, FALSE);