aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-10-10 16:50:29 +0200
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-10-10 16:50:29 +0200
commit478ea0977129cf1b1fd2b58a8927da30d3797ddd (patch)
treead6b5c76c812655789de3e430f40f4be46c098b7
parenta52033edfb3cdcd63e4e98bb721eca94e6cc5dad (diff)
downloadlibayatana-indicator-478ea0977129cf1b1fd2b58a8927da30d3797ddd.tar.gz
libayatana-indicator-478ea0977129cf1b1fd2b58a8927da30d3797ddd.tar.bz2
libayatana-indicator-478ea0977129cf1b1fd2b58a8927da30d3797ddd.zip
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.
-rw-r--r--libindicator/indicator-ng.c3
1 files changed, 3 insertions, 0 deletions
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;