aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-07-01 13:07:33 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-07-01 13:07:33 -0500
commitd5421fec0a7e51ddb1979a97de271a3f1733321e (patch)
tree18da8e07a2ce5372be046442ade905a158fff771 /src
parent604640ebeca2fe1b2eb4aa475dbb4221dd8aeb72 (diff)
downloadayatana-indicator-session-d5421fec0a7e51ddb1979a97de271a3f1733321e.tar.gz
ayatana-indicator-session-d5421fec0a7e51ddb1979a97de271a3f1733321e.tar.bz2
ayatana-indicator-session-d5421fec0a7e51ddb1979a97de271a3f1733321e.zip
in src/backend-dbus/users.c, use G_DEFINE_QUARK() instead of rolling our own quark func
Diffstat (limited to 'src')
-rw-r--r--src/backend-dbus/users.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/backend-dbus/users.c b/src/backend-dbus/users.c
index caf6403..b9a79e5 100644
--- a/src/backend-dbus/users.c
+++ b/src/backend-dbus/users.c
@@ -151,23 +151,14 @@ set_logins (IndicatorSessionUsersDbus * self, GHashTable * logins)
****
***/
-static GQuark
-get_connection_list_quark (void)
-{
- static GQuark q = 0;
-
- if (G_UNLIKELY (q == 0))
- q = g_quark_from_static_string ("connection-ids");
-
- return q;
-}
+G_DEFINE_QUARK (connection-ids, connection_list)
static void
object_unref_and_disconnect (gpointer instance)
{
- GSList * l;
+ const GQuark q = connection_list_quark ();
GSList * ids;
- const GQuark q = get_connection_list_quark ();
+ GSList * l;
ids = g_object_steal_qdata (G_OBJECT(instance), q);
for (l=ids; l!=NULL; l=l->next)
@@ -184,7 +175,7 @@ object_unref_and_disconnect (gpointer instance)
static void
object_add_connection (GObject * o, gulong connection_id)
{
- const GQuark q = get_connection_list_quark ();
+ const GQuark q = connection_list_quark ();
GSList * ids;
gulong * ptr;