[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-37-g16047902a

paul at claws-mail.org paul at claws-mail.org
Thu Feb 11 10:13:08 UTC 2021


The branch, gtk3 has been updated
       via  16047902ae04a8a9089d139518358e92e1dbe4b5 (commit)
      from  ed02deed2544d6509aa725d1858dcb3271332836 (commit)

Summary of changes:
 src/account.c                           | 4 ++--
 src/action.c                            | 4 ++--
 src/addressadd.c                        | 7 ++++---
 src/addressbook.c                       | 4 ++--
 src/addressbook_foldersel.c             | 7 ++++---
 src/addrgather.c                        | 4 ++--
 src/compose.c                           | 6 +++---
 src/editaddress.c                       | 4 ++--
 src/editgroup.c                         | 6 +++---
 src/edittags.c                          | 4 ++--
 src/foldersel.c                         | 7 ++++---
 src/grouplistdialog.c                   | 4 ++--
 src/gtk/about.c                         | 4 ++--
 src/gtk/foldersort.c                    | 7 ++++---
 src/gtk/logwindow.c                     | 4 ++--
 src/gtk/pluginwindow.c                  | 4 ++--
 src/gtk/prefswindow.c                   | 4 ++--
 src/inc.c                               | 4 ++--
 src/mainwindow.c                        | 2 +-
 src/messageview.c                       | 4 ++--
 src/plugins/att_remover/att_remover.c   | 6 +++---
 src/plugins/managesieve/sieve_manager.c | 4 ++--
 src/plugins/python/python_plugin.c      | 7 ++++---
 src/prefs_actions.c                     | 4 ++--
 src/prefs_filtering.c                   | 4 ++--
 src/prefs_filtering_action.c            | 4 ++--
 src/prefs_matcher.c                     | 4 ++--
 src/prefs_template.c                    | 7 ++++---
 src/printing.c                          | 7 ++++---
 src/send_message.c                      | 4 ++--
 src/sourcewindow.c                      | 4 ++--
 src/ssl_manager.c                       | 7 ++++---
 src/uri_opener.c                        | 7 ++++---
 33 files changed, 86 insertions(+), 77 deletions(-)


- Log -----------------------------------------------------------------
commit 16047902ae04a8a9089d139518358e92e1dbe4b5
Author: Steve Randall <srandall52 at sbcglobal.net>
Date:   Tue Feb 2 07:10:47 2021 -0600

    Get and set window sizes and positions compatible with CSD.

diff --git a/src/account.c b/src/account.c
index b7045d84c..1fda175aa 100644
--- a/src/account.c
+++ b/src/account.c
@@ -699,8 +699,8 @@ static void account_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.accountswin_width = allocation->width;
-	prefs_common.accountswin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.accountswin_width, &prefs_common.accountswin_height);
 }
 
 static void account_edit_create(void)
diff --git a/src/action.c b/src/action.c
index c0aeb51ad..84e7a86a0 100644
--- a/src/action.c
+++ b/src/action.c
@@ -1276,8 +1276,8 @@ static void actions_io_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.actionsiodialog_width = allocation->width;
-	prefs_common.actionsiodialog_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.actionsiodialog_width, &prefs_common.actionsiodialog_height);
 }
 
 static void create_io_dialog(Children *children)
diff --git a/src/addressadd.c b/src/addressadd.c
index 31967f57c..403edabd2 100644
--- a/src/addressadd.c
+++ b/src/addressadd.c
@@ -159,8 +159,8 @@ static void addressadd_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.addressaddwin_width = allocation->width;
-	prefs_common.addressaddwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.addressaddwin_width, &prefs_common.addressaddwin_height);
 }
 
 static void addressadd_create( void ) {
@@ -316,7 +316,8 @@ static void addressadd_create( void ) {
 
 	gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE);
-	gtk_widget_set_size_request(window, prefs_common.addressaddwin_width,
+	gtk_window_set_default_size(GTK_WINDOW(window),
+				    prefs_common.addressaddwin_width,
 				    prefs_common.addressaddwin_height);
 
 	addressadd_dlg.window        = window;
diff --git a/src/addressbook.c b/src/addressbook.c
index a86b70d2a..30c1ec40a 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -711,8 +711,8 @@ static void addressbook_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.addressbookwin_width = allocation->width;
-	prefs_common.addressbookwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.addressbookwin_width, &prefs_common.addressbookwin_height);
 }
 
 static gint sort_column_number = 0;
diff --git a/src/addressbook_foldersel.c b/src/addressbook_foldersel.c
index a8a8629a9..775bdf4aa 100644
--- a/src/addressbook_foldersel.c
+++ b/src/addressbook_foldersel.c
@@ -133,8 +133,8 @@ static void addressbook_foldersel_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.addressbook_folderselwin_width = allocation->width;
-	prefs_common.addressbook_folderselwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.addressbook_folderselwin_width, &prefs_common.addressbook_folderselwin_height);
 }
 
 static void addressbook_foldersel_create( void )
@@ -230,7 +230,8 @@ static void addressbook_foldersel_create( void )
 
 	gtk_window_set_geometry_hints( GTK_WINDOW(window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE );
-	gtk_widget_set_size_request( window, prefs_common.addressbook_folderselwin_width,
+	gtk_window_set_default_size( GTK_WINDOW(window),
+				    prefs_common.addressbook_folderselwin_width,
 				    prefs_common.addressbook_folderselwin_height );
 
 	gtk_widget_show_all( vbox );
diff --git a/src/addrgather.c b/src/addrgather.c
index e6d381b8a..e0513a2db 100644
--- a/src/addrgather.c
+++ b/src/addrgather.c
@@ -147,8 +147,8 @@ static void addrgather_size_allocate(
 {
 	cm_return_if_fail( allocation != NULL );
 	
-	prefs_common.addrgather_width	= allocation->width;
-	prefs_common.addrgather_height	= allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.addrgather_width, &prefs_common.addrgather_height);
 }
 
 #define FMT_BUFSIZE 32
diff --git a/src/compose.c b/src/compose.c
index cd719228c..110540ddf 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -9181,7 +9181,7 @@ static void compose_destroy(Compose *compose)
 #endif
 
 	if (!compose->batch) {
-		gtk_widget_get_allocation(compose->window, &allocation);
+		gtk_window_get_size(compose->window, &allocation.width, &allocation.height);
 		prefs_common.compose_width = allocation.width;
 		prefs_common.compose_height = allocation.height;
 	}
@@ -10714,7 +10714,7 @@ static gint compose_delete_cb(GtkWidget *widget, GdkEventAny *event,
 	gint x, y;
 	Compose *compose = (Compose *)data;
 
-	gtkut_widget_get_uposition(widget, &x, &y);
+	gtk_window_get_position(GTK_WINDOW(widget), &x, &y);
 	if (!compose->batch) {
 		prefs_common.compose_x = x;
 		prefs_common.compose_y = y;
@@ -12147,7 +12147,7 @@ gboolean compose_close(Compose *compose)
 		compose->draft_timeout_tag = COMPOSE_DRAFT_TIMEOUT_FORBIDDEN;
 	}
 
-	gtkut_widget_get_uposition(compose->window, &x, &y);
+	gtk_window_get_position(GTK_WINDOW(compose->window), &x, &y);
 	if (!compose->batch) {
 		prefs_common.compose_x = x;
 		prefs_common.compose_y = y;
diff --git a/src/editaddress.c b/src/editaddress.c
index 237dae91d..5c7a7700f 100644
--- a/src/editaddress.c
+++ b/src/editaddress.c
@@ -780,8 +780,8 @@ static void edit_person_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.addressbookeditpersonwin_width = allocation->width;
-	prefs_common.addressbookeditpersonwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.addressbookeditpersonwin_width, &prefs_common.addressbookeditpersonwin_height);
 }
 
 /* build edit person widgets, return a pointer to the main container of the widgetset (a vbox) */
diff --git a/src/editgroup.c b/src/editgroup.c
index ac1f38ded..b02a427aa 100644
--- a/src/editgroup.c
+++ b/src/editgroup.c
@@ -252,8 +252,8 @@ static void addressbook_edit_group_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.addressbookeditgroupwin_width = allocation->width;
-	prefs_common.addressbookeditgroupwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.addressbookeditgroupwin_width, &prefs_common.addressbookeditgroupwin_height);
 }
 
 static void addressbook_edit_group_create( gboolean *cancelled ) {
@@ -434,7 +434,7 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
 
 	gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE);
-	gtk_widget_set_size_request(window,
+	gtk_window_set_default_size(GTK_WINDOW(window),
 					prefs_common.addressbookeditgroupwin_width,
 				    prefs_common.addressbookeditgroupwin_height);
 
diff --git a/src/edittags.c b/src/edittags.c
index fb4a04940..6af44cfae 100644
--- a/src/edittags.c
+++ b/src/edittags.c
@@ -523,8 +523,8 @@ static void apply_window_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.tagswin_width = allocation->width;
-	prefs_common.tagswin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.tagswin_width, &prefs_common.tagswin_height);
 }
 
 static void apply_window_create(void) 
diff --git a/src/foldersel.c b/src/foldersel.c
index 21f310c54..e0937a496 100644
--- a/src/foldersel.c
+++ b/src/foldersel.c
@@ -232,8 +232,8 @@ static void foldersel_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.folderselwin_width = allocation->width;
-	prefs_common.folderselwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.folderselwin_width, &prefs_common.folderselwin_height);
 }
 
 static void foldersel_create(const gchar *title)
@@ -367,7 +367,8 @@ static void foldersel_create(const gchar *title)
 
 	gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE);
-	gtk_widget_set_size_request(window, prefs_common.folderselwin_width,
+	gtk_window_set_default_size(GTK_WINDOW(window),
+				    prefs_common.folderselwin_width,
 				    prefs_common.folderselwin_height);
 
 	gtk_widget_show_all(vbox);
diff --git a/src/grouplistdialog.c b/src/grouplistdialog.c
index 141a86f66..4f618c530 100644
--- a/src/grouplistdialog.c
+++ b/src/grouplistdialog.c
@@ -517,8 +517,8 @@ static void grouplist_size_allocate(GtkWidget *widget, GtkAllocation *allocation
 {
 	cm_return_if_fail( allocation != NULL );
 	
-	prefs_common.news_subscribe_width	= allocation->width;
-	prefs_common.news_subscribe_height	= allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.news_subscribe_width, &prefs_common.news_subscribe_height);
 }
 
 static gint window_deleted(GtkWidget *widget, GdkEventAny *event, gpointer data)
diff --git a/src/gtk/about.c b/src/gtk/about.c
index 0be4271e5..23986f3ab 100644
--- a/src/gtk/about.c
+++ b/src/gtk/about.c
@@ -936,8 +936,8 @@ static void about_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.aboutwin_width = allocation->width;
-	prefs_common.aboutwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.aboutwin_width, &prefs_common.aboutwin_height);
 }
 
 
diff --git a/src/gtk/foldersort.c b/src/gtk/foldersort.c
index f416ef6cc..81f67b263 100644
--- a/src/gtk/foldersort.c
+++ b/src/gtk/foldersort.c
@@ -192,8 +192,8 @@ static void foldersort_size_allocate_cb(GtkWidget *widget, GtkAllocation *alloca
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.foldersortwin_width = allocation->width;
-	prefs_common.foldersortwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.foldersortwin_width, &prefs_common.foldersortwin_height);
 }
 
 void foldersort_open()
@@ -323,7 +323,8 @@ void foldersort_open()
 
 	gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE);
-	gtk_widget_set_size_request(window, prefs_common.foldersortwin_width,
+	gtk_window_set_default_size(GTK_WINDOW(window),
+				    prefs_common.foldersortwin_width,
 				    prefs_common.foldersortwin_height);
 
 	dialog->window = window;
diff --git a/src/gtk/logwindow.c b/src/gtk/logwindow.c
index f9cba2043..6d3ea493e 100644
--- a/src/gtk/logwindow.c
+++ b/src/gtk/logwindow.c
@@ -68,8 +68,8 @@ static void size_allocate_cb(GtkWidget *widget,
 	cm_return_if_fail(prefs_logwin_width != NULL);
 	cm_return_if_fail(prefs_logwin_height != NULL);
 
-	*prefs_logwin_width = allocation->width;
-	*prefs_logwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		prefs_logwin_width, prefs_logwin_height);
 }
 
 LogWindow *log_window_create(LogInstance instance)
diff --git a/src/gtk/pluginwindow.c b/src/gtk/pluginwindow.c
index c5f77c766..e36781b82 100644
--- a/src/gtk/pluginwindow.c
+++ b/src/gtk/pluginwindow.c
@@ -264,8 +264,8 @@ static void pluginwindow_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.pluginswin_width = allocation->width;
-	prefs_common.pluginswin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.pluginswin_width, &prefs_common.pluginswin_height);
 }
 
 
diff --git a/src/gtk/prefswindow.c b/src/gtk/prefswindow.c
index bfa0fa9af..f95794998 100644
--- a/src/gtk/prefswindow.c
+++ b/src/gtk/prefswindow.c
@@ -591,8 +591,8 @@ static void prefs_size_allocate_cb(GtkWidget *widget,
 
 	/* don't try to save size to NULL pointers */
 	if (prefswindow && prefswindow->save_width && prefswindow->save_height) {
-		*(prefswindow->save_width) = allocation->width;
-		*(prefswindow->save_height) = allocation->height;
+		gtk_window_get_size(GTK_WINDOW(widget),
+			prefswindow->save_width, prefswindow->save_height);
 	}
 }
 
diff --git a/src/inc.c b/src/inc.c
index ad728247d..f559ca39c 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -459,8 +459,8 @@ static void inc_progress_dialog_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.receivewin_width = allocation->width;
-	prefs_common.receivewin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.receivewin_width, &prefs_common.receivewin_height);
 }
 
 static IncProgressDialog *inc_progress_dialog_create(gboolean autocheck)
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 356414092..68d14db7b 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -2832,7 +2832,7 @@ void main_window_get_position(MainWindow *mainwin)
 	if (prefs_common.mainwin_maximised || prefs_common.mainwin_fullscreen)
 		return;
 
-	gtkut_widget_get_uposition(mainwin->window, &x, &y);
+	gtk_window_get_position(mainwin->window, &x, &y);
 
 	prefs_common.mainview_x = x;
 	prefs_common.mainview_y = y;
diff --git a/src/messageview.c b/src/messageview.c
index a1c5b517d..36dad2799 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -1828,8 +1828,8 @@ static void messageview_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.msgwin_width  = allocation->width;
-	prefs_common.msgwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.msgwin_width, &prefs_common.msgwin_height);
 }
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event,
diff --git a/src/plugins/att_remover/att_remover.c b/src/plugins/att_remover/att_remover.c
index 97ff6ac98..505eefb0a 100644
--- a/src/plugins/att_remover/att_remover.c
+++ b/src/plugins/att_remover/att_remover.c
@@ -103,8 +103,8 @@ static void size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation)
 {
 	cm_return_if_fail(allocation != NULL);
 
-	AttRemoverData.win_width = allocation->width;
-	AttRemoverData.win_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+			&AttRemoverData.win_width, &AttRemoverData.win_height);
 }
 
 static gint save_new_message(MsgInfo *oldmsg, MsgInfo *newmsg, MimeInfo *info,
@@ -404,7 +404,7 @@ static void remove_attachments_dialog(AttRemover *attremover)
 
 	gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE);
-	gtk_widget_set_size_request(window, attremover->win_width,
+	gtk_window_set_default_size(GTK_WINDOW(window), attremover->win_width,
 					attremover->win_height);
 
 	attremover->window = window;
diff --git a/src/plugins/managesieve/sieve_manager.c b/src/plugins/managesieve/sieve_manager.c
index 6e2c3b64c..13695a100 100644
--- a/src/plugins/managesieve/sieve_manager.c
+++ b/src/plugins/managesieve/sieve_manager.c
@@ -548,8 +548,8 @@ static void size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation)
 {
 	cm_return_if_fail(allocation != NULL);
 
-	sieve_config.manager_win_width = allocation->width;
-	sieve_config.manager_win_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&sieve_config.manager_win_width, &sieve_config.manager_win_height);
 }
 
 static void got_session_error(SieveSession *session, const gchar *msg,
diff --git a/src/plugins/python/python_plugin.c b/src/plugins/python/python_plugin.c
index dab88ada9..99a0b2fb2 100644
--- a/src/plugins/python/python_plugin.c
+++ b/src/plugins/python/python_plugin.c
@@ -75,8 +75,8 @@ static void size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation)
 {
 	cm_return_if_fail(allocation != NULL);
 
-	python_config.console_win_width = allocation->width;
-	python_config.console_win_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&python_config.console_win_width, &python_config.console_win_height);
 }
 
 static void setup_python_console(void)
@@ -95,7 +95,8 @@ static void setup_python_console(void)
 
   gtk_window_set_geometry_hints(GTK_WINDOW(python_console), NULL, &geometry,
 				    GDK_HINT_MIN_SIZE);
-  gtk_widget_set_size_request(python_console, python_config.console_win_width,
+  gtk_window_set_default_size(GTK_WINDOW(python_console),
+				  python_config.console_win_width,
 				  python_config.console_win_height);
 
   vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
diff --git a/src/prefs_actions.c b/src/prefs_actions.c
index 2579f5b32..ceb8cf23d 100644
--- a/src/prefs_actions.c
+++ b/src/prefs_actions.c
@@ -155,8 +155,8 @@ static void prefs_actions_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.actionswin_width = allocation->width;
-	prefs_common.actionswin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.actionswin_width, &prefs_common.actionswin_height);
 }
 
 static void prefs_actions_create(MainWindow *mainwin)
diff --git a/src/prefs_filtering.c b/src/prefs_filtering.c
index 6fb5d2517..cfa5f5d4a 100644
--- a/src/prefs_filtering.c
+++ b/src/prefs_filtering.c
@@ -234,8 +234,8 @@ static void prefs_filtering_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.filteringwin_width = allocation->width;
-	prefs_common.filteringwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.filteringwin_width, &prefs_common.filteringwin_height);
 }
 
 /* prefs_filtering_close() - just to have one common exit point */
diff --git a/src/prefs_filtering_action.c b/src/prefs_filtering_action.c
index 3012670f1..bc5ce4005 100644
--- a/src/prefs_filtering_action.c
+++ b/src/prefs_filtering_action.c
@@ -301,8 +301,8 @@ static void prefs_filtering_action_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.filteringactionwin_width = allocation->width;
-	prefs_common.filteringactionwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.filteringactionwin_width, &prefs_common.filteringactionwin_height);
 }
 
 #define LABELS_WIDTH		80
diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c
index 9cc79c45f..5f916a364 100644
--- a/src/prefs_matcher.c
+++ b/src/prefs_matcher.c
@@ -480,8 +480,8 @@ static void prefs_matcher_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.matcherwin_width = allocation->width;
-	prefs_common.matcherwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.matcherwin_width, &prefs_common.matcherwin_height);
 }
 
 /*!
diff --git a/src/prefs_template.c b/src/prefs_template.c
index ce885499d..d0e8884a0 100644
--- a/src/prefs_template.c
+++ b/src/prefs_template.c
@@ -147,8 +147,8 @@ static void prefs_template_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.templateswin_width = allocation->width;
-	prefs_common.templateswin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.templateswin_width, &prefs_common.templateswin_height);
 }
 
 static void prefs_template_window_create(void)
@@ -427,7 +427,8 @@ static void prefs_template_window_create(void)
 
 	gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE);
-	gtk_widget_set_size_request(window, prefs_common.templateswin_width,
+	gtk_window_set_default_size(GTK_WINDOW(window),
+				    prefs_common.templateswin_width,
 				    prefs_common.templateswin_height);
 
 	templates.window = window;
diff --git a/src/printing.c b/src/printing.c
index 16f120e93..49c7c441e 100644
--- a/src/printing.c
+++ b/src/printing.c
@@ -430,7 +430,8 @@ static gboolean cb_preview(GtkPrintOperation        *operation,
 	gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
 	gtk_window_set_geometry_hints(GTK_WINDOW(dialog), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE);
-	gtk_widget_set_size_request(dialog, prefs_common.print_previewwin_width,
+	gtk_window_set_default_size(GTK_WINDOW(dialog),
+				    prefs_common.print_previewwin_width,
 				    prefs_common.print_previewwin_height);
 	gtk_window_set_title(GTK_WINDOW(dialog), _("Print preview"));
 
@@ -581,8 +582,8 @@ static void cb_preview_size_allocate(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.print_previewwin_width = allocation->width;
-	prefs_common.print_previewwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.print_previewwin_width, &prefs_common.print_previewwin_height);
 }
 
 static void cb_preview_ready(GtkPrintOperationPreview *preview,
diff --git a/src/send_message.c b/src/send_message.c
index 4d1e90d73..364fd83df 100644
--- a/src/send_message.c
+++ b/src/send_message.c
@@ -597,8 +597,8 @@ static void send_progress_dialog_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.sendwin_width = allocation->width;
-	prefs_common.sendwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.sendwin_width, &prefs_common.sendwin_height);
 }
 
 static SendProgressDialog *send_progress_dialog_create(void)
diff --git a/src/sourcewindow.c b/src/sourcewindow.c
index 2acf55e79..d9e2fe1ef 100644
--- a/src/sourcewindow.c
+++ b/src/sourcewindow.c
@@ -190,8 +190,8 @@ static void source_window_size_alloc_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.sourcewin_width  = allocation->width;
-	prefs_common.sourcewin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.sourcewin_width, &prefs_common.sourcewin_height);
 }
 
 static gint source_window_delete_cb(GtkWidget *widget, GdkEventAny *event,
diff --git a/src/ssl_manager.c b/src/ssl_manager.c
index f8363654f..ca182005c 100644
--- a/src/ssl_manager.c
+++ b/src/ssl_manager.c
@@ -174,8 +174,8 @@ static void ssl_manager_size_allocate_cb(GtkWidget *widget,
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.sslmanwin_width = allocation->width;
-	prefs_common.sslmanwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.sslmanwin_width, &prefs_common.sslmanwin_height);
 }
 
 void ssl_manager_create(void)
@@ -243,7 +243,8 @@ void ssl_manager_create(void)
 
 	gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE);
-	gtk_widget_set_size_request(window, prefs_common.sslmanwin_width,
+	gtk_window_set_default_size(GTK_WINDOW(window),
+				    prefs_common.sslmanwin_width,
 				    prefs_common.sslmanwin_height);
 
 	gtk_widget_show(certlist);
diff --git a/src/uri_opener.c b/src/uri_opener.c
index 5f7d8e9fa..396fe69df 100644
--- a/src/uri_opener.c
+++ b/src/uri_opener.c
@@ -163,8 +163,8 @@ static void uri_opener_size_allocate_cb(GtkWidget *widget, GtkAllocation *alloca
 {
 	cm_return_if_fail(allocation != NULL);
 
-	prefs_common.uriopenerwin_width = allocation->width;
-	prefs_common.uriopenerwin_height = allocation->height;
+	gtk_window_get_size(GTK_WINDOW(widget),
+		&prefs_common.uriopenerwin_width, &prefs_common.uriopenerwin_height);
 }
 
 static void uri_opener_create(void) 
@@ -243,7 +243,8 @@ static void uri_opener_create(void)
 
 	gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
 				      GDK_HINT_MIN_SIZE);
-	gtk_widget_set_size_request(window, prefs_common.uriopenerwin_width,
+	gtk_window_set_default_size(GTK_WINDOW(window),
+				    prefs_common.uriopenerwin_width,
 				    prefs_common.uriopenerwin_height);
 
 	opener.window = window;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list