+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
+
2011-11-18 [mones] 3.7.10cvs87
* src/compose.c
( cvs diff -u -r 1.382.2.593 -r 1.382.2.594 src/compose.c; ) > 3.7.10cvs85.patchset
( cvs diff -u -r 1.83.2.180 -r 1.83.2.181 src/mimeview.c; ) > 3.7.10cvs86.patchset
( cvs diff -u -r 1.382.2.594 -r 1.382.2.595 src/compose.c; cvs diff -u -r 1.47.2.54 -r 1.47.2.55 src/procheader.c; cvs diff -u -r 1.11.2.12 -r 1.11.2.13 src/procheader.h; ) > 3.7.10cvs87.patchset
+( cvs diff -u -r 1.382.2.595 -r 1.382.2.596 src/compose.c; cvs diff -u -r 1.274.2.336 -r 1.274.2.337 src/mainwindow.c; cvs diff -u -r 1.83.2.181 -r 1.83.2.182 src/mimeview.c; cvs diff -u -r 1.20.2.35 -r 1.20.2.36 src/mimeview.h; cvs diff -u -r 1.204.2.205 -r 1.204.2.206 src/prefs_common.c; cvs diff -u -r 1.103.2.134 -r 1.103.2.135 src/prefs_common.h; ) > 3.7.10cvs88.patchset
MICRO_VERSION=10
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=87
+EXTRA_VERSION=88
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
/* 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);
/* 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 */
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);
/* 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.
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;
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,
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,
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,
#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;
}
}
+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);
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);
} 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);
#if !GTK_CHECK_VERSION(2,12,0)
GtkTooltips *tooltips;
#endif
- gint oldsize;
NoticeView *siginfoview;
MimeInfo *siginfo;
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,
{"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,
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;