aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/ephy-encoding-dialog.c8
-rw-r--r--src/ephy-location-action.c5
-rw-r--r--src/ephy-lockdown.c8
-rw-r--r--src/ephy-navigation-action.c4
-rw-r--r--src/ephy-notebook.c36
-rw-r--r--src/ephy-session.c20
-rw-r--r--src/ephy-shell.c17
-rw-r--r--src/ephy-shell.h2
-rw-r--r--src/ephy-tabs-menu.c2
-rw-r--r--src/ephy-toolbar.c5
-rw-r--r--src/ephy-window.c286
-rw-r--r--src/ephy-window.h2
-rw-r--r--src/popup-commands.c2
-rw-r--r--src/ppview-toolbar.c29
-rw-r--r--src/prefs-dialog.c3
-rw-r--r--src/window-commands.c16
17 files changed, 234 insertions, 212 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index eae879efb..73ffa003c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -535,6 +535,7 @@ EPHY_GIR_H_FILES = \
$(top_srcdir)/embed/ephy-history.h \
$(top_srcdir)/embed/ephy-password-manager.h \
$(top_srcdir)/embed/ephy-permission-manager.h \
+ $(top_srcdir)/embed/ephy-web-view.h \
$(top_srcdir)/lib/ephy-dialog.h \
$(top_srcdir)/lib/ephy-node-db.h \
$(top_srcdir)/lib/ephy-node.h \
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index e9283cfb8..8da22cdbe 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -135,11 +135,11 @@ sync_encoding_against_embed (EphyEncodingDialog *dialog)
static void
-embed_net_stop_cb (EphyEmbed *embed,
+embed_net_stop_cb (EphyWebView *view,
GParamSpec *pspec,
EphyEncodingDialog *dialog)
{
- if (ephy_embed_get_load_status (embed) == FALSE)
+ if (ephy_web_view_get_load_status (view) == FALSE)
sync_encoding_against_embed (dialog);
}
@@ -156,7 +156,7 @@ sync_embed_cb (EphyEncodingDialog *dialog, GParamSpec *pspec, gpointer dummy)
dialog);
}
- g_signal_connect (G_OBJECT (embed), "notify::load-status",
+ g_signal_connect (G_OBJECT (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)), "notify::load-status",
G_CALLBACK (embed_net_stop_cb), dialog);
dialog->priv->embed = embed;
@@ -375,7 +375,7 @@ ephy_encoding_dialog_finalize (GObject *object)
if (dialog->priv->embed)
{
- g_signal_handlers_disconnect_by_func (dialog->priv->embed,
+ g_signal_handlers_disconnect_by_func (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (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 f2b8ca2cc..ad10ce7d7 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -22,6 +22,7 @@
#include "config.h"
#include "ephy-embed-container.h"
+#include "ephy-embed-utils.h"
#include "ephy-history.h"
#include "ephy-location-action.h"
#include "ephy-location-entry.h"
@@ -325,7 +326,7 @@ get_location_cb (EphyLocationEntry *entry,
embed = ephy_embed_container_get_active_child
(EPHY_EMBED_CONTAINER (priv->window));
- return g_strdup (ephy_embed_get_address (embed));
+ return g_strdup (ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)));
}
static char *
@@ -337,7 +338,7 @@ get_title_cb (EphyLocationEntry *entry,
embed = ephy_embed_container_get_active_child
(EPHY_EMBED_CONTAINER (action->priv->window));
- return g_strdup (ephy_embed_get_title (embed));
+ return g_strdup (ephy_web_view_get_title (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)));
}
static void
diff --git a/src/ephy-lockdown.c b/src/ephy-lockdown.c
index 83a4adf00..98627e722 100644
--- a/src/ephy-lockdown.c
+++ b/src/ephy-lockdown.c
@@ -22,6 +22,8 @@
#include "config.h"
#include "ephy-embed-container.h"
+#include "ephy-embed-utils.h"
+#include "ephy-web-view.h"
#include "ephy-lockdown.h"
#include "ephy-extension.h"
#include "ephy-action-helper.h"
@@ -102,10 +104,10 @@ update_location_editable (EphyWindow *window,
/* embed is NULL on startup */
if (embed != NULL)
{
- address = ephy_embed_get_location (embed, TRUE);
+ address = ephy_web_view_get_location (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), TRUE);
ephy_toolbar_set_location (EPHY_TOOLBAR (toolbar), address, NULL);
- ephy_embed_set_typed_address (embed, NULL,
- EPHY_EMBED_ADDRESS_EXPIRE_CURRENT);
+ ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), NULL,
+ EPHY_WEB_VIEW_ADDRESS_EXPIRE_CURRENT);
g_free (address);
}
}
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c
index 07f202b56..c25e2bd11 100644
--- a/src/ephy-navigation-action.c
+++ b/src/ephy-navigation-action.c
@@ -283,7 +283,7 @@ build_up_menu (EphyNavigationAction *action)
history = EPHY_HISTORY
(ephy_embed_shell_get_global_history (embed_shell));
- list = ephy_embed_get_go_up_list (embed);
+ list = ephy_web_view_get_go_up_list (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
for (l = list; l != NULL; l = l->next)
{
@@ -410,7 +410,7 @@ ephy_navigation_action_activate (GtkAction *gtk_action)
{
GSList *up_list;
- up_list = ephy_embed_get_go_up_list (embed);
+ up_list = ephy_web_view_get_go_up_list (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
ephy_link_open (EPHY_LINK (action),
up_list->data,
NULL,
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index e7c0a6c48..0cb77ece3 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -29,6 +29,7 @@
#include "ephy-file-helpers.h"
#include "ephy-dnd.h"
#include "ephy-embed.h"
+#include "ephy-embed-utils.h"
#include "ephy-window.h"
#include "ephy-shell.h"
#include "ephy-spinner.h"
@@ -500,7 +501,7 @@ ephy_notebook_finalize (GObject *object)
}
static void
-sync_load_status (EphyEmbed *embed, GParamSpec *pspec, GtkWidget *proxy)
+sync_load_status (EphyWebView *view, GParamSpec *pspec, GtkWidget *proxy)
{
GtkWidget *spinner, *icon;
@@ -508,7 +509,7 @@ sync_load_status (EphyEmbed *embed, GParamSpec *pspec, GtkWidget *proxy)
icon = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "icon"));
g_return_if_fail (spinner != NULL && icon != NULL);
- if (ephy_embed_get_load_status (embed))
+ if (ephy_web_view_get_load_status (view))
{
gtk_widget_hide (icon);
gtk_widget_show (spinner);
@@ -523,19 +524,19 @@ sync_load_status (EphyEmbed *embed, GParamSpec *pspec, GtkWidget *proxy)
}
static void
-sync_icon (EphyEmbed *embed,
+sync_icon (EphyWebView *view,
GParamSpec *pspec,
GtkImage *icon)
{
- gtk_image_set_from_pixbuf (icon, ephy_embed_get_icon (embed));
+ gtk_image_set_from_pixbuf (icon, ephy_web_view_get_icon (view));
}
static void
-sync_label (EphyEmbed *embed, GParamSpec *pspec, GtkWidget *label)
+sync_label (EphyWebView *view, GParamSpec *pspec, GtkWidget *label)
{
const char *title;
- title = ephy_embed_get_title (embed);
+ title = ephy_web_view_get_title (view);
gtk_label_set_text (GTK_LABEL (label), title);
@@ -586,6 +587,7 @@ static GtkWidget *
build_tab_label (EphyNotebook *nb, EphyEmbed *embed)
{
GtkWidget *hbox, *label, *close_button, *image, *spinner, *icon;
+ EphyWebView *view;
/* set hbox spacing and label padding (see below) so that there's an
* equal amount of space around the label */
@@ -649,15 +651,16 @@ 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 */
- sync_icon (embed, NULL, GTK_IMAGE (icon));
- sync_label (embed, NULL, label);
- sync_load_status (embed, NULL, hbox);
+ view = EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed);
+ sync_icon (view, NULL, GTK_IMAGE (icon));
+ sync_label (view, NULL, label);
+ sync_load_status (view, NULL, hbox);
- g_signal_connect_object (embed, "notify::icon",
+ g_signal_connect_object (view, "notify::icon",
G_CALLBACK (sync_icon), icon, 0);
- g_signal_connect_object (embed, "notify::title",
+ g_signal_connect_object (view, "notify::title",
G_CALLBACK (sync_label), label, 0);
- g_signal_connect_object (embed, "notify::load-status",
+ g_signal_connect_object (view, "notify::load-status",
G_CALLBACK (sync_load_status), hbox, 0);
return hbox;
@@ -786,6 +789,7 @@ ephy_notebook_remove (GtkContainer *container,
EphyNotebookPrivate *priv = notebook->priv;
GtkWidget *tab_label, *tab_label_label, *tab_label_icon;
int position, curr;
+ EphyWebView *view;
g_assert (EPHY_IS_EMBED (tab_widget));
@@ -805,12 +809,14 @@ 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);
+
g_signal_handlers_disconnect_by_func
- (tab_widget, G_CALLBACK (sync_icon), tab_label_icon);
+ (view, G_CALLBACK (sync_icon), tab_label_icon);
g_signal_handlers_disconnect_by_func
- (tab_widget, G_CALLBACK (sync_label), tab_label_label);
+ (view, G_CALLBACK (sync_label), tab_label_label);
g_signal_handlers_disconnect_by_func
- (tab_widget, G_CALLBACK (sync_load_status), tab_label);
+ (view, G_CALLBACK (sync_load_status), tab_label);
GTK_CONTAINER_CLASS (ephy_notebook_parent_class)->remove (container, tab_widget);
diff --git a/src/ephy-session.c b/src/ephy-session.c
index d4e38b988..e78849429 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -23,6 +23,8 @@
#include "ephy-session.h"
+#include "ephy-embed.h"
+#include "ephy-embed-utils.h"
#include "ephy-embed-container.h"
#include "ephy-window.h"
#include "ephy-shell.h"
@@ -375,11 +377,11 @@ session_delete (EphySession *session,
}
static void
-load_status_notify_cb (EphyEmbed *embed,
+load_status_notify_cb (EphyWebView *view,
GParamSpec *pspec,
EphySession *session)
{
- if (ephy_embed_get_load_status (embed) == FALSE)
+ if (ephy_web_view_get_load_status (view) == FALSE)
ephy_session_save (session, SESSION_CRASHED);
}
@@ -389,7 +391,7 @@ notebook_page_added_cb (GtkWidget *notebook,
guint position,
EphySession *session)
{
- g_signal_connect (embed, "notify::load-status",
+ g_signal_connect (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), "notify::load-status",
G_CALLBACK (load_status_notify_cb), session);
}
@@ -402,7 +404,7 @@ notebook_page_removed_cb (GtkWidget *notebook,
ephy_session_save (session, SESSION_CRASHED);
g_signal_handlers_disconnect_by_func
- (embed, G_CALLBACK (load_status_notify_cb),
+ (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), G_CALLBACK (load_status_notify_cb),
session);
}
@@ -657,7 +659,7 @@ session_command_open_uris (EphySession *session,
NULL /* parent tab */,
request,
flags | page_flags,
- EPHY_EMBED_CHROME_ALL,
+ EPHY_WEB_VIEW_CHROME_ALL,
FALSE /* is popup? */,
user_time);
g_object_unref (request);
@@ -704,7 +706,7 @@ session_command_dispatch (EphySession *session)
NULL /* NetworkRequest */,
EPHY_NEW_TAB_IN_NEW_WINDOW |
EPHY_NEW_TAB_HOME_PAGE,
- EPHY_EMBED_CHROME_ALL,
+ EPHY_WEB_VIEW_CHROME_ALL,
FALSE /* is popup? */,
cmd->user_time);
}
@@ -1028,17 +1030,17 @@ write_tab (xmlTextWriterPtr writer,
ret = xmlTextWriterStartElement (writer, (xmlChar *) "embed");
if (ret < 0) return ret;
- address = ephy_embed_get_address (embed);
+ address = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
ret = xmlTextWriterWriteAttribute (writer, (xmlChar *) "url",
(const xmlChar *) address);
if (ret < 0) return ret;
- title = ephy_embed_get_title (embed);
+ title = ephy_web_view_get_title (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
ret = xmlTextWriterWriteAttribute (writer, (xmlChar *) "title",
(const xmlChar *) title);
if (ret < 0) return ret;
- if (ephy_embed_get_load_status (embed))
+ if (ephy_web_view_get_load_status (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)))
{
ret = xmlTextWriterWriteAttribute (writer,
(const xmlChar *) "loading",
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 6a6926e62..614d88d7f 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -31,6 +31,7 @@
#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
#include "ephy-embed-single.h"
+#include "ephy-embed-utils.h"
#include "eel-gconf-extensions.h"
#include "ephy-prefs.h"
#include "ephy-file-helpers.h"
@@ -111,7 +112,7 @@ ephy_shell_class_init (EphyShellClass *klass)
static EphyEmbed *
ephy_shell_new_window_cb (EphyEmbedSingle *single,
EphyEmbed *parent_embed,
- EphyEmbedChrome chromemask,
+ EphyWebViewChrome chromemask,
EphyShell *shell)
{
GtkWidget *parent = NULL;
@@ -125,7 +126,7 @@ ephy_shell_new_window_cb (EphyEmbedSingle *single,
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_JAVASCRIPT_CHROME))
{
- chromemask = EPHY_EMBED_CHROME_ALL;
+ chromemask = EPHY_WEB_VIEW_CHROME_ALL;
}
if (parent_embed != NULL)
@@ -140,7 +141,7 @@ ephy_shell_new_window_cb (EphyEmbedSingle *single,
/* what's a popup ? ATM, any window opened with menubar toggled on
* is *not* a popup
*/
- is_popup = (chromemask & EPHY_EMBED_CHROME_MENUBAR) == 0;
+ is_popup = (chromemask & EPHY_WEB_VIEW_CHROME_MENUBAR) == 0;
return ephy_shell_new_tab_full
(shell,
@@ -424,7 +425,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
EphyEmbed *previous_embed,
WebKitNetworkRequest *request,
EphyNewTabFlags flags,
- EphyEmbedChrome chrome,
+ EphyWebViewChrome chrome,
gboolean is_popup,
guint32 user_time)
{
@@ -474,7 +475,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
if (embed != NULL)
{
- if (ephy_embed_get_is_blank (embed))
+ if (ephy_web_view_get_is_blank (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)))
{
active_is_blank = TRUE;
}
@@ -510,8 +511,8 @@ ephy_shell_new_tab_full (EphyShell *shell,
if (flags & EPHY_NEW_TAB_HOME_PAGE ||
flags & EPHY_NEW_TAB_NEW_PAGE)
{
- ephy_embed_set_typed_address (embed, "",
- EPHY_EMBED_ADDRESS_EXPIRE_NEXT);
+ ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), "",
+ EPHY_WEB_VIEW_ADDRESS_EXPIRE_NEXT);
ephy_toolbar_activate_location (toolbar);
is_empty = load_homepage (embed);
}
@@ -575,7 +576,7 @@ ephy_shell_new_tab (EphyShell *shell,
embed = ephy_shell_new_tab_full (shell, parent_window,
previous_embed, request, flags,
- EPHY_EMBED_CHROME_ALL, FALSE, 0);
+ EPHY_WEB_VIEW_CHROME_ALL, FALSE, 0);
if (request)
g_object_unref (request);
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index 00a1765fa..1ebb39190 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -103,7 +103,7 @@ EphyEmbed *ephy_shell_new_tab_full (EphyShell *shell,
EphyEmbed *previous_embed,
WebKitNetworkRequest *request,
EphyNewTabFlags flags,
- EphyEmbedChrome chrome,
+ EphyWebViewChrome chrome,
gboolean is_popup,
guint32 user_time);
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c
index d68868eba..6963ef324 100644
--- a/src/ephy-tabs-menu.c
+++ b/src/ephy-tabs-menu.c
@@ -176,7 +176,7 @@ sync_tab_title (EphyEmbed *embed,
{
const char *title;
- title = ephy_embed_utils_get_title_composite (embed);
+ title = ephy_embed_utils_get_title_composite (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
g_object_set (action, "label", title, NULL);
}
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index f9cd554c6..464272f4d 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-embed-utils.h"
#include "ephy-toolbar.h"
#include "ephy-link.h"
#include "ephy-go-action.h"
@@ -173,8 +174,8 @@ sync_user_input_cb (EphyLocationAction *action,
address = ephy_location_action_get_address (action);
priv->updating_address = TRUE;
- ephy_embed_set_typed_address (embed, address,
- EPHY_EMBED_ADDRESS_EXPIRE_CURRENT);
+ ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), address,
+ EPHY_WEB_VIEW_ADDRESS_EXPIRE_CURRENT);
priv->updating_address = FALSE;
}
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 2df66b244..562c3f3a8 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -95,10 +95,10 @@ static void ephy_window_view_toolbar_cb (GtkAction *action,
EphyWindow *window);
static void ephy_window_view_popup_windows_cb (GtkAction *action,
EphyWindow *window);
-static void sync_tab_load_status (EphyEmbed *embed,
+static void sync_tab_load_status (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window);
-static void sync_tab_security (EphyEmbed *embed,
+static void sync_tab_security (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window);
static void sync_tab_zoom (WebKitWebView *web_view,
@@ -441,7 +441,7 @@ struct _EphyWindowPrivate
guint num_tabs;
guint tab_message_cid;
guint help_message_cid;
- EphyEmbedChrome chrome;
+ EphyWebViewChrome chrome;
guint idle_resize_handler;
GHashTable *tabs_to_remove;
EphyEmbedEvent *context_event;
@@ -576,9 +576,8 @@ impl_remove_child (EphyEmbedContainer *container,
window = EPHY_WINDOW (container);
priv = window->priv;
- modified = ephy_embed_has_modified_forms (child);
- if (ephy_embed_has_modified_forms (child)
- && confirm_close_with_modified_forms (window) == FALSE)
+ modified = ephy_web_view_has_modified_forms (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (child));
+ if (modified && confirm_close_with_modified_forms (window) == FALSE)
{
/* don't close the tab */
return;
@@ -609,7 +608,7 @@ impl_get_is_popup (EphyEmbedContainer *container)
return EPHY_WINDOW (container)->priv->is_popup;
}
-static EphyEmbedChrome
+static EphyWebViewChrome
impl_get_chrome (EphyEmbedContainer *container)
{
return EPHY_WINDOW (container)->priv->chrome;
@@ -740,7 +739,7 @@ exit_fullscreen_clicked_cb (EphyWindow *window)
static gboolean
get_toolbar_visibility (EphyWindow *window)
{
- return ((window->priv->chrome & EPHY_EMBED_CHROME_TOOLBAR) != 0) &&
+ return ((window->priv->chrome & EPHY_WEB_VIEW_CHROME_TOOLBAR) != 0) &&
!window->priv->ppv_mode;
}
@@ -752,7 +751,7 @@ get_chromes_visibility (EphyWindow *window,
gboolean *show_tabsbar)
{
EphyWindowPrivate *priv = window->priv;
- EphyEmbedChrome flags = priv->chrome;
+ EphyWebViewChrome flags = priv->chrome;
if (window->priv->ppv_mode)
{
@@ -763,15 +762,15 @@ get_chromes_visibility (EphyWindow *window,
}
else if (window->priv->fullscreen_mode)
{
- *show_toolbar = (flags & EPHY_EMBED_CHROME_TOOLBAR) != 0;
+ *show_toolbar = (flags & EPHY_WEB_VIEW_CHROME_TOOLBAR) != 0;
*show_menubar = *show_statusbar = FALSE;
*show_tabsbar = !priv->is_popup;
}
else
{
- *show_menubar = (flags & EPHY_EMBED_CHROME_MENUBAR) != 0;
- *show_statusbar = (flags & EPHY_EMBED_CHROME_STATUSBAR) != 0;
- *show_toolbar = (flags & EPHY_EMBED_CHROME_TOOLBAR) != 0;
+ *show_menubar = (flags & EPHY_WEB_VIEW_CHROME_MENUBAR) != 0;
+ *show_statusbar = (flags & EPHY_WEB_VIEW_CHROME_STATUSBAR) != 0;
+ *show_toolbar = (flags & EPHY_WEB_VIEW_CHROME_TOOLBAR) != 0;
*show_tabsbar = !priv->is_popup;
}
}
@@ -839,8 +838,8 @@ ephy_window_fullscreen (EphyWindow *window)
/* sync status */
embed = window->priv->active_embed;
- sync_tab_load_status (embed, NULL, window);
- sync_tab_security (embed, NULL, window);
+ 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);
egg_editable_toolbar_set_model
(EGG_EDITABLE_TOOLBAR (priv->toolbar),
@@ -1069,7 +1068,7 @@ ephy_window_delete_event (GtkWidget *widget,
EphyEmbed *embed;
embed = window->priv->active_embed;
- ephy_embed_set_print_preview_mode (embed, FALSE);
+ ephy_web_view_set_print_preview_mode (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), FALSE);
_ephy_window_set_print_preview (window, FALSE);
@@ -1083,7 +1082,7 @@ ephy_window_delete_event (GtkWidget *widget,
g_return_val_if_fail (EPHY_IS_EMBED (embed), FALSE);
- if (ephy_embed_has_modified_forms (embed))
+ if (ephy_web_view_has_modified_forms (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)))
{
modified = TRUE;
modified_embed = embed;
@@ -1533,7 +1532,7 @@ setup_ui_manager (EphyWindow *window)
}
static void
-sync_tab_address (EphyEmbed *embed,
+sync_tab_address (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
@@ -1542,31 +1541,31 @@ sync_tab_address (EphyEmbed *embed,
if (priv->closing) return;
ephy_toolbar_set_location (priv->toolbar,
- ephy_embed_get_address (embed),
- ephy_embed_get_typed_address (embed));
+ ephy_web_view_get_address (view),
+ ephy_web_view_get_typed_address (view));
ephy_find_toolbar_request_close (priv->find_toolbar);
}
static void
-sync_tab_document_type (EphyEmbed *embed,
+sync_tab_document_type (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
EphyWindowPrivate *priv = window->priv;
GtkActionGroup *action_group = priv->action_group;
GtkAction *action;
- EphyEmbedDocumentType type;
+ EphyWebViewDocumentType type;
gboolean can_find, disable, is_image;
if (priv->closing) return;
/* update zoom actions */
- sync_tab_zoom (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed), NULL, window);
+ sync_tab_zoom (WEBKIT_WEB_VIEW (view), NULL, window);
- type = ephy_embed_get_document_type (embed);
- can_find = (type != EPHY_EMBED_DOCUMENT_IMAGE);
- is_image = type == EPHY_EMBED_DOCUMENT_IMAGE;
- disable = (type != EPHY_EMBED_DOCUMENT_HTML);
+ type = ephy_web_view_get_document_type (view);
+ can_find = (type != EPHY_WEB_VIEW_DOCUMENT_IMAGE);
+ is_image = type == EPHY_WEB_VIEW_DOCUMENT_IMAGE;
+ disable = (type != EPHY_WEB_VIEW_DOCUMENT_HTML);
action = gtk_action_group_get_action (action_group, "ViewEncoding");
ephy_action_change_sensitivity_flags (action, SENS_FLAG_DOCUMENT, disable);
@@ -1586,7 +1585,7 @@ sync_tab_document_type (EphyEmbed *embed,
}
static void
-sync_tab_icon (EphyEmbed *embed,
+sync_tab_icon (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
@@ -1595,7 +1594,7 @@ sync_tab_icon (EphyEmbed *embed,
if (priv->closing) return;
- icon = ephy_embed_get_icon (embed);
+ icon = ephy_web_view_get_icon (view);
ephy_toolbar_set_favicon (priv->toolbar, icon);
}
@@ -1610,7 +1609,7 @@ clear_progress_cb (EphyWindow *window)
}
static void
-sync_tab_load_progress (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window)
+sync_tab_load_progress (EphyWebView *view, GParamSpec *pspec, EphyWindow *window)
{
gdouble progress, previous_progress;
gboolean loading;
@@ -1623,8 +1622,8 @@ sync_tab_load_progress (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window)
window->priv->clear_progress_timeout_id = 0;
}
- progress = ephy_embed_get_load_percent (embed)/100.0;
- loading = ephy_embed_get_load_status (embed);
+ progress = ephy_web_view_get_load_percent (view)/100.0;
+ loading = ephy_web_view_get_load_status (view);
/* Do not show a 'blink' progress from pages that go from 0 to 100,
* for example about:blank. */
@@ -1649,14 +1648,14 @@ sync_tab_load_progress (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window)
}
static void
-sync_tab_message (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window)
+sync_tab_message (EphyWebView *view, GParamSpec *pspec, EphyWindow *window)
{
GtkStatusbar *s = GTK_STATUSBAR (window->priv->statusbar);
const char *message;
if (window->priv->closing) return;
- message = ephy_embed_get_status_message (embed);
+ message = ephy_web_view_get_status_message (view);
gtk_statusbar_pop (s, window->priv->tab_message_cid);
@@ -1667,11 +1666,11 @@ sync_tab_message (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *window)
}
static void
-sync_tab_navigation (EphyEmbed *embed,
+sync_tab_navigation (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
- EphyEmbedNavigationFlags flags;
+ EphyWebViewNavigationFlags flags;
WebKitWebHistoryItem *item;
WebKitWebView *web_view;
WebKitWebBackForwardList *web_back_forward_list;
@@ -1680,17 +1679,17 @@ sync_tab_navigation (EphyEmbed *embed,
if (window->priv->closing) return;
- flags = ephy_embed_get_navigation_flags (embed);
+ flags = ephy_web_view_get_navigation_flags (view);
- if (flags & EPHY_EMBED_NAV_UP)
+ if (flags & EPHY_WEB_VIEW_NAV_UP)
{
up = TRUE;
}
- if (flags & EPHY_EMBED_NAV_BACK)
+ if (flags & EPHY_WEB_VIEW_NAV_BACK)
{
back = TRUE;
}
- if (flags & EPHY_EMBED_NAV_FORWARD)
+ if (flags & EPHY_WEB_VIEW_NAV_FORWARD)
{
forward = TRUE;
}
@@ -1698,7 +1697,7 @@ sync_tab_navigation (EphyEmbed *embed,
ephy_toolbar_set_navigation_actions (window->priv->toolbar,
back, forward, up);
- web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
+ web_view = WEBKIT_WEB_VIEW (view);
web_back_forward_list = webkit_web_view_get_back_forward_list (web_view);
item = webkit_web_back_forward_list_get_back_item (web_back_forward_list);
@@ -1721,12 +1720,12 @@ sync_tab_navigation (EphyEmbed *embed,
}
static void
-sync_tab_security (EphyEmbed *embed,
+sync_tab_security (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
EphyWindowPrivate *priv = window->priv;
- EphyEmbedSecurityLevel level;
+ EphyWebViewSecurityLevel level;
char *description = NULL;
char *state = NULL;
char *tooltip;
@@ -1736,34 +1735,34 @@ sync_tab_security (EphyEmbed *embed,
if (priv->closing) return;
- ephy_embed_get_security_level (embed, &level, &description);
+ ephy_web_view_get_security_level (view, &level, &description);
switch (level)
{
- case EPHY_EMBED_STATE_IS_UNKNOWN:
+ case EPHY_WEB_VIEW_STATE_IS_UNKNOWN:
state = _("Unknown");
break;
- case EPHY_EMBED_STATE_IS_INSECURE:
+ case EPHY_WEB_VIEW_STATE_IS_INSECURE:
state = _("Insecure");
g_free (description);
description = NULL;
break;
- case EPHY_EMBED_STATE_IS_BROKEN:
+ case EPHY_WEB_VIEW_STATE_IS_BROKEN:
state = _("Broken");
stock_id = STOCK_LOCK_BROKEN;
show_lock = TRUE;
g_free (description);
description = NULL;
break;
- case EPHY_EMBED_STATE_IS_SECURE_LOW:
- case EPHY_EMBED_STATE_IS_SECURE_MED:
+ case EPHY_WEB_VIEW_STATE_IS_SECURE_LOW:
+ case EPHY_WEB_VIEW_STATE_IS_SECURE_MED:
state = _("Low");
/* We deliberately don't show the 'secure' icon
* for low & medium secure sites; see bug #151709.
*/
stock_id = STOCK_LOCK_INSECURE;
break;
- case EPHY_EMBED_STATE_IS_SECURE_HIGH:
+ case EPHY_WEB_VIEW_STATE_IS_SECURE_HIGH:
state = _("High");
stock_id = STOCK_LOCK_SECURE;
show_lock = TRUE;
@@ -1804,14 +1803,14 @@ sync_tab_security (EphyEmbed *embed,
}
static void
-sync_tab_popup_windows (EphyEmbed *embed,
+sync_tab_popup_windows (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
guint num_popups = 0;
char *tooltip = NULL;
- g_object_get (embed,
+ g_object_get (view,
"hidden-popup-count", &num_popups,
NULL);
@@ -1832,21 +1831,21 @@ sync_tab_popup_windows (EphyEmbed *embed,
}
static void
-sync_tab_popups_allowed (EphyEmbed *embed,
+sync_tab_popups_allowed (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
GtkAction *action;
gboolean allow;
- g_return_if_fail (EPHY_IS_EMBED (embed));
+ g_return_if_fail (EPHY_IS_WEB_VIEW (view));
g_return_if_fail (EPHY_IS_WINDOW (window));
action = gtk_action_group_get_action (window->priv->action_group,
"ViewPopupWindows");
g_return_if_fail (GTK_IS_ACTION (action));
- g_object_get (embed, "popups-allowed", &allow, NULL);
+ g_object_get (view, "popups-allowed", &allow, NULL);
g_signal_handlers_block_by_func
(G_OBJECT (action),
@@ -1862,7 +1861,7 @@ sync_tab_popups_allowed (EphyEmbed *embed,
}
static void
-sync_tab_load_status (EphyEmbed *embed,
+sync_tab_load_status (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
@@ -1873,7 +1872,7 @@ sync_tab_load_status (EphyEmbed *embed,
if (window->priv->closing) return;
- loading = ephy_embed_get_load_status (embed);
+ loading = ephy_web_view_get_load_status (view);
action = gtk_action_group_get_action (action_group, "ViewStop");
gtk_action_set_sensitive (action, loading);
@@ -1893,7 +1892,7 @@ sync_tab_load_status (EphyEmbed *embed,
}
static void
-sync_tab_title (EphyEmbed *embed,
+sync_tab_title (EphyWebView *view,
GParamSpec *pspec,
EphyWindow *window)
{
@@ -1902,7 +1901,7 @@ sync_tab_title (EphyEmbed *embed,
if (priv->closing) return;
gtk_window_set_title (GTK_WINDOW(window),
- ephy_embed_utils_get_title_composite (embed));
+ ephy_embed_utils_get_title_composite (view));
}
static void
@@ -1910,7 +1909,7 @@ sync_tab_zoom (WebKitWebView *web_view, GParamSpec *pspec, EphyWindow *window)
{
GtkActionGroup *action_group;
GtkAction *action;
- EphyEmbedDocumentType type;
+ EphyWebViewDocumentType type;
gboolean can_zoom_in = TRUE, can_zoom_out = TRUE, can_zoom_normal = FALSE, can_zoom;
float zoom;
EphyEmbed *embed = window->priv->active_embed;
@@ -1921,8 +1920,8 @@ sync_tab_zoom (WebKitWebView *web_view, GParamSpec *pspec, EphyWindow *window)
"zoom-level", &zoom,
NULL);
- type = ephy_embed_get_document_type (embed);
- can_zoom = (type != EPHY_EMBED_DOCUMENT_IMAGE);
+ type = ephy_web_view_get_document_type (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
+ can_zoom = (type != EPHY_WEB_VIEW_DOCUMENT_IMAGE);
if (zoom >= ZOOM_MAXIMAL)
{
@@ -2237,11 +2236,14 @@ show_embed_popup (EphyWindow *window,
}
static gboolean
-tab_context_menu_cb (EphyEmbed *embed,
+tab_context_menu_cb (EphyWebView *view,
EphyEmbedEvent *event,
EphyWindow *window)
{
- g_return_val_if_fail (EPHY_IS_EMBED (embed), FALSE);
+ EphyEmbed *embed;
+
+ g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), FALSE);
+ embed = EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view);
g_return_val_if_fail (window->priv->active_embed == embed, FALSE);
show_embed_popup (window, embed, event);
@@ -2432,7 +2434,7 @@ ephy_window_visibility_cb (EphyEmbed *embed, GParamSpec *pspec, EphyWindow *wind
{
gboolean visibility;
- visibility = ephy_embed_get_visibility (embed);
+ visibility = ephy_web_view_get_visibility (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
if (visibility)
gtk_widget_show (GTK_WIDGET (window));
@@ -2457,7 +2459,7 @@ web_view_ready_cb (WebKitWebView *web_view,
gboolean toolbar_visible;
gboolean statusbar_visible;
gboolean menubar_visible;
- EphyEmbedChrome chrome_mask;
+ EphyWebViewChrome chrome_mask;
WebKitWebWindowFeatures *features;
toolbar_visible = statusbar_visible = menubar_visible = TRUE;
@@ -2476,13 +2478,13 @@ web_view_ready_cb (WebKitWebView *web_view,
gtk_window_set_default_size (GTK_WINDOW (window), width, height);
if (!toolbar_visible)
- chrome_mask &= ~EPHY_EMBED_CHROME_TOOLBAR;
+ chrome_mask &= ~EPHY_WEB_VIEW_CHROME_TOOLBAR;
if (!statusbar_visible)
- chrome_mask &= ~EPHY_EMBED_CHROME_STATUSBAR;
+ chrome_mask &= ~EPHY_WEB_VIEW_CHROME_STATUSBAR;
if (!menubar_visible)
- chrome_mask &= ~EPHY_EMBED_CHROME_MENUBAR;
+ chrome_mask &= ~EPHY_WEB_VIEW_CHROME_MENUBAR;
window->priv->chrome = chrome_mask;
@@ -2524,7 +2526,7 @@ create_web_view_cb (WebKitWebView *web_view,
parent_window,
NULL, NULL,
flags,
- EPHY_EMBED_CHROME_ALL,
+ EPHY_WEB_VIEW_CHROME_ALL,
FALSE,
0);
@@ -2558,7 +2560,6 @@ policy_decision_required_cb (WebKitWebView *web_view,
if (reason == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED &&
(button == 2 /* middle button */ ||
(button == 1 && state == GDK_CONTROL_MASK) /* ctrl + left button */)) {
- const char *uri;
EphyEmbed *embed;
embed = ephy_embed_container_get_active_child
@@ -2570,7 +2571,7 @@ policy_decision_required_cb (WebKitWebView *web_view,
request,
EPHY_NEW_TAB_IN_EXISTING_WINDOW |
EPHY_NEW_TAB_OPEN_PAGE,
- EPHY_EMBED_CHROME_ALL, FALSE, 0);
+ EPHY_WEB_VIEW_CHROME_ALL, FALSE, 0);
return TRUE;
}
@@ -2605,7 +2606,7 @@ const char *remove_node_string =
"if (node) node.parentNode.removeChild(node);";
static void
-ephy_window_link_message_cb (EphyEmbed *embed, GParamSpec *spec, EphyWindow *window)
+ephy_window_link_message_cb (EphyWebView *web_view, GParamSpec *spec, EphyWindow *window)
{
gboolean visible;
const char *link_message;
@@ -2613,8 +2614,8 @@ ephy_window_link_message_cb (EphyEmbed *embed, GParamSpec *spec, EphyWindow *win
g_object_get (window->priv->statusbar, "visible", &visible, NULL);
- view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
- link_message = ephy_embed_get_link_message (embed);
+ view = EPHY_WEB_VIEW (web_view);
+ link_message = ephy_web_view_get_link_message (web_view);
/* If the statusbar is visible remove the test, it might get
stuck otherwise */
@@ -2648,7 +2649,7 @@ ephy_window_link_message_cb (EphyEmbed *embed, GParamSpec *spec, EphyWindow *win
freeme = g_strconcat (buffer, "...", NULL);
}
- g_utf8_strncpy (text, pango_layout_get_text (layout), item->num_chars);
+ g_utf8_strncpy ((gchar *)text, pango_layout_get_text (layout), item->num_chars);
bg = widget->style->bg[GTK_WIDGET_STATE(widget)];
fg = widget->style->fg[GTK_WIDGET_STATE(widget)];
@@ -2688,10 +2689,12 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed)
if (old_embed != NULL)
{
WebKitWebView *web_view;
+ EphyWebView *view;
guint sid;
embed = old_embed;
web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
+ view = EPHY_WEB_VIEW (web_view);
g_signal_handlers_disconnect_by_func (web_view,
G_CALLBACK (sync_tab_zoom),
@@ -2721,50 +2724,50 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed)
G_CALLBACK (policy_decision_required_cb),
NULL);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_popup_windows),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_popups_allowed),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_security),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_document_type),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_load_progress),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_load_status),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_navigation),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_title),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_address),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_icon),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (sync_tab_message),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (ephy_window_visibility_cb),
window);
- g_signal_handlers_disconnect_by_func (embed,
+ g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (ephy_window_link_message_cb),
window);
g_signal_handlers_disconnect_by_func
- (embed, G_CALLBACK (tab_context_menu_cb), window);
+ (view, G_CALLBACK (tab_context_menu_cb), window);
g_signal_handlers_disconnect_by_func
- (embed, G_CALLBACK (ephy_window_dom_mouse_click_cb), window);
+ (view, G_CALLBACK (ephy_window_dom_mouse_click_cb), window);
}
@@ -2773,22 +2776,25 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed)
if (new_embed != NULL)
{
WebKitWebView *web_view;
+ EphyWebView *view;
embed = new_embed;
-
- sync_tab_security (embed, NULL, window);
- sync_tab_document_type (embed, NULL, window);
- sync_tab_load_progress (embed, NULL, window);
- sync_tab_load_status (embed, NULL, window);
- sync_tab_navigation (embed, NULL, window);
- sync_tab_title (embed, NULL, window);
- sync_tab_address (embed, NULL, window);
- sync_tab_icon (embed, NULL, window);
- sync_tab_message (embed, NULL, window);
- sync_tab_popup_windows (embed, NULL, window);
- sync_tab_popups_allowed (embed, NULL, window);
+ view = EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed);
+
+ sync_tab_security (view, NULL, window);
+ sync_tab_document_type (view, NULL, window);
+ sync_tab_load_progress (view, NULL, window);
+ sync_tab_load_status (view, NULL, window);
+ sync_tab_navigation (view, NULL, window);
+ sync_tab_title (view, NULL, window);
+ sync_tab_address (view, NULL, window);
+ sync_tab_icon (view, NULL, window);
+ sync_tab_message (view, NULL, window);
+ sync_tab_popup_windows (view, NULL, window);
+ sync_tab_popups_allowed (view, NULL, window);
web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
+ view = EPHY_WEB_VIEW (web_view);
sync_tab_zoom (web_view, NULL, window);
@@ -2814,49 +2820,49 @@ ephy_window_set_active_tab (EphyWindow *window, EphyEmbed *new_embed)
G_CALLBACK (policy_decision_required_cb),
window, 0);
- g_signal_connect_object (embed, "notify::hidden-popup-count",
+ g_signal_connect_object (view, "notify::hidden-popup-count",
G_CALLBACK (sync_tab_popup_windows),
window, 0);
- g_signal_connect_object (embed, "notify::popups-allowed",
+ g_signal_connect_object (view, "notify::popups-allowed",
G_CALLBACK (sync_tab_popups_allowed),
window, 0);
- g_signal_connect_object (embed, "notify::title",
+ g_signal_connect_object (view, "notify::embed-title",
G_CALLBACK (sync_tab_title),
window, 0);
- g_signal_connect_object (embed, "notify::address",
+ g_signal_connect_object (view, "notify::address",
G_CALLBACK (sync_tab_address),
window, 0);
- g_signal_connect_object (embed, "notify::icon",
+ g_signal_connect_object (view, "notify::icon",
G_CALLBACK (sync_tab_icon),
window, 0);
- g_signal_connect_object (embed, "notify::status-message",
+ g_signal_connect_object (view, "notify::status-message",
G_CALLBACK (sync_tab_message),
window, 0);
- g_signal_connect_object (embed, "notify::security-level",
+ g_signal_connect_object (view, "notify::security-level",
G_CALLBACK (sync_tab_security),
window, 0);
- g_signal_connect_object (embed, "notify::document-type",
+ g_signal_connect_object (view, "notify::document-type",
G_CALLBACK (sync_tab_document_type),
window, 0);
- g_signal_connect_object (embed, "notify::load-status",
+ g_signal_connect_object (view, "notify::load-status",
G_CALLBACK (sync_tab_load_status),
window, 0);
- g_signal_connect_object (embed, "notify::navigation",
+ g_signal_connect_object (view, "notify::navigation",
G_CALLBACK (sync_tab_navigation),
window, 0);
- g_signal_connect_object (embed, "ge-context-menu",
+ g_signal_connect_object (view, "ge-context-menu",
G_CALLBACK (tab_context_menu_cb),
window, G_CONNECT_AFTER);
- g_signal_connect_object (embed, "notify::load-progress",
+ g_signal_connect_object (view, "notify::load-progress",
G_CALLBACK (sync_tab_load_progress),
window, 0);
- g_signal_connect_object (embed, "ge_dom_mouse_click",
+ g_signal_connect_object (view, "ge_dom_mouse_click",
G_CALLBACK (ephy_window_dom_mouse_click_cb),
window, 0);
- g_signal_connect_object (embed, "notify::visibility",
+ g_signal_connect_object (view, "notify::visibility",
G_CALLBACK (ephy_window_visibility_cb),
window, 0);
- g_signal_connect_object (embed, "notify::link-message",
+ g_signal_connect_object (view, "notify::link-message",
G_CALLBACK (ephy_window_link_message_cb),
window, 0);
@@ -2912,7 +2918,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_embed_get_address (embed);
+ address = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
ephy_toolbar_set_location (priv->toolbar, address, NULL);
/* don't suppress alert */
@@ -3081,10 +3087,10 @@ notebook_page_added_cb (EphyNotebook *notebook,
G_CONNECT_SWAPPED);
#endif
- g_signal_connect_object (embed, "close-request",
+ g_signal_connect_object (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), "close-request",
G_CALLBACK (embed_close_request_cb),
window, 0);
- g_signal_connect_object (embed, "ge-modal-alert",
+ g_signal_connect_object (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), "ge-modal-alert",
G_CALLBACK (embed_modal_alert_cb), window, G_CONNECT_AFTER);
/* Let the extensions attach themselves to the tab */
@@ -3131,9 +3137,9 @@ notebook_page_removed_cb (EphyNotebook *notebook,
}
g_signal_handlers_disconnect_by_func
- (embed, G_CALLBACK (embed_modal_alert_cb), window);
+ (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), G_CALLBACK (embed_modal_alert_cb), window);
g_signal_handlers_disconnect_by_func
- (embed, G_CALLBACK (embed_close_request_cb), window);
+ (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), G_CALLBACK (embed_close_request_cb), window);
}
static void
@@ -3158,7 +3164,7 @@ notebook_page_close_request_cb (EphyNotebook *notebook,
return;
}
- if (!ephy_embed_has_modified_forms (embed) ||
+ if (!ephy_web_view_has_modified_forms (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)) ||
confirm_close_with_modified_forms (window))
{
gtk_widget_destroy (GTK_WIDGET (embed));
@@ -3215,28 +3221,28 @@ setup_notebook (EphyWindow *window)
}
static void
-ephy_window_set_chrome (EphyWindow *window, EphyEmbedChrome mask)
+ephy_window_set_chrome (EphyWindow *window, EphyWebViewChrome mask)
{
- EphyEmbedChrome chrome_mask = mask;
+ EphyWebViewChrome chrome_mask = mask;
- if (mask == EPHY_EMBED_CHROME_ALL)
+ if (mask == EPHY_WEB_VIEW_CHROME_ALL)
{
window->priv->should_save_chrome = TRUE;
}
if (!eel_gconf_get_boolean (CONF_WINDOWS_SHOW_TOOLBARS))
{
- chrome_mask &= ~EPHY_EMBED_CHROME_TOOLBAR;
+ chrome_mask &= ~EPHY_WEB_VIEW_CHROME_TOOLBAR;
}
if (!eel_gconf_get_boolean (CONF_WINDOWS_SHOW_STATUSBAR))
{
- chrome_mask &= ~EPHY_EMBED_CHROME_STATUSBAR;
+ chrome_mask &= ~EPHY_WEB_VIEW_CHROME_STATUSBAR;
}
if (eel_gconf_get_boolean (CONF_LOCKDOWN_HIDE_MENUBAR))
{
- chrome_mask &= ~EPHY_EMBED_CHROME_MENUBAR;
+ chrome_mask &= ~EPHY_WEB_VIEW_CHROME_MENUBAR;
}
window->priv->chrome = chrome_mask;
@@ -3543,7 +3549,7 @@ allow_popups_notifier (GConfClient *client,
embed = EPHY_EMBED (tabs->data);
g_return_if_fail (EPHY_IS_EMBED (embed));
- g_object_notify (G_OBJECT (embed), "popups-allowed");
+ g_object_notify (G_OBJECT (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)), "popups-allowed");
}
}
@@ -3871,7 +3877,7 @@ ephy_window_new (void)
/**
* ephy_window_new_with_chrome:
- * @chrome: an #EphyEmbedChrome
+ * @chrome: an #EphyWebViewChrome
* @is_popup: whether the new window is a popup window
*
* Identical to ephy_window_new(), but allows you to specify a chrome.
@@ -3879,7 +3885,7 @@ ephy_window_new (void)
* Return value: a new #EphyWindow
**/
EphyWindow *
-ephy_window_new_with_chrome (EphyEmbedChrome chrome,
+ephy_window_new_with_chrome (EphyWebViewChrome chrome,
gboolean is_popup)
{
return EPHY_WINDOW (g_object_new (EPHY_TYPE_WINDOW,
@@ -4115,21 +4121,21 @@ ephy_window_set_zoom (EphyWindow *window,
static void
sync_prefs_with_chrome (EphyWindow *window)
{
- EphyEmbedChrome flags = window->priv->chrome;
+ EphyWebViewChrome flags = window->priv->chrome;
if (window->priv->should_save_chrome)
{
eel_gconf_set_boolean (CONF_WINDOWS_SHOW_TOOLBARS,
- flags & EPHY_EMBED_CHROME_TOOLBAR);
+ flags & EPHY_WEB_VIEW_CHROME_TOOLBAR);
eel_gconf_set_boolean (CONF_WINDOWS_SHOW_STATUSBAR,
- flags & EPHY_EMBED_CHROME_STATUSBAR);
+ flags & EPHY_WEB_VIEW_CHROME_STATUSBAR);
}
}
static void
sync_chrome_with_view_toggle (GtkAction *action,
EphyWindow *window,
- EphyEmbedChrome chrome_flag,
+ EphyWebViewChrome chrome_flag,
gboolean invert)
{
gboolean active;
@@ -4148,7 +4154,7 @@ ephy_window_view_statusbar_cb (GtkAction *action,
EphyWindow *window)
{
sync_chrome_with_view_toggle (action, window,
- EPHY_EMBED_CHROME_STATUSBAR, FALSE);
+ EPHY_WEB_VIEW_CHROME_STATUSBAR, FALSE);
}
static void
@@ -4156,7 +4162,7 @@ ephy_window_view_toolbar_cb (GtkAction *action,
EphyWindow *window)
{
sync_chrome_with_view_toggle (action, window,
- EPHY_EMBED_CHROME_TOOLBAR, TRUE);
+ EPHY_WEB_VIEW_CHROME_TOOLBAR, TRUE);
}
static void
@@ -4180,7 +4186,7 @@ ephy_window_view_popup_windows_cb (GtkAction *action,
allow = FALSE;
}
- g_object_set (G_OBJECT (embed), "popups-allowed", allow, NULL);
+ g_object_set (G_OBJECT (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)), "popups-allowed", allow, NULL);
}
/**
diff --git a/src/ephy-window.h b/src/ephy-window.h
index ecb34a442..de7f21a7c 100644
--- a/src/ephy-window.h
+++ b/src/ephy-window.h
@@ -60,7 +60,7 @@ GType ephy_window_get_type (void);
EphyWindow *ephy_window_new (void);
-EphyWindow *ephy_window_new_with_chrome (EphyEmbedChrome chrome,
+EphyWindow *ephy_window_new_with_chrome (EphyWebViewChrome chrome,
gboolean is_popup);
void _ephy_window_set_print_preview (EphyWindow *window,
diff --git a/src/popup-commands.c b/src/popup-commands.c
index 31203237e..00db15425 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -373,7 +373,7 @@ popup_cmd_open_frame (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- location = ephy_embed_get_location (embed, FALSE);
+ location = ephy_web_view_get_location (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (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 a5b89abdc..dbc571980 100644
--- a/src/ppview-toolbar.c
+++ b/src/ppview-toolbar.c
@@ -22,6 +22,7 @@
#include "ppview-toolbar.h"
#include "ephy-embed-container.h"
+#include "ephy-embed-utils.h"
#include "ephy-window.h"
#include <string.h>
@@ -177,7 +178,7 @@ toolbar_update_sensitivity (PPViewToolbar *t)
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- pages = ephy_embed_print_preview_n_pages (embed);
+ pages = ephy_web_view_print_preview_n_pages (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
c_page = t->priv->current_page;
action = gtk_action_group_get_action (action_group, "PPVGoBack");
@@ -272,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_embed_print_preview_navigate (embed, EPHY_EMBED_PRINTPREVIEW_HOME, 0);
+ ephy_web_view_print_preview_navigate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), EPHY_WEB_VIEW_PRINTPREVIEW_HOME, 0);
t->priv->current_page = 1;
@@ -289,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_embed_print_preview_navigate (embed,
- EPHY_EMBED_PRINTPREVIEW_END,
- 0);
+ ephy_web_view_print_preview_navigate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
+ EPHY_WEB_VIEW_PRINTPREVIEW_END,
+ 0);
- t->priv->current_page = ephy_embed_print_preview_n_pages (embed);
+ t->priv->current_page = ephy_web_view_print_preview_n_pages (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
toolbar_update_sensitivity (t);
}
@@ -309,7 +310,7 @@ clamp_page_limits (PPViewToolbar *t, int page)
(EPHY_EMBED_CONTAINER (window));
g_return_val_if_fail (embed != NULL, -1);
- pages = ephy_embed_print_preview_n_pages (embed);
+ pages = ephy_web_view_print_preview_n_pages (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
return CLAMP (page, 1, pages);
}
@@ -326,9 +327,9 @@ toolbar_cmd_ppv_go_back (GtkUIManager *merge,
t->priv->current_page = clamp_page_limits (t, t->priv->current_page - 1);
- ephy_embed_print_preview_navigate (embed,
- EPHY_EMBED_PRINTPREVIEW_GOTO_PAGENUM,
- t->priv->current_page);
+ ephy_web_view_print_preview_navigate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
+ EPHY_WEB_VIEW_PRINTPREVIEW_GOTO_PAGENUM,
+ t->priv->current_page);
toolbar_update_sensitivity (t);
}
@@ -345,9 +346,9 @@ toolbar_cmd_ppv_go_forward (GtkUIManager *merge,
t->priv->current_page = clamp_page_limits (t, t->priv->current_page + 1);
- ephy_embed_print_preview_navigate (embed,
- EPHY_EMBED_PRINTPREVIEW_GOTO_PAGENUM,
- t->priv->current_page);
+ ephy_web_view_print_preview_navigate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
+ EPHY_WEB_VIEW_PRINTPREVIEW_GOTO_PAGENUM,
+ t->priv->current_page);
toolbar_update_sensitivity (t);
}
@@ -370,5 +371,5 @@ toolbar_cmd_ppv_close (GtkUIManager *merge,
_ephy_window_set_print_preview (window, FALSE);
- ephy_embed_set_print_preview_mode (embed, FALSE);
+ ephy_web_view_set_print_preview_mode (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), FALSE);
}
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index ab6d5eb1d..0e409051c 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -26,6 +26,7 @@
#include "ephy-prefs.h"
#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
+#include "ephy-embed-utils.h"
#include "ephy-favicon-cache.h"
#include "ephy-session.h"
#include "ephy-embed-prefs.h"
@@ -1016,7 +1017,7 @@ prefs_homepage_current_button_clicked_cb (GtkWidget *button,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- set_homepage_entry (dialog, ephy_embed_get_address (embed));
+ set_homepage_entry (dialog, ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed)));
}
static void
diff --git a/src/window-commands.c b/src/window-commands.c
index dfd512310..66bf63b55 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -93,7 +93,7 @@ window_cmd_file_print_preview (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
- ephy_embed_set_print_preview_mode (embed, TRUE);
+ ephy_web_view_set_print_preview_mode (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed), TRUE);
_ephy_window_set_print_preview (window, TRUE);
}
@@ -124,8 +124,8 @@ window_cmd_file_send_to (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- location = ephy_embed_get_address (embed);
- title = ephy_embed_get_title (embed);
+ 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));
subject = g_uri_escape_string (title, NULL, TRUE);
body = g_uri_escape_string (location, NULL, TRUE);
@@ -247,8 +247,8 @@ window_cmd_file_bookmark_page (GtkAction *action,
g_return_if_fail (embed != NULL);
ephy_bookmarks_ui_add_bookmark (GTK_WINDOW (window),
- ephy_embed_get_address (embed),
- ephy_embed_get_title (embed));
+ 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)));
}
static void
@@ -665,7 +665,7 @@ window_cmd_view_page_source (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (embed != NULL);
- address = ephy_embed_get_address (embed);
+ address = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
user_time = gtk_get_current_event_time ();
if (g_str_has_prefix (address, "file://"))
@@ -693,7 +693,7 @@ window_cmd_view_page_security_info (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
- ephy_embed_show_page_certificate (embed);
+ ephy_web_view_show_page_certificate (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
}
void
@@ -721,7 +721,7 @@ window_cmd_edit_personal_data (GtkAction *action,
(EPHY_EMBED_CONTAINER (window));
if (embed == NULL) return;
- address = ephy_embed_get_address (embed);
+ address = ephy_web_view_get_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed));
host = address != NULL ? ephy_string_get_host_name (address) : NULL;