[Commits] compose.c 1.382.2.595 1.382.2.596 mainwindow.c 1.274.2.336 1.274.2.337 mimeview.c 1.83.2.181 1.83.2.182 mimeview.h 1.20.2.35 1.20.2.36 prefs_common.c 1.204.2.205 1.204.2.206 prefs_common.h 1.103.2.134 1.103.2.135
pawel at claws-mail.org
pawel at claws-mail.org
Fri Nov 18 22:41:57 CET 2011
Update of /home/claws-mail/claws/src
In directory claws-mail:/tmp/cvs-serv20852/src
Modified Files:
Tag: gtk2
compose.c mainwindow.c mimeview.c mimeview.h prefs_common.c
prefs_common.h
Log Message:
2011-11-18 [pawel] 3.7.10cvs88
* src/compose.c
* src/mainwindow.c
* src/mimeview.c
* src/mimeview.h
* src/prefs_common.c
* src/prefs_common.h
Fix bug #2408 'Some UI elements are not persistent
between sessions'
Remember size of main window, compose notebook, mimeview
tree widgets between claws-mail runs. Compose window
size saving was already done in cvs74
Index: mimeview.c
===================================================================
RCS file: /home/claws-mail/claws/src/mimeview.c,v
retrieving revision 1.83.2.181
retrieving revision 1.83.2.182
diff -u -d -r1.83.2.181 -r1.83.2.182
--- mimeview.c 17 Nov 2011 16:05:49 -0000 1.83.2.181
+++ mimeview.c 18 Nov 2011 21:41:55 -0000 1.83.2.182
@@ -143,6 +143,9 @@
static void icon_list_clear (MimeView *mimeview);
static void icon_list_toggle_by_mime_info (MimeView *mimeview,
MimeInfo *mimeinfo);
+static void ctree_size_allocate_cb (GtkWidget *widget,
+ GtkAllocation *allocation,
+ MimeView *mimeview);
static gint mime_toggle_button_cb(GtkWidget *button, GdkEventButton *event,
MimeView *mimeview);
static gboolean part_button_pressed (MimeView *mimeview,
@@ -383,6 +386,8 @@
ctree_mainbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(ctree_mainbox), scrolledwin, TRUE, TRUE, 0);
+ g_signal_connect(G_OBJECT(ctree_mainbox), "size_allocate",
+ G_CALLBACK(ctree_size_allocate_cb), mimeview);
mimeview->ui_manager = gtk_ui_manager_new();
mimeview->action_group = cm_menu_create_action_group_full(mimeview->ui_manager,
@@ -458,7 +463,6 @@
#if !(GTK_CHECK_VERSION(2,12,0))
mimeview->tooltips = tips;
#endif
- mimeview->oldsize = 60;
mimeview->mime_toggle = mime_toggle;
mimeview->siginfoview = siginfoview;
mimeview->scrollbutton = scrollbutton;
@@ -2684,10 +2688,15 @@
}
}
+static void ctree_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation,
+ MimeView *mimeview)
+{
+ prefs_common.mimeview_tree_height = allocation->height;
+}
+
static gint mime_toggle_button_cb(GtkWidget *button, GdkEventButton *event,
MimeView *mimeview)
{
- GtkAllocation allocation;
g_object_ref(button);
mimeview_leave_notify(button, NULL, NULL);
@@ -2698,7 +2707,8 @@
GTK_SHADOW_NONE);
gtk_widget_hide(mimeview->icon_mainbox);
gtk_widget_show(mimeview->ctree_mainbox);
- gtk_paned_set_position(GTK_PANED(mimeview->paned), mimeview->oldsize);
+ gtk_paned_set_position(GTK_PANED(mimeview->paned),
+ prefs_common.mimeview_tree_height);
gtkut_container_remove(GTK_CONTAINER(mimeview->icon_mainbox),
button);
@@ -2707,8 +2717,6 @@
} else {
gtk_arrow_set(GTK_ARROW(gtk_bin_get_child(GTK_BIN((button)))), GTK_ARROW_LEFT,
GTK_SHADOW_NONE);
- gtk_widget_get_allocation(mimeview->ctree_mainbox, &allocation);
- mimeview->oldsize = allocation.height;
gtk_widget_hide(mimeview->ctree_mainbox);
gtk_widget_show(mimeview->icon_mainbox);
gtk_paned_set_position(GTK_PANED(mimeview->paned), 0);
Index: prefs_common.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.c,v
retrieving revision 1.204.2.205
retrieving revision 1.204.2.206
diff -u -d -r1.204.2.205 -r1.204.2.206
--- prefs_common.c 11 Nov 2011 07:26:54 -0000 1.204.2.205
+++ prefs_common.c 18 Nov 2011 21:41:55 -0000 1.204.2.206
@@ -652,6 +652,8 @@
NULL, NULL, NULL},
{"messagewin_height", "540", &prefs_common.msgwin_height, P_INT,
NULL, NULL, NULL},
+ {"mimeview_tree_height", "60", &prefs_common.mimeview_tree_height, P_INT,
+ NULL, NULL, NULL},
{"sourcewin_width", "600", &prefs_common.sourcewin_width, P_INT,
NULL, NULL, NULL},
{"sourcewin_height", "500", &prefs_common.sourcewin_height, P_INT,
@@ -678,6 +680,8 @@
{"compose_height", "470", &prefs_common.compose_height, P_INT,
NULL, NULL, NULL},
#endif
+ {"compose_notebook_height", "130", &prefs_common.compose_notebook_height, P_INT,
+ NULL, NULL, NULL},
{"compose_x", "0", &prefs_common.compose_x, P_INT,
NULL, NULL, NULL},
{"compose_y", "0", &prefs_common.compose_y, P_INT,
Index: compose.c
===================================================================
RCS file: /home/claws-mail/claws/src/compose.c,v
retrieving revision 1.382.2.595
retrieving revision 1.382.2.596
diff -u -d -r1.382.2.595 -r1.382.2.596
--- compose.c 18 Nov 2011 19:36:54 -0000 1.382.2.595
+++ compose.c 18 Nov 2011 21:41:54 -0000 1.382.2.596
@@ -355,6 +355,9 @@
/* callback functions */
+static void compose_notebook_size_alloc (GtkNotebook *notebook,
+ GtkAllocation *allocation,
+ Compose *compose);
static gboolean compose_edit_size_alloc (GtkEditable *widget,
GtkAllocation *allocation,
GtkSHRuler *shruler);
@@ -7483,7 +7486,7 @@
/* Notebook */
notebook = gtk_notebook_new();
- gtk_widget_set_size_request(notebook, -1, 130);
+ gtk_widget_set_size_request(notebook, -1, prefs_common.compose_notebook_height);
gtk_widget_show(notebook);
/* header labels and entries */
@@ -7573,6 +7576,8 @@
gtk_text_buffer_add_selection_clipboard(buffer, clipboard);
gtk_container_add(GTK_CONTAINER(scrolledwin), text);
+ g_signal_connect(G_OBJECT(notebook), "size_allocate",
+ G_CALLBACK(compose_notebook_size_alloc), compose);
g_signal_connect_after(G_OBJECT(text), "size_allocate",
G_CALLBACK(compose_edit_size_alloc),
ruler);
@@ -9232,6 +9237,13 @@
/* callback functions */
+static void compose_notebook_size_alloc(GtkNotebook *notebook,
+ GtkAllocation *allocation,
+ Compose *compose)
+{
+ prefs_common.compose_notebook_height = allocation->height;
+}
+
/* compose_edit_size_alloc() - called when resized. don't know whether Gtk
* includes "non-client" (windows-izm) in calculation, so this calculation
* may not be accurate.
Index: mainwindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/mainwindow.c,v
retrieving revision 1.274.2.336
retrieving revision 1.274.2.337
diff -u -d -r1.274.2.336 -r1.274.2.337
--- mainwindow.c 11 Nov 2011 17:28:06 -0000 1.274.2.336
+++ mainwindow.c 18 Nov 2011 21:41:55 -0000 1.274.2.337
@@ -3659,26 +3659,6 @@
gboolean first_set = (mainwin->hpaned == NULL);
debug_print("Setting widgets... ");
- if (layout_mode == SMALL_LAYOUT && first_set) {
- 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);
- } 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);
- }
-
#ifndef GENERIC_UMPC
mainwin->messageview->statusbar = mainwin->statusbar;
mainwin->messageview->statusbar_cid = mainwin->messageview_cid;
@@ -3801,6 +3781,19 @@
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_widget_set_size_request(GTK_WIDGET(mainwin->window),
+ prefs_common.mainwin_width,
+ prefs_common.mainwin_height);
}
/* remove headerview if not in prefs */
headerview_set_visibility(mainwin->messageview->headerview,
Index: mimeview.h
===================================================================
RCS file: /home/claws-mail/claws/src/mimeview.h,v
retrieving revision 1.20.2.35
retrieving revision 1.20.2.36
diff -u -d -r1.20.2.35 -r1.20.2.36
--- mimeview.h 11 Nov 2011 17:28:06 -0000 1.20.2.35
+++ mimeview.h 18 Nov 2011 21:41:55 -0000 1.20.2.36
@@ -96,7 +96,6 @@
#if !GTK_CHECK_VERSION(2,12,0)
GtkTooltips *tooltips;
#endif
- gint oldsize;
NoticeView *siginfoview;
MimeInfo *siginfo;
Index: prefs_common.h
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.h,v
retrieving revision 1.103.2.134
retrieving revision 1.103.2.135
diff -u -d -r1.103.2.134 -r1.103.2.135
--- prefs_common.h 23 Oct 2011 20:50:47 -0000 1.103.2.134
+++ prefs_common.h 18 Nov 2011 21:41:55 -0000 1.103.2.135
@@ -292,11 +292,14 @@
gint msgwin_width;
gint msgwin_height;
+ gint mimeview_tree_height;
+
gint sourcewin_width;
gint sourcewin_height;
gint compose_width;
gint compose_height;
+ gint compose_notebook_height;
gint compose_x;
gint compose_y;
More information about the Commits
mailing list