aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-11-10 03:52:21 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-10 03:52:21 +0800
commit4e3ff98a7670d0530adb3bca0d00a5d141edb856 (patch)
tree5f48b1e92fc80c312cd1ba34ac6921d48dca06c1 /embed
parent1d54b362a87e2baa341281429971b632a5750e84 (diff)
downloadgsoc2013-epiphany-4e3ff98a7670d0530adb3bca0d00a5d141edb856.tar
gsoc2013-epiphany-4e3ff98a7670d0530adb3bca0d00a5d141edb856.tar.gz
gsoc2013-epiphany-4e3ff98a7670d0530adb3bca0d00a5d141edb856.tar.bz2
gsoc2013-epiphany-4e3ff98a7670d0530adb3bca0d00a5d141edb856.tar.lz
gsoc2013-epiphany-4e3ff98a7670d0530adb3bca0d00a5d141edb856.tar.xz
gsoc2013-epiphany-4e3ff98a7670d0530adb3bca0d00a5d141edb856.tar.zst
gsoc2013-epiphany-4e3ff98a7670d0530adb3bca0d00a5d141edb856.zip
Do not connect and reemit same signal for nothing. Remove unused/expensive
2003-11-09 Marco Pesenti Gritti <marco@gnome.org> * embed/ephy-embed.c: (ephy_embed_base_init): * embed/ephy-embed.h: * embed/mozilla/mozilla-embed.cpp: * src/ephy-tab.c: (ephy_tab_init): Do not connect and reemit same signal for nothing. Remove unused/expensive progress signal. * src/session.c: (session_save): Unlink session file when all windows are removed.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed.c51
-rw-r--r--embed/ephy-embed.h20
-rw-r--r--embed/mozilla/mozilla-embed.cpp44
3 files changed, 8 insertions, 107 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 516d6c6d6..5d124c653 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -145,27 +145,6 @@ ephy_embed_base_init (gpointer g_class)
G_TYPE_NONE,
1,
G_TYPE_STRING);
- ephy_embed_signals[TITLE] =
- g_signal_new ("ge_title",
- EPHY_TYPE_EMBED,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EphyEmbedClass, title),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
- ephy_embed_signals[PROGRESS] =
- g_signal_new ("ge_progress",
- EPHY_TYPE_EMBED,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EphyEmbedClass, progress),
- NULL, NULL,
- ephy_marshal_VOID__STRING_INT_INT,
- G_TYPE_NONE,
- 3,
- G_TYPE_STRING,
- G_TYPE_INT,
- G_TYPE_INT);
ephy_embed_signals[NET_STATE] =
g_signal_new ("ge_net_state",
EPHY_TYPE_EMBED,
@@ -177,25 +156,6 @@ ephy_embed_base_init (gpointer g_class)
2,
G_TYPE_STRING,
G_TYPE_INT);
- ephy_embed_signals[VISIBILITY] =
- g_signal_new ("ge_visibility",
- EPHY_TYPE_EMBED,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EphyEmbedClass, visibility),
- NULL, NULL,
- g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE,
- 1,
- G_TYPE_BOOLEAN);
- ephy_embed_signals[DESTROY_BRSR] =
- g_signal_new ("ge_destroy_brsr",
- EPHY_TYPE_EMBED,
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EphyEmbedClass, destroy_brsr),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE,
- 0);
ephy_embed_signals[OPEN_URI] =
g_signal_new ("ge_open_uri",
EPHY_TYPE_EMBED,
@@ -206,17 +166,6 @@ ephy_embed_base_init (gpointer g_class)
G_TYPE_INT,
1,
G_TYPE_STRING);
- ephy_embed_signals[SIZE_TO] =
- g_signal_new ("ge_size_to",
- EPHY_TYPE_EMBED,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EphyEmbedClass, size_to),
- NULL, NULL,
- ephy_marshal_VOID__INT_INT,
- G_TYPE_NONE,
- 2,
- G_TYPE_INT,
- G_TYPE_INT);
ephy_embed_signals[DOM_MOUSE_CLICK] =
g_signal_new ("ge_dom_mouse_click",
EPHY_TYPE_EMBED,
diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h
index bf2486953..2ebb51d0a 100644
--- a/embed/ephy-embed.h
+++ b/embed/ephy-embed.h
@@ -154,7 +154,14 @@ struct EphyEmbedClass
/* Signals that we inherit from gtkmozembed
*
- * void (* net_stop) (GtkMozEmbed *embed);
+ * void (* net_stop) (GtkMozEmbed *embed);
+ * void (* title) (EphyEmbed *embed);
+ * void (* visibility) (EphyEmbed *embed,
+ * gboolean visibility);
+ * void (* destroy_brsr) (EphyEmbed *embed);
+ * void (* size_to) (EphyEmbed *embed,
+ * gint width,
+ * gint height);
*/
gint (* context_menu) (EphyEmbed *embed,
@@ -167,25 +174,14 @@ struct EphyEmbedClass
const char *status);
void (* location) (EphyEmbed *embed,
const char *location);
- void (* title) (EphyEmbed *embed);
- void (* progress) (EphyEmbed *embed,
- const char *uri,
- gint curprogress,
- gint maxprogress);
void (* net_state) (EphyEmbed *embed,
const char *uri,
EmbedState state);
void (* new_window) (EphyEmbed *embed,
EphyEmbed **new_embed,
EmbedChromeMask chromemask);
- void (* visibility) (EphyEmbed *embed,
- gboolean visibility);
- void (* destroy_brsr) (EphyEmbed *embed);
gint (* open_uri) (EphyEmbed *embed,
const char *uri);
- void (* size_to) (EphyEmbed *embed,
- gint width,
- gint height);
gint (* dom_mouse_click) (EphyEmbed *embed,
EphyEmbedEvent *event);
gint (* dom_mouse_down) (EphyEmbed *embed,
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 97aefca23..79c851d62 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -97,16 +97,11 @@ static const struct
signal_connections[] =
{
{ "location", (void *) mozilla_embed_location_changed_cb },
- { "title", (void *) mozilla_embed_title_changed_cb },
{ "net_state_all", (void *) mozilla_embed_net_state_all_cb },
- { "progress_all", (void *) mozilla_embed_progress_cb },
{ "link_message", (void *) mozilla_embed_link_message_cb },
{ "js_status", (void *) mozilla_embed_js_status_cb },
- { "visibility", (void *) mozilla_embed_visibility_cb },
- { "destroy_browser", (void *) mozilla_embed_destroy_brsr_cb },
{ "dom_mouse_click", (void *) mozilla_embed_dom_mouse_click_cb },
{ "dom_mouse_down", (void *) mozilla_embed_dom_mouse_down_cb },
- { "size_to", (void *) mozilla_embed_size_to_cb },
{ "new_window", (void *) mozilla_embed_new_window_cb },
{ "security_change", (void *) mozilla_embed_security_change_cb },
{ "dom_key_down", (void *) mozilla_embed_dom_key_down_cb },
@@ -779,15 +774,6 @@ mozilla_embed_location_changed_cb (GtkMozEmbed *embed,
}
static void
-mozilla_embed_title_changed_cb (GtkMozEmbed *embed,
- MozillaEmbed *membed)
-{
- g_return_if_fail (MOZILLA_IS_EMBED (membed));
- g_return_if_fail (GTK_IS_WIDGET (embed));
- g_signal_emit_by_name (membed, "ge_title");
-}
-
-static void
mozilla_embed_net_state_all_cb (GtkMozEmbed *embed, const char *aURI,
gint state, guint status,
MozillaEmbed *membed)
@@ -825,15 +811,6 @@ mozilla_embed_net_state_all_cb (GtkMozEmbed *embed, const char *aURI,
}
static void
-mozilla_embed_progress_cb (GtkMozEmbed *embed, const char *aURI,
- gint curprogress, gint maxprogress,
- MozillaEmbed *membed)
-{
- g_signal_emit_by_name (membed, "ge_progress", aURI,
- curprogress, maxprogress);
-}
-
-static void
mozilla_embed_link_message_cb (GtkMozEmbed *embed,
MozillaEmbed *membed)
{
@@ -857,13 +834,6 @@ mozilla_embed_js_status_cb (GtkMozEmbed *embed,
NS_ConvertUCS2toUTF8(status).get());
}
-static void
-mozilla_embed_visibility_cb (GtkMozEmbed *embed, gboolean visibility,
- MozillaEmbed *membed)
-{
- g_signal_emit_by_name (membed, "ge_visibility", visibility);
-}
-
static gint
mozilla_embed_dom_key_down_cb (GtkMozEmbed *embed, gpointer dom_event,
MozillaEmbed *membed)
@@ -927,13 +897,6 @@ mozilla_embed_dom_key_down_cb (GtkMozEmbed *embed, gpointer dom_event,
return ret;
}
-static void
-mozilla_embed_destroy_brsr_cb (GtkMozEmbed *embed,
- MozillaEmbed *membed)
-{
- g_signal_emit_by_name (membed, "ge_destroy_brsr");
-}
-
static gint
mozilla_embed_dom_mouse_click_cb (GtkMozEmbed *embed, gpointer dom_event,
MozillaEmbed *membed)
@@ -1030,13 +993,6 @@ mozilla_embed_dom_mouse_down_cb (GtkMozEmbed *embed, gpointer dom_event,
}
static void
-mozilla_embed_size_to_cb (GtkMozEmbed *embed, gint width, gint height,
- MozillaEmbed *membed)
-{
- g_signal_emit_by_name (membed, "ge_size_to", width, height);
-}
-
-static void
mozilla_embed_new_window_cb (GtkMozEmbed *embed,
GtkMozEmbed **newEmbed,
guint chromemask,