aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-13 19:01:14 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-13 19:37:18 +0800
commit2585245b3a13d640ac9988e7ecff2039ad9275c6 (patch)
tree4d29b19caf8b7324283af45bed0ea061bfcda685 /libempathy-gtk
parente5b71631aacf92ba8d242e0a3e3763555b8c751c (diff)
downloadgsoc2013-empathy-2585245b3a13d640ac9988e7ecff2039ad9275c6.tar
gsoc2013-empathy-2585245b3a13d640ac9988e7ecff2039ad9275c6.tar.gz
gsoc2013-empathy-2585245b3a13d640ac9988e7ecff2039ad9275c6.tar.bz2
gsoc2013-empathy-2585245b3a13d640ac9988e7ecff2039ad9275c6.tar.lz
gsoc2013-empathy-2585245b3a13d640ac9988e7ecff2039ad9275c6.tar.xz
gsoc2013-empathy-2585245b3a13d640ac9988e7ecff2039ad9275c6.tar.zst
gsoc2013-empathy-2585245b3a13d640ac9988e7ecff2039ad9275c6.zip
notify-manager: fetch capabilities in _init instead of _constructor
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-notify-manager.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/libempathy-gtk/empathy-notify-manager.c b/libempathy-gtk/empathy-notify-manager.c
index ffcc34f48..c3d440622 100644
--- a/libempathy-gtk/empathy-notify-manager.c
+++ b/libempathy-gtk/empathy-notify-manager.c
@@ -53,8 +53,6 @@ notify_manager_constructor (GType type,
GObjectConstructParam *construct_params)
{
GObject *retval;
- EmpathyNotifyManagerPriv *priv;
- GList *list, *l;
if (notify_manager != NULL)
return g_object_ref (notify_manager);
@@ -65,20 +63,6 @@ notify_manager_constructor (GType type,
notify_manager = EMPATHY_NOTIFY_MANAGER (retval);
g_object_add_weak_pointer (retval, (gpointer) &notify_manager);
- priv = GET_PRIV (notify_manager);
-
- /* fetch capabilities */
- list = notify_get_server_caps ();
- for (l = list; l != NULL; l = g_list_next (l))
- {
- gchar *capa = l->data;
-
- DEBUG ("add capability: %s", capa);
- /* owernship of the string is transfered to the hash table */
- g_hash_table_insert (priv->capabilities, capa, GUINT_TO_POINTER (TRUE));
- }
- g_list_free (list);
-
return retval;
}
@@ -122,11 +106,24 @@ empathy_notify_manager_init (EmpathyNotifyManager *self)
{
EmpathyNotifyManagerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
EMPATHY_TYPE_NOTIFY_MANAGER, EmpathyNotifyManagerPriv);
+ GList *list, *l;
self->priv = priv;
priv->capabilities = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
NULL);
+
+ /* fetch capabilities */
+ list = notify_get_server_caps ();
+ for (l = list; l != NULL; l = g_list_next (l))
+ {
+ gchar *capa = l->data;
+
+ DEBUG ("add capability: %s", capa);
+ /* owernship of the string is transfered to the hash table */
+ g_hash_table_insert (priv->capabilities, capa, GUINT_TO_POINTER (TRUE));
+ }
+ g_list_free (list);
}
EmpathyNotifyManager *