[gedit] document-panel: group row wrong name and position
- From: Sebastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] document-panel: group row wrong name and position
- Date: Sat, 8 Mar 2014 14:21:11 +0000 (UTC)
commit 90c6b816d965f05d1d2b85dfbf5208920ddb4e8d
Author: Sebastien Lafargue <slafargue src gnome org>
Date: Sat Mar 8 15:18:37 2014 +0100
document-panel: group row wrong name and position
When adding tab group before the last one, group row
name and position are wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=725923
gedit/gedit-documents-panel.c | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
---
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index f428f33..90638dd 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -643,25 +643,20 @@ multi_notebook_tab_added (GeditMultiNotebook *mnb,
if (position == -1)
{
- /* Notebook doesn't exit in GtkListBox, so create it */
- row = gedit_documents_group_row_new (panel, notebook);
- insert_row (panel, GTK_LIST_BOX (panel->priv->listbox), row, -1);
-
- panel->priv->nb_row_notebook += 1;
-
- /* Now, we have a correct position */
- position = get_dest_position_for_tab (panel, notebook, tab);
+ panel->priv->nb_row_tab = 0;
+ panel->priv->nb_row_notebook = 0;
- group_row_refresh_visibility (panel);
+ refresh_list (panel);
}
+ else
+ {
+ /* Add a new tab's row to the listbox */
+ row = gedit_documents_document_row_new (panel, tab);
+ insert_row (panel, GTK_LIST_BOX (panel->priv->listbox), row, position);
- /* Add a new tab's row to the listbox */
- row = gedit_documents_document_row_new (panel, tab);
- 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));
+ panel->priv->nb_row_tab += 1;
+ row_select (panel, GTK_LIST_BOX (panel->priv->listbox), GTK_LIST_BOX_ROW (row));
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]