Bug 545325 – Scrollbars do not disappear automatically

2008-09-05  Michael Natterer  <mitch@gimp.org>

	Bug 545325 – Scrollbars do not disappear automatically

	* app/widgets/gimpcontainertreeview.c: autosize the columns after
	each operation that can reduce the treeview's width.


svn path=/trunk/; revision=26875
This commit is contained in:
Michael Natterer
2008-09-05 14:06:01 +00:00
committed by Michael Natterer
parent 9f7c02e161
commit f1b8cab63d
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2008-09-05 Michael Natterer <mitch@gimp.org>
Bug 545325 Scrollbars do not disappear automatically
* app/widgets/gimpcontainertreeview.c: autosize the columns after
each operation that can reduce the treeview's width.
2008-09-05 Michael Natterer <mitch@gimp.org>
Bug 550983 The size displayed in the status bar isn't correct

View File

@ -513,6 +513,8 @@ gimp_container_tree_view_set_container (GimpContainerView *view,
}
parent_view_iface->set_container (view, container);
gtk_tree_view_columns_autosize (tree_view->view);
}
static void
@ -574,6 +576,8 @@ gimp_container_tree_view_remove_item (GimpContainerView *view,
{
gtk_list_store_remove (GTK_LIST_STORE (tree_view->model), iter);
gtk_tree_view_columns_autosize (tree_view->view);
/* If the store is empty after this remove, clear out renderers
* from all cells so they don't keep refing the viewables
* (see bug #149906).
@ -673,12 +677,21 @@ gimp_container_tree_view_rename_item (GimpContainerView *view,
if (iter)
{
gchar *name = gimp_viewable_get_description (viewable, NULL);
gchar *old_name;
gtk_tree_model_get (tree_view->model, iter,
COLUMN_NAME, &old_name,
-1);
gtk_list_store_set (GTK_LIST_STORE (tree_view->model), iter,
COLUMN_NAME, name,
-1);
if (name && old_name && strlen (name) < strlen (old_name))
gtk_tree_view_columns_autosize (tree_view->view);
g_free (name);
g_free (old_name);
}
}