2009-04-19 [paul] 3.7.1cvs44
authorPaul Mangan <paul@claws-mail.org>
Sun, 19 Apr 2009 07:24:41 +0000 (07:24 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 19 Apr 2009 07:24:41 +0000 (07:24 +0000)
* src/prefs_common.c
* src/prefs_common.h
* src/gtk/about.c
save About window size.
patch by Pawel Pekala

ChangeLog
PATCHSETS
configure.ac
src/gtk/about.c
src/prefs_common.c
src/prefs_common.h

index 3a70fc1..da56cd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-19 [paul]      3.7.1cvs44
+
+       * src/prefs_common.c
+       * src/prefs_common.h
+       * src/gtk/about.c
+               save About window size.
+               patch by Pawel Pekala
+
 2009-04-12 [paul]      3.7.1cvs43
 
        * tools/csv2addressbook.pl
index 56ff640..8e7e4ff 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.4.8 -r 1.1.4.9 src/gtk/manage_window.c;  ) > 3.7.1cvs41.patchset
 ( cvs diff -u -r 1.49.2.129 -r 1.49.2.130 src/procmime.c;  ) > 3.7.1cvs42.patchset
 ( cvs diff -u -r 1.1.2.4 -r 1.1.2.5 tools/csv2addressbook.pl;  ) > 3.7.1cvs43.patchset
+( cvs diff -u -r 1.204.2.189 -r 1.204.2.190 src/prefs_common.c;  cvs diff -u -r 1.103.2.123 -r 1.103.2.124 src/prefs_common.h;  cvs diff -u -r 1.4.2.74 -r 1.4.2.75 src/gtk/about.c;  ) > 3.7.1cvs44.patchset
index ebd1758..9400d2a 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=43
+EXTRA_VERSION=44
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 2b3ee21..fa5b64d 100644 (file)
@@ -61,6 +61,8 @@ static gboolean about_textview_motion_notify(GtkWidget *widget,
 static gboolean about_textview_leave_notify(GtkWidget *widget,
                                        GdkEventCrossing *event,
                                        GtkWidget *textview);
+static void about_size_allocate_cb(GtkWidget *widget,
+                                       GtkAllocation *allocation);
 static void about_textview_uri_update(GtkWidget *textview, gint x, gint y);
 
 static GtkWidget *link_popupmenu;
@@ -663,12 +665,15 @@ static void about_create(void)
        gtk_window_set_title(GTK_WINDOW(window), _("About Claws Mail"));
        gtk_container_set_border_width(GTK_CONTAINER(window), 8);
        gtk_widget_set_size_request(window, -1, -1);
+       g_signal_connect(G_OBJECT(window), "size_allocate",
+                        G_CALLBACK(about_size_allocate_cb), NULL);
+       g_signal_connect(G_OBJECT(window), "size_allocate",
+                        G_CALLBACK(about_size_allocate_cb), NULL);
        g_signal_connect(G_OBJECT(window), "delete_event",
                         G_CALLBACK(gtk_widget_hide_on_delete), NULL);
        g_signal_connect(G_OBJECT(window), "key_press_event",
                         G_CALLBACK(key_pressed), NULL);
-       gtk_widget_realize(window);
-
+       
        if (!geometry.min_width) {
                geometry.min_width = 450;
                geometry.min_height = 500;
@@ -676,6 +681,10 @@ static void about_create(void)
 
        gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
                                      GDK_HINT_MIN_SIZE);
+       gtk_window_set_default_size(GTK_WINDOW(window), prefs_common.aboutwin_width,
+                                   prefs_common.aboutwin_height);      
+       
+       gtk_widget_realize(window);
 
        vbox1 = gtk_vbox_new(FALSE, 8);
        gtk_container_add(GTK_CONTAINER(window), vbox1);
@@ -776,6 +785,16 @@ static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event)
        return FALSE;
 }
 
+static void about_size_allocate_cb(GtkWidget *widget,
+                                  GtkAllocation *allocation)
+{
+       cm_return_if_fail(allocation != NULL);
+
+       prefs_common.aboutwin_width = allocation->width;
+       prefs_common.aboutwin_height = allocation->height;
+}
+
+
 static gboolean about_textview_uri_clicked(GtkTextTag *tag, GObject *obj,
                                        GdkEvent *event, GtkTextIter *iter,
                                        GtkWidget *textview)
index c5387dc..725ea1a 100644 (file)
@@ -1021,6 +1021,11 @@ static PrefParam param[] = {
        {"addressbook_folderselwin_height", "-1", &prefs_common.addressbook_folderselwin_height, P_INT,
         NULL, NULL, NULL},
 
+       {"aboutwin_width", "450", &prefs_common.aboutwin_width, P_INT,
+        NULL, NULL, NULL},
+       {"aboutwin_height", "500", &prefs_common.aboutwin_height, P_INT,
+        NULL, NULL, NULL},
+
        /* Hidden */
        {"warn_dnd", "1", &prefs_common.warn_dnd, P_INT,
         NULL, NULL, NULL},
index 1334640..5cbcc76 100644 (file)
@@ -465,6 +465,8 @@ struct _PrefsCommon
        gint addressaddwin_height;
        gint addressbook_folderselwin_width;
        gint addressbook_folderselwin_height;
+       gint aboutwin_width;
+       gint aboutwin_height;
 
        gint warn_dnd;
        gint broken_are_utf8;