aboutsummaryrefslogtreecommitdiff
path: root/lib/indicator-menu.vala
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2014-04-10 11:28:03 +1200
committerWilliam Hua <william.hua@canonical.com>2014-04-10 11:28:03 +1200
commitd4868ddeca70ce2a3a4936e5bff41e380ad61b5d (patch)
tree10ca420d9a74e08946e0e73b81740dc805dd3062 /lib/indicator-menu.vala
parentf442bede4bd7ed4f455f2714b93b2b71f20540da (diff)
downloadayatana-indicator-keyboard-d4868ddeca70ce2a3a4936e5bff41e380ad61b5d.tar.gz
ayatana-indicator-keyboard-d4868ddeca70ce2a3a4936e5bff41e380ad61b5d.tar.bz2
ayatana-indicator-keyboard-d4868ddeca70ce2a3a4936e5bff41e380ad61b5d.zip
Use different mouse actions when locked.
Diffstat (limited to 'lib/indicator-menu.vala')
-rw-r--r--lib/indicator-menu.vala13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/indicator-menu.vala b/lib/indicator-menu.vala
index e321a2d2..8e5661e2 100644
--- a/lib/indicator-menu.vala
+++ b/lib/indicator-menu.vala
@@ -52,10 +52,17 @@ public class Indicator.Keyboard.IndicatorMenu : MenuModel {
}
var indicator = new MenuItem.submenu (null, submenu);
- indicator.set_attribute ("x-canonical-type", "s", "com.canonical.indicator.root");
- indicator.set_attribute ("x-canonical-secondary-action", "s", "indicator.next");
- indicator.set_attribute ("x-canonical-scroll-action", "s", "indicator.scroll");
indicator.set_detailed_action ("indicator.indicator");
+ indicator.set_attribute ("x-canonical-type", "s", "com.canonical.indicator.root");
+
+ /* We need special mouse actions on the lock screen. */
+ if ((options & Options.DCONF) != Options.NONE) {
+ indicator.set_attribute ("x-canonical-secondary-action", "s", "indicator.next");
+ indicator.set_attribute ("x-canonical-scroll-action", "s", "indicator.scroll");
+ } else {
+ indicator.set_attribute ("x-canonical-secondary-action", "s", "indicator.locked_next");
+ indicator.set_attribute ("x-canonical-scroll-action", "s", "indicator.locked_scroll");
+ }
indicator_menu = new Menu ();
indicator_menu.append_item (indicator);