* src/mimeview.[ch]
authorLuke Plant <L.Plant.98@cantab.net>
Mon, 18 Aug 2003 17:08:48 +0000 (17:08 +0000)
committerLuke Plant <L.Plant.98@cantab.net>
Mon, 18 Aug 2003 17:08:48 +0000 (17:08 +0000)
* src/gtk/gtkvscrollbutton.[ch]
o removed gtk_vscrollbutton_reset() (reasons: reduce
  dependencies; do it the GTK way; reduce code -14/+2 lines)
o removed horizontal separator between icons

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

index 4fe83162e09db2e9c86be86cb27d5a89373efde5..6074a6442c19b9a47113a80dc4bb15a64719a9a3 100644 (file)
@@ -1,3 +1,10 @@
+2003-08-18 [luke]      0.9.4claws29
+       * src/mimeview.[ch]
+       * src/gtk/gtkvscrollbutton.[ch]
+               o removed gtk_vscrollbutton_reset() (reasons: reduce 
+                 dependencies; do it the GTK way; reduce code -14/+2 lines)
+               o removed horizontal separator between icons
+
 2003-08-17 [christoph] 0.9.4claws28
 
        * src/procmsg.c
index 85dfc6baab41849b20179273e231cd24ac8d72de..fc06ea11e2ab0d967caa1fc3a805551d6850ef20 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=28
+EXTRA_VERSION=29
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index 7e7b0f47737ca08f4d2db9fd58364aea69772756..7b33b7af3f7651d18fe83e0db460f7af688a874a 100644 (file)
@@ -201,14 +201,6 @@ 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,
                                           GtkVScrollbutton *scrollbutton)
index 9eadf9743db5b9266edaea859bb15a9ff91f2cb7..99d22314e3e85883f2f430f4d866277352fe3c47 100644 (file)
@@ -75,8 +75,6 @@ extern "C" {
 GtkType    gtk_vscrollbutton_get_type  (void);
 GtkWidget* gtk_vscrollbutton_new       (GtkAdjustment *adjustment);
 
-void      gtk_vscrollbutton_reset      (GtkVScrollbutton *vscroll_button);
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
index 2f3d6bd402a98590befaf6833b1f02fdbd85df12..fb13820aa609b85618c74c7e80847e01e6a55e0e 100644 (file)
@@ -242,7 +242,7 @@ MimeView *mimeview_create(MainWindow *mainwin)
        
        gtk_notebook_set_page(GTK_NOTEBOOK(notebook), 0);
                                
-       icon_vbox = gtk_vbox_new(FALSE,0);
+       icon_vbox = gtk_vbox_new(FALSE, 2);
        icon_scroll = gtk_layout_new(NULL, NULL);
        gtk_layout_put(GTK_LAYOUT(icon_scroll), icon_vbox, 0, 0);
        scrollbutton = gtk_vscrollbutton_new(gtk_layout_get_vadjustment(GTK_LAYOUT(icon_scroll)));
@@ -303,7 +303,6 @@ 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); 
        
@@ -714,7 +713,6 @@ 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)))
@@ -1486,18 +1484,12 @@ static void icon_list_append_icon (MimeView *mimeview, MimeInfo *mimeinfo)
        GtkWidget *pixmap;
        GtkWidget *vbox;
        GtkWidget *button;
-       GtkWidget *sep;
        gchar *tip;
        gchar *desc = NULL;
        StockPixmap stockp;
        
        vbox = mimeview->icon_vbox;
        mimeview->icon_count++;
-       if (mimeview->icon_count > 1) {
-               sep = gtk_hseparator_new();
-               gtk_widget_show(sep);
-               gtk_box_pack_start(GTK_BOX(vbox), sep, TRUE, TRUE, 3);
-       }
        button = gtk_toggle_button_new();
        gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
        gtk_object_set_data(GTK_OBJECT(button), "icon_number", 
@@ -1592,7 +1584,8 @@ static void icon_list_clear (MimeView *mimeview)
        }
        mimeview->icon_count = 0;
        adj  = gtk_layout_get_vadjustment(GTK_LAYOUT(mimeview->icon_scroll));
-       adj->value = 0;
+       adj->value = adj->lower;
+       gtk_signal_emit_by_name(GTK_OBJECT (adj), "value_changed");
 }
 
 static void icon_list_toggle_by_mime_info(MimeView     *mimeview,
index cc9c3db0ae5940192f770139b47f70b15126be67..2762268eaa293076071feddab4d5b519d5246b00 100644 (file)
@@ -58,7 +58,6 @@ struct _MimeView
        GtkWidget *icon_vbox;
        GtkWidget *icon_mainbox;
        GtkWidget *mime_toggle;
-       GtkWidget *scroll_button;
 
        MimeViewType type;