[epiphany/wip/google-safe-browsing: 33/37] gsb-service: Add update-finished signal
- From: Gabriel Ivașcu <gabrielivascu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/google-safe-browsing: 33/37] gsb-service: Add update-finished signal
- Date: Mon, 2 Oct 2017 18:54:48 +0000 (UTC)
commit c166d24183753b1c74d0075aeee196d91979d2b5
Author: Gabriel Ivascu <gabrielivascu gnome org>
Date: Tue Sep 26 20:43:31 2017 +0300
gsb-service: Add update-finished signal
lib/safe-browsing/ephy-gsb-service.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/lib/safe-browsing/ephy-gsb-service.c b/lib/safe-browsing/ephy-gsb-service.c
index 911dadd..aac950b 100644
--- a/lib/safe-browsing/ephy-gsb-service.c
+++ b/lib/safe-browsing/ephy-gsb-service.c
@@ -65,6 +65,13 @@ enum {
static GParamSpec *obj_properties[LAST_PROP];
+enum {
+ UPDATE_FINISHED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
static gboolean ephy_gsb_service_update (EphyGSBService *self);
typedef struct {
@@ -328,6 +335,7 @@ ephy_gsb_service_update_finished_cb (EphyGSBService *self,
gpointer user_data)
{
self->is_updating = FALSE;
+ g_signal_emit (self, signals[UPDATE_FINISHED], 0);
ephy_gsb_service_schedule_update (self);
}
@@ -508,6 +516,13 @@ ephy_gsb_service_class_init (EphyGSBServiceClass *klass)
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, LAST_PROP, obj_properties);
+
+ signals[UPDATE_FINISHED] =
+ g_signal_new ("update-finished",
+ EPHY_TYPE_GSB_SERVICE,
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 0);
}
EphyGSBService *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]