diff options
author | Iulian Radu <iulian.radu67@gmail.com> | 2016-07-28 13:34:19 +0300 |
---|---|---|
committer | Iulian Radu <iulian.radu67@gmail.com> | 2016-07-28 14:23:43 +0300 |
commit | ff3510fb379830b32674134cc78e709d66ad3342 (patch) | |
tree | bee1eee7b95c803cc12ebb12c0297370d69f277b | |
parent | 5dfb8f9a2ccd843964f73e72b3d03eda370c2d91 (diff) | |
download | epiphany-ff3510fb379830b32674134cc78e709d66ad3342.tar.gz |
ephy-window: Remove unnecessary GtkUIManager
-rw-r--r-- | src/bookmarks/ephy-bookmarks-ui.c | 2 | ||||
-rw-r--r-- | src/ephy-window.c | 42 |
2 files changed, 2 insertions, 42 deletions
diff --git a/src/bookmarks/ephy-bookmarks-ui.c b/src/bookmarks/ephy-bookmarks-ui.c index 52b5920c0..ea883652e 100644 --- a/src/bookmarks/ephy-bookmarks-ui.c +++ b/src/bookmarks/ephy-bookmarks-ui.c @@ -184,7 +184,7 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window) data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY); g_return_if_fail (data == NULL); - manager = ephy_window_get_ui_manager (window); + manager = gtk_ui_manager_new (); data = g_new0 (BookmarksWindowData, 1); g_object_set_data_full (G_OBJECT (window), BM_WINDOW_DATA_KEY, data, g_free); diff --git a/src/ephy-window.c b/src/ephy-window.c index aef91b93c..465af0f7d 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -139,7 +139,6 @@ struct _EphyWindow { GtkApplicationWindow parent_instance; GtkWidget *toolbar; - GtkUIManager *manager; GHashTable *action_labels; GtkNotebook *notebook; EphyEmbed *active_embed; @@ -945,16 +944,6 @@ const struct { { "search-selection", NULL } }; -static void -setup_ui_manager (EphyWindow *window) -{ - GtkUIManager *manager; - - manager = gtk_ui_manager_new (); - - window->manager = manager; -} - static char * calculate_location (const char *typed_address, const char *address) { @@ -2604,7 +2593,6 @@ static void ephy_window_dispose (GObject *object) { EphyWindow *window = EPHY_WINDOW (object); - GSList *popups; LOG ("EphyWindow dispose %p", window); @@ -2614,14 +2602,6 @@ ephy_window_dispose (GObject *object) ephy_bookmarks_ui_detach_window (window); - /* Deactivate menus */ - popups = gtk_ui_manager_get_toplevels (window->manager, GTK_UI_MANAGER_POPUP); - g_slist_foreach (popups, (GFunc)gtk_menu_shell_deactivate, NULL); - g_slist_free (popups); - - g_object_unref (window->manager); - window->manager = NULL; - _ephy_window_set_context_event (window, NULL); g_clear_object (&window->hit_test_result); @@ -2996,8 +2976,7 @@ ephy_window_constructor (GType type, settings_change_notify (settings, window); - /* Setup the UI manager and connect verbs */ - setup_ui_manager (window); + /* Setup tab accels */ setup_tab_accels (window); window->notebook = setup_notebook (window); @@ -3082,9 +3061,6 @@ ephy_window_constructor (GType type, * our super menu manually when running outside the Shell. */ gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (window), FALSE); - /* ensure the UI is updated */ - gtk_ui_manager_ensure_update (window->manager); - init_menu_updaters (window); ephy_window_set_chrome (window, chrome); @@ -3175,22 +3151,6 @@ ephy_window_new (void) } /** - * ephy_window_get_ui_manager: - * @window: an #EphyWindow - * - * Returns this window's UI manager. - * - * Return value: (transfer none): an #GtkUIManager - **/ -GtkUIManager * -ephy_window_get_ui_manager (EphyWindow *window) -{ - g_return_val_if_fail (EPHY_IS_WINDOW (window), NULL); - - return window->manager; -} - -/** * ephy_window_get_notebook: * @window: an #EphyWindow * |