aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2007-11-16 23:03:10 +0800
committerXan Lopez <xan@src.gnome.org>2007-11-16 23:03:10 +0800
commitb7d6a7384621691379618b0be22bef0f58b30414 (patch)
tree378d3377f3290f3461b23f25349579077ff0bdb3 /src
parent1b8bf4b88fb016020c822e5a9208a89ed8ebbdc4 (diff)
downloadgsoc2013-epiphany-b7d6a7384621691379618b0be22bef0f58b30414.tar
gsoc2013-epiphany-b7d6a7384621691379618b0be22bef0f58b30414.tar.gz
gsoc2013-epiphany-b7d6a7384621691379618b0be22bef0f58b30414.tar.bz2
gsoc2013-epiphany-b7d6a7384621691379618b0be22bef0f58b30414.tar.lz
gsoc2013-epiphany-b7d6a7384621691379618b0be22bef0f58b30414.tar.xz
gsoc2013-epiphany-b7d6a7384621691379618b0be22bef0f58b30414.tar.zst
gsoc2013-epiphany-b7d6a7384621691379618b0be22bef0f58b30414.zip
And port all the callers in src/
svn path=/trunk/; revision=7695
Diffstat (limited to 'src')
-rw-r--r--src/ephy-encoding-dialog.c4
-rw-r--r--src/ephy-encoding-menu.c9
-rw-r--r--src/ephy-extensions-manager.c11
-rw-r--r--src/ephy-location-action.c8
-rw-r--r--src/ephy-lockdown.c4
-rw-r--r--src/ephy-navigation-action.c12
-rw-r--r--src/ephy-session.c16
-rw-r--r--src/ephy-shell.c3
-rw-r--r--src/ephy-tabs-menu.c12
-rw-r--r--src/ephy-toolbar.c3
-rw-r--r--src/popup-commands.c20
-rw-r--r--src/ppview-toolbar.c21
-rw-r--r--src/prefs-dialog.c5
-rw-r--r--src/window-commands.c46
14 files changed, 113 insertions, 61 deletions
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index 24db69fa1..4fa23bdf8 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2000, 2001, 2002, 2003 Marco Pesenti Gritti
* Copyright © 2003, 2004 Christian Persch
@@ -24,6 +25,7 @@
#include "ephy-encoding-dialog.h"
#include "ephy-encodings.h"
#include "ephy-embed.h"
+#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
#include "ephy-file-helpers.h"
#include "ephy-shell.h"
@@ -192,7 +194,7 @@ sync_active_tab (EphyWindow *window, GParamSpec *pspec, EphyEncodingDialog *dial
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (dialog->priv->window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (dialog->priv->window));
g_object_set (G_OBJECT (dialog), "embed", embed, NULL);
}
diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c
index b5e6ea90e..edd1e358d 100644
--- a/src/ephy-encoding-menu.c
+++ b/src/ephy-encoding-menu.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2002 Ricardo Fernández Pascual
* Copyright © 2003 Marco Pesenti Gritti
@@ -26,6 +27,7 @@
#include "ephy-encoding-dialog.h"
#include "ephy-encodings.h"
#include "ephy-embed.h"
+#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
#include "ephy-shell.h"
#include "ephy-debug.h"
@@ -159,7 +161,7 @@ update_encoding_menu_cb (GtkAction *dummy, EphyEncodingMenu *menu)
/* get most recently used encodings */
recent = ephy_encodings_get_recent (p->encodings);
- embed = ephy_window_get_active_tab (p->window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (p->window));
encoding = ephy_embed_get_encoding (embed);
if (encoding == NULL) goto build_menu;
@@ -271,7 +273,7 @@ encoding_activate_cb (GtkAction *action, EphyEncodingMenu *menu)
name = gtk_action_get_name (GTK_ACTION (action));
encoding = name + strlen("Encoding");
- embed = ephy_window_get_active_tab (menu->priv->window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (menu->priv->window));
ephy_embed_set_encoding (embed, encoding);
@@ -340,7 +342,8 @@ ephy_encoding_menu_automatic_cb (GtkAction *action, EphyEncodingMenu *menu)
return;
}
- embed = ephy_window_get_active_tab (menu->priv->window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (menu->priv->window));
/* setting "" will clear the forced encoding */
ephy_embed_set_encoding (embed, "");
diff --git a/src/ephy-extensions-manager.c b/src/ephy-extensions-manager.c
index 7d549a697..9d489d1cb 100644
--- a/src/ephy-extensions-manager.c
+++ b/src/ephy-extensions-manager.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2003 Marco Pesenti Gritti
* Copyright © 2003, 2004 Christian Persch
@@ -28,6 +29,8 @@
#include "ephy-loader.h"
#include "ephy-shlib-loader.h"
+#include "ephy-embed-container.h"
+
#include "ephy-node-db.h"
#include "ephy-shell.h"
#include "eel-gconf-extensions.h"
@@ -676,7 +679,8 @@ attach_window (EphyWindow *window,
ephy_extension_attach_window (extension, window);
- tabs = ephy_window_get_tabs (window);
+ tabs = ephy_embed_container_get_children
+ (EPHY_EMBED_CONTAINER (window));
for (l = tabs; l; l = l->next)
{
ephy_extension_attach_tab (extension, window,
@@ -739,7 +743,8 @@ detach_window (EphyWindow *window,
{
GList *tabs, *l;
- tabs = ephy_window_get_tabs (window);
+ tabs = ephy_embed_container_get_children
+ (EPHY_EMBED_CONTAINER (window));
for (l = tabs; l; l = l->next)
{
ephy_extension_detach_tab (extension, window,
@@ -1231,7 +1236,7 @@ impl_detach_window (EphyExtension *extension,
g_object_ref (window);
/* Detach tabs (uses impl_detach_tab) */
- tabs = ephy_window_get_tabs (window);
+ tabs = ephy_embed_container_get_children (EPHY_EMBED_CONTAINER (window));
for (l = tabs; l; l = l->next)
{
ephy_extension_detach_tab (extension, window,
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 584a00e98..713ede9fb 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2003, 2004 Marco Pesenti Gritti
* Copyright © 2003, 2004 Christian Persch
@@ -21,6 +22,7 @@
#include "config.h"
+#include "ephy-embed-container.h"
#include "ephy-location-action.h"
#include "ephy-location-entry.h"
#include "ephy-shell.h"
@@ -285,7 +287,8 @@ get_location_cb (EphyLocationEntry *entry,
EphyLocationActionPrivate *priv = action->priv;
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (priv->window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (priv->window));
return g_strdup (ephy_embed_get_address (embed));
}
@@ -296,7 +299,8 @@ get_title_cb (EphyLocationEntry *entry,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (action->priv->window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (action->priv->window));
return g_strdup (ephy_embed_get_title (embed));
}
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index 526caa5c7..8229aea23 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2000, 2001, 2002, 2003, 2004 Marco Pesenti Gritti
* Copyright © 2003, 2004, 2005 Christian Persch
@@ -21,6 +22,7 @@
#include "config.h"
+#include "ephy-embed-container.h"
#include "ephy-lockdown.h"
#include "ephy-extension.h"
#include "ephy-action-helper.h"
@@ -98,7 +100,7 @@ update_location_editable (EphyWindow *window,
if (editable == FALSE)
{
toolbar = ephy_window_get_toolbar (window);
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
/* embed is NULL on startup */
if (embed != NULL)
{
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c
index b994a9a6b..56ad8081a 100644
--- a/src/ephy-navigation-action.c
+++ b/src/ephy-navigation-action.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2003, 2004 Marco Pesenti Gritti
* Copyright © 2003, 2004 Christian Persch
@@ -26,6 +27,7 @@
#include "ephy-window.h"
#include "ephy-favicon-cache.h"
#include "ephy-history.h"
+#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
#include "ephy-link.h"
#include "ephy-gui.h"
@@ -143,7 +145,7 @@ activate_by_history_index (EphyNavigationAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (action->priv->window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (action->priv->window));
g_return_if_fail (embed != NULL);
if (ephy_gui_is_middle_click ())
@@ -203,7 +205,7 @@ activate_up_menu_item_cb (GtkWidget *menuitem,
EphyEmbed *embed;
char *url;
- embed = ephy_window_get_active_tab (action->priv->window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (action->priv->window));
g_return_if_fail (embed != NULL);
url = g_object_get_data (G_OBJECT (menuitem), URL_DATA_KEY);
@@ -222,7 +224,7 @@ build_back_or_forward_menu (EphyNavigationAction *action)
int pos, count;
int start, end;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_val_if_fail (embed != NULL, NULL);
pos = ephy_embed_shistory_get_pos (embed);
@@ -298,7 +300,7 @@ build_up_menu (EphyNavigationAction *action)
GSList *list, *l;
char *url;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_val_if_fail (embed != NULL, NULL);
menu = GTK_MENU_SHELL (gtk_menu_new ());
@@ -402,7 +404,7 @@ ephy_navigation_action_activate (GtkAction *gtk_action)
EphyEmbed *embed;
int pos;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
pos = ephy_embed_shistory_get_pos (embed);
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 41c7158ad..9ad5c271c 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2002 Jorn Baayen
* Copyright © 2003, 2004 Marco Pesenti Gritti
@@ -24,6 +25,7 @@
#include "ephy-session.h"
+#include "ephy-embed-container.h"
#include "ephy-window.h"
#include "ephy-shell.h"
#include "ephy-history-window.h"
@@ -1173,7 +1175,7 @@ write_ephy_window (xmlTextWriterPtr writer,
const char *role;
int ret;
- tabs = ephy_window_get_tabs (window);
+ tabs = ephy_embed_container_get_children (EPHY_EMBED_CONTAINER (window));
notebook = ephy_window_get_notebook (window);
/* Do not save an empty EphyWindow.
@@ -1501,7 +1503,8 @@ ephy_session_load (EphySession *session,
}
}
- gtk_widget_grab_focus (GTK_WIDGET (ephy_window_get_active_tab (window)));
+ gtk_widget_grab_focus (GTK_WIDGET (ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window))));
gtk_widget_show (widget);
}
else if (xmlStrEqual (child->name, (const xmlChar *) "toolwindow"))
@@ -1613,18 +1616,19 @@ ephy_session_remove_window (EphySession *session,
EphyWindow *
ephy_session_get_active_window (EphySession *session)
{
- EphyWindow *window = NULL, *w;
+ EphyWindow *window = NULL;
+ EphyEmbedContainer *w;
GList *l;
g_return_val_if_fail (EPHY_IS_SESSION (session), NULL);
for (l = session->priv->windows; l != NULL; l = l->next)
{
- w = EPHY_WINDOW (l->data);
+ w = EPHY_EMBED_CONTAINER (l->data);
- if (ephy_window_get_is_popup (w) == FALSE)
+ if (ephy_embed_container_get_is_popup (w) == FALSE)
{
- window = w;
+ window = EPHY_WINDOW (w);
break;
}
}
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 7116ed2e7..afbfa8d8c 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -29,6 +29,7 @@
#include "ephy-shell.h"
#include "ephy-type-builtins.h"
+#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
#include "ephy-embed-single.h"
#include "eel-gconf-extensions.h"
@@ -500,7 +501,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
g_assert (embed != NULL);
gtk_widget_show (GTK_WIDGET (embed));
- ephy_window_add_tab (window, embed, position, jump_to);
+ ephy_embed_container_add_child (EPHY_EMBED_CONTAINER (window), embed, position, jump_to);
if (previous_embed != NULL)
{
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c
index 0eaf2c1eb..47ce241bc 100644
--- a/src/ephy-tabs-menu.c
+++ b/src/ephy-tabs-menu.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2003 David Bordoley
* Copyright © 2003-2004 Christian Persch
@@ -26,6 +27,7 @@
#include "ephy-marshal.h"
#include "ephy-shell.h"
#include "ephy-debug.h"
+#include "ephy-embed-container.h"
#include "ephy-embed-utils.h"
#include <glib/gi18n.h>
@@ -169,9 +171,9 @@ tab_action_activate_cb (GtkToggleAction *action,
LOG ("tab_action_activate_cb embed=%p", embed);
- if (ephy_window_get_active_tab (priv->window) != embed)
+ if (ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (priv->window)) != embed)
{
- ephy_window_jump_to_tab (priv->window, embed);
+ ephy_embed_container_jump_to_child (EPHY_EMBED_CONTAINER (priv->window), embed);
}
}
@@ -218,7 +220,7 @@ notebook_page_added_cb (EphyNotebook *notebook,
gtk_radio_action_set_group (GTK_RADIO_ACTION (action), group);
/* set this here too, since tab-added comes after notify::active-tab */
- if (ephy_window_get_active_tab (priv->window) == embed)
+ if (ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (priv->window)) == embed)
{
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
}
@@ -299,7 +301,7 @@ sync_active_tab (EphyWindow *window,
EphyEmbed *embed;
GtkAction *action;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
if (embed == NULL) return;
LOG ("active tab is embed %p", embed);
@@ -478,7 +480,7 @@ ephy_tabs_menu_update (EphyTabsMenu *menu)
ephy_tabs_menu_clean (menu);
- tabs = ephy_window_get_tabs (p->window);
+ tabs = ephy_embed_container_get_children (EPHY_EMBED_CONTAINER (p->window));
if (g_list_length (tabs) == 0) return;
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index 613a52463..0ca828670 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -22,6 +22,7 @@
#include "config.h"
+#include "ephy-embed-container.h"
#include "ephy-toolbar.h"
#include "ephy-link.h"
#include "ephy-go-action.h"
@@ -175,7 +176,7 @@ sync_user_input_cb (EphyLocationAction *action,
if (priv->updating_address) return;
- embed = ephy_window_get_active_tab (priv->window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (priv->window));
g_assert (EPHY_IS_EMBED (embed));
address = ephy_location_action_get_address (action);
diff --git a/src/popup-commands.c b/src/popup-commands.c
index 45eb6a88b..6e4d677a4 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -23,6 +23,7 @@
#include "popup-commands.h"
#include "ephy-shell.h"
+#include "ephy-embed-container.h"
#include "ephy-embed-factory.h"
#include "ephy-embed-persist.h"
#include "ephy-prefs.h"
@@ -47,7 +48,8 @@ popup_cmd_link_in_new_window (GtkAction *action,
EphyEmbed *embed;
const GValue *value;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
event = ephy_window_get_context_event (window);
g_return_if_fail (event != NULL);
@@ -68,7 +70,8 @@ popup_cmd_link_in_new_tab (GtkAction *action,
EphyEmbed *embed;
const GValue *value;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
event = ephy_window_get_context_event (window);
g_return_if_fail (event != NULL);
@@ -204,7 +207,7 @@ save_property_url (GtkAction *action,
event = ephy_window_get_context_event (window);
g_return_if_fail (event != NULL);
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
value = ephy_embed_event_get_property (event, property);
@@ -239,7 +242,8 @@ popup_cmd_open_link (GtkAction *action,
const GValue *value;
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
event = ephy_window_get_context_event (window);
@@ -314,7 +318,7 @@ popup_cmd_set_image_as_background (GtkAction *action,
event = ephy_window_get_context_event (window);
g_return_if_fail (event != NULL);
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
value = ephy_embed_event_get_property (event, "image");
@@ -364,7 +368,8 @@ popup_cmd_open_frame (GtkAction *action,
char *location;
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
location = ephy_embed_get_location (embed, FALSE);
@@ -468,7 +473,8 @@ popup_cmd_open_image (GtkAction *action,
event = ephy_window_get_context_event (window);
g_return_if_fail (event != NULL);
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
value = ephy_embed_event_get_property (event, "image");
diff --git a/src/ppview-toolbar.c b/src/ppview-toolbar.c
index b8000d737..357af3e89 100644
--- a/src/ppview-toolbar.c
+++ b/src/ppview-toolbar.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2002 Marco Pesenti Gritti
*
@@ -21,6 +22,7 @@
#include "config.h"
#include "ppview-toolbar.h"
+#include "ephy-embed-container.h"
#include "ephy-window.h"
#include <string.h>
@@ -206,7 +208,8 @@ toolbar_update_sensitivity (PPViewToolbar *t)
GtkAction *action;
GtkActionGroup *action_group = t->priv->action_group;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
pages = ephy_embed_print_preview_n_pages (embed);
@@ -301,7 +304,7 @@ toolbar_cmd_ppv_goto_first (GtkUIManager *merge,
EphyWindow *window = t->priv->window;
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
ephy_embed_print_preview_navigate (embed, EPHY_EMBED_PRINTPREVIEW_HOME, 0);
@@ -318,7 +321,7 @@ toolbar_cmd_ppv_goto_last (GtkUIManager *merge,
EphyWindow *window = t->priv->window;
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
ephy_embed_print_preview_navigate (embed,
@@ -337,7 +340,8 @@ clamp_page_limits (PPViewToolbar *t, int page)
EphyEmbed *embed;
int pages;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_val_if_fail (embed != NULL, -1);
pages = ephy_embed_print_preview_n_pages (embed);
@@ -349,10 +353,10 @@ static void
toolbar_cmd_ppv_go_back (GtkUIManager *merge,
PPViewToolbar *t)
{
- EphyWindow *window = t->priv->window;
+ EphyEmbedContainer *window = EPHY_EMBED_CONTAINER (t->priv->window);
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (window);
g_return_if_fail (EPHY_IS_EMBED (embed));
t->priv->current_page = clamp_page_limits (t, t->priv->current_page - 1);
@@ -371,7 +375,7 @@ toolbar_cmd_ppv_go_forward (GtkUIManager *merge,
EphyWindow *window = t->priv->window;
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
t->priv->current_page = clamp_page_limits (t, t->priv->current_page + 1);
@@ -395,7 +399,8 @@ toolbar_cmd_ppv_close (GtkUIManager *merge,
window = t->priv->window;
g_return_if_fail (EPHY_IS_WINDOW (window));
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
ephy_window_set_print_preview (window, FALSE);
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 150489d00..cef769b92 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 200-2003 Marco Pesenti Gritti
* Copyright © 2003, 2004, 2005 Christian Persch
@@ -24,6 +25,7 @@
#include "prefs-dialog.h"
#include "ephy-dialog.h"
#include "ephy-prefs.h"
+#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
#include "ephy-favicon-cache.h"
#include "ephy-session.h"
@@ -1507,7 +1509,8 @@ prefs_homepage_current_button_clicked_cb (GtkWidget *button,
/* can't do anything in this case */
if (window == NULL) return;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
set_homepage_entry (dialog, ephy_embed_get_address (embed));
diff --git a/src/window-commands.c b/src/window-commands.c
index 6a9ab0583..8cf75a9c6 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright © 2000-2004 Marco Pesenti Gritti
*
@@ -20,6 +21,7 @@
#include "config.h"
+#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
#include "ephy-embed-single.h"
#include "ephy-shell.h"
@@ -94,7 +96,8 @@ window_cmd_file_print_preview (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
ephy_embed_set_print_preview_mode (embed, TRUE);
@@ -107,7 +110,8 @@ window_cmd_file_print (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
ephy_embed_print (embed);
@@ -120,7 +124,8 @@ window_cmd_file_send_to (GtkAction *action,
EphyEmbed *embed;
char *url, *location, *title;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
location = gnome_vfs_escape_string (ephy_embed_get_address (embed));
@@ -177,7 +182,8 @@ window_cmd_view_stop (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
gtk_widget_grab_focus (GTK_WIDGET (embed));
@@ -191,7 +197,8 @@ window_cmd_view_reload (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
gtk_widget_grab_focus (GTK_WIDGET (embed));
@@ -217,7 +224,8 @@ window_cmd_file_bookmark_page (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
ephy_bookmarks_ui_add_bookmark (GTK_WINDOW (window),
@@ -275,7 +283,7 @@ window_cmd_file_save_as (GtkAction *action,
EphyEmbed *embed;
EphyEmbedPersist *persist;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
persist = EPHY_EMBED_PERSIST
@@ -322,7 +330,7 @@ window_cmd_file_close_window (GtkAction *action,
return;
}
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
g_signal_emit_by_name (notebook, "tab-close-request", embed);
@@ -375,7 +383,7 @@ window_cmd_edit_cut (GtkAction *action,
else
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
ephy_command_manager_do_command (EPHY_COMMAND_MANAGER (embed),
@@ -397,7 +405,7 @@ window_cmd_edit_copy (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
ephy_command_manager_do_command (EPHY_COMMAND_MANAGER (embed),
@@ -419,7 +427,7 @@ window_cmd_edit_paste (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
ephy_command_manager_do_command (EPHY_COMMAND_MANAGER (embed),
@@ -441,7 +449,7 @@ window_cmd_edit_delete (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
ephy_command_manager_do_command (EPHY_COMMAND_MANAGER (embed),
@@ -463,7 +471,8 @@ window_cmd_edit_select_all (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
ephy_command_manager_do_command (EPHY_COMMAND_MANAGER (embed),
@@ -602,7 +611,8 @@ window_cmd_view_page_source (GtkAction *action,
const char *address;
guint32 user_time;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
address = ephy_embed_get_address (embed);
@@ -624,7 +634,8 @@ window_cmd_view_page_security_info (GtkAction *action,
{
EphyEmbed *embed;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
ephy_embed_show_page_certificate (embed);
@@ -651,7 +662,8 @@ window_cmd_edit_personal_data (GtkAction *action,
GnomeVFSURI *uri;
const char *host;
- embed = ephy_window_get_active_tab (window);
+ embed = ephy_embed_container_get_active_child
+ (EPHY_EMBED_CONTAINER (window));
if (embed == NULL) return;
uri = gnome_vfs_uri_new (ephy_embed_get_address (embed));
@@ -943,7 +955,7 @@ window_cmd_load_location (GtkAction *action,
g_return_if_fail (address != NULL);
ephy_link_open (EPHY_LINK (window), address,
- ephy_window_get_active_tab (window),
+ ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window)),
ephy_link_flags_from_current_event () | EPHY_LINK_ALLOW_FIXUP);
}
}