diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-09-24 21:52:48 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-09-24 21:52:48 +0800 |
commit | 6207b89fee0b0d515789256374493ae149046474 (patch) | |
tree | 5503ae08d6923cf9ebc0d1a7605ba6b82101b084 | |
parent | d39f450226f19adf4db9d209a9cec77fccd7f509 (diff) | |
download | gsoc2013-epiphany-6207b89fee0b0d515789256374493ae149046474.tar gsoc2013-epiphany-6207b89fee0b0d515789256374493ae149046474.tar.gz gsoc2013-epiphany-6207b89fee0b0d515789256374493ae149046474.tar.bz2 gsoc2013-epiphany-6207b89fee0b0d515789256374493ae149046474.tar.lz gsoc2013-epiphany-6207b89fee0b0d515789256374493ae149046474.tar.xz gsoc2013-epiphany-6207b89fee0b0d515789256374493ae149046474.tar.zst gsoc2013-epiphany-6207b89fee0b0d515789256374493ae149046474.zip |
Simplify and solve bugs by using a checkbox with radio appeareance. That
2003-09-24 Marco Pesenti Gritti <marco@gnome.org>
* src/ephy-tab.c: (ephy_tab_init):
* src/ephy-tabs-menu.c: (tab_added_cb), (tab_removed_cb),
(ephy_tabs_menu_init):
* src/ephy-window.c: (ephy_window_set_active_tab):
Simplify and solve bugs by using a checkbox with radio
appeareance. That way we can get rid of groups that
doesnt really work well for our needs.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | src/ephy-tab.c | 5 | ||||
-rw-r--r-- | src/ephy-tabs-menu.c | 6 | ||||
-rw-r--r-- | src/ephy-window.c | 6 |
4 files changed, 18 insertions, 10 deletions
@@ -1,5 +1,16 @@ 2003-09-24 Marco Pesenti Gritti <marco@gnome.org> + * src/ephy-tab.c: (ephy_tab_init): + * src/ephy-tabs-menu.c: (tab_added_cb), (tab_removed_cb), + (ephy_tabs_menu_init): + * src/ephy-window.c: (ephy_window_set_active_tab): + + Simplify and solve bugs by using a checkbox with radio + appeareance. That way we can get rid of groups that + doesnt really work well for our needs. + +2003-09-24 Marco Pesenti Gritti <marco@gnome.org> + * data/epiphany.schemas.in: correct wrong key diff --git a/src/ephy-tab.c b/src/ephy-tab.c index 8e5b4605a..e0455a194 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -71,7 +71,7 @@ struct EphyTabPrivate int total_requests; int width; int height; - GtkRadioAction *action; + GtkToggleAction *action; float zoom; EmbedSecurityLevel security_level; TabNavigationFlags nav_flags; @@ -1010,9 +1010,10 @@ ephy_tab_init (EphyTab *tab) id = g_strdup_printf ("Tab%lu", tab_id++); - tab->priv->action = g_object_new (GTK_TYPE_RADIO_ACTION, + tab->priv->action = g_object_new (GTK_TYPE_TOGGLE_ACTION, "name", id, "label", _("Blank page"), + "draw_as_radio", TRUE, NULL); g_free (id); diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c index 4a6e7ca25..9b7c6c6fc 100644 --- a/src/ephy-tabs-menu.c +++ b/src/ephy-tabs-menu.c @@ -48,7 +48,6 @@ struct _EphyTabsMenuPrivate { EphyWindow *window; GtkActionGroup *action_group; - GSList *radio_group; guint ui_id; }; @@ -108,9 +107,6 @@ tab_added_cb (EphyNotebook *notebook, GtkWidget *child, EphyTabsMenu *menu) action = GTK_ACTION (ephy_tab_get_action (tab)); gtk_action_group_add_action (menu->priv->action_group, action); - gtk_radio_action_set_group (GTK_RADIO_ACTION (action), menu->priv->radio_group); - menu->priv->radio_group = gtk_radio_action_get_group (GTK_RADIO_ACTION (action)); - ephy_tabs_menu_update (menu); } @@ -124,7 +120,6 @@ tab_removed_cb (EphyNotebook *notebook, GtkWidget *child, EphyTabsMenu *menu) tab = EPHY_TAB (g_object_get_data (G_OBJECT (child), "EphyTab")); action = GTK_ACTION (ephy_tab_get_action (tab)); - gtk_radio_action_set_group (GTK_RADIO_ACTION (action), NULL); gtk_action_group_remove_action (menu->priv->action_group, action); ephy_tabs_menu_update (menu); @@ -209,7 +204,6 @@ ephy_tabs_menu_init (EphyTabsMenu *menu) menu->priv = EPHY_TABS_MENU_GET_PRIVATE (menu); menu->priv->ui_id = 0; - menu->priv->radio_group = NULL; menu->priv->action_group = NULL; } diff --git a/src/ephy-window.c b/src/ephy-window.c index bdbd7822e..89f337db3 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1081,6 +1081,7 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab) { EphyTab *old_tab; EphyEmbed *embed; + GtkToggleAction *action; g_return_if_fail (EPHY_IS_WINDOW (window)); if (ephy_tab_get_window (new_tab) != window) return; @@ -1123,14 +1124,15 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab) g_signal_handlers_disconnect_by_func (G_OBJECT (embed), G_CALLBACK (tab_context_menu_cb), window); + + action = GTK_TOGGLE_ACTION (ephy_tab_get_action (old_tab)); + gtk_toggle_action_set_active (action, FALSE); } window->priv->active_tab = 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); |