diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-12-19 22:35:55 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-12-19 22:35:55 +0800 |
commit | cb85297cd231771cd22913f39fe2a71aa8c53849 (patch) | |
tree | 04361ac93771f0b69da9a4745d7fc6cd52848d9d | |
parent | 5511b6207788fccebd0a9110d8cbf4eaa8c66b5e (diff) | |
download | gsoc2013-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.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | src/ephy-tab.c | 7 | ||||
-rw-r--r-- | src/ephy-window.c | 62 |
3 files changed, 50 insertions, 31 deletions
@@ -1,5 +1,17 @@ 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. + +2003-12-19 Christian Persch <chpe@cvs.gnome.org> + * src/prefs-dialog.c: (add_lang_dialog_response_cb): Remove debug output leftovers. diff --git a/src/ephy-tab.c b/src/ephy-tab.c index 65c2af8c4..e40e51207 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -1015,6 +1015,9 @@ ephy_tab_dom_mouse_click_cb (EphyEmbed *embed, context = ephy_embed_event_get_context (event); modifier = ephy_embed_event_get_modifier (event); + LOG ("ephy_tab_dom_mouse_click_cb: type %d, context %x, modifier %x", + type, context, modifier) + with_control = (modifier & GDK_CONTROL_MASK) != 0; with_shift = (modifier & GDK_SHIFT_MASK) != 0; is_left_click = (type == EPHY_EMBED_EVENT_MOUSE_BUTTON1); @@ -1045,8 +1048,8 @@ ephy_tab_dom_mouse_click_cb (EphyEmbed *embed, { save_property_url (embed, event, "link", CONF_STATE_DOWNLOAD_DIR); } - /* shift+click saves the non-link image, except when it's the submit - * button for a form + /* shift+click saves the non-link image + * Note: pressing enter to submit a form synthesizes a mouse click event */ else if (is_image && is_left_click && with_shift && !is_input) { 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 |