Permalink
Browse files

Preparing to insert settings

  • Loading branch information...
1 parent 01a4bf8 commit 20fc45f7b17db5d6769a4942599415588a230719 @Caccc committed Jun 13, 2011
Showing with 16 additions and 2 deletions.
  1. +15 −2 mediasplayers@ycdref/extension.js
  2. +1 −0 mediasplayers@ycdref/metadata.json
@@ -18,7 +18,7 @@ gnome-shell-extension-mediasplayers is distributed in the hope that it will be u
You should have received a copy of the GNU General Public License along with gnome-shell-extension-mediasplayers. If not, see <http://www.gnu.org/licenses/>.
*/
-
+const Gio = imports.gi.Gio;
const Clutter = imports.gi.Clutter;
const DBus = imports.dbus;
const Lang = imports.lang;
@@ -56,6 +56,10 @@ function Prop() {
this._init();
}
+function OpenSettings() {
+ Util.spawn(["mediasplayers-settings"]);
+}
+
Prop.prototype = {
_init: function() {
DBus.session.proxifyObject(this, PLAYER_DEFAULT, '/org/mpris/MediaPlayer2', this);
@@ -176,6 +180,8 @@ Indicator.prototype = {
_init: function() {
+ //this._settings = getSettings("org.gnome.shell.extensions.mediasplayers");
+
this._pIcon = new St.Icon({
icon_type: St.IconType.SYMBOLIC,
icon_size: Main.panel.button.get_child().height,
@@ -311,7 +317,7 @@ Indicator.prototype = {
}));
this.menu.addMenuItem(this._repeat);
- this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this._banshee = new PopupMenu.PopupSwitchMenuItem(_("Banshee"), true);
this._banshee.connect('toggled', Lang.bind(this, function(item) {
@@ -351,6 +357,13 @@ Indicator.prototype = {
this.menu.addMenuItem(this._clementine);
this.menu.addMenuItem(this._quodlibet);
+ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+
+ item = new PopupMenu.PopupMenuItem(_("MediasPlayers Settings ..."));
+ item.connect('activate', OpenSettings);
+ this.menu.addMenuItem(item);
+
+
this._updateMetadata();
this._updateSwitches();
this._updateVolume();
@@ -3,6 +3,7 @@
"name": "Mediasplayers",
"description": "Medias Players Extension",
"original-author": "d_dref@yahoo.fr",
+"path": "~/.local/share/gnome-shell/extensions/mediasplayers@ycdref",
"shell-version": [ "3.0" ]
}

0 comments on commit 20fc45f

Please sign in to comment.