aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-31 01:08:04 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-31 01:08:04 +0800
commitf1de7218621b82fe0622aa04f380445150af39fc (patch)
tree8f113ca2346c0838fd62dad8201971327263807c /libempathy-gtk
parentc23031cdb33273d6396657f93d5daa064b7d7cac (diff)
downloadgsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.gz
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.bz2
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.lz
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.xz
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.tar.zst
gsoc2013-empathy-f1de7218621b82fe0622aa04f380445150af39fc.zip
Move empathy_notification_is_enabled () to src/
svn path=/trunk/; revision=2294
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c52
-rw-r--r--libempathy-gtk/empathy-ui-utils.h3
2 files changed, 1 insertions, 54 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index d7d314082..91362da5e 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1584,23 +1584,6 @@ static EmpathySoundEntry sound_entries[LAST_EMPATHY_SOUND] = {
N_("Voice call ended"), NULL },
};
-static gboolean
-check_available (void)
-{
- McPresence presence;
- EmpathyIdle *idle;
-
- idle = empathy_idle_dup_singleton ();
- presence = empathy_idle_get_state (idle);
- g_object_unref (idle);
-
- if (presence != MC_PRESENCE_AVAILABLE &&
- presence != MC_PRESENCE_UNSET) {
- return FALSE;
- }
-
- return TRUE;
-}
static gboolean
empathy_sound_pref_is_enabled (const char *key)
@@ -1617,7 +1600,7 @@ empathy_sound_pref_is_enabled (const char *key)
return FALSE;
}
- if (!check_available ()) {
+ if (!empathy_check_available_state ()) {
empathy_conf_get_bool (conf, EMPATHY_PREFS_SOUNDS_DISABLED_AWAY,
&res);
if (res) {
@@ -1658,36 +1641,3 @@ empathy_sound_play (GtkWidget *widget,
}
}
-gboolean
-empathy_notification_should_show (gboolean check_focus)
-{
- 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 (!check_available ()) {
- empathy_conf_get_bool (conf,
- EMPATHY_PREFS_NOTIFICATIONS_DISABLED_AWAY,
- &res);
- if (res) {
- return FALSE;
- }
- }
-
- if (check_focus) {
- empathy_conf_get_bool (conf,
- EMPATHY_PREFS_NOTIFICATIONS_FOCUS, &res);
- return res;
- } else {
- return TRUE;
- }
-}
-
diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h
index 6a52ff111..f7ec6649c 100644
--- a/libempathy-gtk/empathy-ui-utils.h
+++ b/libempathy-gtk/empathy-ui-utils.h
@@ -133,9 +133,6 @@ void empathy_send_file_with_file_chooser (EmpathyContact *conta
void empathy_sound_play (GtkWidget *widget,
EmpathySound sound_id);
-/* Notifications */
-gboolean empathy_notification_should_show (gboolean check_focus);
-
G_END_DECLS
#endif /* __EMPATHY_UI_UTILS_H__ */