From 73018411f1b744face28d15b2b73612b11726aba Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 11 Aug 2010 13:00:39 -0500 Subject: Making it so that applications will pass '0' over dbus if they don't have a set ordering index. --- src/app-indicator.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/app-indicator.c b/src/app-indicator.c index e4138d4..781b630 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -788,11 +788,7 @@ app_indicator_get_property (GObject * object, guint prop_id, GValue * value, GPa break; case PROP_ORDERING_INDEX: - if (priv->ordering_index == 0) { - g_value_set_uint(value, generate_id(priv->category, priv->id)); - } else { - g_value_set_uint(value, priv->ordering_index); - } + g_value_set_uint(value, priv->ordering_index); break; default: @@ -2002,12 +1998,10 @@ app_indicator_get_ordering_index (AppIndicator *self) { g_return_val_if_fail (IS_APP_INDICATOR (self), 0); - guint ordering_index = 0; - - g_object_get(G_OBJECT(self), - PROP_ORDERING_INDEX_S, &ordering_index, - NULL); - - return ordering_index; + if (self->priv->ordering_index == 0) { + return generate_id(self->priv->category, self->priv->id); + } else { + return self->priv->ordering_index; + } } -- cgit v1.2.3