aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-12-19 22:35:55 +0800
committerChristian Persch <chpe@src.gnome.org>2003-12-19 22:35:55 +0800
commitcb85297cd231771cd22913f39fe2a71aa8c53849 (patch)
tree04361ac93771f0b69da9a4745d7fc6cd52848d9d /src/ephy-window.c
parent5511b6207788fccebd0a9110d8cbf4eaa8c66b5e (diff)
downloadgsoc2013-epiphany-cb85297cd231771cd22913f39fe2a71aa8c53849.tar
gsoc2013-epiphany-cb85297cd231771cd22913f39fe2a71aa8c53849.tar.gz
gsoc2013-epiphany-cb85297cd231771cd22913f39fe2a71aa8c53849.tar.bz2
gsoc2013-epiphany-cb85297cd231771cd22913f39fe2a71aa8c53849.tar.lz
gsoc2013-epiphany-cb85297cd231771cd22913f39fe2a71aa8c53849.tar.xz
gsoc2013-epiphany-cb85297cd231771cd22913f39fe2a71aa8c53849.tar.zst
gsoc2013-epiphany-cb85297cd231771cd22913f39fe2a71aa8c53849.zip
Improve comment.
2003-12-19 Christian Persch <chpe@cvs.gnome.org> * src/ephy-tab.c: (ephy_tab_dom_mouse_click_cb): Improve comment. * src/ephy-window.c: (setup_ui_manager), (setup_notebook), (ephy_window_init): Only show the toolbar after the extensions have been attached to the window.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c62
1 files changed, 33 insertions, 29 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 1a9289150..333205d62 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -733,7 +733,7 @@ init_menu_updaters (EphyWindow *window)
}
static void
-setup_window (EphyWindow *window)
+setup_ui_manager (EphyWindow *window)
{
GtkActionGroup *action_group;
GtkAction *action;
@@ -805,23 +805,6 @@ setup_window (EphyWindow *window)
g_warning ("Could not merge epiphany-ui.xml: %s", err->message);
g_clear_error (&err);
}
-
- gtk_ui_manager_ensure_update (GTK_UI_MANAGER (window->ui_merge));
-
- init_menu_updaters (window);
-
- window->priv->toolbar = toolbar_new (window);
- gtk_widget_show (GTK_WIDGET (window->priv->toolbar));
- gtk_box_pack_end (GTK_BOX (window->priv->menu_dock),
- GTK_WIDGET (window->priv->toolbar),
- FALSE, FALSE, 0);
- g_signal_connect (window,
- "selection-received",
- G_CALLBACK (ephy_window_selection_received_cb),
- window);
- g_signal_connect (window, "window-state-event",
- G_CALLBACK (ephy_window_state_event_cb),
- window);
}
static void
@@ -1460,8 +1443,6 @@ setup_notebook (EphyWindow *window)
g_signal_connect (G_OBJECT (notebook), "tabs_reordered",
G_CALLBACK (tabs_reordered_cb), window);
- gtk_widget_show (GTK_WIDGET (notebook));
-
return notebook;
}
@@ -1610,31 +1591,53 @@ ephy_window_init (EphyWindow *window)
ensure_default_icon ();
- /* Setup the window and connect verbs */
- setup_window (window);
+ g_object_ref (ephy_shell);
+
+ /* Setup the UI manager and connect verbs */
+ setup_ui_manager (window);
+
+ window->priv->toolbar = toolbar_new (window);
+ gtk_box_pack_end (GTK_BOX (window->priv->menu_dock),
+ GTK_WIDGET (window->priv->toolbar),
+ FALSE, FALSE, 0);
+
- /* Setup window contents */
window->priv->notebook = setup_notebook (window);
gtk_box_pack_start (GTK_BOX (window->priv->main_vbox),
GTK_WIDGET (window->priv->notebook),
TRUE, TRUE, 0);
window->priv->statusbar = statusbar_new ();
- gtk_widget_show (window->priv->statusbar);
gtk_box_pack_start (GTK_BOX (window->priv->main_vbox),
GTK_WIDGET (window->priv->statusbar),
FALSE, TRUE, 0);
window->priv->tab_message_cid = gtk_statusbar_get_context_id
(GTK_STATUSBAR (window->priv->statusbar), "tab_message");
- g_object_ref (ephy_shell);
-
/* Initialize the menus */
window->priv->tabs_menu = ephy_tabs_menu_new (window);
window->priv->fav_menu = ephy_favorites_menu_new (window);
window->priv->enc_menu = ephy_encoding_menu_new (window);
window->priv->bmk_menu = ephy_bookmarks_menu_new (window);
+ /* Once the window is sufficiently created let the extensions attach to it */
+ manager = EPHY_EXTENSION (ephy_shell_get_extensions_manager (ephy_shell));
+ ephy_extension_attach_window (manager, window);
+
+ /* show widgets */
+ gtk_widget_show (GTK_WIDGET (window->priv->toolbar));
+ gtk_widget_show (GTK_WIDGET (window->priv->notebook));
+ gtk_widget_show (window->priv->statusbar);
+
+ g_signal_connect (window,
+ "selection-received",
+ G_CALLBACK (ephy_window_selection_received_cb),
+ window);
+ g_signal_connect (window, "window-state-event",
+ G_CALLBACK (ephy_window_state_event_cb),
+ window);
+
+ /* lockdown pref notifiers */
window->priv->disable_js_chrome_notifier_id = eel_gconf_notification_add
(CONF_LOCKDOWN_DISABLE_JAVASCRIPT_CHROME,
(GConfClientNotifyFunc)chrome_notifier, window);
@@ -1655,9 +1658,10 @@ ephy_window_init (EphyWindow *window)
(CONF_LOCKDOWN_HIDE_MENUBAR,
(GConfClientNotifyFunc)chrome_notifier, window);
- /* Once the window is fully created let the extensions attach to it */
- manager = EPHY_EXTENSION (ephy_shell_get_extensions_manager (ephy_shell));
- ephy_extension_attach_window (manager, window);
+ /* ensure the UI is updated */
+ gtk_ui_manager_ensure_update (GTK_UI_MANAGER (window->ui_merge));
+
+ init_menu_updaters (window);
}
static void