aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-02-11 06:37:15 +0800
committerChristian Persch <chpe@src.gnome.org>2005-02-11 06:37:15 +0800
commitda3e75ecba1dbc62ee1f6c9e1970f4c140fbef0d (patch)
treedcadd2684a1160fe078833c86c1a8f9d74aaaeb6 /src/ephy-window.c
parentb48d4a6f2f65afa8b982e09929c67dbfe438d54b (diff)
downloadgsoc2013-epiphany-da3e75ecba1dbc62ee1f6c9e1970f4c140fbef0d.tar
gsoc2013-epiphany-da3e75ecba1dbc62ee1f6c9e1970f4c140fbef0d.tar.gz
gsoc2013-epiphany-da3e75ecba1dbc62ee1f6c9e1970f4c140fbef0d.tar.bz2
gsoc2013-epiphany-da3e75ecba1dbc62ee1f6c9e1970f4c140fbef0d.tar.lz
gsoc2013-epiphany-da3e75ecba1dbc62ee1f6c9e1970f4c140fbef0d.tar.xz
gsoc2013-epiphany-da3e75ecba1dbc62ee1f6c9e1970f4c140fbef0d.tar.zst
gsoc2013-epiphany-da3e75ecba1dbc62ee1f6c9e1970f4c140fbef0d.zip
Remove ephy_tab_get_action(). Adapts the tabs menu accordingly.
2005-02-10 Christian Persch <chpe@cvs.gnome.org> * src/ephy-tab.c: (ephy_tab_finalize), (ephy_tab_title_cb), (ensure_page_info), (ephy_tab_init), (ephy_tab_set_title), (ephy_tab_get_title), (ephy_tab_get_zoom): * src/ephy-tab.h: * src/ephy-tabs-menu.c: (ephy_tabs_menu_get_type), (tab_action_activate_cb), (sync_tab_title), (tab_added_cb), (tab_removed_cb), (tabs_reordered_cb), (sync_active_tab), (ephy_tabs_menu_set_window), (ephy_tabs_menu_set_property), (ephy_tabs_menu_get_property), (ephy_tabs_menu_class_init), (ephy_tabs_menu_clean), (tab_set_action_accelerator), (ephy_tabs_menu_update): * src/ephy-window.c: (ephy_window_set_active_tab), (ephy_window_get_active_embed): Remove ephy_tab_get_action(). Adapts the tabs menu accordingly.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 6ea4fbe27..77953976c 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1816,7 +1816,6 @@ 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));
g_return_if_fail (gtk_widget_get_toplevel (GTK_WIDGET (new_tab)) == GTK_WIDGET (window));
@@ -1825,7 +1824,7 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
if (old_tab == new_tab) return;
- if (old_tab)
+ if (old_tab != NULL)
{
g_signal_handlers_disconnect_by_func (G_OBJECT (old_tab),
G_CALLBACK (sync_tab_address),
@@ -1868,14 +1867,11 @@ 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)
+ if (new_tab != NULL)
{
sync_tab_address (new_tab, NULL, window);
sync_tab_document_type (new_tab, NULL, window);
@@ -1944,9 +1940,6 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
G_CALLBACK (tab_context_menu_cb),
window, G_CONNECT_AFTER);
- action = GTK_TOGGLE_ACTION (ephy_tab_get_action (new_tab));
- gtk_toggle_action_set_active (action, TRUE);
-
g_object_notify (G_OBJECT (window), "active-tab");
}
}
@@ -3096,7 +3089,7 @@ ephy_window_get_active_embed (EphyWindow *window)
g_return_val_if_fail (EPHY_IS_WINDOW (window), NULL);
tab = ephy_window_get_active_tab (window);
- g_return_val_if_fail (EPHY_IS_TAB (tab), NULL);
+ if (tab == NULL) return NULL;
return ephy_tab_get_embed (tab);
}