aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-bookmark-action-group.c2
-rw-r--r--src/bookmarks/ephy-bookmark-action.c2
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c17
-rw-r--r--src/bookmarks/ephy-bookmarks-menu.c2
-rw-r--r--src/bookmarks/ephy-bookmarks-ui.c4
-rw-r--r--src/ephy-completion-model.c2
-rw-r--r--src/ephy-encoding-dialog.c2
-rw-r--r--src/ephy-encoding-menu.c2
-rw-r--r--src/ephy-history-window.c17
-rw-r--r--src/ephy-location-controller.c2
-rw-r--r--src/ephy-main.c2
-rw-r--r--src/ephy-session.c6
-rw-r--r--src/ephy-shell.h2
-rw-r--r--src/ephy-window.c12
-rw-r--r--src/popup-commands.c9
-rw-r--r--src/prefs-dialog.c2
-rw-r--r--src/window-commands.c16
17 files changed, 59 insertions, 42 deletions
diff --git a/src/bookmarks/ephy-bookmark-action-group.c b/src/bookmarks/ephy-bookmark-action-group.c
index 3a6820015..f2c55cbc1 100644
--- a/src/bookmarks/ephy-bookmark-action-group.c
+++ b/src/bookmarks/ephy-bookmark-action-group.c
@@ -140,7 +140,7 @@ ephy_bookmark_group_new (EphyNode *node)
GtkActionGroup *action_group;
guint i;
- bookmarks = ephy_shell_get_bookmarks (ephy_shell);
+ bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
smart = ephy_bookmarks_get_smart_bookmarks (bookmarks);
action_group = (GtkActionGroup *) ephy_link_action_group_new ("BA");
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index 0e832c5e1..639d780d0 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -319,7 +319,7 @@ void
ephy_bookmark_action_updated (EphyBookmarkAction *action)
{
GValue value = { 0, };
- EphyBookmarks *bookmarks = ephy_shell_get_bookmarks (ephy_shell);
+ EphyBookmarks *bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
EphyNode *smart = ephy_bookmarks_get_smart_bookmarks (bookmarks);
EphyNode *node = action->priv->node;
const char *title;
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 0cd9e1274..19151c195 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -290,7 +290,7 @@ get_target_window (EphyBookmarksEditor *editor)
}
else
{
- return GTK_WIDGET (gtk_application_get_active_window (GTK_APPLICATION (ephy_shell)));
+ return GTK_WIDGET (gtk_application_get_active_window (GTK_APPLICATION (ephy_shell_get_default ())));
}
}
@@ -314,7 +314,8 @@ cmd_open_bookmarks_in_tabs (GtkAction *action,
location = ephy_node_get_property_string (node,
EPHY_NODE_BMK_PROP_LOCATION);
- new_embed = ephy_shell_new_tab (ephy_shell, window, NULL, location,
+ new_embed = ephy_shell_new_tab (ephy_shell_get_default (),
+ window, NULL, location,
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_IN_EXISTING_WINDOW);
/* if there was no target window, a new one was opened. Get it
@@ -350,8 +351,10 @@ cmd_open_bookmarks_in_browser (GtkAction *action,
location = ephy_node_get_property_string (node,
EPHY_NODE_BMK_PROP_LOCATION);
- ephy_shell_new_tab (ephy_shell, window, NULL, location,
- EPHY_NEW_TAB_OPEN_PAGE | EPHY_NEW_TAB_IN_NEW_WINDOW);
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ window, NULL, location,
+ EPHY_NEW_TAB_OPEN_PAGE |
+ EPHY_NEW_TAB_IN_NEW_WINDOW);
}
g_list_free (selection);
@@ -1043,7 +1046,8 @@ ephy_bookmarks_editor_node_activated_cb (GtkWidget *view,
(node, EPHY_NODE_BMK_PROP_LOCATION);
g_return_if_fail (location != NULL);
- ephy_shell_new_tab (ephy_shell, NULL, NULL, location,
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ NULL, NULL, location,
EPHY_NEW_TAB_OPEN_PAGE);
}
@@ -1061,7 +1065,8 @@ ephy_bookmarks_editor_node_middle_clicked_cb (GtkWidget *view,
(node, EPHY_NODE_BMK_PROP_LOCATION);
g_return_if_fail (location != NULL);
- ephy_shell_new_tab (ephy_shell, window, NULL, location,
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ window, NULL, location,
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_IN_EXISTING_WINDOW);
}
diff --git a/src/bookmarks/ephy-bookmarks-menu.c b/src/bookmarks/ephy-bookmarks-menu.c
index f22cdbe21..dd3bf990f 100644
--- a/src/bookmarks/ephy-bookmarks-menu.c
+++ b/src/bookmarks/ephy-bookmarks-menu.c
@@ -199,7 +199,7 @@ ephy_bookmarks_menu_build (GString *string, EphyNode *parent)
gint priority;
guint flags, id, i;
- eb = ephy_shell_get_bookmarks (ephy_shell);
+ eb = ephy_shell_get_bookmarks (ephy_shell_get_default ());
children = ephy_node_get_children (ephy_bookmarks_get_keywords (eb));
topics = g_ptr_array_sized_new (children->len);
diff --git a/src/bookmarks/ephy-bookmarks-ui.c b/src/bookmarks/ephy-bookmarks-ui.c
index 02c264dd9..4e41638f2 100644
--- a/src/bookmarks/ephy-bookmarks-ui.c
+++ b/src/bookmarks/ephy-bookmarks-ui.c
@@ -169,7 +169,7 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window)
GtkActionGroup *actions;
GtkAction *action;
- eb = ephy_shell_get_bookmarks (ephy_shell);
+ eb = ephy_shell_get_bookmarks (ephy_shell_get_default ());
bookmarks = ephy_bookmarks_get_bookmarks (eb);
topics = ephy_bookmarks_get_keywords (eb);
data = g_object_get_data (G_OBJECT (window), BM_WINDOW_DATA_KEY);
@@ -238,7 +238,7 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window)
void
ephy_bookmarks_ui_detach_window (EphyWindow *window)
{
- EphyBookmarks *eb = ephy_shell_get_bookmarks (ephy_shell);
+ EphyBookmarks *eb = ephy_shell_get_bookmarks (ephy_shell_get_default ());
EphyNode *bookmarks = ephy_bookmarks_get_bookmarks (eb);
EphyNode *topics = ephy_bookmarks_get_keywords (eb);
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index 0a858c1d9..33d84bbc8 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -103,7 +103,7 @@ ephy_completion_model_init (EphyCompletionModel *model)
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);
+ bookmarks_service = ephy_shell_get_bookmarks (ephy_shell_get_default ());
priv->bookmarks = ephy_bookmarks_get_bookmarks (bookmarks_service);
}
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index 58e03f5c3..de15cbae3 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -364,7 +364,7 @@ ephy_encoding_dialog_init (EphyEncodingDialog *dialog)
dialog->priv->encodings =
EPHY_ENCODINGS (ephy_embed_shell_get_encodings
- (EPHY_EMBED_SHELL (ephy_shell)));
+ (EPHY_EMBED_SHELL (ephy_shell_get_default ())));
ephy_dialog_construct (EPHY_DIALOG (dialog),
"/org/gnome/epiphany/epiphany.ui",
diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c
index e276f4a2c..ff2330563 100644
--- a/src/ephy-encoding-menu.c
+++ b/src/ephy-encoding-menu.c
@@ -75,7 +75,7 @@ ephy_encoding_menu_init (EphyEncodingMenu *menu)
menu->priv->encodings =
EPHY_ENCODINGS (ephy_embed_shell_get_encodings
- (EPHY_EMBED_SHELL (ephy_shell)));
+ (EPHY_EMBED_SHELL (ephy_shell_get_default ())));
}
static int
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 70daa107b..1d8df417a 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -302,7 +302,7 @@ get_target_window (EphyHistoryWindow *editor)
}
else
{
- return GTK_WIDGET (gtk_application_get_active_window (GTK_APPLICATION (ephy_shell)));
+ return GTK_WIDGET (gtk_application_get_active_window (GTK_APPLICATION (ephy_shell_get_default ())));
}
}
@@ -320,8 +320,10 @@ cmd_open_bookmarks_in_tabs (GtkAction *action,
for (l = selection; l; l = l->next)
{
EphyHistoryURL *url = l->data;
- ephy_shell_new_tab (ephy_shell, window, NULL, url->url,
- EPHY_NEW_TAB_OPEN_PAGE | EPHY_NEW_TAB_IN_EXISTING_WINDOW);
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ window, NULL, url->url,
+ EPHY_NEW_TAB_OPEN_PAGE |
+ EPHY_NEW_TAB_IN_EXISTING_WINDOW);
}
g_list_free_full (selection, (GDestroyNotify) ephy_history_url_free);
@@ -341,7 +343,8 @@ cmd_open_bookmarks_in_browser (GtkAction *action,
for (l = selection; l; l = l->next)
{
EphyHistoryURL *url = l->data;
- ephy_shell_new_tab (ephy_shell, window, NULL, url->url,
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ window, NULL, url->url,
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_IN_NEW_WINDOW);
}
@@ -566,7 +569,8 @@ ephy_history_window_row_activated_cb (GtkTreeView *view,
path);
g_return_if_fail (url != NULL);
- ephy_shell_new_tab (ephy_shell, NULL, NULL, url->url,
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ NULL, NULL, url->url,
EPHY_NEW_TAB_OPEN_PAGE);
ephy_history_url_free (url);
}
@@ -583,7 +587,8 @@ ephy_history_window_row_middle_clicked_cb (EphyHistoryView *view,
url = ephy_urls_store_get_url_from_path (editor->priv->urls_store, path);
g_return_if_fail (url != NULL);
- ephy_shell_new_tab (ephy_shell, window, NULL, url->url,
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ window, NULL, url->url,
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_IN_EXISTING_WINDOW);
ephy_history_url_free (url);
diff --git a/src/ephy-location-controller.c b/src/ephy-location-controller.c
index 463606e85..0ff9e4d43 100644
--- a/src/ephy-location-controller.c
+++ b/src/ephy-location-controller.c
@@ -757,7 +757,7 @@ ephy_location_controller_init (EphyLocationController *controller)
priv->address = g_strdup ("");
priv->editable = TRUE;
- priv->bookmarks = ephy_shell_get_bookmarks (ephy_shell);
+ priv->bookmarks = ephy_shell_get_bookmarks (ephy_shell_get_default ());
priv->smart_bmks = ephy_bookmarks_get_smart_bookmarks
(controller->priv->bookmarks);
priv->sync_address_is_blocked = FALSE;
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 1281b1db6..10450d7ff 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -235,6 +235,7 @@ main (int argc,
EphyShellStartupContext *ctx;
EphyStartupFlags startup_flags;
EphyEmbedShellMode mode;
+ EphyShell *ephy_shell;
int status;
EphyFileHelpersFlags flags;
@@ -476,6 +477,7 @@ main (int argc,
arguments,
user_time);
g_strfreev (arguments);
+ ephy_shell = ephy_shell_get_default ();
ephy_shell_set_startup_context (ephy_shell, ctx);
status = g_application_run (G_APPLICATION (ephy_shell), argc, argv);
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 962fbf675..d761d9d33 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -764,7 +764,8 @@ confirm_before_recover (EphyWindow* window, char* url, char* title)
{
EphyEmbed *embed;
- embed = ephy_shell_new_tab (ephy_shell, window, NULL, NULL,
+ embed = ephy_shell_new_tab (ephy_shell_get_default (),
+ window, NULL, NULL,
EPHY_NEW_TAB_IN_EXISTING_WINDOW |
EPHY_NEW_TAB_APPEND_LAST);
@@ -807,7 +808,8 @@ parse_embed (xmlNodePtr child,
{
recover_url = (char *) url;
- ephy_shell_new_tab (ephy_shell, window, NULL, recover_url,
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ window, NULL, recover_url,
EPHY_NEW_TAB_IN_EXISTING_WINDOW |
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_APPEND_LAST);
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index ca1d4e22f..3cf8b1844 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -53,8 +53,6 @@ typedef struct _EphyShell EphyShell;
typedef struct _EphyShellClass EphyShellClass;
typedef struct _EphyShellPrivate EphyShellPrivate;
-extern EphyShell *ephy_shell;
-
/**
* EphyNewTabFlags:
* @EPHY_NEW_TAB_HOME_PAGE: loads the home page in the new tab.
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 6c263ed9a..64c7be8ee 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -606,7 +606,7 @@ ephy_window_open_link (EphyLink *link,
}
new_embed = ephy_shell_new_tab
- (ephy_shell,
+ (ephy_shell_get_default (),
EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))),
embed, address, ntflags);
}
@@ -1724,7 +1724,7 @@ sync_network_status (EphyEmbedSingle *single,
GtkAction *action;
gboolean is_online;
- GNetworkMonitor *monitor = G_NETWORK_MONITOR (ephy_shell_get_net_monitor (ephy_shell));
+ GNetworkMonitor *monitor = G_NETWORK_MONITOR (ephy_shell_get_net_monitor (ephy_shell_get_default ()));
is_online = g_network_monitor_get_network_available (monitor);
action = gtk_action_group_get_action (priv->action_group,
@@ -4137,7 +4137,7 @@ EphyWindow *
ephy_window_new (void)
{
return g_object_new (EPHY_TYPE_WINDOW,
- "application", GTK_APPLICATION (ephy_shell),
+ "application", GTK_APPLICATION (ephy_shell_get_default ()),
NULL);
}
@@ -4157,7 +4157,7 @@ ephy_window_new_with_chrome (EphyWebViewChrome chrome,
return g_object_new (EPHY_TYPE_WINDOW,
"chrome", chrome,
"is-popup", is_popup,
- "application", GTK_APPLICATION (ephy_shell),
+ "application", GTK_APPLICATION (ephy_shell_get_default ()),
NULL);
}
@@ -4448,9 +4448,9 @@ ephy_window_close (EphyWindow *window)
}
/* If this is the last window, save its state in the session. */
- if (ephy_shell_get_n_windows (ephy_shell) == 1)
+ if (ephy_shell_get_n_windows (ephy_shell_get_default ()) == 1)
{
- ephy_session_close (EPHY_SESSION (ephy_shell_get_session (ephy_shell)));
+ ephy_session_close (EPHY_SESSION (ephy_shell_get_session (ephy_shell_get_default ())));
}
/* See bug #114689 */
diff --git a/src/popup-commands.c b/src/popup-commands.c
index 03494a142..e010c2671 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -58,7 +58,8 @@ popup_cmd_link_in_new_window (GtkAction *action,
ephy_embed_event_get_property (event, "link-uri", &value);
- ephy_shell_new_tab (ephy_shell, NULL, embed,
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ NULL, embed,
g_value_get_string (&value),
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_IN_NEW_WINDOW);
@@ -81,7 +82,8 @@ popup_cmd_link_in_new_tab (GtkAction *action,
ephy_embed_event_get_property (event, "link-uri", &value);
- ephy_shell_new_tab (ephy_shell, window, embed,
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ window, embed,
g_value_get_string (&value),
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_IN_EXISTING_WINDOW |
@@ -398,7 +400,8 @@ image_open_uri (GFile *file,
if (!success)
{
- ephy_shell_new_tab (ephy_shell, NULL, NULL, remote_address,
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ NULL, NULL, remote_address,
EPHY_NEW_TAB_OPEN_PAGE |
EPHY_NEW_TAB_IN_NEW_WINDOW);
}
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index ac067f498..8910cd71c 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1087,7 +1087,7 @@ prefs_dialog_init (PrefsDialog *pd)
G_CALLBACK (clear_cache_button_clicked_cb), dialog);
encodings = EPHY_ENCODINGS (ephy_embed_shell_get_encodings
- (EPHY_EMBED_SHELL (ephy_shell)));
+ (EPHY_EMBED_SHELL (ephy_shell_get_default ())));
create_node_combo (dialog, encodings, "ISO-8859-1");
diff --git a/src/window-commands.c b/src/window-commands.c
index 2641ccca8..a0e013fa0 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -722,7 +722,7 @@ void
window_cmd_file_quit (GtkAction *action,
EphyWindow *window)
{
- if (ephy_shell_close_all_windows (ephy_shell))
+ if (ephy_shell_close_all_windows (ephy_shell_get_default ()))
g_application_quit (g_application_get_default ());
}
@@ -730,8 +730,10 @@ void
window_cmd_file_new_window (GtkAction *action,
EphyWindow *window)
{
- ephy_shell_new_tab (ephy_shell, NULL, NULL, NULL,
- EPHY_NEW_TAB_IN_NEW_WINDOW | EPHY_NEW_TAB_HOME_PAGE);
+ ephy_shell_new_tab (ephy_shell_get_default (),
+ NULL, NULL, NULL,
+ EPHY_NEW_TAB_IN_NEW_WINDOW |
+ EPHY_NEW_TAB_HOME_PAGE);
}
void
@@ -952,7 +954,7 @@ window_cmd_edit_bookmarks (GtkAction *action,
{
GtkWidget *bwindow;
- bwindow = ephy_shell_get_bookmarks_editor (ephy_shell);
+ bwindow = ephy_shell_get_bookmarks_editor (ephy_shell_get_default ());
gtk_window_present (GTK_WINDOW (bwindow));
}
@@ -962,7 +964,7 @@ window_cmd_edit_history (GtkAction *action,
{
GtkWidget *hwindow;
- hwindow = ephy_shell_get_history_window (ephy_shell);
+ hwindow = ephy_shell_get_history_window (ephy_shell_get_default ());
gtk_window_present (GTK_WINDOW (hwindow));
}
@@ -972,7 +974,7 @@ window_cmd_edit_preferences (GtkAction *action,
{
EphyDialog *dialog;
- dialog = EPHY_DIALOG (ephy_shell_get_prefs_dialog (ephy_shell));
+ dialog = EPHY_DIALOG (ephy_shell_get_prefs_dialog (ephy_shell_get_default ()));
ephy_dialog_show (dialog);
}
@@ -983,7 +985,7 @@ window_cmd_edit_personal_data (GtkAction *action,
{
PdmDialog *dialog;
- dialog = EPHY_PDM_DIALOG (ephy_shell_get_pdm_dialog (ephy_shell));
+ dialog = EPHY_PDM_DIALOG (ephy_shell_get_pdm_dialog (ephy_shell_get_default ()));
/* FIXME?: pdm_dialog_open is supposed to scroll to the host passed
* as second parameters in the cookies tab. Honestly I think this
* has been broken for a while. In any case it's probably not