diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-10-29 00:18:26 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-10-29 00:18:26 +0000 |
commit | cf5ac5eaa90eedc40828a1d41626fa89176c6e5d (patch) | |
tree | 570dccbc7e5e6a238e2acd00e556ebfec8431c29 /libindicator | |
parent | 773d09bf430f6960ee4a1d5c24b96b9375c03403 (diff) | |
parent | 478ea0977129cf1b1fd2b58a8927da30d3797ddd (diff) | |
download | libayatana-indicator-cf5ac5eaa90eedc40828a1d41626fa89176c6e5d.tar.gz libayatana-indicator-cf5ac5eaa90eedc40828a1d41626fa89176c6e5d.tar.bz2 libayatana-indicator-cf5ac5eaa90eedc40828a1d41626fa89176c6e5d.zip |
Allow setting different positions for each profile in indicator files
The 'Position' key in a profile section has precedence over the global 'Position' key, but otherwise the same semantics.
We need this along with lp:~larsu/unity8/per-profile-indicator-positions to enable different positioning on the desktop and phone.
Approved by PS Jenkins bot, Charles Kerr.
Diffstat (limited to 'libindicator')
-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 87deb14..507f979 100644 --- a/libindicator/indicator-ng.c +++ b/libindicator/indicator-ng.c @@ -565,6 +565,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; |