2005-04-29 [colin] 1.9.6cvs46
authorColin Leroy <colin@colino.net>
Fri, 29 Apr 2005 17:10:34 +0000 (17:10 +0000)
committerColin Leroy <colin@colino.net>
Fri, 29 Apr 2005 17:10:34 +0000 (17:10 +0000)
* src/messageview.c
Fix window resizing that refused to size down
* src/prefs_common.c
* src/prefs_common.h
* src/prefs_filtering.c
Save Filtering's window size

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/messageview.c
src/prefs_common.c
src/prefs_common.h
src/prefs_filtering.c

index 8644781..1c84f28 100644 (file)
@@ -1,3 +1,12 @@
+2005-04-29 [colin]     1.9.6cvs46
+
+       * src/messageview.c
+               Fix window resizing that refused to size down
+       * src/prefs_common.c
+       * src/prefs_common.h
+       * src/prefs_filtering.c
+               Save Filtering's window size
+
 2005-04-21 [paul]      1.9.6cvs45
 
        * ChangeLog-gtk2.claws
index 5db2cea..4b62689 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.498 -r 1.1.2.499 ChangeLog-gtk2.claws; cvs diff -u -r 1.65.2.27 -r 1.65.2.28 src/codeconv.c; ) > 1.9.6cvs43.patchset
 ( cvs diff -u -r 1.5.2.4 -r 1.5.2.5 src/setup.c; cvs diff -u -r 1.5.2.3 -r 1.5.2.4 src/statusbar.c; cvs diff -u -r 1.3 -r 1.4 src/statusbar.h; cvs diff -u -r 1.96.2.52 -r 1.96.2.53 src/textview.c; cvs diff -u -r 1.5.2.11 -r 1.5.2.12 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.9 -r 1.4.2.10 src/gtk/gtkutils.h; ) > 1.9.6cvs44.patchset
 ( cvs diff -u -r 1.1.2.500 -r 1.1.2.501 ChangeLog-gtk2.claws; cvs diff -u -r 1.5.2.5 -r 1.5.2.6 src/setup.c; ) > 1.9.6cvs45.patchset
+( cvs diff -u -r 1.94.2.50 -r 1.94.2.51 src/messageview.c; cvs diff -u -r 1.204.2.35 -r 1.204.2.36 src/prefs_common.c; cvs diff -u -r 1.103.2.14 -r 1.103.2.15 src/prefs_common.h; cvs diff -u -r 1.59.2.15 -r 1.59.2.16 src/prefs_filtering.c; ) > 1.9.6cvs46.patchset
index 54b8276..dbcc6db 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=45
+EXTRA_VERSION=46
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index e697167..6ddd8f5 100644 (file)
@@ -419,10 +419,19 @@ MessageView *messageview_create_with_new_window(MainWindow *mainwin)
 {
        MessageView *msgview;
        GtkWidget *window;
+       static GdkGeometry geometry;
 
        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        gtk_window_set_title(GTK_WINDOW(window), _("Sylpheed - Message View"));
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
+
+       if (!geometry.min_height) {
+               geometry.min_width = 320;
+               geometry.min_height = 200;
+       }
+       gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+                                     GDK_HINT_MIN_SIZE);
+
        gtk_widget_set_size_request(window, prefs_common.msgwin_width,
                                    prefs_common.msgwin_height);
 
index 8bdbff6..7ab00fb 100644 (file)
@@ -741,6 +741,11 @@ static PrefParam param[] = {
        {"color_new", "179", &prefs_common.color_new, P_COLOR,
         NULL, NULL, NULL},
 
+       {"filteringwin_width", "500", &prefs_common.filteringwin_width, P_INT,
+        NULL, NULL, NULL},
+       {"filteringwin_height", "-1", &prefs_common.filteringwin_height, P_INT,
+        NULL, NULL, NULL},
+
        {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 
index 1944f13..a9c9a44 100644 (file)
@@ -309,6 +309,9 @@ struct _PrefsCommon
        gulong color_new;
        
        GList *summary_quicksearch_history;
+       
+       gint filteringwin_width;
+       gint filteringwin_height;
 };
 
 extern PrefsCommon prefs_common;
index 91fb558..0cce487 100644 (file)
@@ -158,6 +158,15 @@ void prefs_filtering_open(GSList ** p_processing,
        start_address_completion();
 }
 
+static void prefs_filtering_size_allocate_cb(GtkWidget *widget,
+                                        GtkAllocation *allocation)
+{
+       g_return_if_fail(allocation != NULL);
+
+       prefs_common.filteringwin_width = allocation->width;
+       prefs_common.filteringwin_height = allocation->height;
+}
+
 /* prefs_filtering_close() - just to have one common exit point */
 static void prefs_filtering_close(void)
 {
@@ -202,6 +211,7 @@ static void prefs_filtering_create(void)
        GtkWidget *up_btn;
        GtkWidget *down_btn;
        GtkWidget *bottom_btn;
+       static GdkGeometry geometry;
 
        gchar *title[1];
 
@@ -228,6 +238,8 @@ static void prefs_filtering_create(void)
 
        g_signal_connect(G_OBJECT(window), "delete_event",
                         G_CALLBACK(prefs_filtering_deleted), NULL);
+       g_signal_connect(G_OBJECT(window), "size_allocate",
+                        G_CALLBACK(prefs_filtering_size_allocate_cb), NULL);
        g_signal_connect(G_OBJECT(window), "key_press_event",
                         G_CALLBACK(prefs_filtering_key_pressed), NULL);
        MANAGE_WINDOW_SIGNALS_CONNECT (window);
@@ -366,7 +378,15 @@ static void prefs_filtering_create(void)
        g_signal_connect(G_OBJECT (bottom_btn), "clicked",
                         G_CALLBACK(prefs_filtering_bottom), NULL);
 
-       gtk_widget_set_usize(window, 500, -1);
+       if (!geometry.min_height) {
+               geometry.min_width = 500;
+               geometry.min_height = 400;
+       }
+
+       gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+                                     GDK_HINT_MIN_SIZE);
+       gtk_widget_set_usize(window, prefs_common.filteringwin_width, 
+                                    prefs_common.filteringwin_height);
 
        gtk_widget_show_all(window);