aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-06 18:38:03 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-06 18:38:03 +0800
commitb64094100a910ba2068d3cb64c1595dc02d795d2 (patch)
tree572ee8c5c91e353281000b844f637bd8a36f52c3 /src
parentae767a6174e353acb3b1a850fdefdffebeec9817 (diff)
downloadgsoc2013-epiphany-b64094100a910ba2068d3cb64c1595dc02d795d2.tar
gsoc2013-epiphany-b64094100a910ba2068d3cb64c1595dc02d795d2.tar.gz
gsoc2013-epiphany-b64094100a910ba2068d3cb64c1595dc02d795d2.tar.bz2
gsoc2013-epiphany-b64094100a910ba2068d3cb64c1595dc02d795d2.tar.lz
gsoc2013-epiphany-b64094100a910ba2068d3cb64c1595dc02d795d2.tar.xz
gsoc2013-epiphany-b64094100a910ba2068d3cb64c1595dc02d795d2.tar.zst
gsoc2013-epiphany-b64094100a910ba2068d3cb64c1595dc02d795d2.zip
Make sure event listener is ever attached. Never allow to override
2003-01-06 Marco Pesenti Gritti <marco@it.gnome.org> * TODO: * embed/mozilla/EphyWrapper.cpp: * embed/mozilla/EphyWrapper.h: * embed/mozilla/mozilla-embed.cpp: * src/ephy-tab.c: (ephy_tab_init), (ephy_tab_link_message_cb), (ephy_tab_get_status_message): Make sure event listener is ever attached. Never allow to override statusbar messages.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-tab.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 5ad7090eb..2c50af794 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -52,6 +52,7 @@ struct EphyTabPrivate
gboolean is_active;
TabLoadStatus load_status;
char status_message[255];
+ char link_message[255];
char *title;
char *location;
int load_percent;
@@ -80,10 +81,6 @@ ephy_tab_link_message_cb (EphyEmbed *embed,
const char *message,
EphyTab *tab);
static void
-ephy_tab_js_status_cb (EphyEmbed *embed,
- const char *status,
- EphyTab *tab);
-static void
ephy_tab_location_cb (EphyEmbed *embed, EphyTab *tab);
static void
ephy_tab_title_cb (EphyEmbed *embed, EphyTab *tab);
@@ -201,6 +198,7 @@ ephy_tab_init (EphyTab *tab)
tab->priv->window = NULL;
tab->priv->is_active = FALSE;
*tab->priv->status_message = '\0';
+ *tab->priv->link_message = '\0';
tab->priv->load_status = TAB_LOAD_NONE;
tab->priv->load_percent = 0;
tab->priv->title = NULL;
@@ -226,9 +224,6 @@ ephy_tab_init (EphyTab *tab)
g_signal_connect (embed, "ge_link_message",
GTK_SIGNAL_FUNC (ephy_tab_link_message_cb),
tab);
- g_signal_connect (embed, "ge_js_status",
- GTK_SIGNAL_FUNC (ephy_tab_js_status_cb),
- tab);
g_signal_connect (embed, "ge_location",
GTK_SIGNAL_FUNC (ephy_tab_location_cb),
tab);
@@ -435,25 +430,10 @@ ephy_tab_link_message_cb (EphyEmbed *embed,
{
if (!tab->priv->is_active) return;
- g_strlcpy (tab->priv->status_message,
+ g_strlcpy (tab->priv->link_message,
message, 255);
ephy_window_update_control (tab->priv->window,
- StatusbarMessageControl);
-}
-
-static void
-ephy_tab_js_status_cb (EphyEmbed *embed,
- const char *status,
- EphyTab *tab)
-{
- if (!tab->priv->is_active)
- return;
-
- g_strlcpy (tab->priv->status_message,
- status, 255);
-
- ephy_window_update_control (tab->priv->window,
StatusbarMessageControl);
}
@@ -895,13 +875,13 @@ ephy_tab_get_load_percent (EphyTab *tab)
const char *
ephy_tab_get_status_message (EphyTab *tab)
{
- if (tab->priv->status_message)
+ if (*tab->priv->link_message)
{
- return tab->priv->status_message;
+ return tab->priv->link_message;
}
else
{
- return " ";
+ return tab->priv->status_message;
}
}