aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-01-02 06:57:16 +0800
committerChristian Persch <chpe@src.gnome.org>2004-01-02 06:57:16 +0800
commit05b3184b5d074180c6a730e55b57ced1d5d480db (patch)
tree655829b92f263adbdf8aa4a917a6734e70508cdf /src/ephy-window.c
parentab98ba5308fd8065876b480b799dc591893383e8 (diff)
downloadgsoc2013-epiphany-05b3184b5d074180c6a730e55b57ced1d5d480db.tar
gsoc2013-epiphany-05b3184b5d074180c6a730e55b57ced1d5d480db.tar.gz
gsoc2013-epiphany-05b3184b5d074180c6a730e55b57ced1d5d480db.tar.bz2
gsoc2013-epiphany-05b3184b5d074180c6a730e55b57ced1d5d480db.tar.lz
gsoc2013-epiphany-05b3184b5d074180c6a730e55b57ced1d5d480db.tar.xz
gsoc2013-epiphany-05b3184b5d074180c6a730e55b57ced1d5d480db.tar.zst
gsoc2013-epiphany-05b3184b5d074180c6a730e55b57ced1d5d480db.zip
New API to get the EphyTab from an EphyEmbed. Port all users.
2004-01-01 Christian Persch <chpe@cvs.gnome.org> * src/ephy-notebook.c: (notebook_drag_data_received_cb), (ephy_notebook_insert_page), (ephy_notebook_remove_page): * src/ephy-tab.c: (ephy_tab_for_embed), (ephy_tab_init): * src/ephy-tab.h: * src/ephy-tabs-menu.c: (tab_added_cb), (tab_removed_cb): * src/ephy-window.c: (tab_context_menu_cb), (tab_added_cb), (tab_removed_cb), (real_get_active_tab), (ephy_window_get_tabs): New API to get the EphyTab from an EphyEmbed. Port all users.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 579e3e301..a7f1449c1 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1196,7 +1196,7 @@ tab_context_menu_cb (EphyEmbed *embed,
g_return_val_if_fail (EPHY_IS_EMBED (embed), FALSE);
g_return_val_if_fail (EPHY_IS_EMBED_EVENT(event), FALSE);
- tab = EPHY_TAB (g_object_get_data (G_OBJECT (embed), "EphyTab"));
+ tab = ephy_tab_for_embed (embed);
g_return_val_if_fail (EPHY_IS_TAB (tab), FALSE);
g_return_val_if_fail (window->priv->active_tab == tab, FALSE);
@@ -1356,12 +1356,12 @@ update_tabs_menu_sensitivity (EphyWindow *window)
}
static void
-tab_added_cb (EphyNotebook *notebook, GtkWidget *child, EphyWindow *window)
+tab_added_cb (EphyNotebook *notebook, EphyEmbed *embed, EphyWindow *window)
{
EphyTab *tab;
- g_return_if_fail (EPHY_IS_EMBED (child));
- tab = EPHY_TAB (g_object_get_data (G_OBJECT (child), "EphyTab"));
+ g_return_if_fail (EPHY_IS_EMBED (embed));
+ tab = ephy_tab_for_embed (embed);
window->priv->num_tabs++;
@@ -1372,12 +1372,12 @@ tab_added_cb (EphyNotebook *notebook, GtkWidget *child, EphyWindow *window)
}
static void
-tab_removed_cb (EphyNotebook *notebook, GtkWidget *child, EphyWindow *window)
+tab_removed_cb (EphyNotebook *notebook, EphyEmbed *embed, EphyWindow *window)
{
EphyTab *tab;
- g_return_if_fail (EPHY_IS_EMBED (child));
- tab = EPHY_TAB (g_object_get_data (G_OBJECT (child), "EphyTab"));
+ g_return_if_fail (EPHY_IS_EMBED (embed));
+ tab = ephy_tab_for_embed (embed);
g_signal_handlers_disconnect_by_func (G_OBJECT (tab),
G_CALLBACK (sync_tab_visibility),
@@ -1798,7 +1798,7 @@ real_get_active_tab (EphyWindow *window, int page_num)
page_num);
g_return_val_if_fail (GTK_IS_WIDGET (embed_widget), NULL);
- tab = g_object_get_data (G_OBJECT (embed_widget), "EphyTab");
+ tab = ephy_tab_for_embed (EPHY_EMBED (embed_widget));
g_return_val_if_fail (EPHY_IS_TAB (tab), NULL);
return tab;
@@ -1925,8 +1925,9 @@ ephy_window_get_tabs (EphyWindow *window)
{
EphyTab *tab;
- tab = g_object_get_data (G_OBJECT (w), "EphyTab");
- g_return_val_if_fail (EPHY_IS_TAB (G_OBJECT (tab)), NULL);
+ g_return_val_if_fail (EPHY_IS_EMBED (w), NULL);
+ tab = ephy_tab_for_embed (EPHY_EMBED (w));
+ g_return_val_if_fail (EPHY_IS_TAB (tab), NULL);
tabs = g_list_prepend (tabs, tab);
i++;