aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-navigation-history-action.c
diff options
context:
space:
mode:
authorMario Sanchez Prada <msanchez@igalia.com>2010-04-10 01:37:09 +0800
committerXan Lopez <xan@gnome.org>2010-04-20 21:11:07 +0800
commit4592bb6927a5a7017403fbcaa4937aa10c263227 (patch)
tree4f5497e71b82f8fc64fa0e8913df427004853386 /src/ephy-navigation-history-action.c
parentede59b054c4af72cc41108db8aedafbcae1996de (diff)
downloadgsoc2013-epiphany-4592bb6927a5a7017403fbcaa4937aa10c263227.tar
gsoc2013-epiphany-4592bb6927a5a7017403fbcaa4937aa10c263227.tar.gz
gsoc2013-epiphany-4592bb6927a5a7017403fbcaa4937aa10c263227.tar.bz2
gsoc2013-epiphany-4592bb6927a5a7017403fbcaa4937aa10c263227.tar.lz
gsoc2013-epiphany-4592bb6927a5a7017403fbcaa4937aa10c263227.tar.xz
gsoc2013-epiphany-4592bb6927a5a7017403fbcaa4937aa10c263227.tar.zst
gsoc2013-epiphany-4592bb6927a5a7017403fbcaa4937aa10c263227.zip
Change sensitiveness for history buttons when clearing the history
Connect to the 'cleared' signal and change the sensitivity flags Bug #539716 Signed-off-by: Xan Lopez <xan@gnome.org>
Diffstat (limited to 'src/ephy-navigation-history-action.c')
-rw-r--r--src/ephy-navigation-history-action.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ephy-navigation-history-action.c b/src/ephy-navigation-history-action.c
index 90345b2e6..c82f04c34 100644
--- a/src/ephy-navigation-history-action.c
+++ b/src/ephy-navigation-history-action.c
@@ -23,6 +23,7 @@
#include "config.h"
#include "ephy-navigation-history-action.h"
+#include "ephy-action-helper.h"
#include "ephy-debug.h"
#include "ephy-embed-container.h"
#include "ephy-embed-shell.h"
@@ -133,6 +134,13 @@ deselect_menu_item_cb (GtkWidget *menuitem,
gtk_statusbar_pop (GTK_STATUSBAR (statusbar), statusbar_cid);
}
+static void
+ephy_history_cleared_cb (EphyHistory *history,
+ EphyNavigationHistoryAction *action)
+{
+ ephy_action_change_sensitivity_flags (GTK_ACTION (action), SENS_FLAG, TRUE);
+}
+
static GList*
webkit_construct_history_list (WebKitWebView *web_view, WebKitHistoryType hist_type)
{
@@ -283,6 +291,10 @@ ephy_navigation_history_action_init (EphyNavigationHistoryAction *action)
history = EPHY_HISTORY (ephy_embed_shell_get_global_history (embed_shell));
action->priv->history = EPHY_HISTORY (g_object_ref (history));
+
+ g_signal_connect (action->priv->history,
+ "cleared", G_CALLBACK (ephy_history_cleared_cb),
+ action);
}
static void
@@ -290,6 +302,9 @@ ephy_navigation_history_action_finalize (GObject *object)
{
EphyNavigationHistoryAction *action = EPHY_NAVIGATION_HISTORY_ACTION (object);
+ g_signal_handlers_disconnect_by_func (action->priv->history,
+ ephy_history_cleared_cb,
+ action);
g_object_unref (action->priv->history);
action->priv->history = NULL;