summaryrefslogtreecommitdiff
path: root/gtk/gtkclist.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-12-13 23:18:03 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-12-13 23:18:03 +0000
commit73b15ba391b3a533786e2a2f4f80274b80866822 (patch)
tree818fcfa22f617b7b5e1bdfe61980b7beb2e07f2d /gtk/gtkclist.c
parent8c22e8065e52a3d3d2c1157b0e5d5c827557debc (diff)
downloadgtk+-73b15ba391b3a533786e2a2f4f80274b80866822.tar.gz
System fnmatch wasn't going to be UTF-8 clean, neither was our version.
Fri Dec 13 17:45:40 2002 Owen Taylor <otaylor@redhat.com> * gtk/fnmatch.c gtk/gtkprivate.h gtk/gtkfilesel.c: System fnmatch wasn't going to be UTF-8 clean, neither was our version. Redo our fnmatch.c to be UTF-8, add test cases, fix all sorts of bugs inherited from the antique GNU fnmatch code. Change interface to get rid of fnmatch.h constants. Fixes basic non-workingness of filesel with non-ASCII filenames. * gtk/fnmatch.h: No longer needed.
Diffstat (limited to 'gtk/gtkclist.c')
-rw-r--r--gtk/gtkclist.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index 86e895dff1..40b0ea5d1f 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -2844,10 +2844,6 @@ real_remove_row (GtkCList *clist,
clist->row_list_end = g_list_previous (list);
g_list_remove (list, clist_row);
- /*if (clist->focus_row >=0 &&
- (row <= clist->focus_row || clist->focus_row >= clist->rows))
- clist->focus_row--;*/
-
if (row < ROW_FROM_YPIXEL (clist, 0))
clist->voffset += clist->row_height + CELL_SPACING;
@@ -4346,7 +4342,9 @@ sync_selection (GtkCList *clist,
clist->focus_row += d;
if (clist->focus_row == -1 && clist->rows >= 1)
clist->focus_row = 0;
- else if (clist->focus_row >= clist->rows)
+ else if (d < 0 && clist->focus_row >= clist->rows - 1)
+ clist->focus_row = clist->rows - 2;
+ else if (clist->focus_row >= clist->rows) /* Paranoia */
clist->focus_row = clist->rows - 1;
}