Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *** /home/aries/Загрузки/arch_aur/gnome-shell-extension-mediaplayer-git/pkg/usr/share/gnome-shell/extensions/mediaplayer@patapon.info/extension.js 2011-09-04 04:11:26.796910942 +0400
- --- /usr/share/gnome-shell/extensions/mediaplayer@patapon.info/extension.js 2011-09-04 03:53:59.095920159 +0400
- ***************
- *** 371,377 ****
- this._playButton = new ControlButton('media-playback-start',
- Lang.bind(this, function () { this._mediaServerPlayer.PlayPauseRemote(); }));
- this._stopButton = new ControlButton('media-playback-stop',
- ! Lang.bind(this, function () { this._mediaServerPlayer.StopRemote(); }));
- this._nextButton = new ControlButton('media-skip-forward',
- Lang.bind(this, function () { this._mediaServerPlayer.NextRemote(); }));
- --- 371,377 ----
- this._playButton = new ControlButton('media-playback-start',
- Lang.bind(this, function () { this._mediaServerPlayer.PlayPauseRemote(); }));
- this._stopButton = new ControlButton('media-playback-stop',
- ! Lang.bind(this, function () { this._mediaServerPlayer.PauseRemote(); this._mediaServerPlayer.StopRemote(); }));
- this._nextButton = new ControlButton('media-skip-forward',
- Lang.bind(this, function () { this._mediaServerPlayer.NextRemote(); }));
- ***************
- *** 395,400 ****
- --- 395,401 ----
- this._volume = new PopupMenu.PopupSliderMenuItem(0, {style_class: 'volume-slider'});
- this._volume.connect('value-changed', Lang.bind(this, function(item) {
- this._mediaServerPlayer.setVolume(item._value);
- + this._setVolume(this,item._value);
- }));
- this.addMenuItem(this._volumeInfo);
- this.addMenuItem(this._volume);
- ***************
- *** 422,427 ****
- --- 423,433 ----
- this._setStatus(iface, value["PlaybackStatus"]);
- if (value["Metadata"])
- this._setMetadata(iface, value["Metadata"]);
- + this._getStatus();
- + this._getMetadata();
- + this._getVolume();
- + this._currentTime = 0;
- + this._getPosition();
- }));
- this._mediaServerPlayer.connect('Seeked', Lang.bind(this, function(sender, value) {
- ***************
- *** 462,467 ****
- --- 468,475 ----
- if (metadata["mpris:length"]) {
- // song length in secs
- this._songLength = metadata["mpris:length"] / 1000000;
- + if(this._name === "quodlibet")
- + this._songLength = metadata["mpris:length"] / 1000;
- // reset timer
- this._stopTimer();
- this._runTimer();
- ***************
- *** 493,498 ****
- --- 501,512 ----
- if (metadata["mpris:artUrl"]) {
- let cover = metadata["mpris:artUrl"].toString();
- cover = decodeURIComponent(cover.substr(7));
- + /* FIXME
- + fix for quodlibet + picture saver plugin
- + File: .quodlibet/current.cover */
- + if (!GLib.file_test(cover, GLib.FileTest.EXISTS))
- + if(this._name === "quodlibet")
- + cover = decodeURIComponent(".quodlibet/current.cover");
- if (! GLib.file_test(cover, GLib.FileTest.EXISTS))
- this._trackCover.set_child(new St.Icon({icon_name: "media-optical-cd-audio", icon_size: 100, icon_type: St.IconType.FULLCOLOR}));
- else {
- ***************
- *** 516,528 ****
- },
- _setVolume: function(sender, value) {
- ! if (value === 0)
- ! this._volumeInfo.setIcon("audio-volume-muted");
- if (value > 0)
- this._volumeInfo.setIcon("audio-volume-low");
- ! if (value > 0.30)
- this._volumeInfo.setIcon("audio-volume-medium");
- ! if (value > 0.80)
- this._volumeInfo.setIcon("audio-volume-high");
- this._volume.setValue(value);
- },
- --- 530,541 ----
- },
- _setVolume: function(sender, value) {
- ! this._volumeInfo.setIcon("audio-volume-muted");
- if (value > 0)
- this._volumeInfo.setIcon("audio-volume-low");
- ! if (value > 0.33)
- this._volumeInfo.setIcon("audio-volume-medium");
- ! if (value > 0.66)
- this._volumeInfo.setIcon("audio-volume-high");
- this._volume.setValue(value);
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement