2009-10-07 [paul] 3.7.2cvs48
authorPaul Mangan <paul@claws-mail.org>
Wed, 7 Oct 2009 07:34:01 +0000 (07:34 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 7 Oct 2009 07:34:01 +0000 (07:34 +0000)
* src/addrgather.c
* src/prefs_common.c
* src/prefs_common.h
fix  Bug 2003 -  Address gathering dialog minor bugs/annoyances,
patch by Pawel Pekala

ChangeLog
PATCHSETS
configure.ac
src/addrgather.c
src/prefs_common.c
src/prefs_common.h

index 924d57c..2d84c09 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-10-07 [paul]      3.7.2cvs48
+
+       * src/addrgather.c
+       * src/prefs_common.c
+       * src/prefs_common.h
+               fix  Bug 2003 -  Address gathering dialog minor bugs/annoyances,
+               patch by Pawel Pekala
+
 2009-10-07 [paul]      3.7.2cvs47
 
        * po/cs.po
index a9490cc..7df6e8a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.26 -r 1.1.2.27 src/printing.c;  ) > 3.7.2cvs45.patchset
 ( cvs diff -u -r 1.42.2.47 -r 1.42.2.48 po/fr.po;  ) > 3.7.2cvs46.patchset
 ( cvs diff -u -r 1.9.2.16 -r 1.9.2.17 po/cs.po;  cvs diff -u -r 1.58.2.44 -r 1.58.2.45 po/de.po;  cvs diff -u -r 1.5.2.14 -r 1.5.2.15 po/hu.po;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 po/id.po;  cvs diff -u -r 1.16.2.9 -r 1.16.2.10 po/ja.po;  cvs diff -u -r 1.50.2.36 -r 1.50.2.37 po/pt_BR.po;  ) > 3.7.2cvs47.patchset
+( cvs diff -u -r 1.5.10.29 -r 1.5.10.30 src/addrgather.c;  cvs diff -u -r 1.204.2.192 -r 1.204.2.193 src/prefs_common.c;  cvs diff -u -r 1.103.2.125 -r 1.103.2.126 src/prefs_common.h;  ) > 3.7.2cvs48.patchset
index 752cfc8..85e6475 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=47
+EXTRA_VERSION=48
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a7f8f5b..e9a7f68 100644 (file)
@@ -42,6 +42,7 @@
 #include "manage_window.h"
 #include "folder.h"
 #include "utils.h"
+#include "prefs_common.h"
 
 #include "addrharvest.h"
 #include "addrindex.h"
@@ -127,6 +128,15 @@ static gboolean addrgather_dlg_key_pressed(
        return FALSE;
 }
 
+static void addrgather_size_allocate(
+       GtkWidget *widget, GtkAllocation *allocation )
+{
+       cm_return_if_fail( allocation != NULL );
+       
+       prefs_common.addrgather_width   = allocation->width;
+       prefs_common.addrgather_height  = allocation->height;
+}
+
 #define FMT_BUFSIZE 32
 
 static gboolean addrgather_dlg_harvest() {
@@ -338,7 +348,8 @@ static void addrgather_page_fields(gint pageNum, gchar *pageLbl)
        gtk_container_set_border_width(GTK_CONTAINER(vboxf), 8);
 
        for (i = 0; i < NUM_FIELDS; i++) {
-               PACK_CHECK_BUTTON(vboxf, checkHeader[i], _harv_headerNames_[i]);
+               PACK_CHECK_BUTTON(vboxf, checkHeader[i],
+                       prefs_common_translated_header_name(_harv_headerNames_[i]));
                addrgather_dlg.checkHeader[i] = checkHeader[i];
        }
 
@@ -417,9 +428,9 @@ static void addrgather_dlg_create(void)
        GtkWidget *vbox;
        GtkWidget *hbbox;
        GtkWidget *hsbox;
-
+       static GdkGeometry geometry;
+       
        window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "addrgather");
-       gtk_widget_set_size_request(window, 380, -1);
        gtk_container_set_border_width(GTK_CONTAINER(window), 4);
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
@@ -428,6 +439,8 @@ static void addrgather_dlg_create(void)
                         G_CALLBACK(addrgather_dlg_delete_event), NULL);
        g_signal_connect(G_OBJECT(window), "key_press_event",
                         G_CALLBACK(addrgather_dlg_key_pressed), NULL);
+       g_signal_connect(G_OBJECT(window), "size_allocate",
+                        G_CALLBACK(addrgather_size_allocate), NULL);
 
        vbox = gtk_vbox_new(FALSE, 6);
        gtk_container_add(GTK_CONTAINER(window), vbox);
@@ -457,6 +470,16 @@ static void addrgather_dlg_create(void)
        g_signal_connect(G_OBJECT(btnCancel), "clicked",
                         G_CALLBACK(addrgather_dlg_cancel), NULL);
 
+       if (!geometry.min_width) {
+               geometry.min_width = 450;
+               geometry.min_height = -1;
+       }
+
+       gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+                                     GDK_HINT_MIN_SIZE);
+       gtk_window_set_default_size(GTK_WINDOW(window), prefs_common.addrgather_width,
+                                   prefs_common.addrgather_height);
+
        gtk_widget_show_all(vbox);
 
        addrgather_dlg.window     = window;
@@ -512,6 +535,7 @@ AddressBookFile *addrgather_dlg_execute(FolderItem *folderItem, AddressIndex *ad
        }
 
        gtk_widget_set_sensitive(addrgather_dlg.btnOk, TRUE);
+       gtk_widget_set_sensitive(addrgather_dlg.btnCancel, TRUE);
        gtk_widget_grab_default(addrgather_dlg.btnOk);
 
        /* Apply window title */
index bada8ee..95f4470 100644 (file)
@@ -1030,6 +1030,11 @@ static PrefParam param[] = {
        {"aboutwin_height", "500", &prefs_common.aboutwin_height, P_INT,
         NULL, NULL, NULL},
 
+       {"addrgather_width", "450", &prefs_common.addrgather_width, P_INT,
+        NULL, NULL, NULL},
+       {"addrgather_height", "-1", &prefs_common.addrgather_height, P_INT,
+        NULL, NULL, NULL},
+
        /* Hidden */
        {"warn_dnd", "1", &prefs_common.warn_dnd, P_INT,
         NULL, NULL, NULL},
index e091671..8b1b333 100644 (file)
@@ -469,6 +469,8 @@ struct _PrefsCommon
        gint addressbook_folderselwin_height;
        gint aboutwin_width;
        gint aboutwin_height;
+       gint addrgather_width;
+       gint addrgather_height;
 
        gint warn_dnd;
        gint broken_are_utf8;