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



commit 7216fc00d67d6eac8049198cac7f9ecb58ee98ec
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Thu Aug 9 16:57:18 2012 +0300

    ephy-history-service: add "url-title-changed" signal

 lib/history/ephy-history-service.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 9c5d72e..52cc8b9 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -49,6 +49,7 @@ typedef enum {
 enum {
   VISIT_URL,
   CLEARED,
+  URL_TITLE_CHANGED,
   LAST_SIGNAL
 };
 
@@ -172,6 +173,17 @@ ephy_history_service_class_init (EphyHistoryServiceClass *klass)
                   G_TYPE_NONE,
                   0);
 
+  signals[URL_TITLE_CHANGED] =
+    g_signal_new ("url-title-changed",
+                  G_OBJECT_CLASS_TYPE (gobject_class),
+                  G_SIGNAL_RUN_LAST,
+                  0, NULL, NULL,
+                  g_cclosure_marshal_generic,
+                  G_TYPE_NONE,
+                  2,
+                  G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
+                  G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE);
+
   g_object_class_install_property (gobject_class,
                                    PROP_HISTORY_FILENAME,
                                    g_param_spec_string ("history-filename",
@@ -688,6 +700,7 @@ ephy_history_service_execute_set_url_title (EphyHistoryService *self,
     url->title = title;
     ephy_history_service_update_url_row (self, url);
     ephy_history_service_schedule_commit (self);
+    g_signal_emit (self, signals[URL_TITLE_CHANGED], 0, url->url, url->title);
     return TRUE;
   }
 }



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