[gthumb: 13/40] overwrite dialog: load previews at 256x256
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 13/40] overwrite dialog: load previews at 256x256
- Date: Fri, 10 Sep 2010 16:57:18 +0000 (UTC)
commit 5c85cc31aa736b7e9950e48966859fd32f2a80cb
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Sep 5 15:56:23 2010 +0200
overwrite dialog: load previews at 256x256
...and set the preview size in a single place
data/ui/overwrite-dialog.ui | 4 ----
gthumb/gth-overwrite-dialog.c | 10 +++++++---
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/data/ui/overwrite-dialog.ui b/data/ui/overwrite-dialog.ui
index e1f74cf..bdaf1d2 100644
--- a/data/ui/overwrite-dialog.ui
+++ b/data/ui/overwrite-dialog.ui
@@ -44,8 +44,6 @@
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="old_image_frame">
- <property name="width_request">256</property>
- <property name="height_request">256</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
@@ -191,8 +189,6 @@
<property name="spacing">6</property>
<child>
<object class="GtkFrame" id="new_image_frame">
- <property name="width_request">256</property>
- <property name="height_request">256</property>
<property name="visible">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
diff --git a/gthumb/gth-overwrite-dialog.c b/gthumb/gth-overwrite-dialog.c
index 8568fb6..4ed5f98 100644
--- a/gthumb/gth-overwrite-dialog.c
+++ b/gthumb/gth-overwrite-dialog.c
@@ -29,7 +29,8 @@
#include "gtk-utils.h"
-#define PREVIEW_SIZE 128
+#define ICON_SIZE 128
+#define PREVIEW_SIZE 256
static gpointer gth_overwrite_dialog_parent_class = NULL;
@@ -171,7 +172,7 @@ info_ready_cb (GList *files,
icon = (GIcon*) g_file_info_get_attribute_object (self->priv->source_data->info, "preview::icon");
if (icon == NULL)
icon = g_content_type_get_icon (g_file_info_get_content_type (self->priv->source_data->info));
- pixbuf = _g_icon_get_pixbuf (icon, PREVIEW_SIZE, gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (self))));
+ pixbuf = _g_icon_get_pixbuf (icon, ICON_SIZE, gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (self))));
if (pixbuf != NULL) {
gth_image_viewer_set_pixbuf (GTH_IMAGE_VIEWER (self->priv->new_image_viewer), pixbuf, -1, -1);
g_object_unref (pixbuf);
@@ -213,7 +214,7 @@ info_ready_cb (GList *files,
icon = (GIcon*) g_file_info_get_attribute_object (self->priv->destination_data->info, "preview::icon");
if (icon == NULL)
icon = g_content_type_get_icon (g_file_info_get_content_type (self->priv->destination_data->info));
- pixbuf = _g_icon_get_pixbuf (icon, PREVIEW_SIZE, gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (self))));
+ pixbuf = _g_icon_get_pixbuf (icon, ICON_SIZE, gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (self))));
if (pixbuf != NULL) {
gth_image_viewer_set_pixbuf (GTH_IMAGE_VIEWER (self->priv->old_image_viewer), pixbuf, -1, -1);
g_object_unref (pixbuf);
@@ -288,6 +289,9 @@ gth_overwrite_dialog_construct (GthOverwriteDialog *self,
if (default_response == GTH_OVERWRITE_RESPONSE_RENAME)
gtk_widget_grab_focus (_gtk_builder_get_widget (self->priv->builder, "overwrite_rename_entry"));
+ gtk_widget_set_size_request (_gtk_builder_get_widget (self->priv->builder, "old_image_frame"), PREVIEW_SIZE, PREVIEW_SIZE);
+ gtk_widget_set_size_request (_gtk_builder_get_widget (self->priv->builder, "new_image_frame"), PREVIEW_SIZE, PREVIEW_SIZE);
+
self->priv->old_image_viewer = gth_image_viewer_new ();
gth_image_viewer_set_transp_type (GTH_IMAGE_VIEWER (self->priv->old_image_viewer), GTH_TRANSP_TYPE_NONE);
gth_image_viewer_set_fit_mode (GTH_IMAGE_VIEWER (self->priv->old_image_viewer), GTH_FIT_SIZE_IF_LARGER);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]