aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-06-13 15:16:53 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-06-13 15:16:53 -0400
commit9b3162f7aeb23197f6bde643a897c64bd1133986 (patch)
tree761bb8a0e224257cdeb4ce988627d430b4926923 /src
parentf7ff900fadff1277be47f0d772c6a84cfaa185a2 (diff)
downloadayatana-indicator-sound-9b3162f7aeb23197f6bde643a897c64bd1133986.tar.gz
ayatana-indicator-sound-9b3162f7aeb23197f6bde643a897c64bd1133986.tar.bz2
ayatana-indicator-sound-9b3162f7aeb23197f6bde643a897c64bd1133986.zip
Put mute and volume slider into a single section
To avoid a separator between them.
Diffstat (limited to 'src')
-rw-r--r--src/service.vala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/service.vala b/src/service.vala
index 22f77c3..fe95ab8 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -93,9 +93,8 @@ public class IndicatorSound.Service {
}
static Menu create_menu () {
-
- var menu = new Menu ();
- menu.append ("Mute", "indicator.mute");
+ var volume_section = new Menu ();
+ volume_section.append ("Mute", "indicator.mute");
var slider = new MenuItem (null, "indicator.volume");
slider.set_attribute ("x-canonical-type", "s", "com.canonical.unity.slider");
@@ -104,8 +103,10 @@ public class IndicatorSound.Service {
slider.set_attribute ("min-value", "d", 0.0);
slider.set_attribute ("max-value", "d", 1.0);
slider.set_attribute ("step", "d", 0.01);
- menu.append_item (slider);
+ volume_section.append_item (slider);
+ var menu = new Menu ();
+ menu.append_section (null, volume_section);
menu.append ("Sound Settingsā€¦", "indicator.settings");
return menu;