mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Remove "new-window" functionality
I were never able to get setifactionary results with this because: * In GTK apps new window is created from the same process * OpenGL is single-threaded so performance per window is halfed * GTK4 has problems with rendeing using multiple contexts resulting in some frames being upside down So for the time being I am removing a non-working option. There is a chance that it will be fixed and added in future, but for now lets not advertise a functionality that does not work.
This commit is contained in:
@@ -43,13 +43,22 @@ class ClapperApp extends AppBase
|
|||||||
super.vfunc_open(files, hint);
|
super.vfunc_open(files, hint);
|
||||||
|
|
||||||
this.playlist = files;
|
this.playlist = files;
|
||||||
|
|
||||||
|
if(!this.doneFirstActivate)
|
||||||
this._handleAppStart();
|
this._handleAppStart();
|
||||||
|
else
|
||||||
|
this.setWindowPlaylist(this.active_window);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onWindowShow(window)
|
_onWindowShow(window)
|
||||||
{
|
{
|
||||||
super._onWindowShow(window);
|
super._onWindowShow(window);
|
||||||
|
|
||||||
|
this.setWindowPlaylist(window);
|
||||||
|
}
|
||||||
|
|
||||||
|
setWindowPlaylist(window)
|
||||||
|
{
|
||||||
if(!this.playlist.length)
|
if(!this.playlist.length)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -62,7 +62,7 @@ class ClapperAppBase extends Gtk.Application
|
|||||||
_handleAppStart()
|
_handleAppStart()
|
||||||
{
|
{
|
||||||
if(this.doneFirstActivate)
|
if(this.doneFirstActivate)
|
||||||
return this._onWindowShow(this.active_window);
|
return;
|
||||||
|
|
||||||
this._onFirstActivate();
|
this._onFirstActivate();
|
||||||
this.active_window.present();
|
this.active_window.present();
|
||||||
@@ -82,15 +82,11 @@ class ClapperAppBase extends Gtk.Application
|
|||||||
this.windowShowSignal = this.active_window.connect(
|
this.windowShowSignal = this.active_window.connect(
|
||||||
'show', this._onWindowShow.bind(this)
|
'show', this._onWindowShow.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
this.doneFirstActivate = true;
|
this.doneFirstActivate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onWindowShow(window)
|
_onWindowShow(window)
|
||||||
{
|
{
|
||||||
if(!this.windowShowSignal)
|
|
||||||
return;
|
|
||||||
|
|
||||||
window.disconnect(this.windowShowSignal);
|
window.disconnect(this.windowShowSignal);
|
||||||
this.windowShowSignal = null;
|
this.windowShowSignal = null;
|
||||||
}
|
}
|
||||||
|
@@ -95,7 +95,7 @@ class ClapperPlayer extends PlayerBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!file.query_exists(null)) {
|
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++;
|
this._trackId++;
|
||||||
|
|
||||||
if(this._playlist.length <= this._trackId)
|
if(this._playlist.length <= this._trackId)
|
||||||
|
@@ -10,8 +10,3 @@ Terminal=false
|
|||||||
Type=Application
|
Type=Application
|
||||||
# Translators: Search terms to find this application. Do NOT translate the semicolons!
|
# 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;
|
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
|
|
||||||
|
Reference in New Issue
Block a user