[gthumb/gthumb-2-14] resize_images: update the height according to the ratio
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-2-14] resize_images: update the height according to the ratio
- Date: Wed, 26 Oct 2011 20:53:00 +0000 (UTC)
commit 717c7aa022421f78ea103622fcf403492766f9a2
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Oct 26 21:08:31 2011 +0200
resize_images: update the height according to the ratio
extensions/resize_images/dlg-resize-images.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/extensions/resize_images/dlg-resize-images.c b/extensions/resize_images/dlg-resize-images.c
index 5dee6db..82c7608 100644
--- a/extensions/resize_images/dlg-resize-images.c
+++ b/extensions/resize_images/dlg-resize-images.c
@@ -276,7 +276,8 @@ width_spinbutton_value_changed_cb (GtkSpinButton *spinbutton,
return;
g_signal_handler_block (GET_WIDGET ("height_spinbutton"), data->height_spinbutton_event);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("height_spinbutton")), ratio * gtk_spin_button_get_value (spinbutton));
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("height_spinbutton")),
+ ratio * gtk_spin_button_get_value (GTK_SPIN_BUTTON (GET_WIDGET ("width_spinbutton"))));
g_signal_handler_unblock (GET_WIDGET ("height_spinbutton"), data->height_spinbutton_event);
}
@@ -303,7 +304,8 @@ height_spinbutton_value_changed_cb (GtkSpinButton *spinbutton,
return;
g_signal_handler_block (GET_WIDGET ("width_spinbutton"), data->width_spinbutton_event);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("width_spinbutton")), ratio * gtk_spin_button_get_value (spinbutton));
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (GET_WIDGET ("width_spinbutton")),
+ ratio * gtk_spin_button_get_value (GTK_SPIN_BUTTON (GET_WIDGET ("height_spinbutton"))));
g_signal_handler_unblock (GET_WIDGET ("width_spinbutton"), data->width_spinbutton_event);
}
@@ -477,6 +479,7 @@ dlg_resize_images (GthBrowser *browser,
/* Run dialog. */
update_width_height_properties (data);
+ width_spinbutton_value_changed_cb (NULL, data);
if (GTH_IS_FILE_SOURCE_VFS (gth_browser_get_location_source (browser)))
gtk_widget_hide (GET_WIDGET ("use_destination_checkbutton"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]