scroll list when moving rows up or down

This commit is contained in:
Christoph Hohmann 2001-07-27 12:39:55 +00:00
parent a170ca0a84
commit 19a99f3dd3
5 changed files with 36 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2001-07-27 [christoph]
* src/prefs_filter.c
* src/prefs_filtering.c
* src/prefs_matcher.c
* src/prefs_scoring.c
scroll list when moving rows up or down
2001-07-26 [alfons]
* configure.in, acconfig.h

View file

@ -752,6 +752,9 @@ static void prefs_filter_up(void)
row = GPOINTER_TO_INT(clist->selection->data);
if (row > 1) {
gtk_clist_row_move(clist, row, row - 1);
if(gtk_clist_row_is_visible(clist, row - 1) != GTK_VISIBILITY_FULL) {
gtk_clist_moveto(clist, row - 1, 0, 0, 0);
}
prefs_filter_set_list();
}
}
@ -766,6 +769,9 @@ static void prefs_filter_down(void)
row = GPOINTER_TO_INT(clist->selection->data);
if (row > 0 && row < clist->rows - 1) {
gtk_clist_row_move(clist, row, row + 1);
if(gtk_clist_row_is_visible(clist, row + 1) != GTK_VISIBILITY_FULL) {
gtk_clist_moveto(clist, row + 1, 0, 1, 0);
}
prefs_filter_set_list();
}
}

View file

@ -851,6 +851,9 @@ static void prefs_filtering_up(void)
row = GPOINTER_TO_INT(clist->selection->data);
if (row > 1) {
gtk_clist_row_move(clist, row, row - 1);
if(gtk_clist_row_is_visible(clist, row - 1) != GTK_VISIBILITY_FULL) {
gtk_clist_moveto(clist, row - 1, 0, 0, 0);
}
}
}
@ -864,6 +867,9 @@ static void prefs_filtering_down(void)
row = GPOINTER_TO_INT(clist->selection->data);
if (row > 0 && row < clist->rows - 1) {
gtk_clist_row_move(clist, row, row + 1);
if(gtk_clist_row_is_visible(clist, row + 1) != GTK_VISIBILITY_FULL) {
gtk_clist_moveto(clist, row + 1, 0, 1, 0);
}
}
}

View file

@ -1085,8 +1085,12 @@ static void prefs_matcher_up(void)
if (!clist->selection) return;
row = GPOINTER_TO_INT(clist->selection->data);
if (row > 1)
if (row > 1) {
gtk_clist_row_move(clist, row, row - 1);
if(gtk_clist_row_is_visible(clist, row - 1) != GTK_VISIBILITY_FULL) {
gtk_clist_moveto(clist, row - 1, 0, 0, 0);
}
}
}
static void prefs_matcher_down(void)
@ -1097,8 +1101,12 @@ static void prefs_matcher_down(void)
if (!clist->selection) return;
row = GPOINTER_TO_INT(clist->selection->data);
if (row >= 1 && row < clist->rows - 1)
if (row >= 1 && row < clist->rows - 1) {
gtk_clist_row_move(clist, row, row + 1);
if(gtk_clist_row_is_visible(clist, row + 1) != GTK_VISIBILITY_FULL) {
gtk_clist_moveto(clist, row + 1, 0, 1, 0);
}
}
}
static void prefs_matcher_select(GtkCList *clist, gint row, gint column,

View file

@ -659,6 +659,9 @@ static void prefs_scoring_up(void)
row = GPOINTER_TO_INT(clist->selection->data);
if (row > 1) {
gtk_clist_row_move(clist, row, row - 1);
if(gtk_clist_row_is_visible(clist, row - 1) != GTK_VISIBILITY_FULL) {
gtk_clist_moveto(clist, row - 1, 0, 0, 0);
}
}
}
@ -672,6 +675,9 @@ static void prefs_scoring_down(void)
row = GPOINTER_TO_INT(clist->selection->data);
if (row > 0 && row < clist->rows - 1) {
gtk_clist_row_move(clist, row, row + 1);
if(gtk_clist_row_is_visible(clist, row + 1) != GTK_VISIBILITY_FULL) {
gtk_clist_moveto(clist, row + 1, 0, 1, 0);
}
}
}