diff options
author | Lars Hamann <lars@gtk.org> | 1999-02-11 23:47:48 +0000 |
---|---|---|
committer | Lars Hamann <lars@src.gnome.org> | 1999-02-11 23:47:48 +0000 |
commit | 1f85d83ef357fed2f5dbdcfd99c14dcfbddb0326 (patch) | |
tree | 2119177a5cad92c8d68a683bd974b65b6c4e076e /gtk/gtklist.c | |
parent | ed219818b1795864ae2fec4fd10e7ff7c833c814 (diff) | |
download | gtk+-1f85d83ef357fed2f5dbdcfd99c14dcfbddb0326.tar.gz |
don't autoselect focus_row in case of GTK_SELECTION_EXTENDED
Fri Feb 12 00:08:01 1999 Lars Hamann <lars@gtk.org>
* gtk/gtklist.c (gtk_list_remove_items_internal): don't autoselect
focus_row in case of GTK_SELECTION_EXTENDED
* gtk/testgtk.c : few changes in list example.
* gtk/gtklistitem.c (gtk_list_item_class_init):
* gtk/gtkctree.c (gtk_ctree_class_init):
* gtk/gtkclist.c (gtk_clist_class_init):
fixed indentation, removed unused key bindings
Diffstat (limited to 'gtk/gtklist.c')
-rw-r--r-- | gtk/gtklist.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gtk/gtklist.c b/gtk/gtklist.c index 9948c0582e..ccfd161367 100644 --- a/gtk/gtklist.c +++ b/gtk/gtklist.c @@ -1096,7 +1096,6 @@ gtk_list_insert_items (GtkList *list, gtk_signal_connect (GTK_OBJECT (widget), "toggle", GTK_SIGNAL_FUNC (gtk_list_signal_item_toggle), list); - if (GTK_WIDGET_VISIBLE (widget->parent)) { if (GTK_WIDGET_REALIZED (widget->parent) && @@ -1109,6 +1108,7 @@ gtk_list_insert_items (GtkList *list, } } + nchildren = g_list_length (list->children); if ((position < 0) || (position > nchildren)) position = nchildren; @@ -1140,7 +1140,7 @@ gtk_list_insert_items (GtkList *list, if (tmp_list == list->children) list->children = items; } - + if (list->children && !list->selection && (list->selection_mode == GTK_SELECTION_BROWSE)) { @@ -1411,8 +1411,7 @@ gtk_list_remove_items_internal (GtkList *list, else if (container->focus_child) gtk_container_set_focus_child (container, new_focus_child); - if ((list->selection_mode == GTK_SELECTION_BROWSE || - list->selection_mode == GTK_SELECTION_EXTENDED) && !list->selection) + if (list->selection_mode == GTK_SELECTION_BROWSE && !list->selection) { list->last_focus_child = new_focus_child; gtk_list_select_child (list, new_focus_child); @@ -1577,7 +1576,7 @@ gtk_list_unselect_all (GtkList *list) if (!list->children) return; - + if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (list)) gtk_list_end_drag_selection (list); |