aboutsummaryrefslogtreecommitdiffstats
path: root/lib/history/ephy-history-service.c
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-03-06 02:18:30 +0800
committerXan Lopez <xan@igalia.com>2012-03-07 04:49:46 +0800
commitca8957ac91d2da67e8ccf42ee297ec30056052b8 (patch)
tree28455e9003f8c5c7e4b255b0fe52b7100c941a80 /lib/history/ephy-history-service.c
parentf9ac9eaf73b94ca0ee3b7cf3a129500161f58ea2 (diff)
downloadgsoc2013-epiphany-ca8957ac91d2da67e8ccf42ee297ec30056052b8.tar
gsoc2013-epiphany-ca8957ac91d2da67e8ccf42ee297ec30056052b8.tar.gz
gsoc2013-epiphany-ca8957ac91d2da67e8ccf42ee297ec30056052b8.tar.bz2
gsoc2013-epiphany-ca8957ac91d2da67e8ccf42ee297ec30056052b8.tar.lz
gsoc2013-epiphany-ca8957ac91d2da67e8ccf42ee297ec30056052b8.tar.xz
gsoc2013-epiphany-ca8957ac91d2da67e8ccf42ee297ec30056052b8.tar.zst
gsoc2013-epiphany-ca8957ac91d2da67e8ccf42ee297ec30056052b8.zip
ephy-history-service: add a "cleared" signal for the clear method
And use it in EphyEmbed instead of the legacy signal.
Diffstat (limited to 'lib/history/ephy-history-service.c')
-rw-r--r--lib/history/ephy-history-service.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 8d4e188fb..fb02c80f6 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -44,6 +44,7 @@ typedef enum {
enum {
VISIT_URL,
+ CLEARED,
LAST_SIGNAL
};
@@ -156,6 +157,15 @@ ephy_history_service_class_init (EphyHistoryServiceClass *klass)
1,
G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
+ signals[CLEARED] =
+ g_signal_new ("cleared",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
g_object_class_install_property (gobject_class,
PROP_HISTORY_FILENAME,
g_param_spec_string ("history-filename",
@@ -408,6 +418,10 @@ ephy_history_service_execute_job_callback (gpointer data)
g_assert (message->callback);
message->callback (message->service, message->success, message->result, message->user_data);
+
+ if (message->type == CLEAR)
+ g_signal_emit (message->service, signals[CLEARED], 0);
+
ephy_history_service_message_free (message);
return FALSE;