[totem/wip/hadess/fix-dbus-open] main: Fix GApplication Open() not working




commit 32d101599b2599ffdc828cd6eb0313584d9101cd
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Sep 6 10:46:10 2022 +0200

    main: Fix GApplication Open() not working
    
    The playlist signals weren't correctly reconnected after being blocked
    to clear the playlist.
    
    To reproduce manually:
    totem --gapplication-service
    gapplication launch org.gnome.Totem.Devel ~/Videos/foo.mp4
    
    Bisected by Sebastian Keller
    
    Fixes: 2a7952a7 ("main: Use GSignalGroup to simplify playlist signal handling")

 src/totem-object.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/totem-object.c b/src/totem-object.c
index 071968212..a26d6899a 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -2882,16 +2882,12 @@ totem_object_open_files_list (TotemObject *totem, GSList *list)
                                || strstr (filename, "://") != NULL
                                || g_str_has_prefix (filename, "dvd:") != FALSE
                                || g_str_has_prefix (filename, "vcd:") != FALSE
-                               || g_str_has_prefix (filename, "dvb:") != FALSE)
-               {
-                       if (cleared == FALSE)
-                       {
+                               || g_str_has_prefix (filename, "dvb:") != FALSE) {
+                       if (cleared == FALSE) {
                                /* The function that calls us knows better
-                                * if we should be doing something with the 
+                                * if we should be doing something with the
                                 * changed playlist ... */
-                               g_signal_handlers_disconnect_by_func
-                                       (G_OBJECT (totem->playlist),
-                                        playlist_changed_cb, totem);
+                               g_signal_group_block (totem->playlist_signals);
                                changed = totem_playlist_clear (totem->playlist);
                                bacon_video_widget_close (totem->bvw);
                                emit_file_closed (totem);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]