diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-02-17 18:54:58 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-02-17 18:54:58 +0000 |
commit | 4bebcafef41b3dbc6b4f3f3e2f6382d82390335f (patch) | |
tree | ebb69bda73b2d4be8a11efbd9f0f59b3c3a24a3d /src/music-player-bridge.vala | |
parent | 6ad2bc640794ad3d78c401e4e9391169446db619 (diff) | |
download | ayatana-indicator-sound-4bebcafef41b3dbc6b4f3f3e2f6382d82390335f.tar.gz ayatana-indicator-sound-4bebcafef41b3dbc6b4f3f3e2f6382d82390335f.tar.bz2 ayatana-indicator-sound-4bebcafef41b3dbc6b4f3f3e2f6382d82390335f.zip |
getting there
Diffstat (limited to 'src/music-player-bridge.vala')
-rw-r--r-- | src/music-player-bridge.vala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala index c6c9913..b5932fa 100644 --- a/src/music-player-bridge.vala +++ b/src/music-player-bridge.vala @@ -23,11 +23,13 @@ using GLib; public class MusicPlayerBridge : GLib.Object { + const int DEVICE_ITEMS_COUNT = 3; + private SettingsManager settings_manager; private Dbusmenu.Menuitem root_menu; private HashMap<string, PlayerController> registered_clients; private Mpris2Watcher watcher; - + public MusicPlayerBridge() { } @@ -79,10 +81,10 @@ public class MusicPlayerBridge : GLib.Object private int calculate_menu_position() { if(this.registered_clients.size == 0){ - return 2; + return DEVICE_ITEMS_COUNT; } else{ - return (2 + (this.registered_clients.size * PlayerController.WIDGET_QUANTITY)); + return (DEVICE_ITEMS_COUNT + (this.registered_clients.size * PlayerController.WIDGET_QUANTITY)); } } |