call _gtk_tree_view_column_cell_set_dirty when visible, so this column

Mon Feb 25 22:11:34 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_visible): call
        _gtk_tree_view_column_cell_set_dirty when visible, so this column
        gets some space allocated. (#70996)

        * gtk/gtkliststore.c (gtk_list_store_get_path): add simple
        optimization for the tail case
        (gtk_list_store_real_set_value): remove unneeded _get_path calls
This commit is contained in:
Kristian Rietveld 2002-02-25 21:20:25 +00:00 committed by Kristian Rietveld
parent 9953d39036
commit 2544d7b719
9 changed files with 79 additions and 5 deletions

View File

@ -1,3 +1,13 @@
Mon Feb 25 22:11:34 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_visible): call
_gtk_tree_view_column_cell_set_dirty when visible, so this column
gets some space allocated. (#70996)
* gtk/gtkliststore.c (gtk_list_store_get_path): add simple
optimization for the tail case
(gtk_list_store_real_set_value): remove unneeded _get_path calls
Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com> Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):

View File

@ -1,3 +1,13 @@
Mon Feb 25 22:11:34 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_visible): call
_gtk_tree_view_column_cell_set_dirty when visible, so this column
gets some space allocated. (#70996)
* gtk/gtkliststore.c (gtk_list_store_get_path): add simple
optimization for the tail case
(gtk_list_store_real_set_value): remove unneeded _get_path calls
Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com> Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):

View File

@ -1,3 +1,13 @@
Mon Feb 25 22:11:34 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_visible): call
_gtk_tree_view_column_cell_set_dirty when visible, so this column
gets some space allocated. (#70996)
* gtk/gtkliststore.c (gtk_list_store_get_path): add simple
optimization for the tail case
(gtk_list_store_real_set_value): remove unneeded _get_path calls
Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com> Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):

View File

@ -1,3 +1,13 @@
Mon Feb 25 22:11:34 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_visible): call
_gtk_tree_view_column_cell_set_dirty when visible, so this column
gets some space allocated. (#70996)
* gtk/gtkliststore.c (gtk_list_store_get_path): add simple
optimization for the tail case
(gtk_list_store_real_set_value): remove unneeded _get_path calls
Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com> Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):

View File

@ -1,3 +1,13 @@
Mon Feb 25 22:11:34 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_visible): call
_gtk_tree_view_column_cell_set_dirty when visible, so this column
gets some space allocated. (#70996)
* gtk/gtkliststore.c (gtk_list_store_get_path): add simple
optimization for the tail case
(gtk_list_store_real_set_value): remove unneeded _get_path calls
Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com> Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):

View File

@ -1,3 +1,13 @@
Mon Feb 25 22:11:34 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_visible): call
_gtk_tree_view_column_cell_set_dirty when visible, so this column
gets some space allocated. (#70996)
* gtk/gtkliststore.c (gtk_list_store_get_path): add simple
optimization for the tail case
(gtk_list_store_real_set_value): remove unneeded _get_path calls
Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com> Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):

View File

@ -1,3 +1,13 @@
Mon Feb 25 22:11:34 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_visible): call
_gtk_tree_view_column_cell_set_dirty when visible, so this column
gets some space allocated. (#70996)
* gtk/gtkliststore.c (gtk_list_store_get_path): add simple
optimization for the tail case
(gtk_list_store_real_set_value): remove unneeded _get_path calls
Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com> Mon Feb 25 12:47:25 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):

View File

@ -514,6 +514,12 @@ gtk_list_store_get_path (GtkTreeModel *tree_model,
g_return_val_if_fail (GTK_IS_LIST_STORE (tree_model), NULL); g_return_val_if_fail (GTK_IS_LIST_STORE (tree_model), NULL);
g_return_val_if_fail (iter->stamp == GTK_LIST_STORE (tree_model)->stamp, NULL); g_return_val_if_fail (iter->stamp == GTK_LIST_STORE (tree_model)->stamp, NULL);
if (G_SLIST (iter->user_data) == G_SLIST (GTK_LIST_STORE (tree_model)->tail))
{
retval = gtk_tree_path_new ();
gtk_tree_path_append_index (retval, GTK_LIST_STORE (tree_model)->length - 1);
return retval;
}
for (list = G_SLIST (GTK_LIST_STORE (tree_model)->root); list; list = list->next) for (list = G_SLIST (GTK_LIST_STORE (tree_model)->root); list; list = list->next)
{ {
@ -651,7 +657,6 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
{ {
GtkTreeDataList *list; GtkTreeDataList *list;
GtkTreeDataList *prev; GtkTreeDataList *prev;
GtkTreePath *path;
GValue real_value = {0, }; GValue real_value = {0, };
gboolean converted = FALSE; gboolean converted = FALSE;
gint orig_column = column; gint orig_column = column;
@ -691,13 +696,11 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
{ {
if (column == 0) if (column == 0)
{ {
path = gtk_list_store_get_path (GTK_TREE_MODEL (list_store), iter);
if (converted) if (converted)
_gtk_tree_data_list_value_to_node (list, &real_value); _gtk_tree_data_list_value_to_node (list, &real_value);
else else
_gtk_tree_data_list_value_to_node (list, value); _gtk_tree_data_list_value_to_node (list, value);
retval = TRUE; retval = TRUE;
gtk_tree_path_free (path);
if (converted) if (converted)
g_value_unset (&real_value); g_value_unset (&real_value);
return retval; return retval;
@ -727,13 +730,11 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
column --; column --;
} }
path = gtk_list_store_get_path (GTK_TREE_MODEL (list_store), iter);
if (converted) if (converted)
_gtk_tree_data_list_value_to_node (list, &real_value); _gtk_tree_data_list_value_to_node (list, &real_value);
else else
_gtk_tree_data_list_value_to_node (list, value); _gtk_tree_data_list_value_to_node (list, value);
retval = TRUE; retval = TRUE;
gtk_tree_path_free (path);
if (converted) if (converted)
g_value_unset (&real_value); g_value_unset (&real_value);

View File

@ -1445,6 +1445,9 @@ gtk_tree_view_column_set_visible (GtkTreeViewColumn *tree_column,
tree_column->visible = visible; tree_column->visible = visible;
if (tree_column->visible)
_gtk_tree_view_column_cell_set_dirty (tree_column, TRUE);
gtk_tree_view_column_update_button (tree_column); gtk_tree_view_column_update_button (tree_column);
g_object_notify (G_OBJECT (tree_column), "visible"); g_object_notify (G_OBJECT (tree_column), "visible");
} }