diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-09-24 20:06:06 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-09-24 20:06:06 +0800 |
commit | 3844f2dc783a6e505e7f114bc1a747e5c040021c (patch) | |
tree | da57bb88871a1ce0e5ec47311522507647d61556 /src/ephy-window.c | |
parent | 330bb03126170f0be6527c71f44654aeefd46514 (diff) | |
download | gsoc2013-epiphany-3844f2dc783a6e505e7f114bc1a747e5c040021c.tar gsoc2013-epiphany-3844f2dc783a6e505e7f114bc1a747e5c040021c.tar.gz gsoc2013-epiphany-3844f2dc783a6e505e7f114bc1a747e5c040021c.tar.bz2 gsoc2013-epiphany-3844f2dc783a6e505e7f114bc1a747e5c040021c.tar.lz gsoc2013-epiphany-3844f2dc783a6e505e7f114bc1a747e5c040021c.tar.xz gsoc2013-epiphany-3844f2dc783a6e505e7f114bc1a747e5c040021c.tar.zst gsoc2013-epiphany-3844f2dc783a6e505e7f114bc1a747e5c040021c.zip |
Dave Bordoley <bordoley@msu.edu>
2003-09-24 Marco Pesenti Gritti <marco@gnome.org>
Dave Bordoley <bordoley@msu.edu>
* src/ephy-tab.c: (ephy_tab_action_activate_cb), (ephy_tab_init):
* src/ephy-tabs-menu.c: (tab_added_cb), (tab_removed_cb),
(ephy_tabs_menu_set_window), (ephy_tabs_menu_set_property),
(ephy_tabs_menu_class_init), (ephy_tabs_menu_init),
(ephy_tabs_menu_clean), (ephy_tabs_menu_update):
* src/ephy-window.c: (ephy_window_set_active_tab), (tab_added_cb),
(tab_removed_cb), (tabs_reordered_cb):
Use radio buttons for tabs menu. Do not recreate the
action group every time but keep it synced.
* src/ephy-notebook.c: (ephy_notebook_insert_page):
Emit added signal before activating the page.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 367c91e73..bdbd7822e 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -55,6 +55,7 @@ #include <gdk/gdkx.h> #include <gdk/gdkkeysyms.h> #include <gtk/gtkactiongroup.h> +#include <gtk/gtktoggleaction.h> #include <gtk/gtkuimanager.h> #include <gtk/gtktoggleaction.h> @@ -1128,6 +1129,8 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab) if (new_tab) { + GtkToggleAction *action; + sync_tab_address (new_tab, NULL, window); sync_tab_icon (new_tab, NULL, window); sync_tab_load_progress (new_tab, NULL, window); @@ -1179,6 +1182,9 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab) g_signal_connect_object (embed, "ge_context_menu", G_CALLBACK (tab_context_menu_cb), window, 0); + + action = GTK_TOGGLE_ACTION (ephy_tab_get_action (new_tab)); + gtk_toggle_action_set_active (action, TRUE); } } @@ -1214,13 +1220,6 @@ update_tabs_menu_sensitivity (EphyWindow *window) } static void -update_tabs_menu (EphyWindow *window) -{ - update_tabs_menu_sensitivity (window); - ephy_tabs_menu_update (window->priv->tabs_menu); -} - -static void tab_added_cb (EphyNotebook *notebook, GtkWidget *child, EphyWindow *window) { EphyTab *tab; @@ -1230,7 +1229,7 @@ tab_added_cb (EphyNotebook *notebook, GtkWidget *child, EphyWindow *window) window->priv->num_tabs++; - update_tabs_menu (window); + update_tabs_menu_sensitivity (window); g_signal_connect_object (G_OBJECT (tab), "notify::visible", G_CALLBACK (sync_tab_visibility), window, 0); @@ -1257,7 +1256,7 @@ tab_removed_cb (EphyNotebook *notebook, GtkWidget *child, EphyWindow *window) } else { - update_tabs_menu (window); + update_tabs_menu_sensitivity (window); } } @@ -1280,7 +1279,8 @@ tab_detached_cb (EphyNotebook *notebook, GtkWidget *child, static void tabs_reordered_cb (EphyNotebook *notebook, EphyWindow *window) { - update_tabs_menu (window); + update_tabs_menu_sensitivity (window); + ephy_tabs_menu_update (window->priv->tabs_menu); } static GtkNotebook * |