[gedit] document-panel: always selecting the active tab



commit e3b369a6c20d7908a0faef7404709fae63155023
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Mon May 12 18:58:36 2014 +0200

    document-panel: always selecting the active tab
    
    When opening multiple files ( with command-line or with
    mutli-selection in open files dialog ), the wrong row is selected.

 gedit/gedit-documents-panel.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index c0b605e..b4f8357 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -690,7 +690,11 @@ multi_notebook_tab_added (GeditMultiNotebook  *mnb,
                insert_row (panel, GTK_LIST_BOX (panel->priv->listbox), row, position);
 
                panel->priv->nb_row_tab += 1;
-               row_select (panel, GTK_LIST_BOX (panel->priv->listbox), GTK_LIST_BOX_ROW (row));
+
+               if (tab == gedit_multi_notebook_get_active_tab (mnb))
+               {
+                       row_select (panel, GTK_LIST_BOX (panel->priv->listbox), GTK_LIST_BOX_ROW (row));
+               }
        }
 }
 


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