aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-11-09 03:59:27 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-09 03:59:27 +0800
commitbc6c348cb4faebda6c9ed0bcd6f51b0894103f8b (patch)
tree0ae1c9527c9499e7fb2d59620d2f700bc7a6ab81 /embed/mozilla/mozilla-embed-single.cpp
parentefdbfda6497ce49555dfa80a6e0d90d5f2ee6389 (diff)
downloadgsoc2013-epiphany-bc6c348cb4faebda6c9ed0bcd6f51b0894103f8b.tar
gsoc2013-epiphany-bc6c348cb4faebda6c9ed0bcd6f51b0894103f8b.tar.gz
gsoc2013-epiphany-bc6c348cb4faebda6c9ed0bcd6f51b0894103f8b.tar.bz2
gsoc2013-epiphany-bc6c348cb4faebda6c9ed0bcd6f51b0894103f8b.tar.lz
gsoc2013-epiphany-bc6c348cb4faebda6c9ed0bcd6f51b0894103f8b.tar.xz
gsoc2013-epiphany-bc6c348cb4faebda6c9ed0bcd6f51b0894103f8b.tar.zst
gsoc2013-epiphany-bc6c348cb4faebda6c9ed0bcd6f51b0894103f8b.zip
Remove decls from the top
2003-11-08 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/mozilla-embed-persist.cpp: * embed/mozilla/mozilla-embed-single.cpp: * embed/mozilla/mozilla-embed.cpp: Remove decls from the top
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp165
1 files changed, 68 insertions, 97 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 595e291b1..df298d73a 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -72,35 +72,6 @@ mozilla_embed_single_init (MozillaEmbedSingle *ges);
static void
mozilla_embed_single_finalize (GObject *object);
-static void
-impl_clear_cache (EphyEmbedSingle *shell);
-static void
-impl_set_offline_mode (EphyEmbedSingle *shell,
- gboolean offline);
-static void
-impl_load_proxy_autoconf (EphyEmbedSingle *shell,
- const char* url);
-static GList *
-impl_get_font_list (EphyEmbedSingle *shell,
- const char *langGroup);
-static GList *
-impl_list_cookies (EphyEmbedSingle *shell);
-static void
-impl_remove_cookies (EphyEmbedSingle *shell,
- GList *cookies);
-static GList *
-impl_list_passwords (EphyEmbedSingle *shell,
- PasswordType type);
-static void
-impl_remove_passwords (EphyEmbedSingle *shell,
- GList *passwords,
- PasswordType type);
-
-static void mozilla_embed_single_new_window_orphan_cb (GtkMozEmbedSingle *embed,
- GtkMozEmbed **retval,
- guint chrome_mask,
- EphyEmbedSingle *shell);
-
#define MOZILLA_EMBED_SINGLE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), MOZILLA_TYPE_EMBED_SINGLE, MozillaEmbedSinglePrivate))
struct MozillaEmbedSinglePrivate
@@ -141,28 +112,6 @@ mozilla_embed_single_get_type (void)
return mozilla_embed_single_type;
}
-static void
-mozilla_embed_single_class_init (MozillaEmbedSingleClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- EphyEmbedSingleClass *shell_class = EPHY_EMBED_SINGLE_CLASS (klass);
-
- parent_class = (GObjectClass *) g_type_class_peek_parent (klass);
-
- object_class->finalize = mozilla_embed_single_finalize;
-
- shell_class->clear_cache = impl_clear_cache;
- shell_class->set_offline_mode = impl_set_offline_mode;
- shell_class->load_proxy_autoconf = impl_load_proxy_autoconf;
- shell_class->get_font_list = impl_get_font_list;
- shell_class->list_cookies = impl_list_cookies;
- shell_class->remove_cookies = impl_remove_cookies;
- shell_class->list_passwords = impl_list_passwords;
- shell_class->remove_passwords = impl_remove_passwords;
-
- g_type_class_add_private (object_class, sizeof(MozillaEmbedSinglePrivate));
-}
-
EphyEmbedSingle *
mozilla_embed_single_new (void)
{
@@ -276,6 +225,51 @@ mozilla_setup_colors (MozillaEmbedSingle *mes)
mes->priv->theme_window = window;
}
+static void
+mozilla_embed_single_new_window_orphan_cb (GtkMozEmbedSingle *embed,
+ GtkMozEmbed **retval,
+ guint chrome_mask,
+ EphyEmbedSingle *shell)
+{
+ /* FIXME conversion duped in mozilla_embed */
+ EphyEmbed *new_embed;
+ int i;
+ EmbedChromeMask mask = EMBED_CHROME_OPENASPOPUP;
+
+ struct
+ {
+ guint chromemask;
+ EmbedChromeMask embed_mask;
+ }
+ conversion_map [] =
+ {
+ { GTK_MOZ_EMBED_FLAG_DEFAULTCHROME, EMBED_CHROME_DEFAULT },
+ { GTK_MOZ_EMBED_FLAG_MENUBARON, EMBED_CHROME_MENUBARON },
+ { GTK_MOZ_EMBED_FLAG_TOOLBARON, EMBED_CHROME_TOOLBARON },
+ { GTK_MOZ_EMBED_FLAG_STATUSBARON, EMBED_CHROME_STATUSBARON },
+ { GTK_MOZ_EMBED_FLAG_WINDOWRAISED, EMBED_CHROME_WINDOWRAISED },
+ { GTK_MOZ_EMBED_FLAG_WINDOWLOWERED, EMBED_CHROME_WINDOWLOWERED },
+ { GTK_MOZ_EMBED_FLAG_CENTERSCREEN, EMBED_CHROME_CENTERSCREEN },
+ { GTK_MOZ_EMBED_FLAG_OPENASDIALOG, EMBED_CHROME_OPENASDIALOG },
+ { GTK_MOZ_EMBED_FLAG_OPENASCHROME, EMBED_CHROME_OPENASCHROME },
+ { 0, EMBED_CHROME_NONE }
+ };
+
+ for (i = 0; conversion_map[i].chromemask != 0; i++)
+ {
+ if (chrome_mask & conversion_map[i].chromemask)
+ {
+ mask = (EmbedChromeMask) (mask | conversion_map[i].embed_mask);
+ }
+ }
+
+ g_signal_emit_by_name (shell, "new_window_orphan", &new_embed, mask);
+
+ g_assert (new_embed != NULL);
+
+ *retval = GTK_MOZ_EMBED(EPHY_EMBED(new_embed));
+}
+
static void
mozilla_init_single (MozillaEmbedSingle *mes)
{
@@ -290,7 +284,7 @@ mozilla_init_single (MozillaEmbedSingle *mes)
/* allow creation of orphan windows */
g_signal_connect (G_OBJECT (single), "new_window_orphan",
- GTK_SIGNAL_FUNC (mozilla_embed_single_new_window_orphan_cb),
+ G_CALLBACK (mozilla_embed_single_new_window_orphan_cb),
mes);
}
@@ -462,51 +456,6 @@ mozilla_embed_single_init_services (MozillaEmbedSingle *single)
return TRUE;
}
-static void
-mozilla_embed_single_new_window_orphan_cb (GtkMozEmbedSingle *embed,
- GtkMozEmbed **retval,
- guint chrome_mask,
- EphyEmbedSingle *shell)
-{
- /* FIXME conversion duped in mozilla_embed */
- EphyEmbed *new_embed;
- int i;
- EmbedChromeMask mask = EMBED_CHROME_OPENASPOPUP;
-
- struct
- {
- guint chromemask;
- EmbedChromeMask embed_mask;
- }
- conversion_map [] =
- {
- { GTK_MOZ_EMBED_FLAG_DEFAULTCHROME, EMBED_CHROME_DEFAULT },
- { GTK_MOZ_EMBED_FLAG_MENUBARON, EMBED_CHROME_MENUBARON },
- { GTK_MOZ_EMBED_FLAG_TOOLBARON, EMBED_CHROME_TOOLBARON },
- { GTK_MOZ_EMBED_FLAG_STATUSBARON, EMBED_CHROME_STATUSBARON },
- { GTK_MOZ_EMBED_FLAG_WINDOWRAISED, EMBED_CHROME_WINDOWRAISED },
- { GTK_MOZ_EMBED_FLAG_WINDOWLOWERED, EMBED_CHROME_WINDOWLOWERED },
- { GTK_MOZ_EMBED_FLAG_CENTERSCREEN, EMBED_CHROME_CENTERSCREEN },
- { GTK_MOZ_EMBED_FLAG_OPENASDIALOG, EMBED_CHROME_OPENASDIALOG },
- { GTK_MOZ_EMBED_FLAG_OPENASCHROME, EMBED_CHROME_OPENASCHROME },
- { 0, EMBED_CHROME_NONE }
- };
-
- for (i = 0; conversion_map[i].chromemask != 0; i++)
- {
- if (chrome_mask & conversion_map[i].chromemask)
- {
- mask = (EmbedChromeMask) (mask | conversion_map[i].embed_mask);
- }
- }
-
- g_signal_emit_by_name (shell, "new_window_orphan", &new_embed, mask);
-
- g_assert (new_embed != NULL);
-
- *retval = GTK_MOZ_EMBED(EPHY_EMBED(new_embed));
-}
-
static void
mozilla_embed_single_finalize (GObject *object)
{
@@ -749,3 +698,25 @@ impl_remove_passwords (EphyEmbedSingle *shell,
};
};
}
+
+static void
+mozilla_embed_single_class_init (MozillaEmbedSingleClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ EphyEmbedSingleClass *shell_class = EPHY_EMBED_SINGLE_CLASS (klass);
+
+ parent_class = (GObjectClass *) g_type_class_peek_parent (klass);
+
+ object_class->finalize = mozilla_embed_single_finalize;
+
+ shell_class->clear_cache = impl_clear_cache;
+ shell_class->set_offline_mode = impl_set_offline_mode;
+ shell_class->load_proxy_autoconf = impl_load_proxy_autoconf;
+ shell_class->get_font_list = impl_get_font_list;
+ shell_class->list_cookies = impl_list_cookies;
+ shell_class->remove_cookies = impl_remove_cookies;
+ shell_class->list_passwords = impl_list_passwords;
+ shell_class->remove_passwords = impl_remove_passwords;
+
+ g_type_class_add_private (object_class, sizeof(MozillaEmbedSinglePrivate));
+}