* src/mimeview.[ch]
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Tue, 29 Jul 2003 13:14:26 +0000 (13:14 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Tue, 29 Jul 2003 13:14:26 +0000 (13:14 +0000)
* src/gtk/gtkvscrollbutton.[ch]
fix UI glitch where mime icon toolbox' scroll position is not
reset after switching to another message

ChangeLog.claws
configure.ac
src/gtk/gtkvscrollbutton.c
src/gtk/gtkvscrollbutton.h
src/mimeview.c
src/mimeview.h

index 54f7a52..bd5571f 100644 (file)
@@ -1,3 +1,11 @@
+2003-07-29 [alfons]    0.9.3claws74
+
+       * src/mimeview.[ch]
+       * src/gtk/gtkvscrollbutton.[ch]
+               fix UI glitch where mime icon toolbox' scroll position is not 
+               reset after switching to another message
+               
+
 2003-07-29 [paul]      0.9.3claws73
 
        * src/prefs_folder_item.c
index b54e06d..450a5f1 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=73
+EXTRA_VERSION=74
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index d4a37c7..7e7b0f4 100644 (file)
@@ -201,6 +201,13 @@ void gtk_vscrollbutton_set_adjustment(GtkVScrollbutton *scrollbutton,
     }
 }
 
+void gtk_vscrollbutton_reset(GtkVScrollbutton *scrollbutton)
+{
+       /* do what luke does when scrolling */
+       scrollbutton->adjustment->value = scrollbutton->adjustment->lower;
+       gtk_signal_emit_by_name(GTK_OBJECT (scrollbutton->adjustment),
+                               "value_changed");
+}
 
 static gint gtk_vscrollbutton_button_press(GtkWidget *widget,
                                           GdkEventButton *event,
index 08a63ee..9eadf97 100644 (file)
@@ -72,9 +72,10 @@ extern "C" {
 #endif /* __cplusplus */
 
 
-GtkType    gtk_vscrollbutton_get_type (void);
-GtkWidget* gtk_vscrollbutton_new      (GtkAdjustment *adjustment);
+GtkType    gtk_vscrollbutton_get_type  (void);
+GtkWidget* gtk_vscrollbutton_new       (GtkAdjustment *adjustment);
 
+void      gtk_vscrollbutton_reset      (GtkVScrollbutton *vscroll_button);
 
 #ifdef __cplusplus
 }
index 4c5ad28..e1e8b0c 100644 (file)
@@ -301,6 +301,7 @@ MimeView *mimeview_create(MainWindow *mainwin)
        mimeview->tooltips      = tooltips;
        mimeview->oldsize       = 60;
        mimeview->mime_toggle   = mime_toggle;
+       mimeview->scroll_button = scrollbutton;
 
        mimeview->target_list   = gtk_target_list_new(mimeview_mime_types, 1); 
        
@@ -709,6 +710,8 @@ static void mimeview_clear(MimeView *mimeview)
 
        g_free(mimeview->file);
        mimeview->file = NULL;
+
+       gtk_vscrollbutton_reset(GTK_VSCROLLBUTTON(mimeview->scroll_button));
        icon_list_clear(mimeview);
 
        if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mimeview->mime_toggle)))
index 2762268..cc9c3db 100644 (file)
@@ -58,6 +58,7 @@ struct _MimeView
        GtkWidget *icon_vbox;
        GtkWidget *icon_mainbox;
        GtkWidget *mime_toggle;
+       GtkWidget *scroll_button;
 
        MimeViewType type;