scroll list when moving rows up or down
authorChristoph Hohmann <reboot@gmx.ch>
Fri, 27 Jul 2001 12:39:55 +0000 (12:39 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Fri, 27 Jul 2001 12:39:55 +0000 (12:39 +0000)
ChangeLog.claws
src/prefs_filter.c
src/prefs_filtering.c
src/prefs_matcher.c
src/prefs_scoring.c

index 53658aa..ba43fde 100644 (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
index e370e4f..68819f9 100644 (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();
        }
 }
index 0abc38e..ea9996c 100644 (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);
+               } 
        }
 }
 
index 3cd5302..9cdb370 100644 (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,
index 7eeddbb..ef1296e 100644 (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);
+               } 
        }
 }