[gedit] document-panel: always select the corresponding tab



commit cdc3be1a58ce1b371c3b4816b72c8d384a8126aa
Author: Sebastien Lafargue <slafargue src gnome org>
Date:   Thu Mar 13 21:37:49 2014 +0100

    document-panel: always select the corresponding tab
    
    When dropping a not selected document row, we must be sure
    that the corresponding tab is selected

 gedit/gedit-documents-panel.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index 92018e6..880c02e 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -1274,6 +1274,13 @@ panel_on_drag_data_received (GtkWidget        *widget,
                        {
                                gedit_notebook_move_tab (old_notebook, new_notebook, tab, position);
                        }
+
+                       if (tab != gedit_multi_notebook_get_active_tab (panel->priv->mnb))
+                       {
+                               g_signal_handler_block (panel->priv->mnb, 
panel->priv->tab_switched_handler_id);
+                               gedit_multi_notebook_set_active_tab (panel->priv->mnb, tab);
+                               g_signal_handler_unblock (panel->priv->mnb, 
panel->priv->tab_switched_handler_id);
+                       }
                }
 
                gtk_drag_finish (context, TRUE, FALSE, time);


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