Permalink
Browse files

Finished implementing devices in volume applet and panel slightly les…

…s fugly
  • Loading branch information...
1 parent a8cba88 commit 6d8973c0d20eafc9e2c22dbb2f5a0fa43dc6d984 @clefebvre clefebvre committed Dec 15, 2011
Showing with 13 additions and 9 deletions.
  1. +3 −3 data/theme/gnome-shell.css
  2. +10 −6 js/ui/status/volume.js
@@ -279,9 +279,9 @@ StTooltip StLabel {
color: #ffffff;
background-color: black;
border-image: url("panel-border.svg") 1;
- font-size: 10.5pt;
- font-weight: bold;
- height: 1.86em;
+ font-size: 8.5pt;
+ font-weight: normal;
+ height: 25px;
}
#panelLeft, #panelCenter {
View
@@ -911,16 +911,20 @@ Indicator.prototype = {
}
let sinks = this._control.get_sinks();
this._selectDeviceItem.menu.removeAll();
- for (let i = 0; i < sinks.length; i++) {
- let description = sinks[i].get_description();
+ for (let i = 0; i < sinks.length; i++) {
+ let sink = sinks[i];
+ let menuItem = new PopupMenu.PopupMenuItem(sink.get_description());
if (sinks[i].get_id() == this._output.get_id()) {
- description = "* " + sinks[i].get_description();
+ menuItem.setShowDot(true);
}
- let menuItem = new PopupMenu.PopupMenuItem(description);
- this._selectDeviceItem.menu.addMenuItem(menuItem);
+ menuItem.connect('activate', Lang.bind(this, function() {
+ log('Changing default sink to ' + sink.get_description());
+ this._control.set_default_sink(sink);
+ }));
+ this._selectDeviceItem.menu.addMenuItem(menuItem);
}
},
-
+
_readInput: function() {
if (this._inputVolumeId) {
this._input.disconnect(this._inputVolumeId);

0 comments on commit 6d8973c

Please sign in to comment.