aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2013-07-18 18:31:49 +0800
committerXavier Claessens <xavier.claessens@collabora.co.uk>2013-07-18 19:02:17 +0800
commiteaa91c2dea8e630e113025764d678c823761e1e6 (patch)
treeed899aed2bc391a2e30e054c35087be83a0ee150
parent2d71ae69bc60d3825feafb0e2315069498010aee (diff)
downloadgsoc2013-empathy-eaa91c2dea8e630e113025764d678c823761e1e6.tar
gsoc2013-empathy-eaa91c2dea8e630e113025764d678c823761e1e6.tar.gz
gsoc2013-empathy-eaa91c2dea8e630e113025764d678c823761e1e6.tar.bz2
gsoc2013-empathy-eaa91c2dea8e630e113025764d678c823761e1e6.tar.lz
gsoc2013-empathy-eaa91c2dea8e630e113025764d678c823761e1e6.tar.xz
gsoc2013-empathy-eaa91c2dea8e630e113025764d678c823761e1e6.tar.zst
gsoc2013-empathy-eaa91c2dea8e630e113025764d678c823761e1e6.zip
Move empathy_check_available_state() from utils to sound-manager
It is used only from one place, there is no reason to have it in utils. https://bugzilla.gnome.org/show_bug.cgi?id=704454
-rw-r--r--libempathy-gtk/empathy-sound-manager.c18
-rw-r--r--libempathy/empathy-utils.c18
-rw-r--r--libempathy/empathy-utils.h1
3 files changed, 18 insertions, 19 deletions
diff --git a/libempathy-gtk/empathy-sound-manager.c b/libempathy-gtk/empathy-sound-manager.c
index 600816f67..4f69c62db 100644
--- a/libempathy-gtk/empathy-sound-manager.c
+++ b/libempathy-gtk/empathy-sound-manager.c
@@ -23,6 +23,7 @@
#include <glib/gi18n-lib.h>
#include "empathy-gsettings.h"
+#include "empathy-presence-manager.h"
#include "empathy-utils.h"
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
@@ -162,6 +163,23 @@ empathy_sound_manager_dup_singleton (void)
}
static gboolean
+empathy_check_available_state (void)
+{
+ TpConnectionPresenceType presence;
+ EmpathyPresenceManager *presence_mgr;
+
+ presence_mgr = empathy_presence_manager_dup_singleton ();
+ presence = empathy_presence_manager_get_state (presence_mgr);
+ g_object_unref (presence_mgr);
+
+ if (presence != TP_CONNECTION_PRESENCE_TYPE_AVAILABLE &&
+ presence != TP_CONNECTION_PRESENCE_TYPE_UNSET)
+ return FALSE;
+
+ return TRUE;
+}
+
+static gboolean
empathy_sound_pref_is_enabled (EmpathySoundManager *self,
EmpathySound sound_id)
{
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 0efe3a180..25624bf00 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -34,7 +34,6 @@
#include <math.h>
#include "empathy-client-factory.h"
-#include "empathy-presence-manager.h"
#include "extensions.h"
#include <math.h>
@@ -422,23 +421,6 @@ empathy_file_lookup (const gchar *filename, const gchar *subdir)
return path;
}
-gboolean
-empathy_check_available_state (void)
-{
- TpConnectionPresenceType presence;
- EmpathyPresenceManager *presence_mgr;
-
- presence_mgr = empathy_presence_manager_dup_singleton ();
- presence = empathy_presence_manager_get_state (presence_mgr);
- g_object_unref (presence_mgr);
-
- if (presence != TP_CONNECTION_PRESENCE_TYPE_AVAILABLE &&
- presence != TP_CONNECTION_PRESENCE_TYPE_UNSET)
- return FALSE;
-
- return TRUE;
-}
-
gint
empathy_uint_compare (gconstpointer a,
gconstpointer b)
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 440fe8350..f002c41cd 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -60,7 +60,6 @@ const gchar * empathy_presence_to_str (TpConnectionPresenceType presence);
TpConnectionPresenceType empathy_presence_from_str (const gchar *str);
gchar * empathy_file_lookup (const gchar *filename,
const gchar *subdir);
-gboolean empathy_check_available_state (void);
gint empathy_uint_compare (gconstpointer a,
gconstpointer b);