aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-08-10 11:56:49 -0500
committerTed Gould <ted@gould.cx>2010-08-10 11:56:49 -0500
commit220d6a305dcfaa0671d7304696f2d8fb1df28431 (patch)
treeb251f5c6aed9110d13b200335e55b311e17a773d /src
parent4a52e90da37a03c2a4b523193861010539632e6e (diff)
downloadlibayatana-appindicator-220d6a305dcfaa0671d7304696f2d8fb1df28431.tar.gz
libayatana-appindicator-220d6a305dcfaa0671d7304696f2d8fb1df28431.tar.bz2
libayatana-appindicator-220d6a305dcfaa0671d7304696f2d8fb1df28431.zip
Storing the value and allowing the get to use a generated value.
Diffstat (limited to 'src')
-rw-r--r--src/app-indicator.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index 3ba2cfb..4395452 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -74,6 +74,7 @@ struct _AppIndicatorPrivate {
gchar *icon_theme_path;
DbusmenuServer *menuservice;
GtkWidget *menu;
+ guint32 ordering_id;
gchar * label;
gchar * label_guide;
guint label_change_idle;
@@ -468,6 +469,7 @@ app_indicator_init (AppIndicator *self)
priv->icon_theme_path = NULL;
priv->menu = NULL;
priv->menuservice = NULL;
+ priv->ordering_id = 0;
priv->label = NULL;
priv->label_guide = NULL;
priv->label_change_idle = 0;
@@ -716,6 +718,9 @@ app_indicator_set_property (GObject * object, guint prop_id, const GValue * valu
}
break;
}
+ case PROP_ORDERING_ID:
+ priv->ordering_id = g_value_get_uint(value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -782,6 +787,14 @@ app_indicator_get_property (GObject * object, guint prop_id, GValue * value, GPa
g_value_set_string (value, priv->label_guide);
break;
+ case PROP_ORDERING_ID:
+ if (priv->ordering_id == 0) {
+ g_value_set_uint(value, generate_id(priv->category, priv->id));
+ } else {
+ g_value_set_uint(value, priv->ordering_id);
+ }
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;