places-menu: recognize if apps-menu is present, and place to the right of it

If apps-menu is enabled at the same time as places-menu, the right order
is activities, apps-menu, places-menu, app-menu. Previously we used the
extension activation order to obtain this, but it's not reliable enough,
so make it explicit in code.
This commit is contained in:
Giovanni Campagna
2012-09-06 19:32:26 +02:00
parent eda45e6072
commit 39c221775e

View File

@@ -106,7 +106,11 @@ let _indicator;
function enable() {
_indicator = new PlacesMenu;
Main.panel.addToStatusArea('places-menu', _indicator, 1, 'left');
let pos = 1;
if ('apps-menu' in Main.panel.statusArea)
pos = 2;
Main.panel.addToStatusArea('places-menu', _indicator, pos, 'left');
}
function disable() {