+2005-10-16 [wwp] 1.9.15cvs52
+
+ * src/addressbook.c
+ * src/editaddress.c
+ * src/prefs_common.c
+ * src/prefs_common.h
+ Remember window sizes (address book)
+
2005-10-16 [wwp] 1.9.15cvs51
* src/plugins/clamav/clamav_plugin_gtk.c
( cvs diff -u -r 1.60.2.33 -r 1.60.2.34 src/addressbook.c; cvs diff -u -r 1.274.2.74 -r 1.274.2.75 src/mainwindow.c; cvs diff -u -r 1.395.2.137 -r 1.395.2.138 src/summaryview.c; ) > 1.9.15cvs49.patchset
( cvs diff -u -r 1.83.2.44 -r 1.83.2.45 src/mimeview.c; cvs diff -u -r 1.395.2.138 -r 1.395.2.139 src/summaryview.c; cvs diff -u -r 1.96.2.78 -r 1.96.2.79 src/textview.c; ) > 1.9.15cvs50.patchset
( cvs diff -u -r 1.9.2.10 -r 1.9.2.11 src/plugins/clamav/clamav_plugin_gtk.c; cvs diff -u -r 1.23.2.13 -r 1.23.2.14 src/plugins/spamassassin/spamassassin_gtk.c; ) > 1.9.15cvs51.patchset
+( cvs diff -u -r 1.60.2.34 -r 1.60.2.35 src/addressbook.c; cvs diff -u -r 1.14.2.11 -r 1.14.2.12 src/editaddress.c; cvs diff -u -r 1.204.2.62 -r 1.204.2.63 src/prefs_common.c; cvs diff -u -r 1.103.2.32 -r 1.103.2.33 src/prefs_common.h; ) > 1.9.15cvs52.patchset
MICRO_VERSION=15
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=51
+EXTRA_VERSION=52
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
return FALSE;
}
+/*!
+ *\brief Save Gtk object size to prefs dataset
+ */
+static void addressbook_size_allocate_cb(GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ g_return_if_fail(allocation != NULL);
+
+ prefs_common.addressbookwin_width = allocation->width;
+ prefs_common.addressbookwin_height = allocation->height;
+}
+
/*
* Create the address book widgets. The address book contains two CTree widgets: the
* address index tree on the left and the address list on the right.
gchar *text;
gint i;
+ static GdkGeometry geometry;
+
debug_print("Creating addressbook window...\n");
index_titles[COL_SOURCES] = _("Sources");
/* Address book window */
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), _("Address book"));
- gtk_widget_set_size_request(window, ADDRESSBOOK_WIDTH, ADDRESSBOOK_HEIGHT);
gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
gtk_widget_realize(window);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(addressbook_close), NULL);
+ g_signal_connect(G_OBJECT(window), "size_allocate",
+ G_CALLBACK(addressbook_size_allocate_cb), NULL);
g_signal_connect(G_OBJECT(window), "key_press_event",
G_CALLBACK(key_pressed), NULL);
MANAGE_WINDOW_SIGNALS_CONNECT(window);
addrbook.listSelected = NULL;
address_completion_start(window);
+
+ if (!geometry.min_height) {
+ geometry.min_width = ADDRESSBOOK_WIDTH;
+ geometry.min_height = ADDRESSBOOK_HEIGHT;
+ }
+
+ gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+ GDK_HINT_MIN_SIZE);
+ gtk_widget_set_size_request(window, prefs_common.addressbookwin_width,
+ prefs_common.addressbookwin_height);
+
gtk_widget_show_all(window);
}
}
}
+/*!
+ *\brief Save Gtk object size to prefs dataset
+ */
+static void edit_person_size_allocate_cb(GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ g_return_if_fail(allocation != NULL);
+
+ prefs_common.addressbookeditpersonwin_width = allocation->width;
+ prefs_common.addressbookeditpersonwin_height = allocation->height;
+}
+
static void addressbook_edit_person_dialog_create( gboolean *cancelled ) {
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *cancel_btn;
GtkWidget *hsbox;
GtkWidget *statusbar;
+ static GdkGeometry geometry;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_widget_set_size_request(window, EDITPERSON_WIDTH, EDITPERSON_HEIGHT );
/* gtk_container_set_border_width(GTK_CONTAINER(window), 0); */
gtk_window_set_title(GTK_WINDOW(window), _("Edit Person Data"));
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(edit_person_delete_event),
cancelled);
+ g_signal_connect(G_OBJECT(window), "size_allocate",
+ G_CALLBACK(edit_person_size_allocate_cb),
+ cancelled);
g_signal_connect(G_OBJECT(window), "key_press_event",
G_CALLBACK(edit_person_key_pressed),
cancelled);
gtk_widget_show_all(vbox);
+ if (!geometry.min_height) {
+ geometry.min_width = EDITPERSON_WIDTH;
+ geometry.min_height = EDITPERSON_HEIGHT;
+ }
+
+ gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geometry,
+ GDK_HINT_MIN_SIZE);
+ gtk_widget_set_size_request(window, prefs_common.addressbookeditpersonwin_width,
+ prefs_common.addressbookeditpersonwin_height);
+
personeditdlg.window = window;
personeditdlg.notebook = notebook;
personeditdlg.ok_btn = ok_btn;
{"actionswin_height", "-1", &prefs_common.actionswin_height, P_INT,
NULL, NULL, NULL},
+ {"addressbookwin_width", "520", &prefs_common.addressbookwin_width, P_INT,
+ NULL, NULL, NULL},
+ {"addressbookwin_height", "-1", &prefs_common.addressbookwin_height, P_INT,
+ NULL, NULL, NULL},
+
+ {"addressbookeditpersonwin_width", "640", &prefs_common.addressbookeditpersonwin_width, P_INT,
+ NULL, NULL, NULL},
+ {"addressbookeditpersonwin_height", "-1", &prefs_common.addressbookeditpersonwin_height, P_INT,
+ NULL, NULL, NULL},
+
/* Hidden */
{"warn_dnd", "1", &prefs_common.warn_dnd, P_INT,
NULL, NULL, NULL},
gint templateswin_height;
gint actionswin_width;
gint actionswin_height;
+ gint addressbookwin_width;
+ gint addressbookwin_height;
+ gint addressbookeditpersonwin_width;
+ gint addressbookeditpersonwin_height;
gint warn_dnd;
gint broken_are_utf8;
};