diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-10-10 16:50:29 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-10-10 16:50:29 +0200 |
commit | 478ea0977129cf1b1fd2b58a8927da30d3797ddd (patch) | |
tree | ad6b5c76c812655789de3e430f40f4be46c098b7 | |
parent | a52033edfb3cdcd63e4e98bb721eca94e6cc5dad (diff) | |
download | libayatana-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.c | 3 |
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; |