GSList *approvals;
gint ringing;
+
+ GSettings *gsettings_notif;
} EmpathyEventManagerPriv;
typedef struct _EventPriv EventPriv;
TpConnectionPresenceType previous,
EmpathyEventManager *manager)
{
+ EmpathyEventManagerPriv *priv = GET_PRIV (manager);
TpAccount *account;
gchar *header = NULL;
EmpathyIdle *idle;
- GSettings *gsettings = g_settings_new (EMPATHY_PREFS_NOTIFICATIONS_SCHEMA);
GtkWidget *window = empathy_main_window_dup ();
account = empathy_contact_get_account (contact);
/* someone is logging off */
empathy_sound_play (window, EMPATHY_SOUND_CONTACT_DISCONNECTED);
- if (g_settings_get_boolean (gsettings,
+ if (g_settings_get_boolean (priv->gsettings_notif,
EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNOUT))
{
header = g_strdup_printf (_("%s is now offline."),
/* someone is logging in */
empathy_sound_play (window, EMPATHY_SOUND_CONTACT_CONNECTED);
- if (g_settings_get_boolean (gsettings,
+ if (g_settings_get_boolean (priv->gsettings_notif,
EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNIN))
{
header = g_strdup_printf (_("%s is now online."),
out:
g_object_unref (idle);
- g_object_unref (gsettings);
g_object_unref (window);
}
g_slist_free (priv->approvals);
g_object_unref (priv->contact_manager);
g_object_unref (priv->approver);
+ g_object_unref (priv->gsettings_notif);
}
static void
manager->priv = priv;
+ priv->gsettings_notif = g_settings_new (EMPATHY_PREFS_NOTIFICATIONS_SCHEMA);
+
priv->contact_manager = empathy_contact_manager_dup_singleton ();
g_signal_connect (priv->contact_manager, "pendings-changed",
G_CALLBACK (event_manager_pendings_changed_cb), manager);