mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-12 07:37:35 +00:00
manager: Emit signal when loaded providers have changed
This commit is contained in:
parent
cc3a562f03
commit
2b31a9677e
1 changed files with 13 additions and 0 deletions
|
@ -81,6 +81,7 @@ enum {
|
||||||
USSD_ADDED,
|
USSD_ADDED,
|
||||||
USSD_CANCELLED,
|
USSD_CANCELLED,
|
||||||
USSD_STATE_CHANGED,
|
USSD_STATE_CHANGED,
|
||||||
|
PROVIDERS_CHANGED,
|
||||||
SIGNAL_LAST_SIGNAL,
|
SIGNAL_LAST_SIGNAL,
|
||||||
};
|
};
|
||||||
static guint signals [SIGNAL_LAST_SIGNAL];
|
static guint signals [SIGNAL_LAST_SIGNAL];
|
||||||
|
@ -409,6 +410,8 @@ remove_provider (CallsManager *self,
|
||||||
update_protocols (self);
|
update_protocols (self);
|
||||||
update_state (self);
|
update_state (self);
|
||||||
rebuild_origins_by_protocols (self);
|
rebuild_origins_by_protocols (self);
|
||||||
|
|
||||||
|
g_signal_emit (self, signals[PROVIDERS_CHANGED], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -525,6 +528,7 @@ add_provider (CallsManager *self, const gchar *name)
|
||||||
n_items = g_list_model_get_n_items (origins);
|
n_items = g_list_model_get_n_items (origins);
|
||||||
origin_items_changed_cb (origins, 0, 0, n_items, self);
|
origin_items_changed_cb (origins, 0, 0, n_items, self);
|
||||||
|
|
||||||
|
g_signal_emit (self, signals[PROVIDERS_CHANGED], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -659,6 +663,15 @@ calls_manager_class_init (CallsManagerClass *klass)
|
||||||
1,
|
1,
|
||||||
CALLS_TYPE_USSD);
|
CALLS_TYPE_USSD);
|
||||||
|
|
||||||
|
signals[PROVIDERS_CHANGED] =
|
||||||
|
g_signal_new ("providers-changed",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
0,
|
||||||
|
NULL, NULL, NULL,
|
||||||
|
G_TYPE_NONE,
|
||||||
|
0);
|
||||||
|
|
||||||
props[PROP_STATE] =
|
props[PROP_STATE] =
|
||||||
g_param_spec_enum ("state",
|
g_param_spec_enum ("state",
|
||||||
"state",
|
"state",
|
||||||
|
|
Loading…
Reference in a new issue