Commit f970ecf8 authored by Lars Hamann's avatar Lars Hamann

mini code cleanup

* gtk/gtkclist.c (toggle_focus_row): mini code cleanup
parent 7b1a4b5e
Fri Jul 24 18:15:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (toggle_focus_row): mini code cleanup
Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org> Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org>
* gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT. * gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT.
......
Fri Jul 24 18:15:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (toggle_focus_row): mini code cleanup
Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org> Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org>
* gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT. * gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT.
......
Fri Jul 24 18:15:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (toggle_focus_row): mini code cleanup
Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org> Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org>
* gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT. * gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT.
......
Fri Jul 24 18:15:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (toggle_focus_row): mini code cleanup
Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org> Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org>
* gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT. * gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT.
......
Fri Jul 24 18:15:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (toggle_focus_row): mini code cleanup
Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org> Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org>
* gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT. * gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT.
......
Fri Jul 24 18:15:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (toggle_focus_row): mini code cleanup
Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org> Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org>
* gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT. * gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT.
......
Fri Jul 24 18:15:49 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (toggle_focus_row): mini code cleanup
Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org> Fri, 24 Jul 1998 10:56:22 +0200 Paolo Molaro <lupus@debian.org>
* gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT. * gtk/gtkfeatures.h.in: added GTK_HAVE_ENUM_VALUE_STRUCT.
......
...@@ -4966,7 +4966,8 @@ toggle_focus_row (GtkCList *clist) ...@@ -4966,7 +4966,8 @@ toggle_focus_row (GtkCList *clist)
g_return_if_fail (clist != 0); g_return_if_fail (clist != 0);
g_return_if_fail (GTK_IS_CLIST (clist)); g_return_if_fail (GTK_IS_CLIST (clist));
if (gdk_pointer_is_grabbed ()) if (gdk_pointer_is_grabbed () ||
clist->focus_row < 0 || clist->focus_row >= clist->rows)
return; return;
switch (clist->selection_mode) switch (clist->selection_mode)
...@@ -4983,23 +4984,16 @@ toggle_focus_row (GtkCList *clist) ...@@ -4983,23 +4984,16 @@ toggle_focus_row (GtkCList *clist)
clist->undo_selection = NULL; clist->undo_selection = NULL;
clist->undo_unselection = NULL; clist->undo_unselection = NULL;
clist->anchor = clist->focus_row;
clist->drag_pos = clist->focus_row;
clist->undo_anchor = clist->focus_row;
if (GTK_CLIST_ADD_MODE (clist)) if (GTK_CLIST_ADD_MODE (clist))
{ fake_toggle_row (clist, clist->focus_row);
clist->anchor = clist->focus_row;
clist->drag_pos = clist->focus_row;
clist->undo_anchor = clist->focus_row;
fake_toggle_row (clist, clist->focus_row);
GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL);
}
else else
{ GTK_CLIST_CLASS_FW (clist)->fake_unselect_all (clist,clist->focus_row);
clist->anchor = clist->focus_row;
clist->drag_pos = clist->focus_row; GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL);
clist->undo_anchor = clist->focus_row;
GTK_CLIST_CLASS_FW (clist)->fake_unselect_all (clist,
clist->focus_row);
GTK_CLIST_CLASS_FW (clist)->resync_selection (clist, NULL);
}
break; break;
default: default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment