Commit 90c6b816 authored by Sebastien Lafargue's avatar Sebastien Lafargue

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
parent 7332811a
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment