aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gns@gnome.org>2009-12-16 20:35:55 +0800
committerGustavo Noronha Silva <gns@gnome.org>2009-12-17 20:21:25 +0800
commitde05c84965bc829f14fb9165bd05d5612967a36d (patch)
tree943d0bda5b6e028ec4fb578eb65cbc6920a3b793 /src
parent092c7136695555fbd44c51e37c36202c7a2cb832 (diff)
downloadgsoc2013-epiphany-de05c84965bc829f14fb9165bd05d5612967a36d.tar
gsoc2013-epiphany-de05c84965bc829f14fb9165bd05d5612967a36d.tar.gz
gsoc2013-epiphany-de05c84965bc829f14fb9165bd05d5612967a36d.tar.bz2
gsoc2013-epiphany-de05c84965bc829f14fb9165bd05d5612967a36d.tar.lz
gsoc2013-epiphany-de05c84965bc829f14fb9165bd05d5612967a36d.tar.xz
gsoc2013-epiphany-de05c84965bc829f14fb9165bd05d5612967a36d.tar.zst
gsoc2013-epiphany-de05c84965bc829f14fb9165bd05d5612967a36d.zip
Make EphyEmbed inherit from GtkVBox instead of GtkScrolledWindow
Diffstat (limited to 'src')
-rw-r--r--src/ephy-encoding-dialog.c4
-rw-r--r--src/ephy-location-action.c4
-rw-r--r--src/ephy-lockdown.c4
-rw-r--r--src/ephy-navigation-action.c4
-rw-r--r--src/ephy-notebook.c4
-rw-r--r--src/ephy-session.c12
-rw-r--r--src/ephy-shell.c12
-rw-r--r--src/ephy-tabs-menu.c6
-rw-r--r--src/ephy-toolbar.c2
-rw-r--r--src/ephy-window.c32
-rw-r--r--src/popup-commands.c2
-rw-r--r--src/ppview-toolbar.c16
-rw-r--r--src/prefs-dialog.c2
-rw-r--r--src/window-commands.c21
14 files changed, 63 insertions, 62 deletions
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index 2b69ca9d2..eb986a837 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -156,7 +156,7 @@ sync_embed_cb (EphyEncodingDialog *dialog, GParamSpec *pspec, gpointer dummy)
dialog);
}
- g_signal_connect (G_OBJECT (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)), "notify::load-status",
+ g_signal_connect (G_OBJECT (ephy_embed_get_web_view (embed)), "notify::load-status",
G_CALLBACK (embed_net_stop_cb), dialog);
dialog->priv->embed = embed;
@@ -376,7 +376,7 @@ ephy_encoding_dialog_finalize (GObject *object)
if (dialog->priv->embed)
{
- g_signal_handlers_disconnect_by_func (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (dialog->priv->embed),
+ g_signal_handlers_disconnect_by_func (ephy_embed_get_web_view (dialog->priv->embed),
G_CALLBACK (embed_net_stop_cb),
dialog);
}
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 598f9ff8c..7cc22e619 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -333,7 +333,7 @@ get_location_cb (EphyLocationEntry *entry,
embed = ephy_embed_container_get_active_child
(EPHY_EMBED_CONTAINER (priv->window));
- return g_strdup (ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)));
+ return g_strdup (ephy_web_view_get_address (ephy_embed_get_web_view (embed)));
}
static char *
@@ -345,7 +345,7 @@ get_title_cb (EphyLocationEntry *entry,
embed = ephy_embed_container_get_active_child
(EPHY_EMBED_CONTAINER (action->priv->window));
- return g_strdup (ephy_web_view_get_title (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)));
+ return g_strdup (ephy_web_view_get_title (ephy_embed_get_web_view (embed)));
}
static void
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index bb3a03524..37a4eb27f 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -104,9 +104,9 @@ update_location_editable (EphyWindow *window,
/* embed is NULL on startup */
if (embed != NULL)
{
- address = ephy_web_view_get_location (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), TRUE);
+ address = ephy_web_view_get_location (ephy_embed_get_web_view (embed), TRUE);
ephy_toolbar_set_location (EPHY_TOOLBAR (toolbar), address);
- ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), NULL);
+ ephy_web_view_set_typed_address (ephy_embed_get_web_view (embed), NULL);
g_free (address);
}
}
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c
index 094b5adc8..d19cf21fb 100644
--- a/src/ephy-navigation-action.c
+++ b/src/ephy-navigation-action.c
@@ -285,7 +285,7 @@ build_up_menu (EphyNavigationAction *action)
history = EPHY_HISTORY
(ephy_embed_shell_get_global_history (embed_shell));
- list = ephy_web_view_get_go_up_list (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ list = ephy_web_view_get_go_up_list (ephy_embed_get_web_view (embed));
for (l = list; l != NULL; l = l->next)
{
@@ -430,7 +430,7 @@ ephy_navigation_action_activate (GtkAction *gtk_action)
{
GSList *up_list;
- up_list = ephy_web_view_get_go_up_list (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ up_list = ephy_web_view_get_go_up_list (ephy_embed_get_web_view (embed));
ephy_link_open (EPHY_LINK (action),
up_list->data,
NULL,
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 0ea261d11..8dbb10e0e 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -653,7 +653,7 @@ build_tab_label (EphyNotebook *nb, EphyEmbed *embed)
g_object_set_data (G_OBJECT (hbox), "close-button", close_button);
/* Hook the label up to the tab properties */
- view = EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed);
+ view = ephy_embed_get_web_view (embed);
sync_icon (view, NULL, GTK_IMAGE (icon));
sync_label (view, NULL, label);
sync_load_status (view, NULL, hbox);
@@ -811,7 +811,7 @@ ephy_notebook_remove (GtkContainer *container,
tab_label_icon = g_object_get_data (G_OBJECT (tab_label), "icon");
tab_label_label = g_object_get_data (G_OBJECT (tab_label), "label");
- view = EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (tab_widget);
+ view = ephy_embed_get_web_view (EPHY_EMBED (tab_widget));
g_signal_handlers_disconnect_by_func
(view, G_CALLBACK (sync_icon), tab_label_icon);
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 3919c6c1f..e591e1c9f 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -396,7 +396,7 @@ notebook_page_added_cb (GtkWidget *notebook,
guint position,
EphySession *session)
{
- g_signal_connect (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), "notify::load-status",
+ g_signal_connect (ephy_embed_get_web_view (embed), "notify::load-status",
G_CALLBACK (load_status_notify_cb), session);
}
@@ -409,7 +409,7 @@ notebook_page_removed_cb (GtkWidget *notebook,
ephy_session_save (session, SESSION_CRASHED);
g_signal_handlers_disconnect_by_func
- (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), G_CALLBACK (load_status_notify_cb),
+ (ephy_embed_get_web_view (embed), G_CALLBACK (load_status_notify_cb),
session);
}
@@ -1036,17 +1036,17 @@ write_tab (xmlTextWriterPtr writer,
ret = xmlTextWriterStartElement (writer, (xmlChar *) "embed");
if (ret < 0) return ret;
- address = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ address = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
ret = xmlTextWriterWriteAttribute (writer, (xmlChar *) "url",
(const xmlChar *) address);
if (ret < 0) return ret;
- title = ephy_web_view_get_title (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ title = ephy_web_view_get_title (ephy_embed_get_web_view (embed));
ret = xmlTextWriterWriteAttribute (writer, (xmlChar *) "title",
(const xmlChar *) title);
if (ret < 0) return ret;
- if (ephy_web_view_is_loading (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)))
+ if (ephy_web_view_is_loading (ephy_embed_get_web_view (embed)))
{
ret = xmlTextWriterWriteAttribute (writer,
(const xmlChar *) "loading",
@@ -1345,7 +1345,7 @@ confirm_before_recover (EphyWindow* window, char* url, char* title)
EPHY_NEW_TAB_IN_EXISTING_WINDOW | EPHY_NEW_TAB_APPEND_LAST);
/* show generated html and put the original URL in the navigation bar */
- webkit_web_view_load_html_string (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed),
+ webkit_web_view_load_html_string (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (EPHY_EMBED (embed)),
html->str,
url);
g_string_free (html, TRUE);
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 7c20b155c..c3551f861 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -478,8 +478,8 @@ ephy_shell_new_tab_full (EphyShell *shell,
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
if (embed != NULL)
{
- if (ephy_web_view_get_is_blank (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)) &&
- ephy_web_view_is_loading (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)) == FALSE)
+ if (ephy_web_view_get_is_blank (ephy_embed_get_web_view (embed)) &&
+ ephy_web_view_is_loading (ephy_embed_get_web_view (embed)) == FALSE)
{
active_is_blank = TRUE;
}
@@ -496,8 +496,8 @@ ephy_shell_new_tab_full (EphyShell *shell,
if (previous_embed != NULL)
{
- ephy_web_view_copy_back_history (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (previous_embed),
- EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ ephy_web_view_copy_back_history (ephy_embed_get_web_view (previous_embed),
+ ephy_embed_get_web_view (embed));
}
ephy_gui_window_update_user_time (GTK_WIDGET (window), user_time);
@@ -515,13 +515,13 @@ ephy_shell_new_tab_full (EphyShell *shell,
if (flags & EPHY_NEW_TAB_HOME_PAGE ||
flags & EPHY_NEW_TAB_NEW_PAGE)
{
- ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), "");
+ ephy_web_view_set_typed_address (ephy_embed_get_web_view (embed), "");
ephy_toolbar_activate_location (toolbar);
is_empty = load_homepage (embed);
}
else if (flags & EPHY_NEW_TAB_OPEN_PAGE)
{
- ephy_web_view_load_request (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
+ ephy_web_view_load_request (ephy_embed_get_web_view (embed),
request);
is_empty = url_is_empty (webkit_network_request_get_uri (request));
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c
index 7754794d4..0d4875288 100644
--- a/src/ephy-tabs-menu.c
+++ b/src/ephy-tabs-menu.c
@@ -201,9 +201,9 @@ notebook_page_added_cb (EphyNotebook *notebook,
"tooltip", _("Switch to this tab"),
NULL);
- sync_tab_title (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), NULL, action);
+ sync_tab_title (ephy_embed_get_web_view (embed), NULL, action);
/* make sure the action is alive when handling the signal, see bug #169833 */
- g_signal_connect_object (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), "notify::embed-title",
+ g_signal_connect_object (ephy_embed_get_web_view (embed), "notify::embed-title",
G_CALLBACK (sync_tab_title), action, 0);
gtk_action_group_add_action_with_accel (priv->action_group, action, NULL);
@@ -245,7 +245,7 @@ notebook_page_removed_cb (EphyNotebook *notebook,
free_tab_id (action);
g_signal_handlers_disconnect_by_func
- (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), G_CALLBACK (sync_tab_title), action);
+ (ephy_embed_get_web_view (embed), G_CALLBACK (sync_tab_title), action);
g_signal_handlers_disconnect_by_func
(action, G_CALLBACK (tab_action_activate_cb), menu);
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index 83c34e931..a72183145 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -190,7 +190,7 @@ sync_user_input_cb (EphyLocationAction *action,
address = ephy_location_action_get_address (action);
priv->updating_address = TRUE;
- ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), address);
+ ephy_web_view_set_typed_address (ephy_embed_get_web_view (embed), address);
priv->updating_address = FALSE;
}
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 2780aaed0..d614f4730 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -583,7 +583,7 @@ impl_remove_child (EphyEmbedContainer *container,
window = EPHY_WINDOW (container);
priv = window->priv;
- modified = ephy_web_view_has_modified_forms (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (child));
+ modified = ephy_web_view_has_modified_forms (ephy_embed_get_web_view (child));
if (modified && confirm_close_with_modified_forms (window) == FALSE)
{
/* don't close the tab */
@@ -845,8 +845,8 @@ ephy_window_fullscreen (EphyWindow *window)
/* sync status */
embed = window->priv->active_embed;
- sync_tab_load_status (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), NULL, window);
- sync_tab_security (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), NULL, window);
+ sync_tab_load_status (ephy_embed_get_web_view (embed), NULL, window);
+ sync_tab_security (ephy_embed_get_web_view (embed), NULL, window);
egg_editable_toolbar_set_model
(EGG_EDITABLE_TOOLBAR (priv->toolbar),
@@ -1075,7 +1075,7 @@ ephy_window_delete_event (GtkWidget *widget,
EphyEmbed *embed;
embed = window->priv->active_embed;
- ephy_web_view_set_print_preview_mode (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), FALSE);
+ ephy_web_view_set_print_preview_mode (ephy_embed_get_web_view (embed), FALSE);
_ephy_window_set_print_preview (window, FALSE);
@@ -1089,7 +1089,7 @@ ephy_window_delete_event (GtkWidget *widget,
g_return_val_if_fail (EPHY_IS_EMBED (embed), FALSE);
- if (ephy_web_view_has_modified_forms (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)))
+ if (ephy_web_view_has_modified_forms (ephy_embed_get_web_view (embed)))
{
modified = TRUE;
modified_embed = embed;
@@ -1944,7 +1944,7 @@ sync_tab_zoom (WebKitWebView *web_view, GParamSpec *pspec, EphyWindow *window)
"zoom-level", &zoom,
NULL);
- type = ephy_web_view_get_document_type (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ type = ephy_web_view_get_document_type (ephy_embed_get_web_view (embed));
can_zoom = (type != EPHY_WEB_VIEW_DOCUMENT_IMAGE);
if (zoom >= ZOOM_MAXIMAL)
@@ -2431,7 +2431,7 @@ ephy_window_visibility_cb (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *wind
{
gboolean visibility;
- visibility = ephy_web_view_get_visibility (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ visibility = ephy_web_view_get_visibility (ephy_embed_get_web_view (embed));
if (visibility)
gtk_widget_show (GTK_WIDGET (window));
@@ -2788,7 +2788,7 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed)
EphyWebView *view;
embed = new_embed;
- view = EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed);
+ view = ephy_embed_get_web_view (embed);
sync_tab_security (view, NULL, window);
sync_tab_document_type (view, NULL, window);
@@ -2929,7 +2929,7 @@ embed_modal_alert_cb (EphyEmbed *embed,
gtk_window_present (GTK_WINDOW (window));
/* make sure the location entry shows the real URL of the tab's page */
- address = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ address = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
ephy_toolbar_set_location (priv->toolbar, address);
/* don't suppress alert */
@@ -3098,10 +3098,10 @@ notebook_page_added_cb (EphyNotebook *notebook,
G_CONNECT_SWAPPED);
#endif
- g_signal_connect_object (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), "close-request",
+ g_signal_connect_object (ephy_embed_get_web_view (embed), "close-request",
G_CALLBACK (embed_close_request_cb),
window, 0);
- g_signal_connect_object (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), "ge-modal-alert",
+ g_signal_connect_object (ephy_embed_get_web_view (embed), "ge-modal-alert",
G_CALLBACK (embed_modal_alert_cb), window, G_CONNECT_AFTER);
/* Let the extensions attach themselves to the tab */
@@ -3148,9 +3148,9 @@ notebook_page_removed_cb (EphyNotebook *notebook,
}
g_signal_handlers_disconnect_by_func
- (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), G_CALLBACK (embed_modal_alert_cb), window);
+ (ephy_embed_get_web_view (embed), G_CALLBACK (embed_modal_alert_cb), window);
g_signal_handlers_disconnect_by_func
- (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), G_CALLBACK (embed_close_request_cb), window);
+ (ephy_embed_get_web_view (embed), G_CALLBACK (embed_close_request_cb), window);
}
static void
@@ -3175,7 +3175,7 @@ notebook_page_close_request_cb (EphyNotebook *notebook,
return;
}
- if (!ephy_web_view_has_modified_forms (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)) ||
+ if (!ephy_web_view_has_modified_forms (ephy_embed_get_web_view (embed)) ||
confirm_close_with_modified_forms (window))
{
gtk_widget_destroy (GTK_WIDGET (embed));
@@ -3554,7 +3554,7 @@ allow_popups_notifier (GConfClient *client,
embed = EPHY_EMBED (tabs->data);
g_return_if_fail (EPHY_IS_EMBED (embed));
- g_object_notify (G_OBJECT (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)), "popups-allowed");
+ g_object_notify (G_OBJECT (ephy_embed_get_web_view (embed)), "popups-allowed");
}
}
@@ -4185,7 +4185,7 @@ ephy_window_view_popup_windows_cb (GtkAction *action,
allow = FALSE;
}
- g_object_set (G_OBJECT (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)), "popups-allowed", allow, NULL);
+ g_object_set (G_OBJECT (ephy_embed_get_web_view (embed)), "popups-allowed", allow, NULL);
}
/**
diff --git a/src/popup-commands.c b/src/popup-commands.c
index 755817e82..c2d7267af 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -389,7 +389,7 @@ popup_cmd_open_frame (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- location = ephy_web_view_get_location (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), FALSE);
+ location = ephy_web_view_get_location (ephy_embed_get_web_view (embed), FALSE);
ephy_web_view_load_url (EPHY_WEB_VIEW (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed)), location);
g_free (location);
diff --git a/src/ppview-toolbar.c b/src/ppview-toolbar.c
index dbc571980..db27d42ed 100644
--- a/src/ppview-toolbar.c
+++ b/src/ppview-toolbar.c
@@ -178,7 +178,7 @@ toolbar_update_sensitivity (PPViewToolbar *t)
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- pages = ephy_web_view_print_preview_n_pages (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ pages = ephy_web_view_print_preview_n_pages (ephy_embed_get_web_view (embed));
c_page = t->priv->current_page;
action = gtk_action_group_get_action (action_group, "PPVGoBack");
@@ -273,7 +273,7 @@ toolbar_cmd_ppv_goto_first (GtkUIManager *merge,
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
- ephy_web_view_print_preview_navigate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), EPHY_WEB_VIEW_PRINTPREVIEW_HOME, 0);
+ ephy_web_view_print_preview_navigate (ephy_embed_get_web_view (embed), EPHY_WEB_VIEW_PRINTPREVIEW_HOME, 0);
t->priv->current_page = 1;
@@ -290,11 +290,11 @@ toolbar_cmd_ppv_goto_last (GtkUIManager *merge,
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- ephy_web_view_print_preview_navigate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
+ ephy_web_view_print_preview_navigate (ephy_embed_get_web_view (embed),
EPHY_WEB_VIEW_PRINTPREVIEW_END,
0);
- t->priv->current_page = ephy_web_view_print_preview_n_pages (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ t->priv->current_page = ephy_web_view_print_preview_n_pages (ephy_embed_get_web_view (embed));
toolbar_update_sensitivity (t);
}
@@ -310,7 +310,7 @@ clamp_page_limits (PPViewToolbar *t, int page)
(EPHY_EMBED_CONTAINER (window));
g_return_val_if_fail (embed != NULL, -1);
- pages = ephy_web_view_print_preview_n_pages (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ pages = ephy_web_view_print_preview_n_pages (ephy_embed_get_web_view (embed));
return CLAMP (page, 1, pages);
}
@@ -327,7 +327,7 @@ toolbar_cmd_ppv_go_back (GtkUIManager *merge,
t->priv->current_page = clamp_page_limits (t, t->priv->current_page - 1);
- ephy_web_view_print_preview_navigate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
+ ephy_web_view_print_preview_navigate (ephy_embed_get_web_view (embed),
EPHY_WEB_VIEW_PRINTPREVIEW_GOTO_PAGENUM,
t->priv->current_page);
@@ -346,7 +346,7 @@ toolbar_cmd_ppv_go_forward (GtkUIManager *merge,
t->priv->current_page = clamp_page_limits (t, t->priv->current_page + 1);
- ephy_web_view_print_preview_navigate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
+ ephy_web_view_print_preview_navigate (ephy_embed_get_web_view (embed),
EPHY_WEB_VIEW_PRINTPREVIEW_GOTO_PAGENUM,
t->priv->current_page);
@@ -371,5 +371,5 @@ toolbar_cmd_ppv_close (GtkUIManager *merge,
_ephy_window_set_print_preview (window, FALSE);
- ephy_web_view_set_print_preview_mode (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), FALSE);
+ ephy_web_view_set_print_preview_mode (ephy_embed_get_web_view (embed), FALSE);
}
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index b9e895654..ca94c28f4 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1018,7 +1018,7 @@ prefs_homepage_current_button_clicked_cb (GtkWidget *button,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- set_homepage_entry (dialog, ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)));
+ set_homepage_entry (dialog, ephy_web_view_get_address (ephy_embed_get_web_view (embed)));
}
static void
diff --git a/src/window-commands.c b/src/window-commands.c
index b3d437354..c94035682 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -21,6 +21,7 @@
#include "config.h"
+#include "ephy-embed.h"
#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
#include "ephy-embed-single.h"
@@ -93,7 +94,7 @@ window_cmd_file_print_preview (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
- ephy_web_view_set_print_preview_mode (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), TRUE);
+ ephy_web_view_set_print_preview_mode (ephy_embed_get_web_view (embed), TRUE);
_ephy_window_set_print_preview (window, TRUE);
}
@@ -124,8 +125,8 @@ window_cmd_file_send_to (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- location = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
- title = ephy_web_view_get_title (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ location = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
+ title = ephy_web_view_get_title (ephy_embed_get_web_view (embed));
subject = g_uri_escape_string (title, NULL, TRUE);
body = g_uri_escape_string (location, NULL, TRUE);
@@ -247,8 +248,8 @@ window_cmd_file_bookmark_page (GtkAction *action,
g_return_if_fail (embed != NULL);
ephy_bookmarks_ui_add_bookmark (GTK_WINDOW (window),
- ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)),
- ephy_web_view_get_title (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)));
+ ephy_web_view_get_address (ephy_embed_get_web_view (embed)),
+ ephy_web_view_get_title (ephy_embed_get_web_view (embed)));
}
static void
@@ -396,7 +397,7 @@ window_cmd_edit_undo (GtkAction *action,
if (embed)
{
- webkit_web_view_undo (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed));
+ webkit_web_view_undo (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (EPHY_EMBED (embed)));
}
}
}
@@ -421,7 +422,7 @@ window_cmd_edit_redo (GtkAction *action,
embed = gtk_widget_get_ancestor (widget, EPHY_TYPE_EMBED);
if (embed)
{
- webkit_web_view_redo (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed));
+ webkit_web_view_redo (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (EPHY_EMBED (embed)));
}
}
}
@@ -798,7 +799,7 @@ window_cmd_view_page_source (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- address = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ address = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
user_time = gtk_get_current_event_time ();
if (g_str_has_prefix (address, "file://"))
@@ -826,7 +827,7 @@ window_cmd_view_page_security_info (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
- ephy_web_view_show_page_certificate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ ephy_web_view_show_page_certificate (ephy_embed_get_web_view (embed));
}
void
@@ -854,7 +855,7 @@ window_cmd_edit_personal_data (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
if (embed == NULL) return;
- address = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ address = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
host = address != NULL ? ephy_string_get_host_name (address) : NULL;