[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-373-gf71ca14
ticho at claws-mail.org
ticho at claws-mail.org
Thu Oct 4 21:01:07 CEST 2018
The branch, gtk3 has been updated
via f71ca14f9f622a9dc14d23c96fb2f897ca25f71c (commit)
from 4844c6abcebf4f6f4b254877c6600dac8b23dbbc (commit)
Summary of changes:
src/folderview.c | 3 ---
src/mainwindow.c | 64 +++++++++++++++++++++--------------------------------
src/summaryview.c | 3 ---
3 files changed, 25 insertions(+), 45 deletions(-)
- Log -----------------------------------------------------------------
commit f71ca14f9f622a9dc14d23c96fb2f897ca25f71c
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Thu Oct 4 20:58:57 2018 +0200
Make main mainwindow components' sizing slightly more sane.
gtk_widget_set_size_request() is setting minimal widget size
now, so we can't use it for restoring remembered component
sizes anymore, since then they can't be made any smaller than
the remembered size anymore.
diff --git a/src/folderview.c b/src/folderview.c
index 48d8e9c..d03dd58 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -599,9 +599,6 @@ FolderView *folderview_create(void)
(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_AUTOMATIC,
prefs_common.folderview_vscrollbar_policy);
- gtk_widget_set_size_request(scrolledwin,
- prefs_common.folderview_width,
- prefs_common.folderview_height);
folderview->scrolledwin = scrolledwin;
ctree = folderview_ctree_create(folderview);
diff --git a/src/mainwindow.c b/src/mainwindow.c
index fd2ac16..1e7ae30 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -3639,16 +3639,6 @@ void main_window_show(MainWindow *mainwin)
gtk_window_move(GTK_WINDOW(mainwin->window),
prefs_common.mainwin_x,
prefs_common.mainwin_y);
-
- gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->folderview),
- prefs_common.folderview_width,
- prefs_common.folderview_height);
- gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->summaryview),
- prefs_common.summaryview_width,
- prefs_common.summaryview_height);
- gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->messageview),
- prefs_common.msgview_width,
- prefs_common.msgview_height);
#endif
}
@@ -3698,7 +3688,6 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
gtk_paned_add1(GTK_PANED(hpaned),
GTK_WIDGET_PTR(mainwin->folderview));
gtk_widget_show(hpaned);
- gtk_widget_queue_resize(hpaned);
if (messageview_is_visible(mainwin->messageview)) {
gtk_paned_add2(GTK_PANED(hpaned), vpaned);
@@ -3715,7 +3704,16 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
if (layout_mode == SMALL_LAYOUT && first_set) {
mainwin_paned_show_first(GTK_PANED(hpaned));
}
- gtk_widget_queue_resize(vpaned);
+
+ gtk_paned_set_position(GTK_PANED(hpaned),
+ prefs_common_get_prefs()->folderview_width);
+
+ if (layout_mode == NORMAL_LAYOUT &&
+ messageview_is_visible(mainwin->messageview)) {
+ gtk_paned_set_position(GTK_PANED(vpaned),
+ prefs_common_get_prefs()->summaryview_height);
+ }
+
break;
case WIDE_LAYOUT:
vpaned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
@@ -3729,7 +3727,6 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
GTK_WIDGET_PTR(mainwin->summaryview));
gtk_widget_show(hpaned);
- gtk_widget_queue_resize(hpaned);
if (messageview_is_visible(mainwin->messageview)) {
gtk_paned_add2(GTK_PANED(vpaned),
@@ -3738,7 +3735,15 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
g_object_ref(GTK_WIDGET_PTR(mainwin->messageview));
}
gtk_widget_show(vpaned);
- gtk_widget_queue_resize(vpaned);
+
+ gtk_paned_set_position(GTK_PANED(hpaned),
+ prefs_common_get_prefs()->folderview_width);
+
+ if (messageview_is_visible(mainwin->messageview)) {
+ gtk_paned_set_position(GTK_PANED(vpaned),
+ prefs_common_get_prefs()->summaryview_height);
+ }
+
break;
case WIDE_MSGLIST_LAYOUT:
vpaned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
@@ -3751,7 +3756,6 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
GTK_WIDGET_PTR(mainwin->folderview));
gtk_widget_show(hpaned);
- gtk_widget_queue_resize(hpaned);
if (messageview_is_visible(mainwin->messageview)) {
gtk_paned_add2(GTK_PANED(hpaned),
@@ -3760,9 +3764,13 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
g_object_ref(GTK_WIDGET_PTR(mainwin->messageview));
}
gtk_paned_add2(GTK_PANED(vpaned), hpaned);
-
gtk_widget_show(vpaned);
- gtk_widget_queue_resize(vpaned);
+
+ gtk_paned_set_position(GTK_PANED(hpaned),
+ prefs_common_get_prefs()->folderview_width);
+ gtk_paned_set_position(GTK_PANED(vpaned),
+ prefs_common_get_prefs()->summaryview_height);
+
break;
default:
g_warning("Unknown layout");
@@ -3782,27 +3790,8 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
gtk_widget_realize(mainwin->folderview->ctree);
gtk_widget_realize(mainwin->summaryview->hbox);
gtk_widget_realize(mainwin->summaryview->hbox_l);
- gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->folderview),
- prefs_common.folderview_width,
- prefs_common.folderview_height);
- gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->summaryview),
- 0,0);
- gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->messageview),
- 0,0);
- gtk_widget_set_size_request(GTK_WIDGET(mainwin->window),
- prefs_common.mainwin_width,
- prefs_common.mainwin_height);
gtk_paned_set_position(GTK_PANED(mainwin->hpaned), 800);
} else {
- gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->folderview),
- prefs_common.folderview_width,
- prefs_common.folderview_height);
- gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->summaryview),
- prefs_common.summaryview_width,
- prefs_common.summaryview_height);
- gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->messageview),
- prefs_common.msgview_width,
- prefs_common.msgview_height);
gtk_window_set_default_size(GTK_WINDOW(mainwin->window),
prefs_common.mainwin_width,
prefs_common.mainwin_height);
@@ -3822,9 +3811,6 @@ static void main_window_set_widgets(MainWindow *mainwin, LayoutType layout_mode)
prefs_common.mainwin_x,
prefs_common.mainwin_y);
- gtk_widget_queue_resize(vbox_body);
- gtk_widget_queue_resize(mainwin->vbox);
- gtk_widget_queue_resize(mainwin->window);
/* CLAWS: previous "gtk_widget_show_all" makes noticeview
* and mimeview icon list/ctree lose track of their visibility states */
if (!noticeview_is_visible(mainwin->messageview->noticeview))
diff --git a/src/summaryview.c b/src/summaryview.c
index 8fe0484..f036f8b 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -628,9 +628,6 @@ SummaryView *summary_create(MainWindow *mainwin)
scrolledwin);
gtk_box_pack_start(GTK_BOX(vbox), summaryview->mainwidget_book, TRUE, TRUE, 0);
#endif
- gtk_widget_set_size_request(vbox,
- prefs_common.summaryview_width,
- prefs_common.summaryview_height);
ctree = summary_ctree_create(summaryview);
gtk_widget_show(ctree);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list