mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
deprecate GTK_SELECTION_EXTENDED.
Mon Aug 27 14:21:30 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtkenums.h (GtkSelectionMode): deprecate GTK_SELECTION_EXTENDED. * gtk/gtkclist.c: Remove old GTK_SELECTION_MULTIPLE behavior. Make GTK_SELECTION_EXTENDED be GTK_SELECTION_MULTIPLE. * gtk/gtkctree.c: ditto * gtk/gtklist.c: ditto * gtk/gtktree.c: ditto
This commit is contained in:
parent
28c7dd4d42
commit
d70c0b4077
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
Mon Aug 27 14:21:30 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkenums.h (GtkSelectionMode): deprecate
|
||||
GTK_SELECTION_EXTENDED.
|
||||
|
||||
* gtk/gtkclist.c: Remove old GTK_SELECTION_MULTIPLE behavior.
|
||||
Make GTK_SELECTION_EXTENDED be GTK_SELECTION_MULTIPLE.
|
||||
|
||||
* gtk/gtkctree.c: ditto
|
||||
|
||||
* gtk/gtklist.c: ditto
|
||||
|
||||
* gtk/gtktree.c: ditto
|
||||
|
||||
Mon Aug 27 14:18:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.h (gtk_menu_bar_prepend): Fix a cuple
|
||||
|
@ -1,3 +1,17 @@
|
||||
Mon Aug 27 14:21:30 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkenums.h (GtkSelectionMode): deprecate
|
||||
GTK_SELECTION_EXTENDED.
|
||||
|
||||
* gtk/gtkclist.c: Remove old GTK_SELECTION_MULTIPLE behavior.
|
||||
Make GTK_SELECTION_EXTENDED be GTK_SELECTION_MULTIPLE.
|
||||
|
||||
* gtk/gtkctree.c: ditto
|
||||
|
||||
* gtk/gtklist.c: ditto
|
||||
|
||||
* gtk/gtktree.c: ditto
|
||||
|
||||
Mon Aug 27 14:18:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.h (gtk_menu_bar_prepend): Fix a cuple
|
||||
|
@ -1,3 +1,17 @@
|
||||
Mon Aug 27 14:21:30 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkenums.h (GtkSelectionMode): deprecate
|
||||
GTK_SELECTION_EXTENDED.
|
||||
|
||||
* gtk/gtkclist.c: Remove old GTK_SELECTION_MULTIPLE behavior.
|
||||
Make GTK_SELECTION_EXTENDED be GTK_SELECTION_MULTIPLE.
|
||||
|
||||
* gtk/gtkctree.c: ditto
|
||||
|
||||
* gtk/gtklist.c: ditto
|
||||
|
||||
* gtk/gtktree.c: ditto
|
||||
|
||||
Mon Aug 27 14:18:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.h (gtk_menu_bar_prepend): Fix a cuple
|
||||
|
@ -1,3 +1,17 @@
|
||||
Mon Aug 27 14:21:30 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkenums.h (GtkSelectionMode): deprecate
|
||||
GTK_SELECTION_EXTENDED.
|
||||
|
||||
* gtk/gtkclist.c: Remove old GTK_SELECTION_MULTIPLE behavior.
|
||||
Make GTK_SELECTION_EXTENDED be GTK_SELECTION_MULTIPLE.
|
||||
|
||||
* gtk/gtkctree.c: ditto
|
||||
|
||||
* gtk/gtklist.c: ditto
|
||||
|
||||
* gtk/gtktree.c: ditto
|
||||
|
||||
Mon Aug 27 14:18:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.h (gtk_menu_bar_prepend): Fix a cuple
|
||||
|
@ -1,3 +1,17 @@
|
||||
Mon Aug 27 14:21:30 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkenums.h (GtkSelectionMode): deprecate
|
||||
GTK_SELECTION_EXTENDED.
|
||||
|
||||
* gtk/gtkclist.c: Remove old GTK_SELECTION_MULTIPLE behavior.
|
||||
Make GTK_SELECTION_EXTENDED be GTK_SELECTION_MULTIPLE.
|
||||
|
||||
* gtk/gtkctree.c: ditto
|
||||
|
||||
* gtk/gtklist.c: ditto
|
||||
|
||||
* gtk/gtktree.c: ditto
|
||||
|
||||
Mon Aug 27 14:18:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.h (gtk_menu_bar_prepend): Fix a cuple
|
||||
|
@ -1,3 +1,17 @@
|
||||
Mon Aug 27 14:21:30 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkenums.h (GtkSelectionMode): deprecate
|
||||
GTK_SELECTION_EXTENDED.
|
||||
|
||||
* gtk/gtkclist.c: Remove old GTK_SELECTION_MULTIPLE behavior.
|
||||
Make GTK_SELECTION_EXTENDED be GTK_SELECTION_MULTIPLE.
|
||||
|
||||
* gtk/gtkctree.c: ditto
|
||||
|
||||
* gtk/gtklist.c: ditto
|
||||
|
||||
* gtk/gtktree.c: ditto
|
||||
|
||||
Mon Aug 27 14:18:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.h (gtk_menu_bar_prepend): Fix a cuple
|
||||
|
@ -1,3 +1,17 @@
|
||||
Mon Aug 27 14:21:30 2001 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkenums.h (GtkSelectionMode): deprecate
|
||||
GTK_SELECTION_EXTENDED.
|
||||
|
||||
* gtk/gtkclist.c: Remove old GTK_SELECTION_MULTIPLE behavior.
|
||||
Make GTK_SELECTION_EXTENDED be GTK_SELECTION_MULTIPLE.
|
||||
|
||||
* gtk/gtkctree.c: ditto
|
||||
|
||||
* gtk/gtklist.c: ditto
|
||||
|
||||
* gtk/gtktree.c: ditto
|
||||
|
||||
Mon Aug 27 14:18:12 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.h (gtk_menu_bar_prepend): Fix a cuple
|
||||
|
@ -1294,7 +1294,6 @@ gtk_clist_set_selection_mode (GtkCList *clist,
|
||||
switch (mode)
|
||||
{
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
return;
|
||||
case GTK_SELECTION_BROWSE:
|
||||
case GTK_SELECTION_SINGLE:
|
||||
@ -3449,7 +3448,7 @@ gtk_clist_set_selectable (GtkCList *clist,
|
||||
if (!selectable && clist_row->state == GTK_STATE_SELECTED)
|
||||
{
|
||||
if (clist->anchor >= 0 &&
|
||||
clist->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
clist->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
clist->drag_button = 0;
|
||||
remove_grab (clist);
|
||||
@ -3525,7 +3524,7 @@ gtk_clist_undo_selection (GtkCList *clist)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
if (clist->selection_mode == GTK_SELECTION_EXTENDED &&
|
||||
if (clist->selection_mode == GTK_SELECTION_MULTIPLE &&
|
||||
(clist->undo_selection || clist->undo_unselection))
|
||||
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[UNDO_SELECTION]);
|
||||
}
|
||||
@ -3568,7 +3567,6 @@ toggle_row (GtkCList *clist,
|
||||
|
||||
switch (clist->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
case GTK_SELECTION_SINGLE:
|
||||
clist_row = ROW_ELEMENT (clist, row)->data;
|
||||
@ -3624,10 +3622,9 @@ toggle_focus_row (GtkCList *clist)
|
||||
switch (clist->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_SINGLE:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
toggle_row (clist, clist->focus_row, 0, NULL);
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
g_list_free (clist->undo_selection);
|
||||
g_list_free (clist->undo_unselection);
|
||||
clist->undo_selection = NULL;
|
||||
@ -3656,7 +3653,7 @@ toggle_add_mode (GtkCList *clist)
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
if ((gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (clist)) ||
|
||||
clist->selection_mode != GTK_SELECTION_EXTENDED)
|
||||
clist->selection_mode != GTK_SELECTION_MULTIPLE)
|
||||
return;
|
||||
|
||||
gtk_clist_draw_focus (GTK_WIDGET (clist));
|
||||
@ -3789,7 +3786,7 @@ real_select_all (GtkCList *clist)
|
||||
case GTK_SELECTION_BROWSE:
|
||||
return;
|
||||
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
g_list_free (clist->undo_selection);
|
||||
g_list_free (clist->undo_unselection);
|
||||
clist->undo_selection = NULL;
|
||||
@ -3807,15 +3804,6 @@ real_select_all (GtkCList *clist)
|
||||
update_extended_selection (clist, clist->rows);
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
return;
|
||||
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
for (i = 0, list = clist->row_list; list; i++, list = list->next)
|
||||
{
|
||||
if (((GtkCListRow *)(list->data))->state == GTK_STATE_NORMAL)
|
||||
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[SELECT_ROW],
|
||||
i, -1, NULL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3841,7 +3829,7 @@ real_unselect_all (GtkCList *clist)
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
g_list_free (clist->undo_selection);
|
||||
g_list_free (clist->undo_unselection);
|
||||
clist->undo_selection = NULL;
|
||||
@ -3913,7 +3901,7 @@ real_undo_selection (GtkCList *clist)
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
if ((gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (clist)) ||
|
||||
clist->selection_mode != GTK_SELECTION_EXTENDED)
|
||||
clist->selection_mode != GTK_SELECTION_MULTIPLE)
|
||||
return;
|
||||
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
@ -3966,7 +3954,7 @@ set_anchor (GtkCList *clist,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
if (clist->selection_mode != GTK_SELECTION_EXTENDED || clist->anchor >= 0)
|
||||
if (clist->selection_mode != GTK_SELECTION_MULTIPLE || clist->anchor >= 0)
|
||||
return;
|
||||
|
||||
g_list_free (clist->undo_selection);
|
||||
@ -3997,7 +3985,7 @@ resync_selection (GtkCList *clist,
|
||||
GList *list;
|
||||
GtkCListRow *clist_row;
|
||||
|
||||
if (clist->selection_mode != GTK_SELECTION_EXTENDED)
|
||||
if (clist->selection_mode != GTK_SELECTION_MULTIPLE)
|
||||
return;
|
||||
|
||||
if (clist->anchor < 0 || clist->drag_pos < 0)
|
||||
@ -4120,7 +4108,7 @@ update_extended_selection (GtkCList *clist,
|
||||
gint h2 = 0;
|
||||
gint top;
|
||||
|
||||
if (clist->selection_mode != GTK_SELECTION_EXTENDED || clist->anchor == -1)
|
||||
if (clist->selection_mode != GTK_SELECTION_MULTIPLE || clist->anchor == -1)
|
||||
return;
|
||||
|
||||
if (row < 0)
|
||||
@ -4291,7 +4279,7 @@ extend_selection (GtkCList *clist,
|
||||
g_return_if_fail (GTK_IS_CLIST (clist));
|
||||
|
||||
if ((gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (clist)) ||
|
||||
clist->selection_mode != GTK_SELECTION_EXTENDED)
|
||||
clist->selection_mode != GTK_SELECTION_MULTIPLE)
|
||||
return;
|
||||
|
||||
if (auto_start_selection)
|
||||
@ -4948,7 +4936,6 @@ gtk_clist_button_press (GtkWidget *widget,
|
||||
switch (clist->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_SINGLE:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (event->type != GDK_BUTTON_PRESS)
|
||||
{
|
||||
gtk_signal_emit (GTK_OBJECT (clist),
|
||||
@ -4964,7 +4951,7 @@ gtk_clist_button_press (GtkWidget *widget,
|
||||
clist_signals[SELECT_ROW],
|
||||
row, column, event);
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (event->type != GDK_BUTTON_PRESS)
|
||||
{
|
||||
if (clist->anchor != -1)
|
||||
@ -5133,7 +5120,7 @@ gtk_clist_button_release (GtkWidget *widget,
|
||||
{
|
||||
switch (clist->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (!(event->state & GDK_SHIFT_MASK) ||
|
||||
!GTK_WIDGET_CAN_FOCUS (widget) ||
|
||||
event->x < 0 || event->x >= clist->clist_window_width ||
|
||||
@ -5142,7 +5129,6 @@ gtk_clist_button_release (GtkWidget *widget,
|
||||
(clist, (GdkEvent *) event);
|
||||
break;
|
||||
case GTK_SELECTION_SINGLE:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (get_selection_info (clist, event->x, event->y,
|
||||
&row, &column))
|
||||
{
|
||||
@ -5321,7 +5307,7 @@ gtk_clist_motion (GtkWidget *widget,
|
||||
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[SELECT_ROW],
|
||||
clist->focus_row, -1, event);
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
update_extended_selection (clist, clist->focus_row);
|
||||
break;
|
||||
default:
|
||||
@ -6371,7 +6357,7 @@ gtk_clist_focus_content_area (GtkCList *clist)
|
||||
clist->focus_row = 0;
|
||||
|
||||
if ((clist->selection_mode == GTK_SELECTION_BROWSE ||
|
||||
clist->selection_mode == GTK_SELECTION_EXTENDED) &&
|
||||
clist->selection_mode == GTK_SELECTION_MULTIPLE) &&
|
||||
!clist->selection)
|
||||
gtk_signal_emit (GTK_OBJECT (clist),
|
||||
clist_signals[SELECT_ROW],
|
||||
@ -6868,7 +6854,7 @@ scroll_vertical (GtkCList *clist,
|
||||
|
||||
switch (clist->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (clist->anchor >= 0)
|
||||
return;
|
||||
case GTK_SELECTION_BROWSE:
|
||||
@ -6892,7 +6878,7 @@ scroll_vertical (GtkCList *clist,
|
||||
{
|
||||
case GTK_VISIBILITY_NONE:
|
||||
if (old_focus_row != clist->focus_row &&
|
||||
!(clist->selection_mode == GTK_SELECTION_EXTENDED &&
|
||||
!(clist->selection_mode == GTK_SELECTION_MULTIPLE &&
|
||||
GTK_CLIST_ADD_MODE(clist)))
|
||||
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[SELECT_ROW],
|
||||
clist->focus_row, -1, NULL);
|
||||
@ -6936,7 +6922,7 @@ scroll_vertical (GtkCList *clist,
|
||||
}
|
||||
default:
|
||||
if (old_focus_row != clist->focus_row &&
|
||||
!(clist->selection_mode == GTK_SELECTION_EXTENDED &&
|
||||
!(clist->selection_mode == GTK_SELECTION_MULTIPLE &&
|
||||
GTK_CLIST_ADD_MODE(clist)))
|
||||
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[SELECT_ROW],
|
||||
clist->focus_row, -1, NULL);
|
||||
@ -7181,7 +7167,7 @@ real_sort_list (GtkCList *clist)
|
||||
|
||||
gtk_clist_freeze (clist);
|
||||
|
||||
if (clist->anchor != -1 && clist->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (clist->anchor != -1 && clist->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
g_list_free (clist->undo_selection);
|
||||
@ -7386,12 +7372,11 @@ gtk_clist_drag_begin (GtkWidget *widget,
|
||||
|
||||
switch (clist->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
update_extended_selection (clist, clist->focus_row);
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
break;
|
||||
case GTK_SELECTION_SINGLE:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
clist->anchor = -1;
|
||||
case GTK_SELECTION_BROWSE:
|
||||
break;
|
||||
|
@ -2103,7 +2103,7 @@ gtk_ctree_link (GtkCTree *ctree,
|
||||
|
||||
clist = GTK_CLIST (ctree);
|
||||
|
||||
if (update_focus_row && clist->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (update_focus_row && clist->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
|
||||
@ -2247,7 +2247,7 @@ gtk_ctree_unlink (GtkCTree *ctree,
|
||||
|
||||
clist = GTK_CLIST (ctree);
|
||||
|
||||
if (update_focus_row && clist->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (update_focus_row && clist->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
|
||||
@ -2428,7 +2428,7 @@ real_tree_move (GtkCTree *ctree,
|
||||
|
||||
visible = gtk_ctree_is_viewable (ctree, node);
|
||||
|
||||
if (clist->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (clist->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
|
||||
@ -3450,7 +3450,7 @@ real_select_all (GtkCList *clist)
|
||||
case GTK_SELECTION_BROWSE:
|
||||
return;
|
||||
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
|
||||
gtk_clist_freeze (clist);
|
||||
|
||||
@ -3471,10 +3471,6 @@ real_select_all (GtkCList *clist)
|
||||
gtk_clist_thaw (clist);
|
||||
break;
|
||||
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
gtk_ctree_select_recursive (ctree, NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* do nothing */
|
||||
break;
|
||||
@ -3504,7 +3500,7 @@ real_unselect_all (GtkCList *clist)
|
||||
}
|
||||
break;
|
||||
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
g_list_free (clist->undo_selection);
|
||||
g_list_free (clist->undo_unselection);
|
||||
clist->undo_selection = NULL;
|
||||
@ -4578,7 +4574,7 @@ gtk_ctree_real_select_recursive (GtkCTree *ctree,
|
||||
thaw = TRUE;
|
||||
}
|
||||
|
||||
if (clist->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (clist->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
|
||||
@ -4823,7 +4819,7 @@ gtk_ctree_node_set_selectable (GtkCTree *ctree,
|
||||
clist = GTK_CLIST (ctree);
|
||||
|
||||
if (clist->anchor >= 0 &&
|
||||
clist->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
clist->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
clist->drag_button = 0;
|
||||
remove_grab (clist);
|
||||
@ -5490,7 +5486,7 @@ gtk_ctree_sort_recursive (GtkCTree *ctree,
|
||||
|
||||
gtk_clist_freeze (clist);
|
||||
|
||||
if (clist->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (clist->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
|
||||
@ -5537,7 +5533,7 @@ gtk_ctree_sort_node (GtkCTree *ctree,
|
||||
|
||||
gtk_clist_freeze (clist);
|
||||
|
||||
if (clist->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (clist->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
GTK_CLIST_GET_CLASS (clist)->resync_selection (clist, NULL);
|
||||
|
||||
@ -5620,7 +5616,7 @@ resync_selection (GtkCList *clist, GdkEvent *event)
|
||||
|
||||
g_return_if_fail (GTK_IS_CTREE (clist));
|
||||
|
||||
if (clist->selection_mode != GTK_SELECTION_EXTENDED)
|
||||
if (clist->selection_mode != GTK_SELECTION_MULTIPLE)
|
||||
return;
|
||||
|
||||
if (clist->anchor < 0 || clist->drag_pos < 0)
|
||||
@ -5732,7 +5728,7 @@ real_undo_selection (GtkCList *clist)
|
||||
|
||||
g_return_if_fail (GTK_IS_CTREE (clist));
|
||||
|
||||
if (clist->selection_mode != GTK_SELECTION_EXTENDED)
|
||||
if (clist->selection_mode != GTK_SELECTION_MULTIPLE)
|
||||
return;
|
||||
|
||||
if (!(clist->undo_selection || clist->undo_unselection))
|
||||
|
@ -320,7 +320,7 @@ typedef enum
|
||||
GTK_SELECTION_SINGLE,
|
||||
GTK_SELECTION_BROWSE,
|
||||
GTK_SELECTION_MULTIPLE,
|
||||
GTK_SELECTION_EXTENDED
|
||||
GTK_SELECTION_EXTENDED == GTK_SELECTION_MULTIPLE /* Deprecated */
|
||||
} GtkSelectionMode;
|
||||
|
||||
/* Shadow types */
|
||||
|
@ -493,7 +493,7 @@ gtk_list_unmap (GtkWidget *widget)
|
||||
{
|
||||
gtk_list_end_drag_selection (list);
|
||||
|
||||
if (list->anchor != -1 && list->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (list->anchor != -1 && list->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
gtk_list_end_selection (list);
|
||||
}
|
||||
|
||||
@ -601,7 +601,7 @@ gtk_list_motion_notify (GtkWidget *widget,
|
||||
case GTK_SELECTION_BROWSE:
|
||||
gtk_list_select_child (list, item);
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
gtk_list_update_extended_selection (list, row);
|
||||
break;
|
||||
default:
|
||||
@ -655,7 +655,6 @@ gtk_list_button_press (GtkWidget *widget,
|
||||
switch (list->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_SINGLE:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (event->type != GDK_BUTTON_PRESS)
|
||||
gtk_list_select_child (list, item);
|
||||
else
|
||||
@ -665,7 +664,7 @@ gtk_list_button_press (GtkWidget *widget,
|
||||
case GTK_SELECTION_BROWSE:
|
||||
break;
|
||||
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
focus_row = g_list_index (list->children, item);
|
||||
|
||||
if (list->last_focus_child)
|
||||
@ -763,13 +762,12 @@ gtk_list_button_release (GtkWidget *widget,
|
||||
|
||||
switch (list->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (!(event->state & GDK_SHIFT_MASK))
|
||||
gtk_list_end_selection (list);
|
||||
break;
|
||||
|
||||
case GTK_SELECTION_SINGLE:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
|
||||
item = gtk_get_event_widget ((GdkEvent*) event);
|
||||
|
||||
@ -918,7 +916,7 @@ gtk_list_set_focus_child (GtkContainer *container,
|
||||
case GTK_SELECTION_BROWSE:
|
||||
gtk_list_select_child (list, child);
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (!list->last_focus_child && !list->add_mode)
|
||||
{
|
||||
list->undo_focus_child = list->last_focus_child;
|
||||
@ -958,7 +956,7 @@ gtk_list_focus (GtkWidget *widget,
|
||||
GtkList *list;
|
||||
|
||||
list = GTK_LIST (container);
|
||||
if (list->selection_mode == GTK_SELECTION_EXTENDED && list->anchor >= 0)
|
||||
if (list->selection_mode == GTK_SELECTION_MULTIPLE && list->anchor >= 0)
|
||||
gtk_list_end_selection (list);
|
||||
|
||||
if (container->focus_child)
|
||||
@ -996,7 +994,7 @@ gtk_list_insert_items (GtkList *list,
|
||||
return;
|
||||
|
||||
gtk_list_end_drag_selection (list);
|
||||
if (list->selection_mode == GTK_SELECTION_EXTENDED && list->anchor >= 0)
|
||||
if (list->selection_mode == GTK_SELECTION_MULTIPLE && list->anchor >= 0)
|
||||
gtk_list_end_selection (list);
|
||||
|
||||
tmp_list = items;
|
||||
@ -1153,7 +1151,7 @@ gtk_list_clear_items (GtkList *list,
|
||||
container = GTK_CONTAINER (list);
|
||||
|
||||
gtk_list_end_drag_selection (list);
|
||||
if (list->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (list->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
if (list->anchor >= 0)
|
||||
gtk_list_end_selection (list);
|
||||
@ -1219,7 +1217,7 @@ gtk_list_clear_items (GtkList *list,
|
||||
gtk_container_set_focus_child (container, new_focus_child);
|
||||
|
||||
if ((list->selection_mode == GTK_SELECTION_BROWSE ||
|
||||
list->selection_mode == GTK_SELECTION_EXTENDED) && !list->selection)
|
||||
list->selection_mode == GTK_SELECTION_MULTIPLE) && !list->selection)
|
||||
{
|
||||
list->last_focus_child = new_focus_child;
|
||||
gtk_list_select_child (list, new_focus_child);
|
||||
@ -1281,7 +1279,7 @@ gtk_list_remove_items_internal (GtkList *list,
|
||||
container = GTK_CONTAINER (list);
|
||||
|
||||
gtk_list_end_drag_selection (list);
|
||||
if (list->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (list->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
if (list->anchor >= 0)
|
||||
gtk_list_end_selection (list);
|
||||
@ -1458,7 +1456,7 @@ gtk_list_select_all (GtkList *list)
|
||||
if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (list))
|
||||
gtk_list_end_drag_selection (list);
|
||||
|
||||
if (list->selection_mode == GTK_SELECTION_EXTENDED && list->anchor >= 0)
|
||||
if (list->selection_mode == GTK_SELECTION_MULTIPLE && list->anchor >= 0)
|
||||
gtk_list_end_selection (list);
|
||||
|
||||
container = GTK_CONTAINER (list);
|
||||
@ -1472,7 +1470,7 @@ gtk_list_select_all (GtkList *list)
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
g_list_free (list->undo_selection);
|
||||
g_list_free (list->undo_unselection);
|
||||
list->undo_selection = NULL;
|
||||
@ -1489,13 +1487,6 @@ gtk_list_select_all (GtkList *list)
|
||||
gtk_list_update_extended_selection (list, g_list_length(list->children));
|
||||
gtk_list_end_selection (list);
|
||||
return;
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
for (work = list->children; work; work = work->next)
|
||||
{
|
||||
if (GTK_WIDGET_STATE (work->data) == GTK_STATE_NORMAL)
|
||||
gtk_list_select_child (list, GTK_WIDGET (work->data));
|
||||
}
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1516,7 +1507,7 @@ gtk_list_unselect_all (GtkList *list)
|
||||
if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (list))
|
||||
gtk_list_end_drag_selection (list);
|
||||
|
||||
if (list->selection_mode == GTK_SELECTION_EXTENDED && list->anchor >= 0)
|
||||
if (list->selection_mode == GTK_SELECTION_MULTIPLE && list->anchor >= 0)
|
||||
gtk_list_end_selection (list);
|
||||
|
||||
container = GTK_CONTAINER (list);
|
||||
@ -1530,7 +1521,7 @@ gtk_list_unselect_all (GtkList *list)
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
gtk_list_reset_extended_selection (list);
|
||||
break;
|
||||
default:
|
||||
@ -1558,7 +1549,7 @@ gtk_list_extend_selection (GtkList *list,
|
||||
g_return_if_fail (GTK_IS_LIST (list));
|
||||
|
||||
if ((gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (list)) ||
|
||||
list->selection_mode != GTK_SELECTION_EXTENDED)
|
||||
list->selection_mode != GTK_SELECTION_MULTIPLE)
|
||||
return;
|
||||
|
||||
container = GTK_CONTAINER (list);
|
||||
@ -1728,7 +1719,6 @@ gtk_list_toggle_row (GtkList *list,
|
||||
|
||||
switch (list->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
case GTK_SELECTION_SINGLE:
|
||||
if (item->state == GTK_STATE_SELECTED)
|
||||
@ -1760,10 +1750,9 @@ gtk_list_toggle_focus_row (GtkList *list)
|
||||
switch (list->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_SINGLE:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
gtk_list_toggle_row (list, container->focus_child);
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if ((focus_row = g_list_index (list->children, container->focus_child))
|
||||
< 0)
|
||||
return;
|
||||
@ -1798,7 +1787,7 @@ gtk_list_toggle_add_mode (GtkList *list)
|
||||
g_return_if_fail (GTK_IS_LIST (list));
|
||||
|
||||
if ((gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (list)) ||
|
||||
list->selection_mode != GTK_SELECTION_EXTENDED)
|
||||
list->selection_mode != GTK_SELECTION_MULTIPLE)
|
||||
return;
|
||||
|
||||
container = GTK_CONTAINER (list);
|
||||
@ -1822,7 +1811,7 @@ gtk_list_undo_selection (GtkList *list)
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST (list));
|
||||
|
||||
if (list->selection_mode != GTK_SELECTION_EXTENDED ||
|
||||
if (list->selection_mode != GTK_SELECTION_MULTIPLE ||
|
||||
(gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (list)))
|
||||
return;
|
||||
|
||||
@ -1916,7 +1905,7 @@ gtk_list_set_anchor (GtkList *list,
|
||||
|
||||
g_return_if_fail (GTK_IS_LIST (list));
|
||||
|
||||
if (list->selection_mode != GTK_SELECTION_EXTENDED || list->anchor >= 0)
|
||||
if (list->selection_mode != GTK_SELECTION_MULTIPLE || list->anchor >= 0)
|
||||
return;
|
||||
|
||||
g_list_free (list->undo_selection);
|
||||
@ -1995,7 +1984,7 @@ gtk_list_update_extended_selection (GtkList *list,
|
||||
if (row >= length)
|
||||
row = length - 1;
|
||||
|
||||
if (list->selection_mode != GTK_SELECTION_EXTENDED || !list->anchor < 0)
|
||||
if (list->selection_mode != GTK_SELECTION_MULTIPLE || !list->anchor < 0)
|
||||
return;
|
||||
|
||||
/* extending downwards */
|
||||
@ -2148,7 +2137,7 @@ gtk_list_scroll_vertical (GtkList *list,
|
||||
if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (list))
|
||||
return;
|
||||
|
||||
if (list->selection_mode == GTK_SELECTION_EXTENDED)
|
||||
if (list->selection_mode == GTK_SELECTION_MULTIPLE)
|
||||
{
|
||||
GtkContainer *container;
|
||||
|
||||
@ -2528,17 +2517,9 @@ gtk_list_signal_item_select (GtkListItem *list_item,
|
||||
}
|
||||
gtk_signal_emit (GTK_OBJECT (list), list_signals[SELECTION_CHANGED]);
|
||||
break;
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (list->anchor >= 0)
|
||||
return;
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (!g_list_find (list->selection, list_item))
|
||||
{
|
||||
list->selection = g_list_prepend (list->selection, list_item);
|
||||
gtk_widget_ref (GTK_WIDGET (list_item));
|
||||
gtk_signal_emit (GTK_OBJECT (list), list_signals[SELECTION_CHANGED]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2573,7 +2554,7 @@ gtk_list_signal_item_toggle (GtkListItem *list_item,
|
||||
g_return_if_fail (GTK_IS_LIST (list));
|
||||
|
||||
if ((list->selection_mode == GTK_SELECTION_BROWSE ||
|
||||
list->selection_mode == GTK_SELECTION_EXTENDED) &&
|
||||
list->selection_mode == GTK_SELECTION_MULTIPLE) &&
|
||||
GTK_WIDGET (list_item)->state == GTK_STATE_NORMAL)
|
||||
{
|
||||
gtk_widget_set_state (GTK_WIDGET (list_item), GTK_STATE_SELECTED);
|
||||
@ -2621,11 +2602,10 @@ gtk_list_drag_begin (GtkWidget *widget,
|
||||
|
||||
switch (list->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
gtk_list_end_selection (list);
|
||||
break;
|
||||
case GTK_SELECTION_SINGLE:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
list->undo_focus_child = NULL;
|
||||
break;
|
||||
default:
|
||||
|
@ -1067,27 +1067,6 @@ gtk_real_tree_select_child (GtkTree *tree,
|
||||
break;
|
||||
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
if (child->state == GTK_STATE_NORMAL)
|
||||
{
|
||||
gtk_tree_item_select (GTK_TREE_ITEM (child));
|
||||
root_selection = g_list_prepend (root_selection, child);
|
||||
gtk_widget_ref (child);
|
||||
tree->root_tree->selection = root_selection;
|
||||
gtk_signal_emit (GTK_OBJECT (tree->root_tree),
|
||||
tree_signals[SELECTION_CHANGED]);
|
||||
}
|
||||
else if (child->state == GTK_STATE_SELECTED)
|
||||
{
|
||||
gtk_tree_item_deselect (GTK_TREE_ITEM (child));
|
||||
root_selection = g_list_remove (root_selection, child);
|
||||
gtk_widget_unref (child);
|
||||
tree->root_tree->selection = root_selection;
|
||||
gtk_signal_emit (GTK_OBJECT (tree->root_tree),
|
||||
tree_signals[SELECTION_CHANGED]);
|
||||
}
|
||||
break;
|
||||
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1102,7 +1081,6 @@ gtk_real_tree_unselect_child (GtkTree *tree,
|
||||
switch (tree->selection_mode)
|
||||
{
|
||||
case GTK_SELECTION_SINGLE:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
case GTK_SELECTION_BROWSE:
|
||||
if (child->state == GTK_STATE_SELECTED)
|
||||
{
|
||||
@ -1115,7 +1093,7 @@ gtk_real_tree_unselect_child (GtkTree *tree,
|
||||
}
|
||||
break;
|
||||
|
||||
case GTK_SELECTION_EXTENDED:
|
||||
case GTK_SELECTION_MULTIPLE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user