[gedit] Get the good notebook with tab to a new window



commit 8143f206727e434e0500526c6d5fef92b43faeb2
Author: Sebastien Lafargue <slafargue src gnome org>
Date:   Sat Mar 15 20:39:47 2014 +0100

    Get the good notebook with tab to a new window
    
    error encountered :
    
    assertion 'gtk_widget_get_parent (widget) == GTK_WIDGET (container)
    ...' failed
    
    When moving tab to a new window and having several notebooks,
    make sure the source notebook is the good one
    ( wich is not always the active one )

 gedit/gedit-window.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 998b13d..f7294c8 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -3361,7 +3361,7 @@ _gedit_window_move_tab_to_new_window (GeditWindow *window,
 
        new_window = clone_window (window);
 
-       old_notebook = gedit_multi_notebook_get_active_notebook (window->priv->multi_notebook);
+       old_notebook = GEDIT_NOTEBOOK (gtk_widget_get_parent (GTK_WIDGET (tab)));
        new_notebook = gedit_multi_notebook_get_active_notebook (new_window->priv->multi_notebook);
 
        gedit_notebook_move_tab (old_notebook,


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