gboolean empathy_notification_is_enabled (void) { EmpathyConf *conf; gboolean res; conf = empathy_conf_get (); res = FALSE; empathy_conf_get_bool (conf, EMPATHY_PREFS_NOTIFICATIONS_ENABLED, &res); if (!res) { return FALSE; } if (!empathy_check_available_state ()) { empathy_conf_get_bool (conf, EMPATHY_PREFS_NOTIFICATIONS_DISABLED_AWAY, &res); if (res) { return FALSE; } } return TRUE; }
static gboolean empathy_sound_pref_is_enabled (EmpathySoundManager *self, EmpathySound sound_id) { EmpathySoundEntry *entry; entry = &(sound_entries[sound_id]); g_return_val_if_fail (entry->sound_id == sound_id, FALSE); if (entry->key == NULL) return TRUE; if (! g_settings_get_boolean (self->priv->gsettings_sound, EMPATHY_PREFS_SOUNDS_ENABLED)) return FALSE; if (!empathy_check_available_state ()) { if (g_settings_get_boolean (self->priv->gsettings_sound, EMPATHY_PREFS_SOUNDS_DISABLED_AWAY)) return FALSE; } return g_settings_get_boolean (self->priv->gsettings_sound, entry->key); }