aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/appearance-prefs.c10
-rw-r--r--src/ephy-encoding-menu.c12
-rw-r--r--src/ephy-nautilus-view.c4
-rw-r--r--src/ephy-shell.c13
-rw-r--r--src/ephy-tab.c9
-rwxr-xr-xsrc/general-prefs.c17
-rwxr-xr-xsrc/pdm-dialog.c40
-rw-r--r--src/prefs-dialog.c16
-rw-r--r--src/window-commands.c8
9 files changed, 85 insertions, 44 deletions
diff --git a/src/appearance-prefs.c b/src/appearance-prefs.c
index 0cb928cdf..85c4d91b9 100755
--- a/src/appearance-prefs.c
+++ b/src/appearance-prefs.c
@@ -183,10 +183,14 @@ setup_font_menu (AppearancePrefs *dialog,
char key[255];
int pos;
GtkWidget *entry = GTK_COMBO(combo)->entry;
+ EphyEmbedSingle *single;
- ephy_embed_shell_get_font_list (EPHY_EMBED_SHELL (ephy_shell),
- lang_encode[dialog->priv->language],
- type, &fonts, &default_font);
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
+
+ ephy_embed_single_get_font_list (single,
+ lang_encode[dialog->priv->language],
+ type, &fonts, &default_font);
/* Get the default font */
sprintf (key, "%s_%s_%s", CONF_RENDERING_FONT, type,
diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c
index 47b20c3cd..54481dbd3 100644
--- a/src/ephy-encoding-menu.c
+++ b/src/ephy-encoding-menu.c
@@ -241,6 +241,10 @@ ephy_encoding_menu_rebuild (EphyEncodingMenu *wrhm)
GList *groups, *gl;
EggMenuMerge *merge = EGG_MENU_MERGE (p->window->ui_merge);
int group_index = 0, charset_index = 0;
+ EphyEmbedSingle *single;
+
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
LOG ("Rebuilding encoding menu")
@@ -252,7 +256,7 @@ ephy_encoding_menu_rebuild (EphyEncodingMenu *wrhm)
p->action_group = egg_action_group_new ("EncodingActions");
egg_menu_merge_insert_action_group (merge, p->action_group, 0);
- ephy_embed_shell_get_charset_groups (embed_shell, &groups);
+ ephy_embed_single_get_charset_groups (single, &groups);
for (gl = groups; gl != NULL; gl = gl->next)
{
@@ -261,9 +265,9 @@ ephy_encoding_menu_rebuild (EphyEncodingMenu *wrhm)
build_group (p->action_group, xml, group, group_index);
- ephy_embed_shell_get_charset_titles (embed_shell,
- group,
- &charsets);
+ ephy_embed_single_get_charset_titles (single,
+ group,
+ &charsets);
for (cl = charsets; cl != NULL; cl = cl->next)
{
diff --git a/src/ephy-nautilus-view.c b/src/ephy-nautilus-view.c
index d4b853866..a1084ce94 100644
--- a/src/ephy-nautilus-view.c
+++ b/src/ephy-nautilus-view.c
@@ -169,6 +169,10 @@ ephy_nautilus_view_instance_init (EphyNautilusView *view)
{
GtkWidget *w;
EphyNautilusViewPrivate *p = g_new0 (EphyNautilusViewPrivate, 1);
+ EphyEmbedSingle *single;
+
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
view->priv = p;
view->priv->embed = ephy_embed_new (G_OBJECT (ephy_shell));
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index c16f37403..964744a4a 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -103,7 +103,7 @@ ephy_shell_get_type (void)
(GInstanceInitFunc) ephy_shell_init
};
- ephy_shell_type = g_type_register_static (EPHY_EMBED_SHELL_IMPL,
+ ephy_shell_type = g_type_register_static (EPHY_EMBED_SHELL_TYPE,
"EphyShell",
&our_info, 0);
}
@@ -188,6 +188,12 @@ ephy_shell_new_window_cb (EphyEmbedShell *shell,
static void
ephy_shell_init (EphyShell *gs)
{
+ EphyEmbedSingle *single;
+
+ gs->priv = g_new0 (EphyShellPrivate, 1);
+ gs->priv->session = NULL;
+ gs->priv->bookmarks = NULL;
+
ephy_shell = gs;
g_object_add_weak_pointer (G_OBJECT(ephy_shell),
(gpointer *)&ephy_shell);
@@ -199,9 +205,8 @@ ephy_shell_init (EphyShell *gs)
ephy_stock_icons_init ();
ephy_ensure_dir_exists (ephy_dot_dir ());
- gs->priv = g_new0 (EphyShellPrivate, 1);
- gs->priv->session = NULL;
- gs->priv->bookmarks = NULL;
+ /* This ensures mozilla is fired up */
+ single = ephy_embed_shell_get_embed_single (EPHY_EMBED_SHELL (gs));
g_signal_connect (G_OBJECT (gs),
"new_window_orphan",
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 9b3e53c5a..e660b6bba 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -189,13 +189,14 @@ static void
ephy_tab_init (EphyTab *tab)
{
GObject *embed, *embed_widget;
- EphyEmbedShell *shell;
+ EphyEmbedSingle *single;
- tab->priv = g_new0 (EphyTabPrivate, 1);
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
- shell = EPHY_EMBED_SHELL (ephy_shell);
+ tab->priv = g_new0 (EphyTabPrivate, 1);
- tab->priv->embed = ephy_embed_new (G_OBJECT(shell));
+ tab->priv->embed = ephy_embed_new (G_OBJECT(single));
tab->priv->window = NULL;
tab->priv->event = NULL;
diff --git a/src/general-prefs.c b/src/general-prefs.c
index 706820f43..81fb1c1e2 100755
--- a/src/general-prefs.c
+++ b/src/general-prefs.c
@@ -18,6 +18,7 @@
#include "general-prefs.h"
#include "ephy-shell.h"
+#include "ephy-embed-single.h"
#include "ephy-prefs.h"
#include "ephy-embed-prefs.h"
#include "ephy-shell.h"
@@ -185,8 +186,12 @@ default_charset_menu_changed_cb (GtkOptionMenu *option_menu,
GList *charsets;
int i;
CharsetInfo *info;
+ EphyEmbedSingle *single;
- ephy_embed_shell_get_charset_titles (shell, NULL, &charsets);
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
+
+ ephy_embed_single_get_charset_titles (single, NULL, &charsets);
i = gtk_option_menu_get_history (option_menu);
charsets = g_list_nth (charsets, i);
@@ -211,15 +216,17 @@ find_charset_in_list_cmp (gconstpointer a,
static void
create_default_charset_menu (GeneralPrefs *dialog)
{
- EphyEmbedShell *shell;
GList *l;
GList *charsets;
GtkWidget *menu;
GtkWidget *optionmenu;
char *value;
+ EphyEmbedSingle *single;
+
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
- shell = EPHY_EMBED_SHELL (ephy_shell);
- ephy_embed_shell_get_charset_titles (shell, NULL, &l);
+ ephy_embed_single_get_charset_titles (single, NULL, &l);
menu = gtk_menu_new ();
@@ -251,7 +258,7 @@ create_default_charset_menu (GeneralPrefs *dialog)
g_signal_connect (optionmenu, "changed",
G_CALLBACK (default_charset_menu_changed_cb),
- shell);
+ embed_shell);
g_list_free (l);
}
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index 3524d6495..fc0a102f0 100755
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -427,53 +427,61 @@ static void
pdm_dialog_cookie_remove (PdmActionInfo *info,
GList *data)
{
- ephy_embed_shell_remove_cookies
- (EPHY_EMBED_SHELL (ephy_shell), data);
+ EphyEmbedSingle *single;
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
+ ephy_embed_single_remove_cookies (single, data);
}
static void
pdm_dialog_password_remove (PdmActionInfo *info,
GList *data)
{
- ephy_embed_shell_remove_passwords
- (EPHY_EMBED_SHELL (ephy_shell), data,
- PASSWORD_PASSWORD);
+ EphyEmbedSingle *single;
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
+
+ ephy_embed_single_remove_passwords (single, data,
+ PASSWORD_PASSWORD);
}
static void
pdm_dialog_cookies_free (PdmActionInfo *info,
GList *data)
{
- EphyEmbedShell *shell;
GList *l;
+ EphyEmbedSingle *single;
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
- shell = EPHY_EMBED_SHELL (ephy_shell);
l = data ? data : info->list;
- ephy_embed_shell_free_cookies (shell, l);
+ ephy_embed_single_free_cookies (single, l);
}
static void
pdm_dialog_passwords_free (PdmActionInfo *info,
GList *data)
{
- EphyEmbedShell *shell;
GList *l;
+ EphyEmbedSingle *single;
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
- shell = EPHY_EMBED_SHELL (ephy_shell);
l = data ? data : info->list;
- ephy_embed_shell_free_passwords (shell, l);
+ ephy_embed_single_free_passwords (single, l);
}
static void
pdm_dialog_init (PdmDialog *dialog)
{
- EphyEmbedShell *shell;
PdmActionInfo *cookies;
PdmActionInfo *passwords;
GtkWidget *cookies_tv;
GtkWidget *passwords_tv;
+ EphyEmbedSingle *single;
- shell = EPHY_EMBED_SHELL (ephy_shell);
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
dialog->priv = g_new0 (PdmDialogPrivate, 1);
dialog->priv->cookies = NULL;
@@ -488,7 +496,7 @@ pdm_dialog_init (PdmDialog *dialog)
passwords_tv = setup_passwords_treeview (dialog);
cookies = g_new0 (PdmActionInfo, 1);
- ephy_embed_shell_list_cookies (shell, &cookies->list);
+ ephy_embed_single_list_cookies (single, &cookies->list);
cookies->dialog = dialog;
cookies->remove_id = PROP_COOKIES_REMOVE;
cookies->add = pdm_dialog_cookie_add;
@@ -499,8 +507,8 @@ pdm_dialog_init (PdmDialog *dialog)
setup_action (cookies);
passwords = g_new0 (PdmActionInfo, 1);
- ephy_embed_shell_list_passwords (shell, PASSWORD_PASSWORD,
- &passwords->list);
+ ephy_embed_single_list_passwords (single, PASSWORD_PASSWORD,
+ &passwords->list);
passwords->dialog = dialog;
passwords->remove_id = PROP_PASSWORDS_REMOVE;
passwords->add = pdm_dialog_password_add;
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 438cd900e..1d7bb34ee 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -318,18 +318,22 @@ void
prefs_clear_memory_cache_button_clicked_cb (GtkWidget *button,
gpointer data)
{
- EphyEmbedShell *shell;
+ EphyEmbedSingle *single;
- shell = EPHY_EMBED_SHELL (ephy_shell);
- ephy_embed_shell_clear_cache (shell, MEMORY_CACHE);
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
+
+ ephy_embed_single_clear_cache (single, MEMORY_CACHE);
}
void
prefs_clear_disk_cache_button_clicked_cb (GtkWidget *button,
gpointer data)
{
- EphyEmbedShell *shell;
+ EphyEmbedSingle *single;
+
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
- shell = EPHY_EMBED_SHELL (ephy_shell);
- ephy_embed_shell_clear_cache (shell, DISK_CACHE);
+ ephy_embed_single_clear_cache (single, DISK_CACHE);
}
diff --git a/src/window-commands.c b/src/window-commands.c
index f83f56a89..923bf4775 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -308,6 +308,10 @@ window_cmd_file_open (EggAction *action,
GtkWidget *wmain;
EphyEmbedShell *embed_shell;
gresult result;
+ EphyEmbedSingle *single;
+
+ single = ephy_embed_shell_get_embed_single
+ (EPHY_EMBED_SHELL (ephy_shell));
embed_shell = EPHY_EMBED_SHELL (ephy_shell);
@@ -316,8 +320,8 @@ window_cmd_file_open (EggAction *action,
dir = eel_gconf_get_string (CONF_STATE_OPEN_DIR);
- result = ephy_embed_shell_show_file_picker
- (embed_shell, wmain,
+ result = ephy_embed_single_show_file_picker
+ (single, wmain,
_("Select the file to open"),
dir, NULL, modeOpen,
&file, NULL, NULL, NULL);