[gedit/wip/loader-saver: 38/52] tab: remove_tab() directly, not in an idle



commit 609649cea9ebfacdbdfb0062dba8b24dd8fbd10a
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jun 27 22:23:20 2014 +0200

    tab: remove_tab() directly, not in an idle
    
    remove_tab() is now called outside of a signal handler, so it is safe to
    remove the tab directly.
    
    This commit exposed a bug in GtkSourceCompletionContext, which is now
    fixed in commit 31dc73a5e6f53d0c19c6a72b2878d4160208a4e5 (in the
    gtksourceview repository).

 gedit/gedit-tab.c |   18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 6f9804f..29a482c 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -908,14 +908,6 @@ info_bar_set_progress (GeditTab *tab,
 }
 
 static gboolean
-remove_tab_idle (GeditTab *tab)
-{
-       remove_tab (tab);
-
-       return FALSE;
-}
-
-static gboolean
 scroll_to_cursor (GeditTab *tab)
 {
        GeditView *view;
@@ -1728,15 +1720,7 @@ load_cb (GtkSourceFileLoader *loader,
                if (error->domain == G_IO_ERROR &&
                    error->code == G_IO_ERROR_CANCELLED)
                {
-                       /* remove the tab, but in an idle handler, since
-                        * we are in the handler of doc loaded and we
-                        * don't want doc and tab to be finalized now.
-                        */
-                       /* FIXME idle still needed? */
-                       /* FIXME if an idle is still needed, it's safer to
-                        * remove the idle source during dispose().
-                        */
-                       g_idle_add ((GSourceFunc) remove_tab_idle, tab);
+                       remove_tab (tab);
                }
                else
                {


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