[gthumb] photo-importer: use maximized dialog on netbooks
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] photo-importer: use maximized dialog on netbooks
- Date: Tue, 27 Apr 2010 17:32:05 +0000 (UTC)
commit fb6c4da85a4ceb3467b844a76164a68b34a4a52d
Author: Jussi Kukkonen <jku linux intel com>
Date: Tue Apr 27 15:37:07 2010 +0300
photo-importer: use maximized dialog on netbooks
Import dialog ends up 400 pixels high on netbooks, that's not
very usable. Maximized should fit that use case better.
.../photo_importer/data/ui/photo-importer.ui | 1 -
extensions/photo_importer/dlg-photo-importer.c | 17 ++++++++++++-----
2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/extensions/photo_importer/data/ui/photo-importer.ui b/extensions/photo_importer/data/ui/photo-importer.ui
index be55e0c..d6b6394 100644
--- a/extensions/photo_importer/data/ui/photo-importer.ui
+++ b/extensions/photo_importer/data/ui/photo-importer.ui
@@ -111,7 +111,6 @@
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="filelist_box">
- <property name="width_request">550</property>
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
diff --git a/extensions/photo_importer/dlg-photo-importer.c b/extensions/photo_importer/dlg-photo-importer.c
index 42e81ac..9a1b4de 100644
--- a/extensions/photo_importer/dlg-photo-importer.c
+++ b/extensions/photo_importer/dlg-photo-importer.c
@@ -470,13 +470,13 @@ preferences_button_clicked_cb (GtkWidget *widget,
gtk_window_present (GTK_WINDOW (data->preferences_dialog));
}
-
void
dlg_photo_importer (GthBrowser *browser,
GFile *source)
{
DialogData *data;
GtkCellRenderer *renderer;
+ GdkScreen *screen;
GthFileDataSort *sort_type;
GList *tests, *scan;
char *general_filter;
@@ -502,6 +502,17 @@ dlg_photo_importer (GthBrowser *browser,
gth_browser_set_dialog (browser, "photo_importer", data->dialog);
g_object_set_data (G_OBJECT (data->dialog), "dialog_data", data);
+ screen = gtk_widget_get_screen (data->dialog);
+ if (screen && gdk_screen_get_height (screen) < 768) {
+ /* maximize on netbooks */
+ gtk_window_maximize (GTK_WINDOW (data->dialog));
+ } else {
+ /* This should fit on a XGA/WXGA (height 768) screen
+ * with top and bottom panels */
+ gtk_window_set_default_size (GTK_WINDOW (data->dialog),
+ 580, 670);
+ }
+
data->source_store = gtk_list_store_new (SOURCE_LIST_COLUMNS, G_TYPE_OBJECT, G_TYPE_ICON, G_TYPE_STRING);
data->source_list = gtk_combo_box_new_with_model (GTK_TREE_MODEL (data->source_store));
gtk_widget_show (data->source_list);
@@ -581,10 +592,6 @@ dlg_photo_importer (GthBrowser *browser,
data->preferences_dialog = gth_import_preferences_dialog_new ();
gtk_window_set_transient_for (GTK_WINDOW (data->preferences_dialog), GTK_WINDOW (data->dialog));
- gtk_window_set_default_size (GTK_WINDOW (data->dialog),
- -1,
- gdk_screen_get_height (gtk_widget_get_screen (GTK_WIDGET (data->dialog))) * 2 / 3);
-
/* Set the signals handlers. */
g_signal_connect (G_OBJECT (data->dialog),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]