[Xfce4-commits] [apps/ristretto] 01/01: Fix Glib-Critical errors

noreply at xfce.org noreply at xfce.org
Wed Apr 17 20:06:15 CEST 2019


This is an automated email from the git hooks/post-receive script.

f   2   4   0   4       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/ristretto.

commit 46718b46ca42422b19012fddc218302bdb24ac0d
Author: Igor <f2404 at yandex.ru>
Date:   Wed Apr 17 14:05:03 2019 -0400

    Fix Glib-Critical errors
    
    "Source ID X was not found when attempting to remove it" when showing/hiding
    toolbar in fullscreen mode.
---
 src/main_window.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/main_window.c b/src/main_window.c
index b2796e6..745792c 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -185,6 +185,8 @@ cb_rstto_main_window_state_event(GtkWidget *widget, GdkEventWindowState *event,
 static gboolean
 cb_rstto_main_window_show_fs_toolbar_timeout (RsttoMainWindow *window);
 static void
+cb_rstto_main_window_show_fs_toolbar_timeout_destroy (gpointer user_data);
+static void
 cb_rstto_main_window_image_list_iter_changed (RsttoImageListIter *iter, RsttoMainWindow *window);
 static void
 rstto_main_window_update_statusbar (RsttoMainWindow *window);
@@ -2379,7 +2381,10 @@ cb_rstto_main_window_state_event(GtkWidget *widget, GdkEventWindowState *event,
                 }
                 if (rstto_image_list_get_n_images (window->priv->image_list) != 0)
                 {
-                    window->priv->show_fs_toolbar_timeout_id = g_timeout_add (500, (GSourceFunc)cb_rstto_main_window_show_fs_toolbar_timeout, window);
+                    window->priv->show_fs_toolbar_timeout_id =
+                            g_timeout_add_full (G_PRIORITY_DEFAULT, 500,
+                                                (GSourceFunc) cb_rstto_main_window_show_fs_toolbar_timeout, window,
+                                                cb_rstto_main_window_show_fs_toolbar_timeout_destroy);
                 }
             }
 
@@ -2540,7 +2545,10 @@ cb_rstto_main_window_image_viewer_enter_notify_event (GtkWidget *widget,
                 g_source_remove (window->priv->show_fs_toolbar_timeout_id);
                 window->priv->show_fs_toolbar_timeout_id = 0;
             }
-            window->priv->show_fs_toolbar_timeout_id = g_timeout_add (500, (GSourceFunc)cb_rstto_main_window_show_fs_toolbar_timeout, window);
+            window->priv->show_fs_toolbar_timeout_id =
+                    g_timeout_add_full (G_PRIORITY_DEFAULT, 500,
+                                        (GSourceFunc) cb_rstto_main_window_show_fs_toolbar_timeout, window,
+                                        cb_rstto_main_window_show_fs_toolbar_timeout_destroy);
         }
     }
 
@@ -2554,6 +2562,12 @@ cb_rstto_main_window_show_fs_toolbar_timeout (RsttoMainWindow *window)
     return FALSE;
 }
 
+static void
+cb_rstto_main_window_show_fs_toolbar_timeout_destroy (gpointer user_data)
+{
+    RSTTO_MAIN_WINDOW (user_data)->priv->show_fs_toolbar_timeout_id = 0;
+}
+
 /**
  * cb_rstto_main_window_play:
  * @widget:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list