[epiphany/wip/gtkaction-to-gaction: 6/6] ephy-window: Remove unnecessary GtkUIManager
- From: Iulian Radu <iulianradu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/gtkaction-to-gaction: 6/6] ephy-window: Remove unnecessary GtkUIManager
- Date: Thu, 28 Jul 2016 11:27:22 +0000 (UTC)
commit ff3510fb379830b32674134cc78e709d66ad3342
Author: Iulian Radu <iulian radu67 gmail com>
Date: Thu Jul 28 13:34:19 2016 +0300
ephy-window: Remove unnecessary GtkUIManager
src/bookmarks/ephy-bookmarks-ui.c | 2 +-
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 52b5920..ea88365 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 aef91b9..465af0f 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
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]