Commit 1f85d83e authored by Lars Hamann's avatar Lars Hamann Committed by Lars Hamann
Browse files

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
parent ed219818
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
Wed Feb 10 01:02:46 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (real_remove_row):
......
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
Wed Feb 10 01:02:46 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (real_remove_row):
......
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
Wed Feb 10 01:02:46 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (real_remove_row):
......
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
Wed Feb 10 01:02:46 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (real_remove_row):
......
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
Wed Feb 10 01:02:46 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (real_remove_row):
......
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
Wed Feb 10 01:02:46 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (real_remove_row):
......
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
Wed Feb 10 01:02:46 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (real_remove_row):
......
......@@ -473,6 +473,7 @@ gtk_clist_class_init (GtkCListClass *klass)
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
GtkBindingSet *binding_set;
object_class = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
......@@ -700,203 +701,102 @@ gtk_clist_class_init (GtkCListClass *klass)
klass->set_cell_contents = set_cell_contents;
klass->cell_size_request = cell_size_request;
{
GtkBindingSet *binding_set;
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Home, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_End, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 1.0);
gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Down, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Home,
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_End,
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 1.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Left, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Right, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Home, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_End, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 1.0);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
"undo_selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
"abort_column_resize", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
"toggle_focus_row", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK,
"toggle_add_mode", 0);
gtk_binding_entry_add_signal (binding_set, '/', GDK_CONTROL_MASK,
"select_all", 0);
gtk_binding_entry_add_signal (binding_set, '\\', GDK_CONTROL_MASK,
"unselect_all", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Shift_L,
GDK_RELEASE_MASK | GDK_SHIFT_MASK,
"end_selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Shift_R,
GDK_RELEASE_MASK | GDK_SHIFT_MASK,
"end_selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Shift_L,
GDK_RELEASE_MASK | GDK_SHIFT_MASK |
GDK_CONTROL_MASK,
"end_selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Shift_R,
GDK_RELEASE_MASK | GDK_SHIFT_MASK |
GDK_CONTROL_MASK,
"end_selection", 0);
}
/*
{
GtkBindingSet *binding_set;
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Home, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_End, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, 0,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, 0,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, 0,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, 0,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Home, 0,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_KP_End, 0,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 1.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Left, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Left, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Right, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Right, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Home, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_End, 0,
"sroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 1.0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Divide, 0,
"undo_selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
"abort_column_resize", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
"toggle_focus_row", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Multiply, 0,
"toggle_add_mode", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Add, 0,
"select_all", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Subtract, 0,
"unselect_all", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
"end_selection", 0);
}
*/
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Home, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_End, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 1.0);
gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Down, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Home,
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_End,
GDK_SHIFT_MASK | GDK_CONTROL_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 1.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Left, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Right, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Home, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_End, 0,
"scroll_horizontal", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 1.0);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
"undo_selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
"abort_column_resize", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
"toggle_focus_row", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK,
"toggle_add_mode", 0);
gtk_binding_entry_add_signal (binding_set, '/', GDK_CONTROL_MASK,
"select_all", 0);
gtk_binding_entry_add_signal (binding_set, '\\', GDK_CONTROL_MASK,
"unselect_all", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Shift_L,
GDK_RELEASE_MASK | GDK_SHIFT_MASK,
"end_selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Shift_R,
GDK_RELEASE_MASK | GDK_SHIFT_MASK,
"end_selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Shift_L,
GDK_RELEASE_MASK | GDK_SHIFT_MASK |
GDK_CONTROL_MASK,
"end_selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Shift_R,
GDK_RELEASE_MASK | GDK_SHIFT_MASK |
GDK_CONTROL_MASK,
"end_selection", 0);
}
static void
......
......@@ -336,6 +336,7 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkCListClass *clist_class;
GtkBindingSet *binding_set;
object_class = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
......@@ -456,51 +457,46 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
klass->tree_move = real_tree_move;
klass->change_focus_row_expansion = change_focus_row_expansion;
{
GtkBindingSet *binding_set;
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set,
'+', GDK_SHIFT_MASK,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Add, 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Add, GDK_CONTROL_MASK,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM,
GTK_CTREE_EXPANSION_EXPAND_RECURSIVE);
gtk_binding_entry_add_signal (binding_set,
'-', 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_COLLAPSE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Subtract, 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_COLLAPSE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Subtract, GDK_CONTROL_MASK,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM,
GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE);
gtk_binding_entry_add_signal (binding_set,
'=', 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Multiply, 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Multiply, GDK_CONTROL_MASK,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM,
GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE);
}
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set,
'+', GDK_SHIFT_MASK,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Add, 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Add, GDK_CONTROL_MASK,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM,
GTK_CTREE_EXPANSION_EXPAND_RECURSIVE);
gtk_binding_entry_add_signal (binding_set,
'-', 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_COLLAPSE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Subtract, 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_COLLAPSE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Subtract, GDK_CONTROL_MASK,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM,
GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE);
gtk_binding_entry_add_signal (binding_set,
'=', 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Multiply, 0,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Multiply, GDK_CONTROL_MASK,
"change_focus_row_expansion", 1,
GTK_TYPE_ENUM,
GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE);
}
static void
......
......@@ -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);
......
......@@ -100,6 +100,7 @@ gtk_list_item_class_init (GtkListItemClass *class)
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkItemClass *item_class;
GtkBindingSet *binding_set;
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
......@@ -207,103 +208,97 @@ gtk_list_item_class_init (GtkListItemClass *class)
class->scroll_vertical = NULL;
class->toggle_add_mode = NULL;
{
GtkBindingSet *binding_set;
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set, GDK_Up, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_Home, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 0.0);
gtk_binding_entry_add_signal (binding_set, GDK_End, GDK_CONTROL_MASK,
"scroll_vertical", 2,
GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
GTK_TYPE_FLOAT, 1.0);
gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Down, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, GDK_SHIFT_MASK,
"extend_selection", 3,
GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Home,