diff options
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.c | 14 |
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; |