From 478ea0977129cf1b1fd2b58a8927da30d3797ddd Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 10 Oct 2013 16:50:29 +0200 Subject: Allow setting per-profile positions in indicator files The 'Position' key in a profile section has precedence over the global 'Position' key, but otherwise the same semantics. --- libindicator/indicator-ng.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libindicator/indicator-ng.c b/libindicator/indicator-ng.c index 8d3304b..a502c50 100644 --- a/libindicator/indicator-ng.c +++ b/libindicator/indicator-ng.c @@ -567,6 +567,9 @@ indicator_ng_load_from_keyfile (IndicatorNg *self, self->menu_object_path = g_key_file_get_string (keyfile, self->profile, "ObjectPath", error); if (self->menu_object_path == NULL) return FALSE; + + /* a position in the profile overrides the global one */ + self->position = g_key_file_maybe_get_integer (keyfile, self->profile, "Position", self->position); } return TRUE; -- cgit v1.2.3