diff --git a/clapper_src/app.js b/clapper_src/app.js index 6efc2882..c084c616 100644 --- a/clapper_src/app.js +++ b/clapper_src/app.js @@ -43,13 +43,22 @@ class ClapperApp extends AppBase super.vfunc_open(files, hint); this.playlist = files; - this._handleAppStart(); + + if(!this.doneFirstActivate) + this._handleAppStart(); + else + this.setWindowPlaylist(this.active_window); } _onWindowShow(window) { super._onWindowShow(window); + this.setWindowPlaylist(window); + } + + setWindowPlaylist(window) + { if(!this.playlist.length) return; diff --git a/clapper_src/appBase.js b/clapper_src/appBase.js index fd382ae4..cc2842af 100644 --- a/clapper_src/appBase.js +++ b/clapper_src/appBase.js @@ -62,7 +62,7 @@ class ClapperAppBase extends Gtk.Application _handleAppStart() { if(this.doneFirstActivate) - return this._onWindowShow(this.active_window); + return; this._onFirstActivate(); this.active_window.present(); @@ -82,15 +82,11 @@ class ClapperAppBase extends Gtk.Application this.windowShowSignal = this.active_window.connect( 'show', this._onWindowShow.bind(this) ); - this.doneFirstActivate = true; } _onWindowShow(window) { - if(!this.windowShowSignal) - return; - window.disconnect(this.windowShowSignal); this.windowShowSignal = null; } diff --git a/clapper_src/player.js b/clapper_src/player.js index 513a2852..76238aec 100644 --- a/clapper_src/player.js +++ b/clapper_src/player.js @@ -95,7 +95,7 @@ class ClapperPlayer extends PlayerBase } if(!file.query_exists(null)) { - debug(`file does not exist: ${source}`, 'LEVEL_WARNING'); + debug(`file does not exist: ${file.get_path()}`, 'LEVEL_WARNING'); this._trackId++; if(this._playlist.length <= this._trackId) diff --git a/data/com.github.rafostar.Clapper.desktop b/data/com.github.rafostar.Clapper.desktop index 56b7f14c..bad593ea 100644 --- a/data/com.github.rafostar.Clapper.desktop +++ b/data/com.github.rafostar.Clapper.desktop @@ -10,8 +10,3 @@ Terminal=false Type=Application # Translators: Search terms to find this application. Do NOT translate the semicolons! Keywords=Video;Movie;Film;Clip;Series;Player;Playlist;DVD;TV;Disc;Album;Music;GNOME;Clapper; -Actions=new-window; - -[Desktop Action new-window] -Name=New Window -Exec=com.github.rafostar.Clapper --new-window