[epiphany/overview] ephy-history-service: add "url-deleted" signal



commit aa6b94960185dede7937e5f242777a6ebacb2650
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Fri Aug 10 20:45:12 2012 +0300

    ephy-history-service: add "url-deleted" signal

 lib/history/ephy-history-service.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 52cc8b9..0c72a76 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -50,6 +50,7 @@ enum {
   VISIT_URL,
   CLEARED,
   URL_TITLE_CHANGED,
+  URL_DELETED,
   LAST_SIGNAL
 };
 
@@ -184,6 +185,16 @@ ephy_history_service_class_init (EphyHistoryServiceClass *klass)
                   G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
                   G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
 
+  signals[URL_DELETED] =
+    g_signal_new ("url-deleted",
+                  G_OBJECT_CLASS_TYPE (gobject_class),
+                  G_SIGNAL_RUN_LAST,
+                  0, NULL, NULL,
+                  g_cclosure_marshal_VOID__STRING,
+                  G_TYPE_NONE,
+                  1,
+                  G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
+
   g_object_class_install_property (gobject_class,
                                    PROP_HISTORY_FILENAME,
                                    g_param_spec_string ("history-filename",
@@ -847,6 +858,7 @@ ephy_history_service_execute_delete_urls (EphyHistoryService *self,
   for (l = urls; l != NULL; l = l->next) {
     url = l->data;
     ephy_history_service_delete_url (self, url);
+    g_signal_emit (self, signals[URL_DELETED], 0, url->url);
   }
 
   ephy_history_service_delete_orphan_hosts (self);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]