2005-10-14 [paul] 1.9.15cvs45
authorPaul Mangan <paul@claws-mail.org>
Fri, 14 Oct 2005 13:43:17 +0000 (13:43 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 14 Oct 2005 13:43:17 +0000 (13:43 +0000)
* src/prefs_actions.c
* src/prefs_common.c
* src/prefs_common.h
* src/prefs_filtering_action.c
* src/prefs_matcher.c
* src/prefs_template.c
remember window sizes
fix Info button size

Patches by wwp

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/prefs_actions.c
src/prefs_common.c
src/prefs_common.h
src/prefs_filtering_action.c
src/prefs_matcher.c
src/prefs_template.c

index 7403332231a823c40820a3ebb85c45c86ca077a9..d02eeda9ce8cd5fe2c5e3f8a87e03c40208561d1 100644 (file)
@@ -1,3 +1,16 @@
+2005-10-14 [paul]      1.9.15cvs45
+
+       * src/prefs_actions.c
+       * src/prefs_common.c
+       * src/prefs_common.h
+       * src/prefs_filtering_action.c
+       * src/prefs_matcher.c
+       * src/prefs_template.c
+               remember window sizes
+               fix Info button size
+
+       Patches by wwp
+
 2005-10-13 [colin]     1.9.15cvs44
 
        * src/mimeview.c
index 4d2114edc69202c78592b1997f289b3e7081ff58..b0e33ca2d13f81f4c892c63f0b4c36d21a32b34d 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.136 -r 1.395.2.137 src/summaryview.c;  ) > 1.9.15cvs42.patchset
 ( cvs diff -u -r 1.5.2.9 -r 1.5.2.10 src/noticeview.c;  cvs diff -u -r 1.3.8.4 -r 1.3.8.5 src/noticeview.h;  ) > 1.9.15cvs43.patchset
 ( cvs diff -u -r 1.83.2.43 -r 1.83.2.44 src/mimeview.c;  cvs diff -u -r 1.5.2.10 -r 1.5.2.11 src/noticeview.c;  cvs diff -u -r 1.3.8.5 -r 1.3.8.6 src/noticeview.h;  ) > 1.9.15cvs44.patchset
+( cvs diff -u -r 1.60.2.24 -r 1.60.2.25 src/prefs_actions.c;  cvs diff -u -r 1.204.2.61 -r 1.204.2.62 src/prefs_common.c;  cvs diff -u -r 1.103.2.31 -r 1.103.2.32 src/prefs_common.h;  cvs diff -u -r 1.1.4.20 -r 1.1.4.21 src/prefs_filtering_action.c;  cvs diff -u -r 1.43.2.26 -r 1.43.2.27 src/prefs_matcher.c;  cvs diff -u -r 1.12.2.15 -r 1.12.2.16 src/prefs_template.c;  ) > 1.9.15cvs45.patchset
index 39e346e11c3767628e58487c89a32587850dca5c..70ba5f923a5b317a3863add134f1eef933213f52 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=44
+EXTRA_VERSION=45
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 8104054f3fc499f527a1e6bc8a3861e5a9cb2ff5..cb43d5bdab5df75bed91a694eee7f01ce5be0838 100644 (file)
@@ -129,6 +129,18 @@ void prefs_actions_open(MainWindow *mainwin)
        gtk_widget_show(actions.window);
 }
 
+/*!
+ *\brief       Save Gtk object size to prefs dataset
+ */
+static void prefs_actions_size_allocate_cb(GtkWidget *widget,
+                                        GtkAllocation *allocation)
+{
+       g_return_if_fail(allocation != NULL);
+
+       prefs_common.actionswin_width = allocation->width;
+       prefs_common.actionswin_height = allocation->height;
+}
+
 static void prefs_actions_create(MainWindow *mainwin)
 {
        GtkWidget *window;
@@ -162,6 +174,7 @@ static void prefs_actions_create(MainWindow *mainwin)
        GtkWidget *btn_vbox;
        GtkWidget *up_btn;
        GtkWidget *down_btn;
+       static GdkGeometry geometry;
 
        debug_print("Creating actions configuration window...\n");
 
@@ -171,7 +184,6 @@ static void prefs_actions_create(MainWindow *mainwin)
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
        gtk_window_set_modal(GTK_WINDOW(window), TRUE);
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
-       gtk_window_set_default_size(GTK_WINDOW(window), 400, -1);
 
        vbox = gtk_vbox_new(FALSE, 6);
        gtk_widget_show(vbox);
@@ -187,6 +199,8 @@ static void prefs_actions_create(MainWindow *mainwin)
        gtk_window_set_title(GTK_WINDOW(window), _("Actions configuration"));
        g_signal_connect(G_OBJECT(window), "delete_event",
                         G_CALLBACK(prefs_actions_deleted), NULL);
+       g_signal_connect(G_OBJECT(window), "size_allocate",
+                        G_CALLBACK(prefs_actions_size_allocate_cb), NULL);
        g_signal_connect(G_OBJECT(window), "key_press_event",
                         G_CALLBACK(prefs_actions_key_pressed), NULL);
        MANAGE_WINDOW_SIGNALS_CONNECT(window);
@@ -296,6 +310,16 @@ static void prefs_actions_create(MainWindow *mainwin)
        g_signal_connect(G_OBJECT(down_btn), "clicked",
                         G_CALLBACK(prefs_actions_down), NULL);
 
+       if (!geometry.min_height) {
+               geometry.min_width = 486;
+               geometry.min_height = 322;
+       }
+
+       gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+                                     GDK_HINT_MIN_SIZE);
+       gtk_widget_set_size_request(window, prefs_common.actionswin_width,
+                                   prefs_common.actionswin_height);
+
        gtk_widget_show(window);
 
        actions.window = window;
index 21d4165c0d9e3444be4e3dfeb7670df29231a580..d7f7612fcf48d8f14b0afb3924f13b06df36b74b 100644 (file)
@@ -543,11 +543,32 @@ static PrefParam param[] = {
        {"color_new", "179", &prefs_common.color_new, P_COLOR,
         NULL, NULL, NULL},
 
+       /* Some windows' sizes */
        {"filteringwin_width", "500", &prefs_common.filteringwin_width, P_INT,
         NULL, NULL, NULL},
        {"filteringwin_height", "-1", &prefs_common.filteringwin_height, P_INT,
         NULL, NULL, NULL},
 
+       {"filteringactionwin_width", "490", &prefs_common.filteringactionwin_width, P_INT,
+        NULL, NULL, NULL},
+       {"filteringactionwin_height", "-1", &prefs_common.filteringactionwin_height, P_INT,
+        NULL, NULL, NULL},
+
+       {"matcherwin_width", "520", &prefs_common.matcherwin_width, P_INT,
+        NULL, NULL, NULL},
+       {"matcherwin_height", "-1", &prefs_common.matcherwin_height, P_INT,
+        NULL, NULL, NULL},
+
+       {"templateswin_width", "440", &prefs_common.templateswin_width, P_INT,
+        NULL, NULL, NULL},
+       {"templateswin_height", "-1", &prefs_common.templateswin_height, P_INT,
+        NULL, NULL, NULL},
+
+       {"actionswin_width", "486", &prefs_common.actionswin_width, P_INT,
+        NULL, NULL, NULL},
+       {"actionswin_height", "-1", &prefs_common.actionswin_height, P_INT,
+        NULL, NULL, NULL},
+
        /* Hidden */
        {"warn_dnd", "1", &prefs_common.warn_dnd, P_INT,
         NULL, NULL, NULL},
index 80104aaa15f902c7e535dd946556782ac0be03b6..5f1a5795246e9273914980a684b73038d3bec319 100644 (file)
@@ -324,6 +324,14 @@ struct _PrefsCommon
        
        gint filteringwin_width;
        gint filteringwin_height;
+       gint filteringactionwin_width;
+       gint filteringactionwin_height;
+       gint matcherwin_width;
+       gint matcherwin_height;
+       gint templateswin_width;
+       gint templateswin_height;
+       gint actionswin_width;
+       gint actionswin_height;
        gint warn_dnd;
        gint broken_are_utf8;
 };
index 15f826b183aba888da443ad075a577881d1033fe..01192cd9e13121d94cc469f81e9edddb3bbce5f1 100644 (file)
@@ -224,6 +224,18 @@ void prefs_filtering_action_open(GSList *action_list,
        gtk_widget_show(filtering_action.window);
 }
 
+/*!
+ *\brief       Save Gtk object size to prefs dataset
+ */
+static void prefs_filtering_action_size_allocate_cb(GtkWidget *widget,
+                                        GtkAllocation *allocation)
+{
+       g_return_if_fail(allocation != NULL);
+
+       prefs_common.filteringactionwin_width = allocation->width;
+       prefs_common.filteringactionwin_height = allocation->height;
+}
+
 /*!
  *\brief       Create the matcher dialog
  */
@@ -275,6 +287,7 @@ static void prefs_filtering_action_create(void)
 
        GList *combo_items;
        gint i;
+       static GdkGeometry geometry;
 
         GList * accounts;
 
@@ -300,6 +313,8 @@ static void prefs_filtering_action_create(void)
                             _("Filtering action configuration"));
        g_signal_connect(G_OBJECT(window), "delete_event",
                         G_CALLBACK(prefs_filtering_action_deleted), NULL);
+       g_signal_connect(G_OBJECT(window), "size_allocate",
+                        G_CALLBACK(prefs_filtering_action_size_allocate_cb), NULL);
        g_signal_connect(G_OBJECT(window), "key_press_event",
                         G_CALLBACK(prefs_filtering_action_key_pressed), NULL);
        MANAGE_WINDOW_SIGNALS_CONNECT(window);
@@ -513,6 +528,16 @@ static void prefs_filtering_action_create(void)
        g_signal_connect(G_OBJECT(down_btn), "clicked",
                         G_CALLBACK(prefs_filtering_action_down), NULL);
 
+       if (!geometry.min_height) {
+               geometry.min_width = 490;
+               geometry.min_height = 328;
+       }
+
+       gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+                                     GDK_HINT_MIN_SIZE);
+       gtk_widget_set_size_request(window, prefs_common.filteringactionwin_width,
+                                   prefs_common.filteringactionwin_height);
+
        gtk_widget_show_all(window);
 
        filtering_action.window    = window;
index 495dddd7a542f4453e1d92e7e1f1cc38a4e44399..0b262711817c24530c64b176c55650e12f72b299 100644 (file)
@@ -315,6 +315,18 @@ void prefs_matcher_open(MatcherList *matchers, PrefsMatcherSignal *cb)
        gtk_widget_show(matcher.window);
 }
 
+/*!
+ *\brief       Save Gtk object size to prefs dataset
+ */
+static void prefs_matcher_size_allocate_cb(GtkWidget *widget,
+                                        GtkAllocation *allocation)
+{
+       g_return_if_fail(allocation != NULL);
+
+       prefs_common.matcherwin_width = allocation->width;
+       prefs_common.matcherwin_height = allocation->height;
+}
+
 /*!
  *\brief       Create the matcher dialog
  */
@@ -374,6 +386,7 @@ static void prefs_matcher_create(void)
 
        GList *combo_items;
        gint i;
+       static GdkGeometry geometry;
 
        debug_print("Creating matcher configuration window...\n");
 
@@ -397,6 +410,8 @@ static void prefs_matcher_create(void)
                             _("Condition configuration"));
        g_signal_connect(G_OBJECT(window), "delete_event",
                         G_CALLBACK(prefs_matcher_deleted), NULL);
+       g_signal_connect(G_OBJECT(window), "size_allocate",
+                        G_CALLBACK(prefs_matcher_size_allocate_cb), NULL);
        g_signal_connect(G_OBJECT(window), "key_press_event",
                         G_CALLBACK(prefs_matcher_key_pressed), NULL);
        MANAGE_WINDOW_SIGNALS_CONNECT(window);
@@ -487,7 +502,7 @@ static void prefs_matcher_create(void)
        test_btn = gtk_button_new_with_label(_("Info ..."));
        gtk_widget_show(test_btn);
        gtk_table_attach(GTK_TABLE (criteria_table), test_btn, 3, 4, 1, 2,
-                        GTK_FILL | GTK_SHRINK | GTK_EXPAND, 0, 0, 0);
+                        0, 0, 0, 0);
        g_signal_connect(G_OBJECT (test_btn), "clicked",
                         G_CALLBACK(prefs_matcher_test_info),
                         NULL);
@@ -654,6 +669,16 @@ static void prefs_matcher_create(void)
        g_signal_connect(G_OBJECT(down_btn), "clicked",
                         G_CALLBACK(prefs_matcher_down), NULL);
 
+       if (!geometry.min_height) {
+               geometry.min_width = 520;
+               geometry.min_height = 368;
+       }
+
+       gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+                                     GDK_HINT_MIN_SIZE);
+       gtk_widget_set_size_request(window, prefs_common.matcherwin_width,
+                                   prefs_common.matcherwin_height);
+
        gtk_widget_show_all(window);
 
        matcher.window    = window;
index 25a44033aa5f35b81d0a1491efc0de133832b127..fe9f2856265f0bf3264d6413668bb0bb64499c15 100644 (file)
@@ -106,6 +106,18 @@ void prefs_template_open(void)
        gtk_widget_show(templates.window);
 }
 
+/*!
+ *\brief       Save Gtk object size to prefs dataset
+ */
+static void prefs_template_size_allocate_cb(GtkWidget *widget,
+                                        GtkAllocation *allocation)
+{
+       g_return_if_fail(allocation != NULL);
+
+       prefs_common.templateswin_width = allocation->width;
+       prefs_common.templateswin_height = allocation->height;
+}
+
 #define ADD_ENTRY(entry, str, row) \
 { \
        label1 = gtk_label_new(str); \
@@ -149,13 +161,15 @@ static void prefs_template_window_create(void)
        GtkWidget       *confirm_area;
        GtkWidget         *ok_btn;
        GtkWidget         *cancel_btn;
+       static GdkGeometry geometry;
+
+       debug_print("Creating templates configuration window...\n");
 
        /* main window */
        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
        gtk_window_set_modal(GTK_WINDOW(window), TRUE);
        gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
-       gtk_window_set_default_size(GTK_WINDOW(window), 400, -1);
 
        /* vpaned to separate template settings from templates list */
        vpaned = gtk_vpaned_new();
@@ -281,6 +295,8 @@ static void prefs_template_window_create(void)
 
        g_signal_connect(G_OBJECT(window), "delete_event",
                         G_CALLBACK(prefs_template_deleted_cb), NULL);
+       g_signal_connect(G_OBJECT(window), "size_allocate",
+                        G_CALLBACK(prefs_template_size_allocate_cb), NULL);
        g_signal_connect(G_OBJECT(window), "key_press_event",
                         G_CALLBACK(prefs_template_key_pressed_cb), NULL);
        MANAGE_WINDOW_SIGNALS_CONNECT(window);
@@ -291,6 +307,16 @@ static void prefs_template_window_create(void)
 
        address_completion_start(window);
 
+       if (!geometry.min_height) {
+               geometry.min_width = 440;
+               geometry.min_height = 500;
+       }
+
+       gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+                                     GDK_HINT_MIN_SIZE);
+       gtk_widget_set_size_request(window, prefs_common.templateswin_width,
+                                   prefs_common.templateswin_height);
+
        templates.window = window;
        templates.ok_btn = ok_btn;
        templates.list_view = list_view;