gnome-scan r488 - in trunk: . lib
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r488 - in trunk: . lib
- Date: Thu, 21 Feb 2008 16:46:09 +0000 (GMT)
Author: bersace
Date: Thu Feb 21 16:46:08 2008
New Revision: 488
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=488&view=rev
Log:
Update page-orientation when using manual paper-size.
Modified:
trunk/ChangeLog
trunk/lib/gnome-scan-preview-plugin-area.c
Modified: trunk/lib/gnome-scan-preview-plugin-area.c
==============================================================================
--- trunk/lib/gnome-scan-preview-plugin-area.c (original)
+++ trunk/lib/gnome-scan-preview-plugin-area.c Thu Feb 21 16:46:08 2008
@@ -483,11 +483,16 @@
gs_convert (r.height, GS_UNIT_PIXEL, GS_UNIT_MM, res));
g_boxed_free (GTK_TYPE_PAPER_SIZE, p);
p = gtk_paper_size_new_custom ("manual", _("Manual"),
- gs_convert (r.width, GS_UNIT_PIXEL, GS_UNIT_MM, res),
- gs_convert (r.height, GS_UNIT_PIXEL, GS_UNIT_MM, res),
+ gs_convert (MIN(r.width, r.height), GS_UNIT_PIXEL, GS_UNIT_MM, res),
+ gs_convert (MAX(r.width, r.height), GS_UNIT_PIXEL, GS_UNIT_MM, res),
GTK_UNIT_MM);
+ /* update orientation according to area extent */
+ GtkPageOrientation or = r.width > r.height ? GTK_PAGE_ORIENTATION_LANDSCAPE : GTK_PAGE_ORIENTATION_PORTRAIT;
+ gnome_scan_settings_set_enum (s, "page-orientation",
+ GTK_TYPE_PAGE_ORIENTATION, or);
}
else if (g_str_equal (gtk_paper_size_get_name (p), "maximal")) {
+ /* set origin to (0,0) for maximal paper-size */
o->x = o->y = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]