aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ephy-completion-model.c2
-rw-r--r--src/ephy-navigation-history-action.c2
-rw-r--r--src/ephy-session.c4
-rw-r--r--src/ephy-shell.c6
-rw-r--r--src/ephy-window.c21
-rw-r--r--src/pdm-dialog.c4
-rw-r--r--src/window-commands.c2
7 files changed, 24 insertions, 17 deletions
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index 87980c71b..0a858c1d9 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -101,7 +101,7 @@ ephy_completion_model_init (EphyCompletionModel *model)
model->priv = priv = EPHY_COMPLETION_MODEL_GET_PRIVATE (model);
- priv->history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (embed_shell));
+ priv->history_service = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ()));
bookmarks_service = ephy_shell_get_bookmarks (ephy_shell);
priv->bookmarks = ephy_bookmarks_get_bookmarks (bookmarks_service);
diff --git a/src/ephy-navigation-history-action.c b/src/ephy-navigation-history-action.c
index d48127da4..ebb86e4cb 100644
--- a/src/ephy-navigation-history-action.c
+++ b/src/ephy-navigation-history-action.c
@@ -159,7 +159,7 @@ ephy_navigation_history_action_init (EphyNavigationHistoryAction *action)
{
action->priv = EPHY_NAVIGATION_HISTORY_ACTION_GET_PRIVATE (action);
- action->priv->history = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (embed_shell));
+ action->priv->history = EPHY_HISTORY_SERVICE (ephy_embed_shell_get_global_history_service (ephy_embed_shell_get_default ()));
action->priv->menu_timeout = 0;
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 024895ae4..962fbf675 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -531,7 +531,7 @@ ephy_session_close (EphySession *session)
session_command_queue_clear (session);
- ephy_embed_shell_prepare_close (embed_shell);
+ ephy_embed_shell_prepare_close (ephy_embed_shell_get_default ());
}
}
@@ -961,7 +961,7 @@ ephy_session_load_from_string (EphySession *session,
}
}
- if (ephy_embed_shell_get_mode (embed_shell) != EPHY_EMBED_SHELL_MODE_TEST)
+ if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) != EPHY_EMBED_SHELL_MODE_TEST)
{
active_child = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
gtk_widget_grab_focus (GTK_WIDGET (active_child));
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 29dcd90c3..eb9789166 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -720,6 +720,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
gboolean is_popup,
guint32 user_time)
{
+ EphyEmbedShell *embed_shell;
EphyWindow *window;
EphyEmbed *embed = NULL;
gboolean fullscreen_lockdown = FALSE;
@@ -731,6 +732,8 @@ ephy_shell_new_tab_full (EphyShell *shell,
gboolean is_empty = FALSE;
int position = -1;
+ embed_shell = ephy_embed_shell_get_default ();
+
if (flags & EPHY_NEW_TAB_OPEN_PAGE) open_page = TRUE;
if (flags & EPHY_NEW_TAB_IN_NEW_WINDOW) in_new_window = TRUE;
if (flags & EPHY_NEW_TAB_IN_EXISTING_WINDOW) in_new_window = FALSE;
@@ -951,8 +954,11 @@ ephy_shell_get_bookmarks_editor (EphyShell *shell)
GtkWidget *
ephy_shell_get_history_window (EphyShell *shell)
{
+ EphyEmbedShell *embed_shell;
EphyHistoryService *service;
+ embed_shell = ephy_embed_shell_get_default ();
+
if (shell->priv->history_window == NULL) {
service = EPHY_HISTORY_SERVICE
(ephy_embed_shell_get_global_history_service (embed_shell));
diff --git a/src/ephy-window.c b/src/ephy-window.c
index e749fb5fe..6c263ed9a 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -697,7 +697,7 @@ get_chromes_visibility (EphyWindow *window,
EphyWindowPrivate *priv = window->priv;
EphyWebViewChrome flags = priv->chrome;
- if (ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_APPLICATION)
+ if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION)
{
*show_toolbar = FALSE;
*show_tabsbar = FALSE;
@@ -1033,7 +1033,7 @@ update_popup_actions_visibility (EphyWindow *window,
action_group = window->priv->popups_action_group;
- if (ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_APPLICATION)
+ if (ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION)
{
action = gtk_action_group_get_action (action_group, "OpenLinkInNewTab");
gtk_action_set_visible (action, FALSE);
@@ -1893,7 +1893,7 @@ populate_context_menu (WebKitWebView *web_view,
_ephy_window_set_context_event (window, embed_event);
g_object_unref (embed_event);
- app_mode = ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_APPLICATION;
+ app_mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION;
update_edit_actions_sensitivity (window, FALSE);
@@ -2505,7 +2505,7 @@ decide_policy_cb (WebKitWebView *web_view,
navigation_type = webkit_navigation_policy_decision_get_navigation_type (navigation_decision);
if (navigation_type == WEBKIT_NAVIGATION_TYPE_LINK_CLICKED &&
- ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_APPLICATION)
+ ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION)
{
/* The only thing we allow here is to either navigate
* in the same window and tab to the current domain,
@@ -2643,7 +2643,7 @@ policy_decision_required_cb (WebKitWebView *web_view,
}
if (reason == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED &&
- ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_APPLICATION)
+ ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_APPLICATION)
{
/* The only thing we allow here is to either navigate
* in the same window and tab to the current domain,
@@ -3463,14 +3463,15 @@ ephy_window_dispose (GObject *object)
ephy_bookmarks_ui_detach_window (window);
g_signal_handlers_disconnect_by_func
- (embed_shell, download_added_cb, window);
+ (ephy_embed_shell_get_default (),
+ download_added_cb, window);
/* Deactivate menus */
popups = gtk_ui_manager_get_toplevels (window->priv->manager, GTK_UI_MANAGER_POPUP);
g_slist_foreach (popups, (GFunc) gtk_menu_shell_deactivate, NULL);
g_slist_free (popups);
- single = ephy_embed_shell_get_embed_single (embed_shell);
+ single = ephy_embed_shell_get_embed_single (ephy_embed_shell_get_default ());
g_signal_handlers_disconnect_by_func
(single, G_CALLBACK (sync_network_status), window);
@@ -3952,7 +3953,7 @@ ephy_window_constructor (GType type,
G_CALLBACK (show_toolbars_setting_cb), window);
/* network status */
- single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (embed_shell));
+ single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (ephy_embed_shell_get_default ()));
sync_network_status (single, NULL, window);
g_signal_connect (single, "notify::network-status",
G_CALLBACK (sync_network_status), window);
@@ -3968,7 +3969,7 @@ ephy_window_constructor (GType type,
priv->is_popup);
/* Disabled actions not needed for application mode. */
- mode = ephy_embed_shell_get_mode (embed_shell);
+ mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
if (mode == EPHY_EMBED_SHELL_MODE_APPLICATION)
{
/* FileNewTab and FileNewWindow are sort of special. */
@@ -4116,7 +4117,7 @@ ephy_window_init (EphyWindow *window)
window->priv = EPHY_WINDOW_GET_PRIVATE (window);
- g_signal_connect (embed_shell,
+ g_signal_connect (ephy_embed_shell_get_default (),
"download-added", G_CALLBACK (download_added_cb),
window);
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 22b92d566..7e3336467 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -1611,7 +1611,7 @@ pdm_dialog_init (PdmDialog *dialog)
PdmActionInfo *cookies, *passwords;
GtkWidget *window;
gboolean has_private_profile =
- ephy_embed_shell_get_mode (embed_shell) == EPHY_EMBED_SHELL_MODE_PRIVATE;
+ ephy_embed_shell_get_mode (ephy_embed_shell_get_default ()) == EPHY_EMBED_SHELL_MODE_PRIVATE;
priv = dialog->priv = EPHY_PDM_DIALOG_GET_PRIVATE (dialog);
@@ -1690,7 +1690,7 @@ pdm_dialog_finalize (GObject *object)
PdmDialog *dialog = EPHY_PDM_DIALOG (object);
GObject *single;
- single = ephy_embed_shell_get_embed_single (embed_shell);
+ single = ephy_embed_shell_get_embed_single (ephy_embed_shell_get_default ());
g_signal_handlers_disconnect_matched
(single, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, object);
diff --git a/src/window-commands.c b/src/window-commands.c
index a38557d72..2641ccca8 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -690,7 +690,7 @@ window_cmd_file_work_offline (GtkAction *action,
EphyEmbedSingle *single;
gboolean offline;
- single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (embed_shell));
+ single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (ephy_embed_shell_get_default ()));
offline = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
ephy_embed_single_set_network_status (single, !offline);
#endif