[evolution-data-server] Bug #669191 - Address book dialog has incorrect default size
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #669191 - Address book dialog has incorrect default size
- Date: Thu, 3 May 2012 10:00:52 +0000 (UTC)
commit 816fc40e31a0aa2f4d04dbeae633aff9433c83f4
Author: Mathieu Trudel-Lapierre <mathieu canonical com>
Date: Thu May 3 12:00:10 2012 +0200
Bug #669191 - Address book dialog has incorrect default size
libedataserverui/e-name-selector-dialog.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/libedataserverui/e-name-selector-dialog.c b/libedataserverui/e-name-selector-dialog.c
index f595d37..18e7368 100644
--- a/libedataserverui/e-name-selector-dialog.c
+++ b/libedataserverui/e-name-selector-dialog.c
@@ -447,10 +447,23 @@ name_selector_dialog_constructed (GObject *object)
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL);
+ /* Try to figure out a sane default size for the dialog. We used to hard
+ * code this to 512 so keep using 512 if the screen is big enough,
+ * otherwise use -1 (use as little as possible, use the
+ * GtkScrolledWindow's scrollbars).
+ *
+ * This should allow scrolling on tiny netbook resolutions and let
+ * others see as much of the dialog as possible.
+ *
+ * 600 pixels seems to be a good lower bound resolution to allow room
+ * above or below for other UI (window manager's?)
+ */
+ gtk_window_set_default_size (GTK_WINDOW (object), 700,
+ gdk_screen_height () >= 600 ? 512 : -1);
+
gtk_dialog_set_default_response (
GTK_DIALOG (object), GTK_RESPONSE_CLOSE);
gtk_window_set_modal (GTK_WINDOW (object), TRUE);
- gtk_window_set_default_size (GTK_WINDOW (object), 700, -1);
gtk_window_set_resizable (GTK_WINDOW (object), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (object), 4);
gtk_window_set_title (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]