aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-08-11 13:00:39 -0500
committerTed Gould <ted@gould.cx>2010-08-11 13:00:39 -0500
commit73018411f1b744face28d15b2b73612b11726aba (patch)
tree11fd52f24be4e80f54e82d84e1795c6b77c20272
parent0dd2e79a84c137ed4846bfd145ce362dcade3477 (diff)
downloadlibayatana-appindicator-73018411f1b744face28d15b2b73612b11726aba.tar.gz
libayatana-appindicator-73018411f1b744face28d15b2b73612b11726aba.tar.bz2
libayatana-appindicator-73018411f1b744face28d15b2b73612b11726aba.zip
Making it so that applications will pass '0' over dbus if they don't have a set ordering index.
-rw-r--r--src/app-indicator.c18
1 files 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;
+ }
}