gnome-scan r803 - in trunk: . src
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r803 - in trunk: . src
- Date: Sat, 31 Jan 2009 13:50:19 +0000 (UTC)
Author: bersace
Date: Sat Jan 31 13:50:19 2009
New Revision: 803
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=803&view=rev
Log:
Preselect resolution
Modified:
trunk/ChangeLog
trunk/src/flegita.vala
Modified: trunk/src/flegita.vala
==============================================================================
--- trunk/src/flegita.vala (original)
+++ trunk/src/flegita.vala Sat Jan 31 13:50:19 2009
@@ -27,6 +27,9 @@
Job job;
Gnome.Scan.Dialog dialog;
Flegita.Sink sink;
+ Gdk.Screen screen;
+ double screen_resolution;
+ Value default_res;
GLib.Environment.set_prgname("flegita");
GLib.Environment.set_application_name(_("Scanner Utility"));
@@ -38,6 +41,17 @@
sink = new Flegita.Sink();
job = new Gnome.Scan.Job(sink);
+
+ // PrÃselect rÃsolution.
+ default_res = Value(typeof(double));
+ screen = Gdk.Screen.get_default();
+ screen_resolution = screen.get_resolution();
+ if (screen_resolution != -1)
+ default_res.set_double(screen.get_resolution());
+ else
+ default_res.set_double(150);
+ job.register_preselection(new PreselValue("resolution", default_res));
+
dialog = new Gnome.Scan.Dialog(null, job);
dialog.run();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]