[gnome-scan/gnome-scan-0-6: 2/23] Tag 0.6 release.
- From: Philipp Sadleder <phsadleder src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-scan/gnome-scan-0-6: 2/23] Tag 0.6 release.
- Date: Wed, 22 Apr 2009 04:45:19 -0400 (EDT)
commit 4654f0e25b481ee1acebb5609f03e62a197c7fa4
Author: Ã?tienne Bersac <bersace src gnome org>
Date: Sat Dec 6 13:32:18 2008 +0000
Tag 0.6 release.
svn path=/tags/GNOME_SCAN_0_6/; revision=638
---
trunk/AUTHORS | 3 +
trunk/COPYING | 1 +
trunk/ChangeLog | 1717 ++++++++++++++++++++
trunk/DESIGN | 47 +
trunk/MAINTAINERS | 4 +
trunk/Makefile.am | 65 +
trunk/NEWS | 264 +++
trunk/README | 73 +
trunk/THANKS | 29 +
trunk/TODO | 51 +
trunk/TODO.tasks | 185 +++
trunk/autogen.sh | 22 +
trunk/configure.ac | 161 ++
trunk/data/Makefile.am | 53 +
trunk/data/flegita-gimp.svg | 1522 +++++++++++++++++
trunk/data/flegita.svg | 655 ++++++++
trunk/data/scan-as-layer.svg | 938 +++++++++++
trunk/data/scan-preview.svg | 982 +++++++++++
trunk/data/scan.svg | 938 +++++++++++
trunk/data/scanner-flatbed.svg | 655 ++++++++
trunk/data/scanner-handheld.svg | 601 +++++++
trunk/data/scanner-multi-function.svg | 1624 ++++++++++++++++++
trunk/data/scanner-sheetfed.svg | 751 +++++++++
trunk/doc/Makefile.am | 1 +
trunk/doc/ref/Makefile.am | 114 ++
trunk/doc/ref/gallery.xml | 22 +
trunk/doc/ref/gnome-scan-1.0-docs.sgml | 59 +
trunk/doc/ref/gnome-scan-1.0-sections.txt | 551 +++++++
trunk/doc/ref/gnome-scan-1.0.types | 17 +
trunk/doc/ref/images/GnomeScanDialog.png | Bin 0 -> 14204 bytes
trunk/doc/ref/tmpl/gnome-scan-1.0-unused.sgml | 840 ++++++++++
.../ref/tmpl/gnome-scan-acquisition-dialog.sgml | 48 +
trunk/doc/ref/tmpl/gnome-scan-backend.sgml | 91 +
trunk/doc/ref/tmpl/gnome-scan-boolean-widget.sgml | 26 +
trunk/doc/ref/tmpl/gnome-scan-dialog.sgml | 48 +
trunk/doc/ref/tmpl/gnome-scan-enum-widget.sgml | 26 +
trunk/doc/ref/tmpl/gnome-scan-init.sgml | 35 +
trunk/doc/ref/tmpl/gnome-scan-job.sgml | 89 +
trunk/doc/ref/tmpl/gnome-scan-module-manager.sgml | 55 +
trunk/doc/ref/tmpl/gnome-scan-module.sgml | 51 +
trunk/doc/ref/tmpl/gnome-scan-number-widget.sgml | 25 +
.../tmpl/gnome-scan-page-orientation-widget.sgml | 25 +
.../doc/ref/tmpl/gnome-scan-paper-size-widget.sgml | 25 +
trunk/doc/ref/tmpl/gnome-scan-param-specs.sgml | 300 ++++
trunk/doc/ref/tmpl/gnome-scan-param-widget.sgml | 98 ++
trunk/doc/ref/tmpl/gnome-scan-plugin.sgml | 146 ++
trunk/doc/ref/tmpl/gnome-scan-preview-area.sgml | 98 ++
.../ref/tmpl/gnome-scan-preview-plugin-area.sgml | 48 +
.../tmpl/gnome-scan-preview-plugin-rotation.sgml | 25 +
trunk/doc/ref/tmpl/gnome-scan-preview-plugin.sgml | 98 ++
trunk/doc/ref/tmpl/gnome-scan-preview-sink.sgml | 42 +
.../doc/ref/tmpl/gnome-scan-processor-common.sgml | 33 +
trunk/doc/ref/tmpl/gnome-scan-processor.sgml | 28 +
trunk/doc/ref/tmpl/gnome-scan-range-widget.sgml | 26 +
trunk/doc/ref/tmpl/gnome-scan-settings.sgml | 254 +++
trunk/doc/ref/tmpl/gnome-scan-sink.sgml | 25 +
trunk/doc/ref/tmpl/gnome-scan-string-widget.sgml | 26 +
trunk/doc/ref/tmpl/gnome-scan-types.sgml | 19 +
trunk/doc/ref/tmpl/gnome-scan-utils.sgml | 66 +
trunk/doc/ref/tmpl/gnome-scan.sgml | 19 +
trunk/doc/ref/tmpl/gnome-scanner.sgml | 95 ++
trunk/doc/ref/tmpl/head-comment.sgml | 19 +
trunk/doc/ref/version.xml.in | 1 +
trunk/flegita.desktop.in | 10 +
trunk/gnome-scan.anjuta | 52 +
trunk/gnome-scan.pc.in | 11 +
trunk/lib/Makefile.am | 229 +++
trunk/lib/gnome-scan-acquisition-dialog.c | 342 ++++
trunk/lib/gnome-scan-acquisition-dialog.h | 62 +
trunk/lib/gnome-scan-backend.c | 250 +++
trunk/lib/gnome-scan-backend.h | 77 +
trunk/lib/gnome-scan-boolean-widget.c | 82 +
trunk/lib/gnome-scan-boolean-widget.h | 48 +
trunk/lib/gnome-scan-dialog.c | 1438 ++++++++++++++++
trunk/lib/gnome-scan-dialog.h | 68 +
trunk/lib/gnome-scan-enum-widget.c | 157 ++
trunk/lib/gnome-scan-enum-widget.h | 48 +
trunk/lib/gnome-scan-init.c | 129 ++
trunk/lib/gnome-scan-init.h | 36 +
trunk/lib/gnome-scan-job.c | 575 +++++++
trunk/lib/gnome-scan-job.h | 108 ++
trunk/lib/gnome-scan-module-manager.c | 235 +++
trunk/lib/gnome-scan-module-manager.h | 66 +
trunk/lib/gnome-scan-module.c | 174 ++
trunk/lib/gnome-scan-module.h | 161 ++
trunk/lib/gnome-scan-number-widget.c | 114 ++
trunk/lib/gnome-scan-number-widget.h | 48 +
trunk/lib/gnome-scan-page-orientation-widget.c | 139 ++
trunk/lib/gnome-scan-page-orientation-widget.h | 57 +
trunk/lib/gnome-scan-paper-size-widget.c | 199 +++
trunk/lib/gnome-scan-paper-size-widget.h | 54 +
trunk/lib/gnome-scan-param-specs.c | 764 +++++++++
trunk/lib/gnome-scan-param-specs.h | 360 ++++
trunk/lib/gnome-scan-param-widget.c | 422 +++++
trunk/lib/gnome-scan-param-widget.h | 123 ++
trunk/lib/gnome-scan-plugin.c | 570 +++++++
trunk/lib/gnome-scan-plugin.h | 132 ++
trunk/lib/gnome-scan-preview-area.c | 343 ++++
trunk/lib/gnome-scan-preview-area.h | 73 +
trunk/lib/gnome-scan-preview-plugin-area.c | 631 +++++++
trunk/lib/gnome-scan-preview-plugin-area.h | 63 +
trunk/lib/gnome-scan-preview-plugin-rotation.c | 91 +
trunk/lib/gnome-scan-preview-plugin-rotation.h | 57 +
trunk/lib/gnome-scan-preview-plugin.c | 244 +++
trunk/lib/gnome-scan-preview-plugin.h | 152 ++
trunk/lib/gnome-scan-preview-sink.c | 130 ++
trunk/lib/gnome-scan-preview-sink.h | 63 +
trunk/lib/gnome-scan-private.h | 31 +
trunk/lib/gnome-scan-processor-common.c | 147 ++
trunk/lib/gnome-scan-processor-common.h | 57 +
trunk/lib/gnome-scan-range-widget.c | 116 ++
trunk/lib/gnome-scan-range-widget.h | 48 +
trunk/lib/gnome-scan-settings.c | 815 ++++++++++
trunk/lib/gnome-scan-settings.h | 141 ++
trunk/lib/gnome-scan-sink.c | 64 +
trunk/lib/gnome-scan-sink.h | 60 +
trunk/lib/gnome-scan-string-widget.c | 77 +
trunk/lib/gnome-scan-string-widget.h | 48 +
trunk/lib/gnome-scan-types.c | 82 +
trunk/lib/gnome-scan-types.c.tpl | 63 +
trunk/lib/gnome-scan-types.h | 44 +
trunk/lib/gnome-scan-types.h.tpl | 50 +
trunk/lib/gnome-scan-utils.c | 204 +++
trunk/lib/gnome-scan-utils.h | 150 ++
trunk/lib/gnome-scan.h | 33 +
trunk/lib/gnome-scanner.c | 301 ++++
trunk/lib/gnome-scanner.h | 94 ++
trunk/modules/Makefile.am | 45 +
trunk/modules/gsane-backend.c | 80 +
trunk/modules/gsane-backend.h | 56 +
trunk/modules/gsane-common.c | 37 +
trunk/modules/gsane-common.h | 52 +
trunk/modules/gsane-meta-param.c | 833 ++++++++++
trunk/modules/gsane-meta-param.h | 179 ++
trunk/modules/gsane-module.c | 56 +
trunk/modules/gsane-scanner.c | 1236 ++++++++++++++
trunk/modules/gsane-scanner.h | 69 +
trunk/modules/gsfile-backend.c | 66 +
trunk/modules/gsfile-backend.h | 55 +
trunk/modules/gsfile-filenames-widget.c | 332 ++++
trunk/modules/gsfile-filenames-widget.h | 48 +
trunk/modules/gsfile-module.c | 37 +
trunk/modules/gsfile-module.h | 35 +
trunk/modules/gsfile-pspec.c | 83 +
trunk/modules/gsfile-pspec.h | 63 +
trunk/modules/gsfile-scanner.c | 196 +++
trunk/modules/gsfile-scanner.h | 59 +
trunk/po/ChangeLog | 232 +++
trunk/po/LINGUAS | 18 +
trunk/po/Makefile.in.in | 218 +++
trunk/po/POTFILES.in | 21 +
trunk/po/ar.po | 400 +++++
trunk/po/ca.po | 407 +++++
trunk/po/de.po | 395 +++++
trunk/po/dz.po | 317 ++++
trunk/po/en_GB.po | 432 +++++
trunk/po/es.po | 425 +++++
trunk/po/fi.po | 444 +++++
trunk/po/fr.po | 434 +++++
trunk/po/it.po | 401 +++++
trunk/po/nb.po | 374 +++++
trunk/po/oc.po | 424 +++++
trunk/po/pl.po | 448 +++++
trunk/po/pt.po | 439 +++++
trunk/po/pt_BR.po | 313 ++++
trunk/po/ru.po | 379 +++++
trunk/po/sv.po | 439 +++++
trunk/src/Makefile.am | 88 +
trunk/src/flegita-action-selector.c | 220 +++
trunk/src/flegita-action-selector.h | 57 +
trunk/src/flegita-gimp-sink.c | 285 ++++
trunk/src/flegita-gimp-sink.h | 69 +
trunk/src/flegita-gimp.c | 191 +++
trunk/src/flegita-output-filename-widget.c | 184 +++
trunk/src/flegita-output-filename-widget.h | 48 +
trunk/src/flegita-pspec.c | 110 ++
trunk/src/flegita-pspec.h | 92 ++
trunk/src/flegita-sink.c | 501 ++++++
trunk/src/flegita-sink.h | 61 +
trunk/src/flegita-types.c | 54 +
trunk/src/flegita-types.c.tpl | 63 +
trunk/src/flegita-types.h | 40 +
trunk/src/flegita-types.h.tpl | 50 +
trunk/src/flegita.c | 124 ++
trunk/src/flegita.h | 40 +
trunk/todo.py | 40 +
trunk/tools/Makefile.am | 24 +
trunk/tools/gs-scrot.c | 728 +++++++++
188 files changed, 40413 insertions(+), 0 deletions(-)
diff --git a/trunk/AUTHORS b/trunk/AUTHORS
new file mode 100644
index 0000000..476f760
--- /dev/null
+++ b/trunk/AUTHORS
@@ -0,0 +1,3 @@
+bersace:Ã?tienne Bersac <bersace03 laposte net>
+Ross Burton <ross burtonini com>
+
diff --git a/trunk/COPYING b/trunk/COPYING
new file mode 120000
index 0000000..7153769
--- /dev/null
+++ b/trunk/COPYING
@@ -0,0 +1 @@
+/usr/share/automake-1.9/COPYING
\ No newline at end of file
diff --git a/trunk/ChangeLog b/trunk/ChangeLog
new file mode 100644
index 0000000..19abebc
--- /dev/null
+++ b/trunk/ChangeLog
@@ -0,0 +1,1717 @@
+2008-03-14 Ã?tienne Bersac <bersace thilivren>
+
+ * Include patch from Deji Akingunola to fix cursor. Close bug
+ #522054.
+
+=== 0.6 ===
+
+2008-03-09 Ã?tienne Bersac <bersace03 laposte net>
+
+ * configure.ac: Release 0.6.
+
+2008-03-08 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-param-specs.c: Fixed a typo :(
+
+2008-03-03 Ã?tienne Bersac <bersace03 laposte net>
+
+ * modules/gsane-meta-param.c: Swallow some redundant epson backend
+ option.
+
+ * lib/gnome-scan-param-specs.h: Use an untranslated option group
+ for preview and hidden. This avoid collision with existing group.
+
+2008-03-01 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/Makefile.am: Fix bug #106348: doesn't build with
+ LDFLAGS=-Wl,--as-needed. Patch from Marcin Banasiak.
+
+ * lib/gnome-scan-settings.c: (gss_gvalue_to_gconf_value): store
+ enum value as gconf_value_int.
+
+ * lib/gnome-scan-processor-common.c: Tweak stress option.
+
+2008-02-29 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-dialog.c: (gnome_scan_dialog_new),
+ (gnome_scan_dialog_run), (gsd_build_group_box),(gsd_build_preview_ui),
+ lib/gnome-scan-paper-size-widget.c (gspsw_update_label),
+ lib/gnome-scan-param-widget.c (gnome_scan_param_widget_constructor),
+ lib/gnome-scan-preview-plugin-area.c: (gsppa_send_area),
+ lib/gnome-scan-processor-common.c (gnome_scan_processor_common_init),
+ modules/gsane-meta-param.c (meta_param_paper_size_get_params),
+ modules/gsfile-scanner.c (gsfile_scanner_new),
+ src/flegita-sink.c (flegita_sink_init),
+ src/flegita.c (flegita_about): Fixed tons of translation
+ issues. Thanks to André Klapper. See bug #519627. Removed dead
+ code.
+
+2008-02-29 Ross Burton <ross burtonini com>
+ * autogen.sh:
+ Don't pass --install to gnome-common.
+
+2008-02-29 Ã?tienne Bersac <bersace03 laposte net>
+
+ * modules/gsfile-scanner.c: (gsfile_scanner_class_init),
+ (gsf_get_child_nodes), (gsf_start_frame), (gsf_work): Migrate to
+ GEGL 0.0.16
+
+ * lib/gnome-scanner.c: (gnome_scanner_get_output_format): Default output
+ format to "RGB u8" rather than NULL.
+
+ * lib/Makefile.am, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-job.c,
+ lib/gnome-scan-preview-plugin-area.c, lib/gnome-scan-private.h,
+ lib/gnome-scan-processor-common.c (gnome_scan_processor_common_init),
+ lib/gnome-scanner.c, modules/gsfile-filenames-widget.c: Use internal
+ translation domain, not app defined one.
+
+2008-02-28 Ã?tienne Bersac <bersace03 laposte net>
+
+ * modules/gsane-common.h: Override _() to use GETTEXT_PACKAGE
+ translation.
+
+ * modules/gsane-scanner.c: (gss_probe_options): Fixed a bug
+ introduced in last change, number of option wasn't read.
+
+ * modules/gsane-scanner.c: (gss_probe_options),
+ (gss_option_get_param_spec): Workaround epson backend "number
+ option is a boolean".
+
+ * AUTHORS, THANKS, src/flegita.c: (flegita_about): Added Ross as
+ contributor.
+
+ * src/flegita.c: (flegita_about), (main), configure.ac: Drop
+ libgnome dependency. Thanks to Ross Burton. (bug #519344).
+
+ * lib/gnome-scan-dialog.c: (gsd_build_sink_ui),
+ (gsd_build_scanner_ui), (gsd_build_processing_ui): Don't show
+ HIDDEN option group. Fix bug #519331.
+
+ * lib/gnome-scan-acquisition-dialog.c:
+ (gnome_scan_acquisition_dialog_set_property),
+ (gnome_scan_acquisition_dialog_get_property), (gsad_monitor): Auto
+ focus Next button on finished scan.
+
+2008-02-27 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-dialog.c: (gnome_scan_dialog_constructor),
+ (gsd_build_group_box): Migrate to new tooltip API.
+ * configure.ac: Depends on Gtk+ 2.12
+
+ * src/flegita.c (flegita_about): Translate application name.
+
+ * flegita.desktop.in (_Comment): Use plural
+
+=== 0.5.93 ===
+
+2008-02-27 Ã?tienne Bersac <bersace03 laposte net>
+
+ * configure.ac: Release 0.5.93, tighten dependecies
+ * NEWS: added details for 0.5.93
+
+ * src/flegita.c: (flegita_about), (main): Added about dialog.
+
+ * modules/gsane-meta-param.c: (meta_param_preview_get_params):
+ Hide preview param.
+
+ * lib/gnome-scan-dialog.c: (gsd_preview_end_refresh),
+ (gsd_preview_refresh), modules/gsane-meta-param.c: (mpps_set_roi),
+ (meta_param_paper_size_set_value), (meta_param_preview_init),
+ (meta_param_preview_finalize), (meta_param_preview_add_param),
+ (meta_param_preview_get_params), (meta_param_preview_set_value),
+ (meta_param_preview_get_value), modules/gsane-scanner.c: ,
+ (gss_init), (gss_probe_options), (gsane_scanner_get_meta_param): Added
+ preview meta param allowing to use sane backend capability, and removing
+ low level code in GnomeScanDialog.
+
+ * lib/gnome-scan-settings.c: (gnome_scan_settings_set_boolean):
+ Fixed using g_value_set_int() rather than
+ g_value_set_boolean (copy-paste typo)
+
+ * modules/gsane-meta-param.c: (meta_param_paper_size_get_params),
+ (gs_rectange_rotate), (mpps_set_roi),
+ (meta_param_paper_size_set_value),
+ (meta_param_paper_size_get_value): Fixed rotation.
+
+ * lib/gnome-scan-preview-plugin-area.c: (gsppa_send_area),
+ (gsppa_set_roi), lib/gnome-scan-utils.c: (gs_rectangle_convert),
+ (gs_rectangle_convert_to_mm), (gs_rectangle_convert_from_mm),
+ (gs_rectangle_rotate): Moved to GSRectangle and GSPoint with
+ gdouble value in order to have accurate paper-size handling.
+
+ * lib/gnome-scan-preview-plugin-rotation.c: (gsppr_button_clicked),
+ (gnome_scan_preview_plugin_rotation_changed): Fix rotation being
+ inversed !
+
+ * modules/gsane-scanner.c: (gsane_scanner_constructor),
+ (gsane_scanner_set_property), (gsane_scanner_class_init),
+ (gsane_scanner_new): Add a sane_type property to properly ignore
+ webcam. Fix build issue. (Thanks Philipp).
+
+2008-02-27 Ã?tienne Bersac <bersace03 laposte net>
+
+ * modules/gsane-backend.c (gsb_probe_scanners): Show ignored
+ scanner name in debug output.
+
+ * modules/gsane-scanner.c (gsane_scanner_constructor): Ignore
+ webcam device.
+
+2008-02-26 Ã?tienne Bersac <bersace03 laposte net>
+
+ * modules/gsane-meta-param.c: (meta_param_source_get_params): set
+ unit of source param to none. avoid pixel unit to appear in UI.
+
+ * lib/gnome-scan-job.c: (gnome_scan_job_dispose),
+ (gnome_scan_job_class_init), (gnome_scan_job_new): move from finalize to
+ dispose, fix unref of settings not belonging to job.
+
+ * src/flegita.c (main): let gnome_scan_job_new() create settings
+ object.
+
+ * NEWS, doc/ref/*, lib/*gnome-scan-acquisition-dialog.[hc]: rework
+ and complete reference manual.
+
+ * lib/gnome-scan-job.c (gnome_scan_job_new): allow to pass NULL
+ settings for auto creation.
+
+ * src/flegita.c: (main): Unref sink.
+
+ * lib/gnome-scan-acquisition-dialog.c, lib/gnome-scan-dialog.c:
+ fix leaking of acquisition dialog and job leading to no settings
+ autosave.
+
+ * lib/gnome-scan-processor-common.c:
+ (gnome_scan_processor_common_get_child_nodes): Fixed typo and tune color
+ enhancement.
+
+ * lib/gnome-scan-processor-common.c: Tune enhancement.
+
+ * lib/gnome-scan-job.c, src/flegita-sink.c: Fixed buffer leaks
+
+2008-02-26 Ã?tienne Bersac <bersace03 laposte net>
+
+ * modules/gsane-scanner.c (gss_option_get_value_by_index): Handle
+ gfloat.
+
+ * lib/gnome-scan-settings.c (gss_gconf_value_to_gvalue): Use
+ gdouble to store gconf float (No float in gnome-scan).
+
+2008-02-25 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-dialog.c (gnome_scan_dialog_constructor): Set
+ Processing tab content border width.
+
+2008-02-24 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-dialog.c: (gsd_load_backends), (gsd_probe_done):
+ Added watch cursor while probing.
+
+=== 0.5.92 ===
+
+2008-02-24 Ã?tienne Bersac <bersace03 laposte net>
+
+ * configure.ac: Version 0.5.92
+
+ * lib/*.c: fixed lots of missing ref/unref.
+
+ * lib/gnome-scan-settings.c: (gnome_scan_settings_constructor),
+ (gnome_scan_settings_finalize), (gnome_scan_settings_dispose):
+ Automatic per app settings saving in gconf.
+
+ * src/flegita-output-filename-widget.c:
+ (flegita_output_filename_widget_set),
+ (fofw_output_filename_changed): Implement set function.
+
+2008-02-21 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-processor-common.c:
+ (gnome_scan_processor_common_init): Mark param specs nick and blurb for
+ translation.
+
+ * lib/gnome-scan-boolean-widget.c:
+ (gnome_scan_boolean_widget_build): Handle i18n of label.
+
+ * configure.ac: Bump to 0.5.5
+
+ * lib/gnome-scan-boolean-widget.c:
+ (gnome_scan_boolean_widget_init): Don't show unit for boolean options.
+
+ * lib/gnome-scan-processor-common.c:
+ (gnome_scan_processor_common_init),
+ (gnome_scan_processor_common_configure),
+ (gnome_scan_processor_common_get_child_nodes): Added enhance option
+ * lib/gnome-scan-settings.c: (gnome_scan_settings_set_boolean),
+ (gnome_scan_settings_get_boolean): Added boolean facilities.
+
+ * lib/gnome-scan-preview-plugin-area.c: (gsppa_send_area): Update page
+ orientation from manual area.
+
+ * modules/gsane-meta-param.c: (meta_param_paper_size_get_params):
+ fix order of orientation, origin and paper-size
+ options. paper-size depends on origin and on orientation.
+
+ * lib/gnome-scan-dialog.c: Use 75. dpi as default preview res,
+ more close to what hardware is capable of. TODO: check the actual
+ resolution from the hardware.
+
+ * lib/gnome-scan-dialog.c: (gsd_build_preview_ui): Show
+ acquisition progress bar.
+
+=== 0.5.4 ===
+
+2008-01-15 Ã?tienne Bersac <bersace03 laposte net>
+
+ * NEWS, configure.ac: Release 0.5.4
+
+ * configure.ac: Depends on GEGL SVN
+ * lib/gnome-scan-dialog.c: (gnome_scan_dialog_constructor),
+ (gsd_build_processing_ui), (gsd_preview_scanner_selected),
+ (gsd_preview_monitor): Added processing UI.
+
+ * lib/gnome-scan-job.c: (gnome_scan_job_configure): Added common
+ processing plugin.
+
+ * lib/gnome-scan-preview-plugin-area.c:
+ (gnome_scan_preview_plugin_area_finalize),
+ (gnome_scan_preview_plugin_area_build_ui): Dropped useless macros
+
+ * lib/gnome-scan-preview-plugin.c (gnome_scan_preview_plugin_freeze),
+ (gnome_scan_preview_plugin_thaw), (gnome_scan_preview_plugin_changed):
+ Add calls to avoid infinite loops while changing a setting.
+
+ * lib/gnome-scan-processor-common.c:
+ (gnome_scan_processor_common_init),
+ (gnome_scan_processor_common_configure): Move degree option to
+ preview group.
+
+ * lib/gnome-scan-string-widget.c: (gssw_activate): Avoid a segfault.
+
+ * modules/gsane-scanner.c: (gss_data_color1), (gss_data_color),
+ (gss_data_color1_three_pass), (gss_data_color_three_pass),
+ (gss_data_gray1), (gss_data_gray), (gss_init): Migrate to latest
+ GEGL API.
+
+ * lib/gnome-scan-preview-plugin-rotation.[ch]: Added a preview
+ rotation plugin adding rotation button.
+
+2007-12-11 Ã?tienne Bersac <laposte.net>
+
+ * lib/gnome-scan-dialog.c, lib/gnome-scan-job.c,
+ lib/gnome-scan-job.h, lib/gnome-scan-processor-common.c,
+ lib/gnome-scan-processor-common.h, lib/Makefile.am: Added basic
+ processing and rotation support.
+
+ * configure.ac, src/flegita-gimp-sink.c: Fixed flegita-gimp
+ plugin. Bump dependencies to gegl 0.0.14.
+
+2007-11-04 Ã?tienne Bersac <laposte.net>
+
+ * src/flegita-sink.c:
+ Set minimal compression to 1, not 0.
+
+2007-09-25 Ã?tienne Bersac <laposte.net>
+
+ * ChangeLog, lib/gnome-scan-module-manager.c,
+ lib/gnome-scan-paper-size-widget.c,
+ lib/gnome-scan-preview-plugin-area.c,
+ lib/gnome-scan-preview-plugin-area.h, po/POTFILES.in: Added a
+ cursor flags in gnome-scan-preview-plugin-area allowing to
+ determine wether the user is allowed to resize/move/create
+ paper-size.
+
+ * ChangeLog, lib/gnome-scan-job.c, lib/gnome-scanner.c,
+ lib/gnome-scanner.h, modules/gsane-scanner.c: Added
+ gnome_scanner_get_output_format(). Use new Gegl convert-format
+ op in order to avoid "RGBA float" output.
+
+2007-09-24 Ã?tienne Bersac <laposte.net>
+
+ * ChangeLog, lib/gnome-scan-dialog.c: Set minimal scanner tree
+ view height to 128. Fix bug #454502.
+
+ * ChangeLog, src/flegita.c: Set application_name and prgname in
+ flegita.
+
+2007-09-23 Ã?tienne Bersac <laposte.net>
+
+ * ChangeLog, lib/gnome-scan-dialog.c, lib/gnome-scan-init.c,
+ lib/gnome-scan-job.c, lib/gnome-scan-module-manager.c,
+ lib/gnome-scan-paper-size-widget.c, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, lib/gnome-scan-preview-sink.c,
+ lib/gnome-scan-sink.h, modules/gsane-scanner.c,
+ modules/gsfile-scanner.c, src/flegita-action-selector.c,
+ src/flegita-gimp-sink.c, src/flegita.h, src/flegita-sink.c,
+ src/flegita-types.c: Now GnomeScanJob build a unique Gegl
+ pipeline from src and sink plugin. There is still a bug in Gegl
+ that prevent flegita-gimp to work with.
+
+2007-09-22 Ã?tienne Bersac <laposte.net>
+
+ * ChangeLog, src/flegita-output-filename-widget.c: Use
+ g_user_get_special_dir(G_USER_DIRECTORY_PICTURES),
+ i.e. XDG_PICTURES_DIR) instead of g_user_get_home_dir().
+
+2007-09-21 Ã?tienne Bersac <laposte.net>
+
+ * ChangeLog,
+ lib/gnome-scan-page-orientation-widget.c,
+ modules/gsane-meta-param.c,
+ modules/gsane-meta-param.h:
+ Implemented PageOrientation handling.
+
+ * ChangeLog,
+ lib/gnome-scan-acquisition-dialog.c,
+ src/flegita-sink.c:
+ Implemented "Forward" action.
+
+ FlegitaSink does not override files anymore (in a smarter way
+ than in 0.4).
+
+ * ChangeLog, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h,
+ lib/gnome-scan-preview-plugin-area.c,
+ lib/gnome-scan-preview-plugin-area.h,
+ lib/gnome-scan-preview-plugin.c,
+ lib/gnome-scan-preview-plugin.h, po/POTFILES.in:
+
+ Implemented area moving and resizing.
+
+ Clipped drawing in order to improve preview area
+ performances (needs feedback).
+
+ Code refactoring and clean up. The preview is now much more
+ better that in 0.4 :)
+
+2007-09-15 13:18 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-preview-plugin.c,
+ lib/gnome-scan-preview-plugin.h,
+ lib/gnome-scan-preview-plugins.c,
+ lib/gnome-scan-preview-plugins.h, modules/gsane-meta-param.c:
+ Split gnome-scan-preview-plugins in gnome-scan-preview-plugin and
+ gnome-scan-preview-plugin-area.
+
+ * ChangeLog, Makefile.am, NEWS, configure.ac: Bump version to
+ 0.5.3.
+ Makes Makefile.am less verbose about devel stuff (ChangeLog and
+ TODO generation).
+
+2007-09-13 12:03 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-paper-size-widget.c,
+ lib/gnome-scan-preview-area.c, lib/gnome-scan-preview-plugins.c,
+ src/flegita-action-selector.c: Fixed bug in preview area plugin,
+ the manual area was not set from user.
+
+2007-09-09 14:57 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-area-widget.c,
+ lib/gnome-scan-area-widget.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-page-orientation-widget.c,
+ lib/gnome-scan-paper-size-widget.c, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h, lib/gnome-scan-preview-plugins.c,
+ lib/gnome-scan-preview-plugins.h, lib/gnome-scan-settings.c,
+ lib/gnome-scan-settings.h, lib/gnome-scan-types.c,
+ lib/gnome-scan-utils.h, modules/gsane-meta-param.c,
+ modules/gsane-meta-param.h, modules/gsane-scanner.c,
+ modules/gsane-scanner.h: Moved from Area to PaperSize+Origin to
+ handle scan roi.
+
+=== 0.5.2 ===
+
+2007-09-06 12:56 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-paper-size-widget.c, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, modules/gsane-meta-param.c,
+ src/flegita-sink.c: Migrate from paper name to true paper size
+ handling.
+
+2007-09-04 14:41 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-acquisition-dialog.c: Use "scanner"
+ icon instead of "input-scanner".
+
+2007-08-29 15:05 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, modules/gsane-meta-param.c: Ignore "paper-size"
+ backend option too in GSane.
+ Warn about ignored options in GSane MetaParamArea.
+
+ * data/input-scanner-flatbed.svg, data/input-scanner-handheld.svg,
+ data/input-scanner-multi-function.svg,
+ data/input-scanner-sheetfed.svg, data/scanner-flatbed.svg,
+ data/scanner-handheld.svg, data/scanner-multi-function.svg,
+ data/scanner-sheetfed.svg: Renamed additionnal scanner icon
+ following icon naming spec.
+
+ * ChangeLog, data/Makefile.am, data/input-scanner.png,
+ data/input-scanner.svg, modules/gsane-scanner.c: Use
+ gnome-icon-theme "scanner" instead of own "input-scanner".
+
+2007-08-28 13:35 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-job.c: Fixed typo, see bug #454412.
+
+ * ChangeLog, modules/gsane-meta-param.c, po/gnome-scan.pot: Updated
+ translation comment.
+
+ * ChangeLog, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-dialog.c, modules/gsane-meta-param.c,
+ po/gnome-scan.pot: Updated translated string.
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-job.c,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-widget.h,
+ lib/gnome-scan-plugin.c, lib/gnome-scan-plugin.h,
+ lib/gnome-scan-settings.c, lib/gnome-scan-settings.h,
+ po/POTFILES.in, src/Makefile.am, src/flegita-action-selector.c,
+ src/flegita-sink.c, src/flegita.c: Implemented printing (still
+ buggy).
+
+ * configure.ac, data/Makefile.am, lib/gnome-scan-init.c: Don't
+ install private icon in shared directory. Fix some memleaks.
+
+2007-08-09 13:40 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, src/Makefile.am, src/flegita-action-selector.c,
+ src/flegita-action-selector.h,
+ src/flegita-output-filename-widget.c, src/flegita-pspec.c,
+ src/flegita-pspec.h, src/flegita-sink.c, src/flegita-types.c,
+ src/flegita-types.c.tpl, src/flegita-types.h,
+ src/flegita-types.h.tpl, src/flegita.c, src/flegita.h: Added
+ preliminary print infrastructure.
+
+ * ChangeLog, lib/gnome-scan-dialog.c, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-plugin.h, lib/gnome-scan-settings.c,
+ lib/gnome-scan-settings.h: Beautify code (thanks GNU Emacs).
+ Added gnome_scan_settings_{set,get}_{int,enum}.
+ Update dynamically sink UI too.
+
+2007-08-07 19:27 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, data/Makefile.am, data/flegita-gimp.svg,
+ data/scan-as-layer.svg, src/Makefile.am, src/flegita-gimp-sink.c,
+ src/flegita-gimp-sink.h, src/flegita-gimp.c, src/flegita-sink.c,
+ src/flegita.c: Flegita-Gimp is back !
+
+ * ChangeLog, lib/gnome-scan-settings.c, lib/gnome-scan-settings.h:
+ Added gnome_scan_settings_set_tranform() and
+ gnome_scan_settings_get_transformed().
+ Added gnome_scan_settings_{get,set}_{double,string}() based on
+ above functions.
+
+2007-08-05 17:50 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, configure.ac, lib/gnome-scan-preview-plugins.c:
+ Another try to optimize preview area roi drawing. Push gdk
+ depedency to 2.11.
+
+ * ChangeLog, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-plugins.c: Draw during expose.
+
+ * ChangeLog, Makefile.am, configure.ac, lib/Makefile.am,
+ lib/gnome-scan-init.c, modules, modules/Makefile.am, plugins,
+ po/POTFILES.in: Renamed plugin to module.
+
+2007-08-03 18:36 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, configure.ac, gnome-scan.pc.in, lib/Makefile.am,
+ plugins/Makefile.am, src/Makefile.am: Use
+ SONAME set to gnomescan1 for library. Fix use of libgnomescan in
+ external software.
+
+2007-06-29 15:14 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-preview-plugins.c: Implemented Select
+ All preview button.
+
+2007-06-28 21:19 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-preview-plugins.c: Use GtkStyle
+ thickness whend drawing selections dashes.
+
+ * ChangeLog, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h, lib/gnome-scan-preview-plugins.c,
+ lib/gnome-scan-preview-plugins.h: Implemented area selection.
+ (needs optimizations).
+
+2007-06-17 18:24 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-preview-plugins.c,
+ lib/gnome-scan-preview-plugins.h: Properly disconnect signal
+ handlers.
+
+2007-06-16 17:35 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-plugins.c: Set preview area sensitive once
+ pixbuf has been sent.
+ Draw dashes over background.
+
+ * ChangeLog, plugins/gsane-meta-param.c: Fix bug, br-y was used
+ instead of br-x when defining default area.
+
+ * ChangeLog, lib/gnome-scan-preview-plugins.c: Request preview
+ redraw if area is changed.
+ Fade out unselected area.
+
+ * ChangeLog, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h: Added
+ gnome_scan_preview_area_get_resolution() and
+ gnome_scan_preview_area_update().
+
+ * ChangeLog, lib/gnome-scan-settings.c: Return a copy of the GValue
+ in gnome_scan_settings_get().
+
+ * ChangeLog, plugins/gsane-meta-param.c,
+ plugins/gsane-meta-param.h, plugins/gsane-scanner.c: Set back
+ area according to paper-size.
+
+ * ChangeLog, lib/gnome-scan-utils.c, lib/gnome-scan-utils.h: Added
+ GdkRectangle unit conversion functions.
+
+ * ChangeLog, lib/gnome-scan-preview-plugins.c, po/POTFILES.in:
+ Basic area drawing in preview.
+
+ * ChangeLog, plugins/gsane-meta-param.c: Fixed use paper width
+ instead of paper height bug.
+
+ * ChangeLog, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h: Added cairo context as signal
+ callback parameter.
+
+ * ChangeLog, lib/gnome-scan-settings.c, lib/gnome-scan-settings.h:
+ Added gnome_scan_settings_init_value().
+
+=== 0.5.1 ===
+
+2007-06-16 14:24 Ã?tienne Bersac <bersace03 laposte net>
+
+ * data/Makefile.am, data/input-scanner.png: Added 24px scanner
+ image (thanks Tengo ArtLibreSet)
+
+2007-06-14 12:19 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, TODO, TODO.tasks, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-preview-plugins.c,
+ lib/gnome-scan-preview-plugins.h: Implemented basic
+ PreviewPlugin.
+ Updated TODO.
+
+ * plugins/gsane-module.c: Check for SANE version.
+
+ * plugins/gsane-meta-param.c, plugins/gsane-module.c: Fixed build
+ bug.
+ Output SANE version.
+
+ * plugins/gsane-meta-param.c, plugins/gsane-meta-param.h,
+ plugins/gsane-scanner.c: Swallow doc-source as source.
+ Create "Hidden" group for "preview" option and more â?¦ (batch-scan
+ ?)
+ Comment MetaParams.
+
+2007-06-13 11:17 Ã?tienne Bersac <bersace03 laposte net>
+
+ * configure.ac: Bumped gegl deps to 0.0.13.
+
+2007-06-12 14:16 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, NEWS, configure.ac: Pushed 0.5.1 release.
+
+ * lib/Makefile.am, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h, lib/gnome-scan-preview-plugins.c,
+ lib/gnome-scan-preview-plugins.h: Added preliminary
+ GnomeScanPreviewPlugin allowing to add features to
+ GnomeScanPreviewArea.
+
+2007-06-03 20:28 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-preview-sink.c, src/flegita-sink.c:
+ Move operation "buffer" to "save-buffer" according to Gegl SVN.
+
+ * lib/gnome-scan-preview-area.c, lib/gnome-scan-preview-area.h:
+ Dropped AREA param. Will be more modularized.
+
+2007-06-02 19:41 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, TODO.tasks, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-job.c, plugins/gsane-meta-param.c,
+ plugins/gsane-scanner.c: Fixed can't preview after changed
+ device bug.
+
+ * ChangeLog, TODO.tasks, lib/Makefile.am,
+ lib/gnome-scan-acquisition-dialog.c, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-job.c, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h, lib/gnome-scan-preview-sink.c,
+ lib/gnome-scan-preview-sink.h, lib/gnome-scan-settings.c,
+ lib/gnome-scan-types.c, lib/gnome-scan-utils.c,
+ lib/gnome-scan-utils.h, plugins/gsane-meta-param.c, po/en_GB.po,
+ po/es.po, po/fr.po, po/gnome-scan.pot, po/sv.po: Added
+ \"Configuring\" and \"Waiting for device\" stages to
+ GnomeScanJob.
+ Added gnome-scan-utils.
+ Implemented preview. Added GnomeScanPreviewSink.
+ Updated pot.
+
+ * plugins/gsane-meta-param.c: Fixed wrong rect value bug.
+
+ * lib/gnome-scan-acquisition-dialog.c, lib/gnome-scan-job.c,
+ lib/gnome-scan-job.h: Splitted gnome_scan_job_run() allowing to
+ run only one frame acquisition.
+ Reworked GnomeScanAcquisitionDialog according to above change.
+
+ * plugins/gsane-meta-param.c: Keep unit for MetaParam "area".
+
+ * lib/Makefile.am, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-types.c,
+ lib/gnome-scan-types.h, plugins/gsane-meta-param.c,
+ plugins/gsane-scanner.c, plugins/gsfile-scanner.c,
+ src/flegita-sink.c: Added gnome-scan-utils.[hc].
+ Moved GnomeScanFormat and GnomeScanUnit to gnome-scan-utils.
+
+2007-06-01 15:17 Ã?tienne Bersac <bersace03 laposte net>
+
+ * TODO.tasks, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-preview-area.c, lib/gnome-scan-preview-area.h: Use
+ constructor instead of init for UI building.
+ Preliminary preview handling in GnomeScanDialog.
+
+ * data/Makefile.am, data/scan-preview.svg: Added scan-preview
+ action icon.
+
+ * AUTHORS, ChangeLog, Makefile.am: Use author realname in
+ ChangeLog.
+
+ * ChangeLog, lib/gnome-scan-dialog.c, lib/gnome-scan-init.c,
+ lib/gnome-scan-init.h, lib/gnome-scan-module-manager.c,
+ lib/gnome-scan-module-manager.h, lib/gnome-scan-module.c,
+ lib/gnome-scan-module.h, lib/gnome-scanner.c,
+ plugins/gsane-backend.c, plugins/gsane-module.c,
+ plugins/gsane-scanner.c, plugins/gsfile-backend.c,
+ plugins/gsfile-module.c, src/flegita.c: Added gnome_scan_exit().
+ Fixed denitialization.
+
+ * lib/gnome-scan-dialog.c: Added Tooltips.
+
+2007-05-31 12:59 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, TODO.tasks, lib/Makefile.am,
+ lib/gnome-scan-area-widget.c, lib/gnome-scan-boolean-widget.c,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-enum-widget.c,
+ lib/gnome-scan-number-widget.c,
+ lib/gnome-scan-page-orientation-widget.c,
+ lib/gnome-scan-page-orientation-widget.h,
+ lib/gnome-scan-paper-size-widget.c,
+ lib/gnome-scan-paper-size-widget.h, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-param-widget.h, lib/gnome-scan-range-widget.c,
+ lib/gnome-scan-string-widget.c, plugins/gsane-meta-param.c,
+ plugins/gsane-meta-param.h, plugins/gsane-scanner.c,
+ plugins/gsfile-filenames-widget.c,
+ src/flegita-output-filename-widget.c: Added PaperSize support.
+ Added preliminary orientation support.
+ Cleaned ParamWidget API.
+ Added Format front option group. Pack front option groups
+ horizontally.
+ Set default dialog height to 420.
+
+2007-05-30 13:14 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-acquisition-dialog.c, plugins/gsane-scanner.c: Fix
+ acquisition always multiple bug.
+ Added icon in GnomeScanAcquisitionDialog.
+
+ * plugins/gsane-meta-param.c, plugins/gsane-scanner.c,
+ plugins/gsane-scanner.h: Implemented mass acquisition in GSane.
+
+ * ChangeLog, NEWS, lib/gnome-scan-plugin.h,
+ plugins/gsane-meta-param.c, plugins/gsane-meta-param.h,
+ plugins/gsane-scanner.c: Updated NEWS.
+ Implemented MetaParamSource set_value.
+
+2007-05-25 23:09 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-dialog.c: Pack advanced options in a
+ scrolled window only if scanner expose more than 12 options.
+ Updated TODO.
+
+ * ChangeLog, lib/gnome-scan-dialog.c: Align option's label to left
+ instead of right (follow HIG).
+
+ * ChangeLog, Makefile.am, NEWS, configure.ac,
+ plugins/gsane-meta-param.c: Fix typo in translatable string.
+ Added --enable-tests and --enable-tools ./configure option to
+ build tests and tools directory (disabled by default).
+ Filled NEWS in expectation of 0.5.1 release.
+
+ * ChangeLog, lib/gnome-scan-dialog.c, po/POTFILES.in: Removed
+ scrolled window for sink options tab.
+
+ * ChangeLog, Makefile.am, configure.ac, data, data/Makefile.am,
+ data/flegita.svg, data/input-scanner-flatbed.svg,
+ data/input-scanner-handheld.svg,
+ data/input-scanner-multi-function.svg,
+ data/input-scanner-sheetfed.svg, data/input-scanner.svg,
+ data/scan.svg, lib/Makefile.am, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-init.c, lib/gnome-scan-init.h,
+ lib/gnome-scan-module-manager.c, plugins/gsane-scanner.c,
+ src/flegita.c: Added icons.
+
+ * lib/gnome-scan-dialog.c: Fixed wrong border with in advanced tab.
+ Added border width in preview tab.
+
+ * lib/gnome-scan-dialog.c: Fix empty "Advanced" tab shown bug.
+ Use 12 pixel border with for GnomeScanDialog notebook pages
+ instead of 6 (more consistent with GtkPrintUnixDialog).
+
+ * ChangeLog, lib/gnome-scan-dialog.c, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, lib/gnome-scan-types.c,
+ lib/gnome-scan-types.h, plugins/gsane-common.c,
+ plugins/gsane-common.h, plugins/gsane-meta-param.c,
+ plugins/gsane-meta-param.h, plugins/gsane-scanner.c,
+ plugins/gsane-scanner.h, plugins/gsfile-pspec.c,
+ plugins/gsfile-pspec.h, plugins/gsfile-scanner.c,
+ src/flegita-pspec.c, src/flegita-pspec.h, src/flegita-sink.c: Use
+ GParamFlags instead of overwriting it with GnomeScanParamFlags in
+ GParamSpecs.
+ Refined MetaParam API.
+ Allow to handle per param ParamWidget instead of per plugin.
+ Refined all Param show/hide mecanism in GnomeScanDialog.
+
+ * ChangeLog, plugins/gsane-meta-param.c, src/flegita-sink.c: Allow
+ 0 png compression level in flegita sink.
+ Fix bug if device has no source.
+
+ * ChangeLog, lib/gnome-scan-dialog.c, lib/gnome-scan-job.c,
+ lib/gnome-scan-plugin.c, plugins/gsane-meta-param.c,
+ plugins/gsane-meta-param.h, plugins/gsane-scanner.c,
+ plugins/gsane-scanner.h, plugins/gsfile-scanner.c,
+ src/flegita-sink.c: Call gnome_scan_plugin_end_frame() in order
+ to free resources.
+ Added PNG compression level option (needs Gegl SVN r1490).
+ Added advanced sink option tab "Output".
+ Renamed GnomeScanScannerSane to GSaneScanner.
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-backend.c, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-enum-widget.c, lib/gnome-scan-job.c,
+ lib/gnome-scan-module-manager.c, lib/gnome-scan-number-widget.c,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-range-widget.c, lib/gnome-scanner.c,
+ plugins/Makefile.am, plugins/gnome-scan-backend-file.c,
+ plugins/gnome-scan-backend-file.h,
+ plugins/gnome-scan-backend-sane.c,
+ plugins/gnome-scan-backend-sane.h,
+ plugins/gnome-scan-filenames-widget.c,
+ plugins/gnome-scan-filenames-widget.h,
+ plugins/gnome-scan-files-pspec.c,
+ plugins/gnome-scan-files-pspec.h,
+ plugins/gnome-scan-module-file.c,
+ plugins/gnome-scan-module-file.h,
+ plugins/gnome-scan-module-sane.c, plugins/gnome-scanner-file.c,
+ plugins/gnome-scanner-file.h, plugins/gnome-scanner-sane.c,
+ plugins/gnome-scanner-sane.h, plugins/gsane-backend.c,
+ plugins/gsane-backend.h, plugins/gsane-common.c,
+ plugins/gsane-common.h, plugins/gsane-meta-param.c,
+ plugins/gsane-meta-param.h, plugins/gsane-module.c,
+ plugins/gsane-scanner.c, plugins/gsane-scanner.h,
+ plugins/gsfile-backend.c, plugins/gsfile-backend.h,
+ plugins/gsfile-filenames-widget.c,
+ plugins/gsfile-filenames-widget.h, plugins/gsfile-module.c,
+ plugins/gsfile-module.h, plugins/gsfile-pspec.c,
+ plugins/gsfile-pspec.h, plugins/gsfile-scanner.c,
+ plugins/gsfile-scanner.h, plugins/meta-param.c,
+ plugins/meta-param.h, po/POTFILES.in, src/Makefile.am,
+ src/flegita-output-filename-widget.c, src/flegita-sink.c: Rework
+ plugins to use own prefix and proper naming.
+ Added source MetaParam (incomplete).
+ Fixed a bug in option group display.
+ Added -Wall -g AM_CFLAGS.
+ Fixed tons of warnings â?¦
+
+2007-05-21 20:46 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, TODO.tasks, lib/Makefile.am,
+ lib/gnome-scan-acquisition-dialog.c, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-filenames-widget.c,
+ lib/gnome-scan-filenames-widget.h, lib/gnome-scan-job.c,
+ lib/gnome-scan-job.h, lib/gnome-scan-output-filename-widget.c,
+ lib/gnome-scan-output-filename-widget.h,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ plugins/Makefile.am, plugins/gnome-scan-filenames-widget.c,
+ plugins/gnome-scan-filenames-widget.h,
+ plugins/gnome-scan-files-pspec.c,
+ plugins/gnome-scan-files-pspec.h,
+ plugins/gnome-scan-module-file.c, plugins/gnome-scan-sink-file.c,
+ plugins/gnome-scan-sink-file.h, plugins/gnome-scanner-sane.c,
+ po/POTFILES.in, src/Makefile.am,
+ src/flegita-output-filename-widget.c,
+ src/flegita-output-filename-widget.h, src/flegita-pspec.c,
+ src/flegita-pspec.h, src/flegita-sink.c, src/flegita-sink.h,
+ src/flegita.c: Do not hardcode prefix in GS_DEFINE_QUARK and
+ GS_DEFINE_PARAM.
+ Moved GnomeScanOutputFilenameWidget and GSParamSpecOutputFilename
+ to FlegitaOutputFilenameWidget and
+ FlegitaParamSpecOutputFilename.
+ Moved GnomeScanFilenamesWidget and GSParamSpecFilenames to file
+ backend.
+ Don't show any text in GnomeScanAcquisitiondialog progress bar.
+
+ * ChangeLog, TODO.tasks, plugins/Makefile.am,
+ plugins/gnome-scanner-sane.c, plugins/gnome-scanner-sane.h,
+ plugins/meta-param.c, plugins/meta-param.h, po/POTFILES.in:
+ Refactor MetaParam as GTypeFundamental.
+ Allow a MetaParam to produce multiple Params.
+
+ * plugins/gnome-scanner-sane.c: Fix segfault in 1bit gray.
+
+ * plugins/gnome-scanner-sane.c: Implemented 8/16bit Gray.
+ Use native Babl grayscale instead of converting to RGB.
+
+ * ChangeLog, plugins/gnome-scanner-sane.c: Implemented 1bit Gray
+ (Black&White).
+
+ * ChangeLog, plugins/gnome-scanner-sane.c: Implemented three pass
+ 1bit RGB acquisition.
+
+2007-05-20 20:35 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, plugins/gnome-scanner-sane.c: Refactor acquisition
+ code.
+ Implemented three pass RGB 8/16 acquisition.
+
+ * plugins/gnome-scanner-sane.c: Implemented (useless) 1 bit per
+ sample RGB acquisition.
+
+ * ChangeLog, plugins/gnome-scanner-sane.c: Implemented 8bit RGB
+ one-pass acquisition in GSane.
+
+ * ChangeLog, TODO.tasks, lib/gnome-scan-area-widget.c,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-settings.c, plugins/gnome-scanner-sane.c:
+ Implemented dynamic tab show/hide.
+ Readded populated preview tab.
+
+ * lib/gnome-scan-dialog.c, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-param-widget.h, lib/gnome-scan-plugin.h,
+ lib/gnome-scan-settings.c, lib/gnome-scan-settings.h,
+ plugins/gnome-scanner-sane.c: Handle area MetaParam disabling.
+ Make GnomeScanParamWidget more independant to GnomeScanDialog.
+
+2007-05-19 21:48 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, TODO.tasks, lib/Makefile.am,
+ lib/gnome-scan-area-widget.c, lib/gnome-scan-area-widget.h,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-param-widget.h,
+ plugins/Makefile.am, plugins/gnome-scanner-sane.c,
+ po/POTFILES.in: Implemented MetaParam system in GSane.
+ Added "area" MetaParam.
+ Added GSParamSpecArea and preliminary GnomeScanAreaWidget.
+
+ * ChangeLog, TODO.tasks, lib/Makefile.am,
+ lib/gnome-scan-boolean-widget.c, lib/gnome-scan-boolean-widget.h,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-enum-widget.c,
+ lib/gnome-scan-enum-widget.h, lib/gnome-scan-filenames-widget.c,
+ lib/gnome-scan-filenames-widget.h,
+ lib/gnome-scan-number-widget.c, lib/gnome-scan-number-widget.h,
+ lib/gnome-scan-output-filename-widget.c,
+ lib/gnome-scan-output-filename-widget.h,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-param-widget.h,
+ lib/gnome-scan-range-widget.c, lib/gnome-scan-range-widget.h,
+ lib/gnome-scan-string-widget.c, lib/gnome-scan-string-widget.h,
+ plugins/gnome-scanner-sane.c, po/POTFILES.in, tools/gs-scrot.c:
+ Modularize GnomeScanParamWidget.
+
+ * ChangeLog, configure.ac, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-widget.c, plugins/gnome-scanner-sane.c,
+ src/flegita.c: Added --disable-debug ./configure option.
+ Don't wait before setting device to ready state.
+
+ * ChangeLog, TODO.tasks, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ plugins/gnome-scanner-sane.c: Implemented param index. Sort param
+ per index instead of string. This help keeping options groups
+ consistency.
+
+ * ChangeLog, TODO.tasks, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-job.c: Udpated TODO.
+ Clean code.
+ Add 6px border to option group. Suggestions welcome.
+
+2007-05-18 20:50 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, plugins/gnome-scanner-sane.c: Updated GnomeScannerSane
+ to new GnomeScanPlugin API.
+
+ * lib/gnome-scan-dialog.c: Don't show front options in Advanced.
+
+ * ChangeLog, lib/gnome-scan-init.c, lib/gnome-scan-job.c,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, plugins/gnome-scan-sink-file.c,
+ plugins/gnome-scanner-file.c, po/POTFILES.in, tests/Makefile.am:
+ Migrated from GdkPixbuf to GeglBuffer. Needs a fix in Gegl
+ \"save-buffer\" operation (see
+ https://lists.xcf.berkeley.edu/lists/gegl-developer/2007-May/000730.html
+ ).
+ Implemented mass acquisition framework and in file backend.
+
+ * TODO.tasks, lib/gnome-scan-dialog.c,
+ plugins/gnome-scanner-sane.c: Moved common option to front option
+ group.
+
+2007-05-17 20:06 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, TODO.tasks, lib/Makefile.am, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-types.c, lib/gnome-scan-types.h,
+ lib/gnome-scan-types.h.tpl, lib/gnome-scanner.c,
+ lib/gnome-scanner.h, plugins/gnome-scanner-file.c,
+ plugins/gnome-scanner-sane.c: Implemented scanner status.
+ Renamed enums to always use GnomeScan prefix (not GS).
+ Wait for scanner to be ready before building scanner UI.
+
+ * lib/gnome-scan-dialog.c: Fix disabled widgets shown if not all
+ group is disabled bug.
+ Improve handling of empty groups.
+
+ * ChangeLog, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-settings.c,
+ plugins/gnome-scanner-sane.c: Implemented GParamSpecInt and
+ GParamSpecDouble GnomeParamSpecWidget.
+ Set only changed value in GSane, avoid useless option reloading.
+ Update settings on inexacts values.
+ Update param widgets (show/hide/set exact value) instead of
+ destroy/recreate option widget.
+ Hide disabled params instead of unsensitive them or not build
+ them.
+ Actually set GSParamRange value from GnomeScanParamWidget.
+
+ * ChangeLog, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-types.c, lib/gnome-scan-types.c.tpl,
+ lib/gnome-scan-types.h, lib/gnome-scan-types.h.tpl,
+ plugins/gnome-scan-sink-file.c, plugins/gnome-scanner-file.c,
+ plugins/gnome-scanner-sane.c: Implemented param unit.
+
+ * lib/gnome-scan-param-specs.c, po/en_GB.po, po/es.po, po/fr.po,
+ po/gnome-scan.pot, po/sv.po: Use N_() instead of _() when
+ generating GQuarks.
+ Updated pot.
+
+ * ChangeLog, lib/gnome-scan-dialog.c, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ plugins/gnome-scan-sink-file.c, plugins/gnome-scanner-file.c,
+ plugins/gnome-scanner-sane.c: Improve i18n handling. Now params
+ nick, blurb and values are translated at runtime using the
+ specified domain setted with gs_param_spec_set_domain().
+
+2007-05-16 22:47 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, configure.ac, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ plugins/gnome-scanner-sane.c, src/flegita.c: Enable i18n for
+ flegita (using gnome-scan domain) and GSane (using sane-backends
+ domain).
+ Implemented gs_param_values_cmp() and true value comparison for
+ enum.
+
+ * TODO.tasks, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-types.c,
+ plugins/gnome-scanner-sane.c: Implemented flags option support.
+ Updated TODO.
+ Now unsensitive disabled options.
+ Drop hard selected options.
+ Fix some GLib warnings.
+
+ * ChangeLog, lib/gnome-scan-param-widget.c: Fix
+ GtkFileChooserButton not shown in GnomeScanParamWidget.
+
+ * ChangeLog, Makefile.am, flegita.desktop.in: Added flegita
+ desktop.
+
+ * ChangeLog, lib/gnome-scan-param-widget.c: * refactor
+ GnomeScanParamWidget.
+
+2007-05-14 10:34 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-param-widget.c: Fix bug in Range GtkAdjustment
+ value. Thanks Philipp Sadleder !
+
+2007-05-11 15:57 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-param-widget.c: Implemented String option ui.
+
+ * ChangeLog, TODO.tasks, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-widget.c, plugins/gnome-scanner-sane.c:
+ Boolean option widget implementation.
+ More code in Range handling, but fighting with a f* bug. I give
+ up for this week.
+
+ * TODO.tasks, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-settings.c,
+ plugins/gnome-scanner-sane.c: Fixed memory handling bug in
+ GSParamSpecRange.
+ Implemented GSParamSpecRange default value.
+ Preliminary Range widget implementation.
+ Use g_strdup_value_contents() where possible.
+
+ * ChangeLog, TODO.tasks, doc/ref/gallery.xml,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-plugin.c, lib/gnome-scan-plugin.h,
+ lib/gnome-scan-settings.c, lib/gnome-scan-settings.h,
+ lib/gnome-scanner.c, lib/gnome-scanner.h,
+ plugins/gnome-scanner-sane.c, tools/gs-scrot.c: Implemented
+ device option setting.
+ Implemented dynamic device option reloading.
+ Sort options in options box.
+
+ * TODO.tasks, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-widget.c, plugins/gnome-scanner-sane.c:
+ Ignore inactive options.
+ Beautify debug output.
+ Implement GParamDouble, GParamString and GParamBoolean.
+ Implement boolean, double and string values getting in SANE
+ backend.
+ Fix last option group not shown bug.
+
+2007-05-10 21:05 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-dialog.c, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-param-widget.h, plugins/gnome-scanner-sane.c:
+ Implemented default sane option value.
+
+ * lib/gnome-scan-param-widget.c: Base Enum option widget.
+
+ * lib/gnome-scan-dialog.c, lib/gnome-scan-param-widget.c: Fix
+ advanced window not drawn bug.
+
+ * lib/gnome-scan-dialog.c: Fix bug in multiple construction of
+ option group.
+
+ * lib/gnome-scan-dialog.c: Show advanced options.
+
+ * plugins/gnome-scanner-sane.c: Implemented
+ gss_option_get_param_spec().
+
+ * lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h: Added
+ GSParamSpecEnum and GSParamSpecRange.
+ Added spec group functions : gs_param_spec_set_group(),
+ gs_param_spec_set_group_from_string(),
+ gs_param_spec_get_group_string().
+
+2007-05-09 19:29 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ plugins/gnome-scanner-sane.c: Added threaded scanner option
+ detection.
+
+ * plugins/gnome-scan-backend-sane.c, plugins/gnome-scanner-sane.c:
+ Open SANE Device. If device can't be opened, don't add it.
+
+ * plugins/gnome-scan-backend-sane.c, plugins/gnome-scanner-sane.c:
+ Added sane-id properties to GnomeScannerSane.
+ Declared configure and work method to GnomeScannerSane (avoid
+ segfault on acquisition).
+
+2007-05-08 11:19 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, configure.ac, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-init.c,
+ lib/gnome-scan-module-manager.c, lib/gnome-scan-param-widget.c,
+ plugins/gnome-scan-backend-sane.c,
+ plugins/gnome-scan-backend-sane.h,
+ plugins/gnome-scan-module-sane.c, plugins/gnome-scanner-sane.c,
+ plugins/gnome-scanner-sane.h, src/Makefile.am, tests/Makefile.am,
+ tests/sane-probe.c: Use static for internal symbols.
+ Don\'t check for gimp dependency while we do not ship gimp
+ plugin.
+ Added SANE backend (only probe works).
+
+2007-05-07 15:31 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, Makefile.am, configure.ac,
+ lib/gnome-scan-module-manager.c, tests, tests/Makefile.am,
+ tests/sane-probe.c: Added tests program.
+
+ * ChangeLog, lib/gnome-scan-types.c, lib/gnome-scan-types.h,
+ plugins/Makefile.am, plugins/gnome-scan-module-file.c,
+ plugins/gnome-scan-module-file.h, plugins/gnome-scan-sink-file.c,
+ plugins/gnome-scan-sink-file.h, plugins/gnome-scanner-file.c,
+ plugins/gnome-scanner-file.h: Renamed sane plugin to libgsane in
+ order to avoid confusion with real SANE so.
+
+2007-04-02 14:43 Ã?tienne Bersac <bersace03 laposte net>
+
+ * tools/gs-scrot.c: Added tooltips.
+
+ * tools/Makefile.am, tools/gs-scrot.c, tools/scrot.c: Renamed scrot
+ to gs-scrot.
+
+ * tools/scrot.glade: Delete obsolete glade file.
+
+2007-03-31 22:10 Ã?tienne Bersac <bersace03 laposte net>
+
+ * doc/ref/images/GSParamSpecFilenames.png,
+ doc/ref/images/GSParamSpecOutputFilename.png,
+ doc/ref/images/GnomeScanAcquisitionDialog.png,
+ doc/ref/images/GnomeScanDialog.png,
+ lib/gnome-scan-param-widget.c: Use 4 pixel spacing between
+ filenames buttons.
+ Updated screenshots.
+
+ * doc/ref/images/GSParamSpecFilenames.png,
+ doc/ref/images/GSParamSpecOutputFilename.png,
+ doc/ref/images/GnomeScanAcquisitionDialog.png,
+ doc/ref/images/GnomeScanDialog.png,
+ lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-acquisition-dialog.h, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-dialog.h, lib/gnome-scan-init.c,
+ lib/gnome-scan-init.h, lib/gnome-scan-module-manager.c,
+ lib/gnome-scan-module-manager.h, lib/gnome-scan-module.c,
+ lib/gnome-scan-module.h, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-param-widget.h, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h, lib/gnome-scan-settings.c,
+ lib/gnome-scan-settings.h, lib/gnome-scan-sink.c,
+ lib/gnome-scan-sink.h, lib/gnome-scan-types.c,
+ lib/gnome-scan-types.h, lib/gnome-scanner.c, lib/gnome-scanner.h,
+ plugins/gnome-scan-backend-file.c,
+ plugins/gnome-scan-backend-file.h,
+ plugins/gnome-scan-module-file.c,
+ plugins/gnome-scan-module-file.h, plugins/gnome-scan-sink-file.c,
+ plugins/gnome-scan-sink-file.h, tools/scrot.c: Highly improve
+ screenshooter. Fix e-mail address :x
+
+ * ChangeLog, Makefile.am, configure.ac, doc/ref/Makefile.am,
+ doc/ref/gallery.xml, doc/ref/gnome-scan-1.0-docs.sgml,
+ doc/ref/images, doc/ref/images/GSParamSpecFilenames.png,
+ doc/ref/images/GSParamSpecOutputFilename.png,
+ doc/ref/images/GnomeScanAcquisitionDialog.png,
+ doc/ref/images/GnomeScanDialog.png, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan.h, src/Makefile.am,
+ tools, tools/Makefile.am, tools/scrot.c, tools/scrot.glade:
+ Explode pkg-config checks. Will make some conditionnal in the
+ future (no-gnome, no-gimp, no-tools, â?¦)
+ Created scrot tools which automate the creation of Gnome Scan
+ widget screenshot, using Gegl to add border and drop down shadow.
+ Added widget gallery to documentation. Generate gallery from
+ available images.
+ Don't load backends upon GnomeScanDialog construction. (shoudl be
+ dispatched between gnome_scan_init() and
+ gnome_scan_dialog_run()).
+
+2007-03-30 11:47 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-job.c, lib/gnome-scan-job.h,
+ lib/gnome-scan-plugin.h, lib/gnome-scanner.c, src/flegita.c:
+ Various fixes. GnomeScanJob does not instanciate its own settings
+ anymore.
+
+ * ChangeLog, plugins/gnome-scan-sink-file.c: Fix symbols lookup
+ error due to migration from filename to output_filename.
+
+2007-03-29 22:23 Ã?tienne Bersac <bersace03 laposte net>
+
+ * TODO.tasks: Updated TODO.tasks
+
+ * ChangeLog, doc/ref/gnome-scan-1.0.types,
+ lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h,
+ lib/gnome-scan-types.c, lib/gnome-scan-types.h,
+ lib/gnome-scanner.c: Fixed some documentation typo.
+
+ * ChangeLog, autogen.sh, configure.ac, lib/Makefile.am,
+ lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-acquisition-dialog.h, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-dialog.h, lib/gnome-scan-init.c,
+ lib/gnome-scan-init.h, lib/gnome-scan-job.c,
+ lib/gnome-scan-job.h, lib/gnome-scan-module-manager.c,
+ lib/gnome-scan-module-manager.h, lib/gnome-scan-module.c,
+ lib/gnome-scan-module.h, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-param-widget.h, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h, lib/gnome-scan-settings.c,
+ lib/gnome-scan-settings.h, lib/gnome-scan-sink.c,
+ lib/gnome-scan-sink.h, lib/gnome-scan-types.c,
+ lib/gnome-scan-types.c.tpl, lib/gnome-scan-types.h,
+ lib/gnome-scan-types.h.tpl, lib/gnome-scan.h,
+ lib/gnome-scanner.c, lib/gnome-scanner.h, plugins/Makefile.am,
+ plugins/gnome-scan-backend-file.c,
+ plugins/gnome-scan-sink-file.c, plugins/gnome-scanner-file.c,
+ src/flegita.c: Document all Gnome Scan library.
+ Rename some stuffs.
+ Harmonize file head comment (LGPL).
+
+ * doc/ref/gnome-scan-1.0-docs.sgml, doc/ref/gnome-scan-1.0.types,
+ doc/ref/tmpl, doc/ref/tmpl/gnome-scan-1.0-unused.sgml,
+ doc/ref/tmpl/gnome-scan-acquisition-dialog.sgml,
+ doc/ref/tmpl/gnome-scan-backend.sgml,
+ doc/ref/tmpl/gnome-scan-dialog.sgml,
+ doc/ref/tmpl/gnome-scan-init.sgml,
+ doc/ref/tmpl/gnome-scan-job.sgml,
+ doc/ref/tmpl/gnome-scan-module-manager.sgml,
+ doc/ref/tmpl/gnome-scan-module.sgml,
+ doc/ref/tmpl/gnome-scan-param-specs.sgml,
+ doc/ref/tmpl/gnome-scan-param-widget.sgml,
+ doc/ref/tmpl/gnome-scan-plugin.sgml,
+ doc/ref/tmpl/gnome-scan-preview-area.sgml,
+ doc/ref/tmpl/gnome-scan-settings.sgml,
+ doc/ref/tmpl/gnome-scan-sink.sgml,
+ doc/ref/tmpl/gnome-scan-types.sgml,
+ doc/ref/tmpl/gnome-scanner.sgml: Added SGMLs.
+
+ * ChangeLog, INSTALL, Makefile.am, autogen.sh, configure.ac, doc,
+ doc/Makefile.am, doc/ref, doc/ref/Makefile.am,
+ doc/ref/version.xml.in, gnome-scan.pc.in, lib/Makefile.am: Added
+ gtk-doc build system.
+ Bump to 0.5 development version.
+
+ * lib/gnome-scan-param-widget.c: Don't use g_idle_add without
+ returning false one time. Fix infinite loop bug. (Thanks Philipp !)
+
+ * ChangeLog, Makefile.am, configure.ac, gnome-scan.pc.in,
+ lib/Makefile.am, plugins/Makefile.am: Fixed build system.
+ Added pkgconfig file.
+
+ * ChangeLog, plugins/gnome-scan-sink-file.c: Select PNG as first
+ available output format.
+
+ * ChangeLog, lib/gnome-scan-backend.c, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-job.c, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-plugin.c, lib/gnome-scan-plugin.h,
+ lib/gnome-scan-settings.c, lib/gnome-scan-sink.c,
+ lib/gnome-scan-sink.h, lib/gnome-scanner.c, lib/gnome-scanner.h,
+ plugins/gnome-scan-sink-file.c, plugins/gnome-scan-sink-file.h,
+ plugins/gnome-scanner-file.c: Used GdkPixbuf formats support and
+ representation.
+ Implemented sink.
+ Added buffer plugin properties (instead of scanner output-buffer
+ and sink input-buffer).
+ Parent file chooser dialog.
+
+2007-03-28 21:43 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-job.c, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, lib/gnome-scanner.h,
+ plugins/gnome-scanner-file.c, plugins/gnome-scanner-file.h,
+ po/POTFILES.in: Implemented acquisition.
+
+ * ChangeLog, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-job.c,
+ lib/gnome-scan-job.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-plugin.c, lib/gnome-scan-plugin.h,
+ lib/gnome-scan-settings.c, plugins/gnome-scanner-file.c,
+ plugins/gnome-scanner-file.h: Implemented plugin configuration.
+ Refined GnomeScanJob API in order to be thread friendly.
+ Fixed bugs in GnomeScanParamWidget properties (thanks to pippin).
+ Use default value in gnome_scan_param_widget_new().
+ Threaded filenames list store populating, delegate preview
+ generation.
+ Threaded job execution and monitoring by
+ GnomeScanAcquisitionDialog.
+ That's all :P
+
+ * lib/gnome-scan-acquisition-dialog.c: Use GMainLoop smoothness to
+ run acquisition dialog. Set acquisition dialog unresizeable,
+ added forward button.
+
+ * ChangeLog, lib/gnome-scan-acquisition-dialog.c: Populate
+ acquisition dialog.
+
+ * lib/gnome-scan-dialog.c, lib/gnome-scan-job.c,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-settings.c,
+ lib/gnome-scan-settings.h: Implement value storing in settings.
+
+ * lib/gnome-scan-plugin.c, lib/gnome-scan-plugin.h: Use
+ g_return_if_fail() and fix API typo.
+
+ * ChangeLog, lib/gnome-scan-param-widget.c: Build filename from
+ widgets.
+
+ * ChangeLog, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ plugins/gnome-scan-sink-file.c: Use suffixes, not mime-types in
+ filename selector.
+ Refactor filename widget in order to fit "output filename" not
+ "input filename".
+
+2007-03-27 21:10 Ã?tienne Bersac <bersace03 laposte net>
+
+ * plugins/gnome-scan-backend-file.c: Revert debugging code.
+
+ * ChangeLog, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-widget.c: Fix dynamic expansion of widgets.
+
+ * ChangeLog, lib/gnome-scan-param-widget.c,
+ plugins/gnome-scan-backend-file.c, plugins/gnome-scanner-file.c,
+ po/POTFILES.in: Mark some string for translation. Refine code.
+
+ * ChangeLog, lib/gnome-scan-dialog.c, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ plugins/gnome-scan-sink-file.c, plugins/gnome-scanner-file.c: Use
+ translatable string for group quark.
+ Implemented file spec widget.
+ Reworked option box building. Now showing group and option label.
+ Packing options in table, etc.
+
+ * ChangeLog, lib/gnome-scan-param-widget.c: Warn about non
+ supported param specs.
+
+ * lib/gnome-scan-dialog.c: Build sink front box.
+
+ * plugins/gnome-scan-sink-file.c: Declare filename param.
+
+ * lib/gnome-scan-param-specs.c, lib/gnome-scan-param-specs.h: Added
+ Filename param spec.
+
+ * lib/gnome-scan-job.c, lib/gnome-scan-job.h, src/flegita.c: Added
+ GnomeScanJob:\"snk" getter/setter.
+
+ * ChangeLog, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-dialog.c: Set superclass properties in init, not
+ in _new.
+
+2007-03-26 23:41 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-acquisition-dialog.c: Remove
+ acquisition dialog seperator.
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-init.c, lib/gnome-scan-init.h, src/flegita.c:
+ Added Gnome Scan initialize functions.
+
+ * plugins/Makefile.am, plugins/gnome-scan-module-file.c,
+ plugins/gnome-scan-sink-file.c, plugins/gnome-scan-sink-file.h:
+ Declared GnomeScanSinkFile.
+
+ * ChangeLog, lib/gnome-scan-dialog.c, lib/gnome-scan-dialog.h,
+ lib/gnome-scan-job.c, lib/gnome-scan-param-widget.c,
+ src/flegita.c: Added GnomeScanDialog:\"job\". Create Job in
+ application in order to configure it before sending to the
+ dialog. (Application can scan without GnomeScanDialog).
+
+2007-03-25 16:26 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-scan-param-widget.c: Implemented clean in filenames
+ selector.
+
+ * ChangeLog, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c:
+ Implemented file removal in filenames selector.
+
+ * ChangeLog, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-param-widget.c,
+ plugins/gnome-scanner-file.c: Use a GSList to list mime-types in
+ GSParamSpecFilenames.
+ Implemented multiple file addition in GnomeScanParamWidget.
+
+ * ChangeLog, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-param-widget.c, lib/gnome-scan-param-widget.h,
+ po/POTFILES.in: Implemented Filenames selector construction.
+ Let GnomeScanParamWidget decided wether to expands/fill or not.
+
+2007-03-24 22:01 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-dialog.c, lib/gnome-scan-job.c,
+ lib/gnome-scan-job.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-param-widget.h, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, lib/gnome-scan-settings.c,
+ lib/gnome-scan-settings.h, plugins/gnome-scan-backend-file.c,
+ plugins/gnome-scanner-file.c: Implemented GnomeScanJob,
+ GnomeScanSettings and GnomeScanParamWidget initialisation.
+ Simplify GnomeScanPlugin param API.
+ Implemented GnomeScanDialog front scanner widget
+ desctruction/creation. Implemented scanner selection.
+
+ * ChangeLog, Makefile.am, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-dialog.c, plugins/gnome-scan-backend-file.c:
+ Enable dialog delete, this helps with buggy software.
+ Autoselecting message dialog parent window. ChangeLog is build
+ only on changes in SVN meta datas (ugly code here).
+
+ * lib/gnome-scan-dialog.c, lib/gnome-scan-param-specs.h,
+ plugins/gnome-scan-backend-file.c, plugins/gnome-scanner-file.c:
+ Implemented hot plug/unplug support !
+
+ * ChangeLog, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-types.c: Move
+ GS_DEFINE_QUARK from header to source. Restructure the code.
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-param-specs.c,
+ lib/gnome-scan-param-specs.h, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, lib/gnome-scan-types.c,
+ lib/gnome-scan-types.h, lib/gnome-scanner.c,
+ plugins/gnome-scanner-file.c: Added GSParamSpecs. Implemented
+ dynamic plugin parameter pool. Added \"files\"
+ GSParamSpecFilenames to GnomeScannerFile.
+
+2007-03-23 22:18 Ã?tienne Bersac <bersace03 laposte net>
+
+ * configure.ac, lib/gnome-scan-backend.c, lib/gnome-scan-dialog.c,
+ plugins/gnome-scan-backend-file.c: Added thread support to
+ probing !!! So easy with GLib smoothness :)
+
+ * ChangeLog, lib/gnome-scan-backend.c, lib/gnome-scan-backend.h,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-module.c,
+ lib/gnome-scan-module.h, plugins/gnome-scan-backend-file.c,
+ plugins/gnome-scan-module-file.c: Added
+ GnomeScanBackend:\"probe-done\" signal.
+ Added "no backend" and "no device" dialog using a convenient
+ function.
+
+ * lib/gnome-scan-dialog.c: Use V as accelerator for Preview tab,
+ since P is used by Apply button.
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-module-manager.c, lib/gnome-scan-module.h,
+ lib/gnome-scan-plugin.c, lib/gnome-scan-plugin.h,
+ lib/gnome-scanner.c, lib/gnome-scanner.h,
+ plugins/gnome-scan-backend-file.c, plugins/gnome-scanner-file.c,
+ plugins/gnome-scanner-file.h, po/POTFILES.in: Fixed symbols
+ export in modules.
+ Implemented device probe.
+ Implemented device list view.
+ Added GnomeScanner:"icon-name" property.
+
+ * ChangeLog, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-module-manager.c,
+ lib/gnome-scan-module.h, plugins/Makefile.am,
+ plugins/gnome-scan-backend-file.c,
+ plugins/gnome-scan-backend-file.h,
+ plugins/gnome-scan-module-file.c,
+ plugins/gnome-scan-module-file.h, plugins/gnome-scanner-file.c,
+ plugins/gnome-scanner-file.h: Declared GnomeScanBackendFile.
+ Autodetect backends (thanks to g_type_children).
+ Révision 200 !!!
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-module-manager.c, lib/gnome-scan-module-manager.h,
+ lib/gnome-scan-module.c, lib/gnome-scan-module.h,
+ plugins/Makefile.am, plugins/gnome-scan-module-file.c,
+ plugins/gnome-scanner-file.c, plugins/gnome-scanner-file.h:
+ Implemented plugin loading system. Added ModuleManager. Thanks to
+ Michael Natterer conf
+ for GUADEC 2007. (So bad i can't be there !!!)
+
+ * ChangeLog, README, lib/Makefile.am, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-module.c, lib/gnome-scan-module.h,
+ lib/gnome-scan-plugin.c, lib/gnome-scan-plugin.h: Preliminary
+ module loading support.
+
+ * ChangeLog, lib/gnome-scan-dialog.c: Added ScrolledWindow around
+ VBoxes.
+
+2007-03-22 23:07 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/gnome-scan-dialog.c, src/flegita.c: Added
+ notebook, defined all tabs, instanciate all boxes.
+ Destroy widgets before quit.
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-acquisition-dialog.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-dialog.h, po/POTFILES.in, src/flegita.c: Added
+ GnomeScanDialog:\"job\" properties.
+ Added GnomeScanDialog private.
+ Implement basic GnomeScanAcquisitionDialog.
+ Chain gnome_scan_dialog_run() and
+ gnome_scan_acquisition_dialog_run().
+
+ * ChangeLog, lib/gnome-scan-acquisition-dialog.c,
+ lib/gnome-scan-acquisition-dialog.h, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-dialog.h, lib/gnome-scan-job.c,
+ lib/gnome-scan-job.h, lib/gnome-scan-param-widget.c,
+ lib/gnome-scan-param-widget.h, lib/gnome-scan-plugin.c,
+ lib/gnome-scan-plugin.h, lib/gnome-scan-preview-area.c,
+ lib/gnome-scan-preview-area.h, lib/gnome-scan-settings.c,
+ lib/gnome-scan-settings.h, lib/gnome-scan-sink.c,
+ lib/gnome-scan-sink.h, lib/gnome-scan-types.c,
+ lib/gnome-scan-types.h, lib/gnome-scanner.c, lib/gnome-scanner.h,
+ plugins/Makefile.am, plugins/gnome-scan-backend-file.c,
+ plugins/gnome-scan-backend-file.h, plugins/gnome-scanner-file.c,
+ plugins/gnome-scanner-file.h: Drop old files. Add new files.
+
+ * ChangeLog, configure.ac, lib/Makefile.am,
+ lib/gnome-known-scan-options.h, lib/gnome-scan-backend-module.c,
+ lib/gnome-scan-backend-module.h, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-dialog.h, lib/gnome-scan-forecast.c,
+ lib/gnome-scan-forecast.h, lib/gnome-scan-job.c,
+ lib/gnome-scan-job.h, lib/gnome-scan-option-constraint.c,
+ lib/gnome-scan-option-constraint.h, lib/gnome-scan-option-set.c,
+ lib/gnome-scan-option-set.h, lib/gnome-scan-option-widget.c,
+ lib/gnome-scan-option-widget.h, lib/gnome-scan-option.c,
+ lib/gnome-scan-option.h, lib/gnome-scan-settings.c,
+ lib/gnome-scan-settings.h, lib/gnome-scan.h, lib/gnome-scanner.c,
+ lib/gnome-scanner.h, plugins/Makefile.am,
+ plugins/gnome-scan-backend-file.c,
+ plugins/gnome-scan-backend-file.h, src/flegita.c: * Huge update
+ following http://live.gnome.org/GnomeScan/Spec .
+ * Created all classes needed for implementation.
+ * Renamed backends to plugin. New plugin installation dir.
+
+
+ * ChangeLog, Makefile.am, backends, plugins, plugins/Makefile.am,
+ plugins/gnome-scan-backend-file.c,
+ plugins/gnome-scan-backend-file.h: Rename backends to plugins.
+
+2007-03-19 18:04 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, Makefile.am, backends/gnome-scan-backend-file.c,
+ lib/Makefile.am, lib/gnome-known-scan-options.h,
+ lib/gnome-known-scanner-options.h, lib/gnome-scan-backend.h,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-option-constraint.c,
+ lib/gnome-scan-option-constraint.h, lib/gnome-scan-option-set.c,
+ lib/gnome-scan-option-set.h, lib/gnome-scan-option-widget.c,
+ lib/gnome-scan-option.c, lib/gnome-scan-option.h,
+ lib/gnome-scan-settings.c, lib/gnome-scan.h,
+ lib/gnome-scanner-option-constraint.c,
+ lib/gnome-scanner-option-constraint.h,
+ lib/gnome-scanner-option-set.c, lib/gnome-scanner-option-set.h,
+ lib/gnome-scanner-option.c, lib/gnome-scanner-option.h,
+ lib/gnome-scanner.c, po/POTFILES.in: * Rename %ScannerOption% to
+ %ScanOption since GnomeScanOption will also handle processing
+ options.
+ * Update $(top_srcdir)/Makefile.am to generate silently ChangeLog
+ * Autoregenerated POTFILES.in
+
+ * lib/gnome-scan-option-widget.c, lib/gnome-scanner-option.c:
+ Correct GnomeScanOption properties default value. Clean some
+ debug messages.
+
+ * backends/gnome-scan-backend-file.c, lib/gnome-scanner-option.c:
+ Provide intial value (and type) for filenames option in
+ GnomeScanBackendFile .
+
+ * lib/gnome-scan-dialog.c, lib/gnome-scan-option-widget.c,
+ lib/gnome-scan-settings.c: Update settings on file selection.
+
+ * ChangeLog, lib/Makefile.am: Fixed gnome-scan-types.[hc]
+ generation. (it was only regenerate). Thanks Philip Sadeleder for
+ the first bug report on gnome-scan 0.5 ;)
+
+ * lib/gnome-scan-option-widget.c: Drop fixed size GtkCellRenderer
+ in filenames selector. Set filenames reorderable in selector.
+
+ * lib/gnome-scan-option-widget.c: Implemented filename removal and
+ filename list clearing. Fix preview of image lower than 96x96
+ (not that usefull for scanning but.).
+
+ * ChangeLog, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-option-widget.c, lib/gnome-scan-settings.c,
+ po/POTFILES.in: Implemented files addition to files list.
+ Implemented file listing including preview.
+
+2007-03-18 23:22 Ã?tienne Bersac <bersace03 laposte net>
+
+ * lib/gnome-known-scanner-options.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-option-widget.c, lib/gnome-scan-option-widget.h,
+ lib/gnome-scanner-option-set.c, lib/gnome-scanner-option-set.h,
+ lib/gnome-scanner-option.c: Implemented FILENAMES
+ ScanOptionWidget. Implemented basic frontbox population.
+
+ * backends/gnome-scan-backend-file.c, lib/Makefile.am,
+ lib/gnome-known-scanner-options.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scanner-option.c, lib/gnome-scanner-option.h: Store
+ group in GnomeScannerOption. Provide well-known options
+ id/name/desc and well-known groups. Use well-known options/groups
+ in file backend.
+
+ * ChangeLog, Makefile.am, lib/Makefile.am, lib/gnome-scanner.h,
+ po/POTFILES.in: Fix gnome-scan to pass make distcheck.
+
+ * ChangeLog, Makefile.am, svn2cl: * Fix ChangeLog generation. Use
+ external svn2cl.
+
+ * backends/gnome-scan-backend-file.c, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-settings.c, lib/gnome-scan-settings.h,
+ lib/gnome-scanner-option-set.c, lib/gnome-scanner-option-set.h,
+ lib/gnome-scanner-option.h, lib/gnome-scanner.c: Implemented
+ GnomeScanSettings update on scanner selection.
+
+ * backends/gnome-scan-backend-file.c, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-settings.c, lib/gnome-scan-settings.h,
+ lib/gnome-scanner-option-set.c, lib/gnome-scanner-option.c,
+ lib/gnome-scanner-option.h, lib/gnome-scanner.c,
+ lib/gnome-scanner.h: Implemented scanner details query.
+ Preliminary implementation of GnomeScannerOption{,Set}. Added
+ GnomeScannerOptionType enum. Added GnomeScanner:"backend"
+ property.
+
+ * lib/gnome-scan-dialog.c: Autoselect first added device.
+ Preliminary device selection handle.
+
+2007-03-17 23:30 Ã?tienne Bersac <bersace03 laposte net>
+
+ * backends/gnome-scan-backend-file.c, lib/Makefile.am,
+ lib/gnome-scan-dialog.c, lib/gnome-scan-option-widget.c,
+ lib/gnome-scan-option-widget.h, lib/gnome-scanner.c: Added
+ preliminary GnomeScanOptionWidget. Drop name/vendor/product in
+ favor to id/name. It\'s more friendly for virtual device.
+
+ * Makefile.am, backends/Makefile.am,
+ backends/gnome-scan-backend-file.c,
+ backends/gnome-scan-backend-file.h, lib/Makefile.am,
+ lib/gnome-scan-backend-module.c, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scanner.c, lib/gnome-scanner.h: Added module search
+ path features. Better handling of module loading failure.
+ Implemented basic device probe. Handle device added event in
+ GnomeScanDialog (use arbitrary icon). Fix autotools tarball
+ generation.
+
+ * Makefile.am, backends, backends/gnome-scan-backend-file.c,
+ backends/gnome-scan-backend-file.h, configure.ac,
+ lib/Makefile.am, lib/gnome-scan-backend-module.c,
+ lib/gnome-scan-backend-module.h, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c: Added backend
+ dynamic loading support. Implemented file backend. Thanks to
+ GtkPrint code.
+
+2007-03-16 17:25 Ã?tienne Bersac <bersace03 laposte net>
+
+ * ChangeLog, lib/Makefile.am, lib/gnome-scan-settings.c,
+ lib/gnome-scanner-option-constraint.c,
+ lib/gnome-scanner-option-constraint.h: Well, this time it should
+ build â?¦
+
+ * lib/Makefile.am, lib/gnome-scan-backend.c,
+ lib/gnome-scan-backend.h, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-forecast.c, lib/gnome-scan-forecast.h,
+ lib/gnome-scan-job.c, lib/gnome-scan-job.h,
+ lib/gnome-scan-settings.c, lib/gnome-scan-settings.h,
+ lib/gnome-scan-types.c.tpl, lib/gnome-scan-types.h.tpl,
+ lib/gnome-scan.h, lib/gnome-scanner-option-constraint.c,
+ lib/gnome-scanner-option-constraint.h,
+ lib/gnome-scanner-option-set.c, lib/gnome-scanner-option-set.h,
+ lib/gnome-scanner-option.c, lib/gnome-scanner-option.h,
+ lib/gnome-scanner.c, lib/gnome-scanner.h, src/main.c: Added
+ almost all necessary files. Thanks to anjuta GObject class
+ generator. It does almost nothing, but it builds.
+
+ * lib/Makefile.am, lib/gnome-scan-dialog.c,
+ lib/gnome-scan-dialog.h, lib/gnome-scan.h, src/Makefile.am,
+ src/main.c: First mockup of gnome-scan 0.5. Mostly stolen from
+ Gnome Scan 0.4.
diff --git a/trunk/DESIGN b/trunk/DESIGN
new file mode 100644
index 0000000..d0bc893
--- /dev/null
+++ b/trunk/DESIGN
@@ -0,0 +1,47 @@
+
+ This document is intended for developers.
+
+
+Gnome Scan 0.5 saw a huge rewrite which involved an almost complete
+redesign.
+
+Scanning:
+â??â??â??â??â??â??â??â??â??
+
+Scanning consists of three stage : acquisition, processing and
+output. This stages are marshalled by GnomeScanJob. Each of these
+stage needs to be configured. A general purpose settings store named
+GnomeScanSettings handle all configuration value representation and
+storage.
+
+Each stage is represented by a GnomeScanPlugin of a special type :
+GnomeScanner for acquisition, GnomeScanProcessor for processing and
+GnomeScanSink for output.
+
+GnomeScanPlugin is a named object which handle a *per instance* param
+spec pool. Also, parameters are supposed to changed (enabled/disabled)
+as the plugin is configured. e.g. if you set compression to JPEG, the
+jpeg-compression-level option will be enabled and thus, the dialog
+will show it to the user.
+
+GnomeScanPlugin params are special GParamSpec. These params have extra
+fields such as "group", "unit", "index", "widget", and "domain" which
+help building complex interface allowing user to configure a plugin.
+
+
+Interface:
+â??â??â??â??â??â??â??â??â??â??
+
+The central widget is GnomeScanDialog. By default, it contains only a
+notebook with some predefined tabs and device selector in the General
+tab and a preview area in the Preview tab as well as button allowing
+to trigger scan. All the other widgets are build dynamically against
+plugins.
+
+
+Adding scan feature to you program:
+â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??
+
+Basically, you should provide a GnomeScanSink object which implement
+import from a GeglBuffer to the model of you application. If you need
+special parameters, you can provide new param spec and param widget.
diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS
new file mode 100644
index 0000000..8c0fa7e
--- /dev/null
+++ b/trunk/MAINTAINERS
@@ -0,0 +1,4 @@
+Ã?tienne Bersac
+E-Mail: bersace03 laposte.net
+Userid: bersace
+
diff --git a/trunk/Makefile.am b/trunk/Makefile.am
new file mode 100644
index 0000000..f06e4c6
--- /dev/null
+++ b/trunk/Makefile.am
@@ -0,0 +1,65 @@
+## Process this file with automake to produce Makefile.in
+## Created by Anjuta
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-tools
+
+SUBDIRS = \
+ lib \
+ modules \
+ src \
+ po \
+ doc \
+ data
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = \
+ gnome-scan.pc
+
+desktopdir = $(datadir)/applications
+desktop_IN = flegita.desktop.in
+desktop_DATA = \
+ $(desktop_IN:.in=)
+
+ INTLTOOL_DESKTOP_RULE@
+
+todo.py:
+ @:
+
+TODO.tasks:
+ @:
+
+TODO: todo.py TODO.tasks
+ @if test $(SVN) = "1" ; then \
+ echo "Updating $@"; \
+ ./todo.py; \
+ fi
+
+C = $(shell find $(SUBDIRS) -name "*.c")
+po/POTFILES.in: $(C)
+ @echo "Updating $@";
+ @for f in $(C); do grep -q "_(" $$f && echo $$f; done | sort > $@
+ @echo $(desktop_IN) >> $@
+
+EXTRA_DIST = \
+ ChangeLog \
+ MAINTAINERS \
+ intltool-extract.in \
+ intltool-merge.in \
+ intltool-update.in \
+ po/Makefile.in.in \
+ po/POTFILES.in \
+ $(desktop_IN)
+
+
+DISTCLEANFILES = \
+ intltool-extract \
+ intltool-merge \
+ intltool-update \
+ $(desktop_DATA)
+
+# Copy all the spec files. Of cource, only one is actually used.
+dist-hook:
+ for specfile in *.spec; do \
+ if test -f $$specfile; then \
+ cp -p $$specfile $(distdir); \
+ fi \
+ done
diff --git a/trunk/NEWS b/trunk/NEWS
new file mode 100644
index 0000000..4465f66
--- /dev/null
+++ b/trunk/NEWS
@@ -0,0 +1,264 @@
+ â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??
+ Gnome Scan
+ â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??
+
+
+Gnome Scan aim to provide a sane scan infrastructure. Flegita provide
+app and plugin on top of Gnome Scan for the desktop.
+
+Changes in version 0.6
+======================
+
+ * Fix bug #519405, don't use translatable option group for internal
+ groups hidden and preview.
+
+ * Swallow some epson specific high-level option redundant with GSane
+ high-level meta-param.
+
+ * Updated translation and new portugese translation.
+
+
+Changes in version 0.5.94
+=========================
+
+ * Migrate to new GTK+ tooltip API. Depends on GTK+ 2.12
+
+ * Added blurb for PNG compression level option in flegita.
+
+ * Translate application name in about flegita dialog.
+
+ * Focus Forward button in GnomeScanAcquisitionDialog.
+
+ * Fixed hidden option exposed in UI (bug #519331).
+
+ * Don't depends on libgnome and libgnomeui, thanks to Ross Burton
+ (bug #519344). Fixed untranslated application name.
+
+ * Don't version modules, thanks to Ross Burton (bug #519350).
+
+ * Cleaned up build system, thanks to Ross Burton.
+
+ * Fixed GSFile backend not updated for a while. Migrated to
+ GEGL 0.0.16, etc.
+
+ * Use explicit gettext domain in library rather than using
+ application defined one.
+
+Contributor to this release: Ross Burton
+
+Changes in version 0.5.93
+=========================
+
+ * Complete rotation implementation, was almost non working in 0.5.4
+ :x
+
+ * Fixed preview with rotation, simplified the preview code, allowing
+ to use hardware capabilities (needs testing though);
+
+ * Fixed ROI position not translated to driver unit.
+
+ * Fixed buffer leaks and lots of other GObject leaks.
+
+ * Use a waiting cursor while probing.
+
+ * About dialog in flegita
+
+ * Reworked and completed API documentation
+
+ * Depends on GEGL 0.0.16.
+
+
+Changes in version 0.5.92 « Sérieusement cette fois »
+=====================================================
+
+ * Add an Automatic color enhancement option in common processing.
+
+ * Use 75. dpi for preview, avoid some bugs in preview area selection.
+
+ * Manual page orientation handling.
+
+ * Show preview acquisition progress bar again.
+
+ * Automatic per app settings saving in gconf. Now depends on GConf.
+
+ * Dropped printing.
+
+
+Changes in version 0.5.4 « Ce projet n'est pas mort »
+=====================================================
+
+ * Processing architecture plus rotation support. UI allows only simple
+ rotation (0, 90, 180 and 270 degrees).
+
+ * Almost finished preview area and roi selection/resizing/moving.
+
+ * By default, flegita now save pictures in XDG_PICTURES_DIR.
+
+ * Handle page orientation.
+
+ * GnomeScanJob now build a unique Gegl pipeline which simplify code,
+ increase performances and allow better processing integration. This
+ avoid "PNG 8bit saved as PNG 16bit" and thus reduce file size.
+
+
+Changes in version 0.5.2 « �a ROCs ! »
+======================================
+
+ * Recreated Gimp plugin for Gimp 2.3
+
+ * Added basic preview area
+
+ * Buggy scan-to-print in flegita using GtkPrint.
+
+ * Use this version for AbiScan (proof of concept)
+
+ * Use app specific icon dir for app specific icon. Use "scanner" icon
+ instead of "input-scanner", from icon-naming-spec.
+
+ * Lots of improvements in API : convenient function to
+ GnomeScanSettings, end_scan() function for GnomeScanPlugin, etc.
+
+ * Fixed some bugs.
+
+
+Changes in version 0.5.1 « Le jeu en valait la chandelle ! »
+============================================================
+
+ * Total rewrite :|
+
+ * Migrate to Gnome SVN.
+
+ * Multithreaded and event-based programming.
+
+ * GnomeScanContext has been splitted in GnomeScanJob and
+ GnomeScanSettings. GnomeScanJob handle acquisition/processing/sink
+ and progression while GnomeScanSettings stores values as GValue in
+ a GHashTable instead of hardcoded params.
+
+ * Use and register GParamSpecs instead of using GObject for storing
+ plugin options description.
+
+ * New GnomeScanParamWidget base class for widget handling
+ GParamSpec. Implemented a bunch of GnomeScanParamWidget subclasses
+ for various GParamSpec.
+
+ * New GnomeScanPlugin base class for GnomeScanner and GnomeScanSink
+ handling dynamic instance parameters with translation.
+
+ * Module system allowing to register new backend, scanner, sink and
+ param widget. New plugin GSFile wich allow to scan from files.
+
+ * Depends on Gegl SVN and Babl 0.0.14. Use GeglBuffer instead of
+ GdkPixbuf allowing scan larger than memory.
+
+ * Extended SANE support in GSane module. Expose all SANE device
+ options. Translate device options. Allow SANE device to provide
+ special scan source.
+
+ * More generic GnomeScanPreviewArea. Preliminary plugin system to add
+ features to preview area.
+
+ * Use themable icons. Register less stock items/icons.
+
+
+Changes in version 0.4.1
+========================
+
+ * Handle enum resolution instead of range (Thanks Philipp Sadleder).
+
+ * Drop dual resolution handling.
+
+ * Added Philipp Sadleder as contributor
+
+0.4.0.4 : added macedonian translation
+0.4.0.3 : added slovenian translation
+0.4.0.2 : added arabic translation
+0.4.0.1 : emergency build fix
+
+
+Changes in version 0.4 « Is your app people ready ? »
+=====================================================
+
+ * Rework GnomeScanDialog to make it very consistent with
+ GtkPrintUnixDialog. Needs user and developer feedback. GnomeScandialog
+ now herit from GtkDialog instead of GtkWindow.
+
+ * Add GnomeScanAreaSelector widget using GtkPaperSize (Thanks Philip
+ Sadleder !). This smart widget list available format for the device
+ considering its geometry. It also compute if the image needs to be
+ rotated or not if you choose portrait or landscape. However, you
+ can still use "Custom size" which also mean custom rotation, using
+ GnomeScanPreviewArea.
+
+ * In GnomeScanSourceSelector, if user select ADF, the area is
+ centered and moved to top. This allow user to select area for
+ ADF. This is a bug if some device ADF do not center paper !
+
+ * Change the default image shown in GnomeScanPreviewArea. Instead of
+ a centered app icon, now use a "document" icon in top left
+ corner. Far more useful.
+
+ * Gnome Scan now handle wether an area is user defined. This allow
+ GnomeScanPreviewArea to show only center handle (move) if a fixed
+ format is specified, or all handle if size is custom.
+
+ * flegita-gimp dialog is now sized 300x400 instead of 800x600 ! Also
+ feature a field "Layer name" in order to preselect the created layer
+ name.
+
+ * Droping GnomeScanOptionWidget. Let UI designer manipulate label as
+ the want (table, frame, â?¦).
+
+ * Dropped GnomeScanAvancedPreview and GnomeScanPreview. Let UI
+ designer do what they want with GnomeScanPreviewArea. Also,
+ GnomeScanDialog has now a fixed preview UI. Zoom will be
+ implemented in the future to allow fine area selection.
+
+ * Added support for X/Y resolution libgnomescan.
+
+ * Add --disable-gnome ./configure option to drop flegita's Gnome
+ dependencies (Thanks Olaf Leidinger !).
+
+ * Code clean up.
+
+
+Changes in version 0.3.1
+========================
+
+ * Improve SANE support (fix barked image bug).
+
+ * Fix crash in GnomeScanResolutionSelector.
+
+ * Disable mass acquisition in flegita-gimp.
+
+ * Use 300dpi resolution for PDF. Fix PDF size in point, not in pixels.
+
+ * Translations in fr, de and ca.
+
+
+Changes in version 0.3
+======================
+
+ * Add --disable-probe option in order to use virtual devices instead
+ of probing. This behaviour was automatic with the --enable-debugging
+ option in 0.2.4.
+
+ * Rework libgnomescan to support multi-scan acquisition and ADF support.
+
+ * Rework libgnomescanui to support mass acquisition. Provide a
+ GS_STOCK_DO_NEXT button for flatbed mass acquisition.
+
+ * Add multipage PDF output support to Flegita.
+
+ * Remove autopreview when flatbed source selected.
+
+ * Fix bugs in GnomeScanAcquisitionDialog display.
+
+ * Fix bugs in memory handling.
+
+ * Fix typos in various messages (both debug and UI). Thanks to
+ Philipp Sadleder.
+
+ * Use g_get_home_dir () instead of ~/Documents as default save
+ directory.
+
diff --git a/trunk/README b/trunk/README
new file mode 100644
index 0000000..92350b9
--- /dev/null
+++ b/trunk/README
@@ -0,0 +1,73 @@
+
+
+
+
+ Welcome to the Gnome Scan project.
+ â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??
+
+ http://www.gnome.org/projects/gnome-scan/index
+
+
+The project aim to build an infrastructure allowing developers to
+easily build consistent and easy-to-use scan features in their software.
+
+The project is not a standalone application but a library to be used
+in applications.
+
+What are the feature implemented/planned ?
+â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??
+
+ * HIG scan dialog very consistent with Gtk+ print dialog.
+
+ * Dynamic device selection.
+
+ * Fulfeatured scan preview.
+
+ * Easy mass acquisition.
+
+ * Per application preference saving.
+
+ * Scan from scanner using SANE (http://www.sane-project.org/).
+
+ * Scan from images and PDF.
+
+ * Integration in Gnome application (Gimp, Abiword, Evolution,
+ Inkscape, â?¦)
+
+
+How can i use it ?
+â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??
+
+Gnome Scan provide a library for use by applications (e.g. using
+plugins) as well as a tiny standalone application, called flegita,
+which allow to simply save scan to file.
+
+
+How to help ?
+â??â??â??â??â??â??â??â??â??â??â??â??â??
+
+Reporting bugs is very helpful. There is too kind of bugs : interface
+bugs, and scanner handling bug.
+
+Due to the large variety of scanners, building a scan interface is
+quite hard. Gnome Scan might fail using properly your scanner. This is
+a bug. By default, Gnome Scan dump device specification. Run flegita
+in a terminal and redirect output in a file.
+
+user host:~$ flegita > debug.log
+
+Reproduce the bug, close flegita (if it didn't crash ;-) ) and attach
+debug.log to the bug report. This will highly help developers to
+diagnostic problems.
+
+
+How to contribute ?
+â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??â??
+
+Reading the TODO is always a good idea. Patches are very welcome as
+well as translations.
+
+Gnome Scan depends on various projects such as SANE
+(http://www.sane-project.org/), Gegl (http://www.gegl.org/), OCRopus
+(http://www.ocropus.org/). Contributing to such project will
+indirectly improve Gnome Scan.
diff --git a/trunk/THANKS b/trunk/THANKS
new file mode 100644
index 0000000..f4add8a
--- /dev/null
+++ b/trunk/THANKS
@@ -0,0 +1,29 @@
+Well, all commits are tagged "bersace", but all this couldn't have
+been done without a lot of people.
+
+Thanks for all people who helped me for Gnome Scan :
+
+ * Philip Sadleder, the earliest gnome-scan tester and translator.
+ * Donald Straney, for his work on imcapd.
+ * Olaf Leidinger, for his disable-gnome patch (0.4 series).
+ * Ross Burton, for its review of 0.5.93 (no gnome, module version,
+ build system, etc.)
+
+Very huge thanks to early translators :
+
+ * Jonathan Ernst, Français
+ * Philipp Sadleder, Deutsch
+ * Daniel Nylander, Swedish
+ * Djihed Afifi, arabe ;)
+ * Gil Forcada, Catalan
+ * Matic Žgur and Matej UrbanÄ?iÄ?, Slovenian
+ * Ð?ован Ð?аÑ?мовÑ?ки, Macedonian
+
+Great thanks to other projects who helps gnome-scan :
+
+ * Gimp people
+ * Gegl (thanks �yvind Kolås !)
+ * SANE
+ * HAL
+ * Emmanuele Bassi ;)
+ * Google for his sponsorship and Vincent Untz for its mentoring.
diff --git a/trunk/TODO b/trunk/TODO
new file mode 100644
index 0000000..f7a9db6
--- /dev/null
+++ b/trunk/TODO
@@ -0,0 +1,51 @@
+* Unfiled
+ * Tune memory handling
+ * GnomeScanSettings GValue handling.
+ * GeglBuffer leaks.
+ * â?¦
+
+* Backend
+ * Auto-save options per application
+ * Design modular and UI friendly processing.
+ * allow to use hardware capabilties
+ * allow to disable some processing ?
+ * â?¦
+
+* User Interface
+ * Tips : remove the sheet from the flatbed ;)
+
+* Flegita Standalone App
+ * Save to network
+ Use GIO/GVFS to save over the network
+
+* Flegita Gimp Plugin
+
+* Build System
+
+* Documentation
+ * Tutorials
+ * adding scanner features to app
+ * Writing a Sink
+ * writing scanner/source backend
+ * writing ParamSpec + widget
+
+ * Documentation
+
+* GSane
+ * Poll hard select options
+ * MetaParam
+ * paper-size
+ * source
+ * gamma
+ * â?¦
+
+* Bindings
+ * Python
+ * C++
+ * C#
+
+* GSFile
+ * Scan over the network
+ Use GIO/GVFS to load files over the network
+ * Scan from PDF
+
diff --git a/trunk/TODO.tasks b/trunk/TODO.tasks
new file mode 100644
index 0000000..4685042
--- /dev/null
+++ b/trunk/TODO.tasks
@@ -0,0 +1,185 @@
+<?xml version="1.0"?>
+<gtodo>
+ <category title="Unfiled" place="7">
+ <item>
+ <attribute id="1180806164" priority="1" done="0" start_date="732829" enddate="99999999" notify="0" endtime="-60" last_edited="1180806184"/>
+ <summary>Tune memory handling</summary>
+ <comment> * GnomeScanSettings GValue handling.
+ * GeglBuffer leaks.
+ * …</comment>
+ </item>
+ </category>
+ <category title="Backend" place="1">
+ <item>
+ <attribute id="1178864191" priority="1" done="1" start_date="732807" completed_date="732812" notify="0" last_edited="1179351907"/>
+ <summary>scanner changed signal</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1178875194" priority="1" done="1" start_date="732807" completed_date="732813" notify="0" last_edited="1179410190"/>
+ <summary>ParamSpec Unit</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1174739202" priority="1" done="1" start_date="732759" completed_date="732814" notify="0" last_edited="1179477930"/>
+ <summary>Scanner status</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1178869709" priority="1" done="1" start_date="732807" completed_date="732815" notify="0" last_edited="1179568654"/>
+ <summary>Use GeglBuffer</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1180134193" priority="1" done="1" start_date="732822" completed_date="732828" notify="0" last_edited="1180702854"/>
+ <summary>gnome_scan_exit()</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1190420222" priority="1" done="0" start_date="732941" enddate="99999999" notify="0" endtime="-60" last_edited="1190420222"/>
+ <summary>Auto-save options per application</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1179771695" priority="2" done="0" start_date="732817" enddate="99999999" notify="0" endtime="-60" last_edited="1190420326"/>
+ <summary>Design modular and UI friendly processing.</summary>
+ <comment>* allow to use hardware capabilties
+* allow to disable some processing ?
+* …</comment>
+ </item>
+ </category>
+ <category title="User Interface" place="2">
+ <item>
+ <attribute id="1174822405" priority="1" done="1" start_date="732760" completed_date="732765" enddate="99999999" notify="0" endtime="-60" last_edited="1175207148"/>
+ <summary>Preview all files in filenames selector.</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1178880443" priority="1" done="1" start_date="732807" completed_date="732813" notify="0" last_edited="1179410196"/>
+ <summary>ParamWidget destruction.</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1179568912" priority="1" done="1" start_date="732815" completed_date="732815" notify="0" last_edited="1179595595"/>
+ <summary>Modular ParamWidget.</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1179569353" priority="1" done="1" start_date="732815" completed_date="732822" notify="0" last_edited="1180134196"/>
+ <summary>Icons</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1180601487" priority="1" done="1" start_date="732827" completed_date="732828" notify="0" last_edited="1180692622"/>
+ <summary>Tooltips</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1180812384" priority="1" done="0" start_date="732829" enddate="99999999" notify="0" endtime="-60" last_edited="1180812384"/>
+ <summary>Tips : remove the sheet from the flatbed ;)</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1179771650" priority="2" done="1" start_date="732817" completed_date="732941" notify="0" last_edited="1190420179"/>
+ <summary>PreviewArea</summary>
+ <comment/>
+ </item>
+ </category>
+ <category title="Flegita Standalone App" place="3">
+ <item>
+ <attribute id="1179749783" priority="1" done="1" start_date="732817" completed_date="732822" notify="0" last_edited="1180134201"/>
+ <summary>Move file sink and output filename param into flegita</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1201114462" priority="1" done="0" start_date="733064" enddate="99999999" notify="0" endtime="-60" last_edited="1201114462"/>
+ <summary>Save to network</summary>
+ <comment>Use GIO/GVFS to save over the network</comment>
+ </item>
+ </category>
+ <category title="Flegita Gimp Plugin" place="4"/>
+ <category title="Build System" place="5">
+ <item>
+ <attribute id="1174739356" priority="1" done="1" start_date="732759" completed_date="732765" notify="0" last_edited="1175207157"/>
+ <summary>install in gnome-scan-1.0</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1174760230" priority="1" done="1" start_date="732759" completed_date="732765" notify="0" last_edited="1175207158"/>
+ <summary>gnome-scan-1.0.pc</summary>
+ <comment/>
+ </item>
+ </category>
+ <category title="Documentation" place="6">
+ <item>
+ <attribute id="1175207127" priority="0" done="1" start_date="732765" completed_date="732803" notify="0" last_edited="1178544020"/>
+ <summary>Widget Gallery</summary>
+ <comment>Create a tools/screenhots that take screenshots of widgets. Put screenshots in doc/ref/images.
+
+Would be nice to concatenate GnomeScanParamWidget screenshots for all GSParamSpecs.</comment>
+ </item>
+ <item>
+ <attribute id="1179589460" priority="1" done="0" start_date="732815" enddate="99999999" notify="0" endtime="-60" last_edited="1179589460"/>
+ <summary>Tutorials</summary>
+ <comment>* adding scanner features to app
+ * Writing a Sink
+* writing scanner/source backend
+* writing ParamSpec + widget
+</comment>
+ </item>
+ <item>
+ <attribute id="1174739384" priority="1" done="0" start_date="732759" notify="0" last_edited="1180463568"/>
+ <summary>Documentation</summary>
+ <comment/>
+ </item>
+ </category>
+ <category title="GSane" place="0">
+ <item>
+ <attribute id="1179351898" priority="0" done="0" start_date="732812" enddate="99999999" notify="0" endtime="-60" last_edited="1180463552"/>
+ <summary>Poll hard select options</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1178880467" priority="0" done="1" start_date="732807" completed_date="732828" notify="0" last_edited="1180691486"/>
+ <summary>Pseudo hotplug</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1179580631" priority="2" done="0" start_date="732815" enddate="99999999" notify="0" endtime="-60" last_edited="1190420272"/>
+ <summary>MetaParam</summary>
+ <comment>* paper-size
+* source
+* gamma
+* …</comment>
+ </item>
+ </category>
+ <category title="Bindings" place="8">
+ <item>
+ <attribute id="1181736948" priority="1" done="0" start_date="732840" enddate="99999999" notify="0" endtime="-60" last_edited="1181736948"/>
+ <summary>Python</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1181736953" priority="1" done="0" start_date="732840" enddate="99999999" notify="0" endtime="-60" last_edited="1181736953"/>
+ <summary>C++</summary>
+ <comment/>
+ </item>
+ <item>
+ <attribute id="1181736958" priority="1" done="0" start_date="732840" enddate="99999999" notify="0" endtime="-60" last_edited="1181736965"/>
+ <summary>C#</summary>
+ <comment/>
+ </item>
+ </category>
+ <category title="GSFile" place="9">
+ <item>
+ <attribute id="1201114532" priority="1" done="0" start_date="733064" enddate="99999999" notify="0" endtime="-60" last_edited="1201114532"/>
+ <summary>Scan over the network</summary>
+ <comment>Use GIO/GVFS to load files over the network</comment>
+ </item>
+ <item>
+ <attribute id="1201114548" priority="1" done="0" start_date="733064" enddate="99999999" notify="0" endtime="-60" last_edited="1201114548"/>
+ <summary>Scan from PDF</summary>
+ <comment></comment>
+ </item>
+ </category>
+</gtodo>
diff --git a/trunk/autogen.sh b/trunk/autogen.sh
new file mode 100755
index 0000000..48273fd
--- /dev/null
+++ b/trunk/autogen.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+REQUIRED_AUTOMAKE_VERSION=1.9
+
+PKG_NAME="gnome-scan"
+
+(test -f $srcdir/configure.ac) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level $PKG_NAME directory"
+ exit 1
+}
+
+which gnome-autogen.sh || {
+ echo "You need to install gnome-common from the GNOME SVN"
+ exit 1
+}
+
+USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
diff --git a/trunk/configure.ac b/trunk/configure.ac
new file mode 100644
index 0000000..995bc67
--- /dev/null
+++ b/trunk/configure.ac
@@ -0,0 +1,161 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl Created by Anjuta application wizard.
+
+AC_INIT(gnome-scan, 0.6, http://bugzilla.gnome.org/simple-bug-guide.cgi?product=gnome-scan)
+
+AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE
+
+#AC_ISC_POSIX
+AC_PROG_CC
+#AM_PROG_CC_STDC
+#AC_HEADER_STDC
+
+GNOME_COMPILE_WARNINGS([maximum])
+
+dnl SANE
+AC_CHECK_HEADERS([sane/sane.h],[],[AC_MSG_ERROR([SANE not found])])
+AC_CHECK_HEADERS([sane/saneopts.h],[],[AC_MSG_ERROR([SANE not found])])
+
+
+dnl DEBUG
+AC_ARG_ENABLE(debug,
+ [ --disable-debug Disabled debugging output],
+ if test "x$enableval" = "xno" ; then
+ DEBUG=0;
+ else
+ DEBUG=1;
+ fi, DEBUG=1)
+AC_DEFINE_UNQUOTED([DEBUG],[${DEBUG}], [Wether to show debug message or not])
+
+
+dnl ***************************************************************************
+dnl Internationalization
+dnl ***************************************************************************
+GETTEXT_PACKAGE=AC_PACKAGE_NAME
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
+AM_GLIB_GNU_GETTEXT
+IT_PROG_INTLTOOL([0.35.0])
+
+
+
+dnl ***************************************************************************
+dnl GNOME SCAN
+dnl ***************************************************************************
+
+AM_PROG_LIBTOOL
+
+LIB_NAME=[gnomescan]
+LIB_CUR=[1]
+LIB_REV=[0]
+LIB_AGE=[0]
+LIB_VERSION=[${LIB_CUR}.${LIB_REV}.${LIB_AGE}]
+API_VERSION=[${LIB_CUR}.0]
+SONAME=[${LIB_NAME}]
+
+AC_SUBST(SONAME)
+AC_SUBST(LIB_VERSION)
+AC_SUBST(API_VERSION)
+
+
+PKG_CHECK_MODULES(GNOME_SCAN, [gmodule-2.0 gthread-2.0 glib-2.0 gdk-2.0 >= 2.11 gdk-pixbuf-2.0 gtk+-2.0 >= 2.12 gegl >= 0.0.16 gconf-2.0 ])
+AC_SUBST(GNOME_SCAN_CFLAGS)
+AC_SUBST(GNOME_SCAN_LIBS)
+
+MODULE_DIR=[${libdir}/${PACKAGE_NAME}-${API_VERSION}]
+AC_SUBST(MODULE_DIR)
+
+ICON_DIR=[${datadir}/${PACKAGE_NAME}/icons]
+AC_SUBST(ICON_DIR)
+
+dnl ***************************************************************************
+dnl GTK DOC
+dnl ***************************************************************************
+
+gtk_doc_min_version=1.7
+GTK_DOC_CHECK(${gtk_doc_min_version})
+
+AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
+if test "x$with_html_dir" = "x" ; then
+ HTML_DIR='${datadir}/gtk-doc/html'
+else
+ HTML_DIR=$with_html_dir
+fi
+AC_SUBST(HTML_DIR)
+
+AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
+if pkg-config --atleast-version=$gtk_doc_min_version gtk-doc; then
+ AC_MSG_RESULT(yes)
+ GTKDOC=true
+else
+ AC_MSG_RESULT(no)
+ GTKDOC=false
+fi
+dnl Let people disable the gtk-doc stuff.
+AC_ARG_ENABLE(gtk-doc,
+ [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]],
+ enable_gtk_doc="$enableval", enable_gtk_doc=auto)
+if test x$enable_gtk_doc = xauto ; then
+ if test x$GTKDOC = xtrue ; then
+ enable_gtk_doc=yes
+ else
+ enable_gtk_doc=no
+ fi
+fi
+AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
+
+dnl ***************************************************************************
+dnl TOOLS
+dnl ***************************************************************************
+
+PKG_CHECK_MODULES(TOOLS, [libglade-2.0 >= 2.6])
+AC_SUBST(TOOLS_CFLAGS)
+AC_SUBST(TOOLS_LIBS)
+
+dnl ***************************************************************************
+dnl FLEGITA
+dnl ***************************************************************************
+
+PKG_CHECK_MODULES(FLEGITA, [gtk+-unix-print-2.0])
+AC_SUBST(FLEGITA_CFLAGS)
+AC_SUBST(FLEGITA_LIBS)
+
+REQUIRES=["gimpui-2.0 >= 2.2 gmodule-2.0 gegl >= 0.0.12 gthread-2.0"]
+AC_SUBST(REQUIRES)
+
+dnl ***************************************************************************
+dnl FLEGITA GIMP plugin
+dnl ***************************************************************************
+
+PKG_CHECK_MODULES(FLEGITA_GIMP, [gimpui-2.0 >= 2.3])
+AC_SUBST(FLEGITA_GIMP_CFLAGS)
+AC_SUBST(FLEGITA_GIMP_LIBS)
+
+
+dnl In order to pass distcheck, the script has to install the plugin
+dnl in the correct prefix if defined. This is done using the
+dnl pkg-config option --define-variable.
+if test "x$prefix" = "xNONE" ; then
+ pcdv="";
+else
+ pcdv="--define-variable=prefix=$prefix";
+fi
+
+GIMP_LIBDIR=`$PKG_CONFIG $pcdv --variable=gimplibdir gimp-2.0`
+AC_SUBST(GIMP_LIBDIR)
+
+
+AC_OUTPUT([
+ gnome-scan.pc
+ Makefile
+ modules/Makefile
+ lib/Makefile
+ po/Makefile.in
+ src/Makefile
+ doc/Makefile
+ doc/ref/Makefile
+ doc/ref/version.xml
+ data/Makefile
+])
diff --git a/trunk/data/Makefile.am b/trunk/data/Makefile.am
new file mode 100644
index 0000000..abcafc3
--- /dev/null
+++ b/trunk/data/Makefile.am
@@ -0,0 +1,53 @@
+
+
+pkgicondir = @ICON_DIR@/hicolor
+gtkicondir = $(datadir)/icons/hicolor
+scalabledir = $(pkgicondir)/scalable
+24dir = $(pkgicondir)/24x24
+GTK_UPDATE_ICON_CACHE=gtk-update-icon-cache --force --ignore-theme-index $(gtkicondir)
+PKG_UPDATE_ICON_CACHE=gtk-update-icon-cache --force --ignore-theme-index $(pkgicondir)
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+update-icon-cache:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(GTK_UPDATE_ICON_CACHE); \
+ echo "Updating App specific icon cache." \
+ $(PKG_UPDATE_ICON_CACHE); \
+ else \
+ echo "*** Icon cache not updated. After (un)install, run this:"; \
+ echo "*** $(GTK_UPDATE_ICON_CACHE)"; \
+ echo "*** $(PKG_UPDATE_ICON_CACHE)"; \
+ fi
+
+
+# devicesdir = $(scalabledir)/devices
+# devices_DATA = \
+# input-scanner.svg \
+# input-scanner-flatbed.svg \
+# input-scanner-multi-function.svg \
+# input-scanner-sheetfed.svg \
+# input-scanner-handheld.svg
+
+# devices24dir = $(24dir)/devices
+# devices24_DATA = \
+# input-scanner.png
+
+actionsdir = $(scalabledir)/actions
+actions_DATA = \
+ scan.svg \
+ scan-preview.svg \
+ scan-as-layer.svg
+
+appsdir = $(gtkicondir)/scalable/apps
+apps_DATA = \
+ flegita.svg \
+ flegita-gimp.svg
+
+EXTRA_DIST = \
+ $(actions_DATA) \
+ $(apps_DATA)
+
+# $(devices_DATA)
+# $(devices24_DATA)
diff --git a/trunk/data/flegita-gimp.svg b/trunk/data/flegita-gimp.svg
new file mode 100644
index 0000000..a55f5b6
--- /dev/null
+++ b/trunk/data/flegita-gimp.svg
@@ -0,0 +1,1522 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="90.000000"
+ inkscape:export-xdpi="90.000000"
+ inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+ width="128"
+ height="128"
+ id="svg11300"
+ sodipodi:version="0.32"
+ inkscape:version="0.45.1"
+ sodipodi:docbase="/home/bersace/Projects/gnome-scan/data"
+ sodipodi:docname="flegita-gimp.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ version="1.0">
+ <defs
+ id="defs3">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient6390">
+ <stop
+ style="stop-color:#d3d7cf;stop-opacity:1"
+ offset="0"
+ id="stop6392" />
+ <stop
+ style="stop-color:#888a85;stop-opacity:1"
+ offset="1"
+ id="stop6394" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5293">
+ <stop
+ style="stop-color:#888a85;stop-opacity:1;"
+ offset="0"
+ id="stop5295" />
+ <stop
+ style="stop-color:#6a6b67;stop-opacity:1;"
+ offset="1"
+ id="stop5297" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5277">
+ <stop
+ style="stop-color:#a6a6a6;stop-opacity:1;"
+ offset="0"
+ id="stop5279" />
+ <stop
+ style="stop-color:#a6a6a6;stop-opacity:0;"
+ offset="1"
+ id="stop5281" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5255">
+ <stop
+ style="stop-color:#8e8e8e;stop-opacity:1;"
+ offset="0"
+ id="stop5257" />
+ <stop
+ style="stop-color:#d0d0d0;stop-opacity:1;"
+ offset="1"
+ id="stop5259" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5236">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5238" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5240" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5214">
+ <stop
+ style="stop-color:#7f8578;stop-opacity:1;"
+ offset="0"
+ id="stop5216" />
+ <stop
+ id="stop5222"
+ offset="0.25"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="0.65909094"
+ id="stop5224" />
+ <stop
+ style="stop-color:#666666;stop-opacity:1;"
+ offset="1"
+ id="stop5218" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5190">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5192" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5194" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5176">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5178" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5180" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5166">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5168" />
+ <stop
+ style="stop-color:#434c4f;stop-opacity:1;"
+ offset="1"
+ id="stop5170" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11520">
+ <stop
+ id="stop11522"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop11524"
+ offset="1.0000000"
+ style="stop-color:#dcdcdc;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11508"
+ inkscape:collect="always">
+ <stop
+ id="stop11510"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11512"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11494"
+ inkscape:collect="always">
+ <stop
+ id="stop11496"
+ offset="0"
+ style="stop-color:#ef2929;stop-opacity:1;" />
+ <stop
+ id="stop11498"
+ offset="1"
+ style="stop-color:#ef2929;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11415">
+ <stop
+ id="stop11417"
+ offset="0.0000000"
+ style="stop-color:#204a87;stop-opacity:0.0000000;" />
+ <stop
+ style="stop-color:#204a87;stop-opacity:1.0000000;"
+ offset="0.50000000"
+ id="stop11423" />
+ <stop
+ id="stop11419"
+ offset="1"
+ style="stop-color:#204a87;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11399"
+ inkscape:collect="always">
+ <stop
+ id="stop11401"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11403"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="translate(-60.28571,-0.285714)"
+ y2="34.462429"
+ x2="43.615788"
+ y1="3.774456"
+ x1="15.82836"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11425"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-60.57143,0)"
+ y2="39.033859"
+ x2="35.679932"
+ y1="9.3458843"
+ x1="9.6957054"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11427"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="33.462429"
+ x2="26.758644"
+ y1="19.774456"
+ x1="13.267134"
+ gradientTransform="translate(-60.85714,0.428571)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11439"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <radialGradient
+ r="8.5"
+ fy="39.142857"
+ fx="12.071428"
+ cy="39.142857"
+ cx="12.071428"
+ gradientTransform="matrix(1,0,0,0.487395,0,20.06483)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11441"
+ xlink:href="#linearGradient11399"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.243453,0,0,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ r="3.8335035"
+ fy="15.048258"
+ fx="27.577173"
+ cy="15.048258"
+ cx="27.577173"
+ id="radialGradient11500"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335035"
+ fy="16.049133"
+ fx="27.577173"
+ cy="16.049133"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,0,0,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11504"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.338462,0,29.48178)"
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ id="radialGradient11514"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.995058,0,0,1.995058,-24.32488,-35.70087)"
+ gradientUnits="userSpaceOnUse"
+ r="20.530962"
+ fy="35.87817"
+ fx="24.44569"
+ cy="35.87817"
+ cx="24.44569"
+ id="radialGradient11526"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1,0,0,0.338462,0,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11532"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1348"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.338462,0,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1350"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.995058,0,0,1.995058,-24.32488,-35.70087)"
+ cx="24.44569"
+ cy="35.87817"
+ fx="24.44569"
+ fy="35.87817"
+ r="20.530962" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1352"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,0,0,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="16.049133"
+ fx="27.577173"
+ fy="16.049133"
+ r="3.8335035" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1354"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,0,0,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="15.048258"
+ fx="27.577173"
+ fy="15.048258"
+ r="3.8335035" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.338462,0,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.049266,0,0,2.049266,-25.65002,-37.31089)"
+ cx="24.44569"
+ cy="35.87817"
+ fx="24.44569"
+ fy="35.87817"
+ r="20.530962" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient5172"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient5182"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932"
+ gradientTransform="matrix(1.968254,1.16303e-7,-9.004103e-8,1.52381,-24.68213,-14.68863)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5196"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223"
+ gradientTransform="matrix(1,0,0,0.5,0,9.681087)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient5220"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient5242"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19"
+ gradientTransform="matrix(1,0,0,0.802632,0,6.5625)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5261"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5263"
+ gradientUnits="userSpaceOnUse"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5267"
+ gradientUnits="userSpaceOnUse"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168"
+ gradientTransform="matrix(0.6,0,0,0.6,3.8,14)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5271"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.6,0,0,0.6,9.8,14)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5273"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.5,-2,9.681087)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5277"
+ id="linearGradient5283"
+ x1="43.870953"
+ y1="15.846735"
+ x2="47.283165"
+ y2="9.129221"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient5299"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182"
+ gradientUnits="userSpaceOnUse" />
+ <pattern
+ patternTransform="translate(-29.7458,104.1385)"
+ inkscape:collect="always"
+ patternUnits="userSpaceOnUse"
+ width="64"
+ height="64"
+ id="pattern1950">
+ <image
+ xlink:href="/home/jesusda/.gimp-2.2/themes/Pasodoble/images/stock-wilber-64.png"
+ sodipodi:absref="/home/jesusda/.gimp-2.2/themes/Pasodoble/images/stock-wilber-64.png"
+ width="64"
+ height="64"
+ id="image1952" />
+ </pattern>
+ <linearGradient
+ y2="26.36174"
+ x2="22.023972"
+ y1="14.085936"
+ x1="18.218752"
+ gradientTransform="matrix(0.911623,0,0,0.911623,0.962417,1.369868)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3754"
+ xlink:href="#linearGradient3734"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient2216"
+ inkscape:collect="always">
+ <stop
+ id="stop2218"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop2220"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2239"
+ inkscape:collect="always">
+ <stop
+ id="stop2241"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop2243"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3734">
+ <stop
+ id="stop3736"
+ offset="0"
+ style="stop-color:#ffc790;stop-opacity:1;" />
+ <stop
+ id="stop3738"
+ offset="1"
+ style="stop-color:#f57900;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2855">
+ <stop
+ id="stop2857"
+ offset="0"
+ style="stop-color:#515151;stop-opacity:1;" />
+ <stop
+ id="stop2859"
+ offset="1"
+ style="stop-color:#212121;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2893">
+ <stop
+ id="stop2895"
+ offset="0"
+ style="stop-color:#9f6404;stop-opacity:1;" />
+ <stop
+ id="stop2897"
+ offset="1"
+ style="stop-color:#634007;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2933">
+ <stop
+ style="stop-color:#b8b8b3;stop-opacity:1;"
+ offset="0"
+ id="stop2935" />
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="1"
+ id="stop2937" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2989"
+ inkscape:collect="always">
+ <stop
+ id="stop2991"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ id="stop2993"
+ offset="1"
+ style="stop-color:black;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3027">
+ <stop
+ style="stop-color:#babdb6;stop-opacity:1;"
+ offset="0"
+ id="stop3029" />
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="1"
+ id="stop3031" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3128">
+ <stop
+ style="stop-color:#929292;stop-opacity:1;"
+ offset="0"
+ id="stop3130" />
+ <stop
+ style="stop-color:#000507;stop-opacity:1;"
+ offset="1"
+ id="stop3132" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(0.750357,0,0,0.750357,7.103475,-37.28869)"
+ gradientUnits="userSpaceOnUse"
+ y2="93.9375"
+ x2="31.5"
+ y1="91.75"
+ x1="30"
+ id="linearGradient2896"
+ xlink:href="#linearGradient2989"
+ inkscape:collect="always" />
+ <radialGradient
+ r="4.0344129"
+ fy="116.97701"
+ fx="51.534412"
+ cy="116.97701"
+ cx="51.534412"
+ gradientTransform="matrix(1.059813,1.084723,-0.801046,0.782651,87.19413,-47.29136)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2894"
+ xlink:href="#linearGradient3128"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="130.375"
+ x2="69"
+ y1="130.375"
+ x1="64.25"
+ gradientTransform="matrix(-0.988869,0.148786,0.148786,0.988869,111.2566,-8.32306)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient2892"
+ xlink:href="#linearGradient3027"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="matrix(0.965796,0,0,0.93469,-31.0723,-58.37105)"
+ gradientUnits="userSpaceOnUse"
+ y2="96.360046"
+ x2="52.25"
+ y1="98"
+ x1="66.307739"
+ id="linearGradient2890"
+ xlink:href="#linearGradient2989"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ r="22.5"
+ fy="135"
+ fx="48"
+ cy="135"
+ cx="48"
+ id="radialGradient2888"
+ xlink:href="#linearGradient2216"
+ inkscape:collect="always" />
+ <radialGradient
+ r="7.6594563"
+ fy="64.503571"
+ fx="101.81102"
+ cy="64.503571"
+ cx="101.81102"
+ gradientTransform="matrix(0.771265,-0.598609,0.690994,0.890291,-21.89012,62.21309)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2886"
+ xlink:href="#linearGradient2933"
+ inkscape:collect="always" />
+ <radialGradient
+ r="7.6594563"
+ fy="64.503571"
+ fx="101.81102"
+ cy="64.503571"
+ cx="101.81102"
+ gradientTransform="matrix(0.771265,-0.598609,0.690994,0.890291,-21.89012,62.21309)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2884"
+ xlink:href="#linearGradient2933"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="57.392532"
+ x2="98.926559"
+ y1="32.521889"
+ x1="102.3781"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient2882"
+ xlink:href="#linearGradient2239"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="60.268833"
+ x2="101.27959"
+ y1="52.671547"
+ x1="100.38548"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient2880"
+ xlink:href="#linearGradient2855"
+ inkscape:collect="always" />
+ <radialGradient
+ r="23.213741"
+ fy="90.027618"
+ fx="42.522038"
+ cy="90.027618"
+ cx="42.522038"
+ gradientTransform="matrix(0.440684,0.416604,-0.558213,0.481148,51.4731,-36.14964)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2878"
+ xlink:href="#linearGradient2893"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.470849,0.490488,-0.596422,0.566476,53.48991,-48.10686)"
+ r="23.213741"
+ fy="90.027618"
+ fx="42.522038"
+ cy="90.027618"
+ cx="42.522038"
+ id="radialGradient2876"
+ xlink:href="#linearGradient2893"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="26.36174"
+ x2="22.023972"
+ y1="14.085936"
+ x1="18.218752"
+ gradientTransform="matrix(0.911623,0,0,0.911623,0.962417,1.369868)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient2870"
+ xlink:href="#linearGradient3734"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient2851">
+ <stop
+ id="stop2853"
+ offset="0"
+ style="stop-color:#ffc790;stop-opacity:1;" />
+ <stop
+ id="stop2855"
+ offset="1"
+ style="stop-color:#f57900;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2845">
+ <stop
+ id="stop2847"
+ offset="0"
+ style="stop-color:#515151;stop-opacity:1;" />
+ <stop
+ id="stop2849"
+ offset="1"
+ style="stop-color:#212121;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2839">
+ <stop
+ id="stop2841"
+ offset="0"
+ style="stop-color:#9f6404;stop-opacity:1;" />
+ <stop
+ id="stop2843"
+ offset="1"
+ style="stop-color:#634007;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2833">
+ <stop
+ style="stop-color:#b8b8b3;stop-opacity:1;"
+ offset="0"
+ id="stop2835" />
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="1"
+ id="stop2837" />
+ </linearGradient>
+ <pattern
+ patternTransform="translate(107.7819,52.17109)"
+ id="pattern2825"
+ xlink:href="#pattern1950"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient2819">
+ <stop
+ style="stop-color:#babdb6;stop-opacity:1;"
+ offset="0"
+ id="stop2821" />
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="1"
+ id="stop2823" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2813">
+ <stop
+ style="stop-color:#929292;stop-opacity:1;"
+ offset="0"
+ id="stop2815" />
+ <stop
+ style="stop-color:#000507;stop-opacity:1;"
+ offset="1"
+ id="stop2817" />
+ </linearGradient>
+ <pattern
+ patternTransform="translate(104.7906,109.9816)"
+ id="pattern2811"
+ xlink:href="#pattern1950"
+ inkscape:collect="always" />
+ <radialGradient
+ r="8.9202849"
+ fy="30.894655"
+ fx="31.1007"
+ cy="30.894655"
+ cx="31.1007"
+ gradientTransform="matrix(0.513906,-0.672384,1.69627,1.296468,-35.9297,10.42941)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient113728"
+ xlink:href="#linearGradient113718"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.513906,-0.672384,1.69627,1.296468,-35.9297,10.42941)"
+ r="8.9202849"
+ fy="30.894655"
+ fx="31.1007"
+ cy="30.894655"
+ cx="31.1007"
+ id="radialGradient113724"
+ xlink:href="#linearGradient113718"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="44.206852"
+ x2="45.652027"
+ y1="33.055382"
+ x1="36.360237"
+ id="linearGradient113710"
+ xlink:href="#linearGradient113704"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-1.404836,-21.23233,25.36301,-1.678153,-267.1603,284.6982)"
+ r="0.594702"
+ fy="11.876307"
+ fx="11.851825"
+ cy="11.876307"
+ cx="11.851825"
+ id="radialGradient111925"
+ xlink:href="#linearGradient111919"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient15662">
+ <stop
+ id="stop15664"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop15666"
+ offset="1.0000000"
+ style="stop-color:#f8f8f8;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <radialGradient
+ id="aigrd3"
+ cx="20.8921"
+ cy="64.5679"
+ r="5.257"
+ fx="20.8921"
+ fy="64.5679"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#F0F0F0"
+ id="stop15573" />
+ <stop
+ offset="1.0000000"
+ style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+ id="stop15575" />
+ </radialGradient>
+ <radialGradient
+ id="aigrd2"
+ cx="20.8921"
+ cy="114.5684"
+ r="5.256"
+ fx="20.8921"
+ fy="114.5684"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#F0F0F0"
+ id="stop15566" />
+ <stop
+ offset="1.0000000"
+ style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+ id="stop15568" />
+ </radialGradient>
+ <linearGradient
+ id="linearGradient269">
+ <stop
+ id="stop270"
+ offset="0.0000000"
+ style="stop-color:#a3a3a3;stop-opacity:1.0000000;" />
+ <stop
+ id="stop271"
+ offset="1.0000000"
+ style="stop-color:#4c4c4c;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient259">
+ <stop
+ id="stop260"
+ offset="0.0000000"
+ style="stop-color:#fafafa;stop-opacity:1.0000000;" />
+ <stop
+ id="stop261"
+ offset="1.0000000"
+ style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient111890">
+ <stop
+ id="stop111892"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ style="stop-color:#5d5e5b;stop-opacity:0.49803922;"
+ offset="0.82051283"
+ id="stop111898" />
+ <stop
+ id="stop111894"
+ offset="1"
+ style="stop-color:#babdb6;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient111919"
+ inkscape:collect="always">
+ <stop
+ id="stop111921"
+ offset="0"
+ style="stop-color:#fce94f;stop-opacity:1;" />
+ <stop
+ id="stop111923"
+ offset="1"
+ style="stop-color:#fce94f;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient113704"
+ inkscape:collect="always">
+ <stop
+ id="stop113706"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ id="stop113708"
+ offset="1"
+ style="stop-color:black;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient113718"
+ inkscape:collect="always">
+ <stop
+ id="stop113720"
+ offset="0"
+ style="stop-color:#50524e;stop-opacity:1" />
+ <stop
+ id="stop113722"
+ offset="1"
+ style="stop-color:#888a85;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3027"
+ id="linearGradient3436"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.988869,0.148786,0.148786,0.988869,111.2566,-8.32306)"
+ x1="64.25"
+ y1="130.375"
+ x2="69"
+ y2="130.375" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3128"
+ id="radialGradient3438"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.059813,1.084723,-0.801046,0.782651,87.19413,-47.29136)"
+ cx="51.534412"
+ cy="116.97701"
+ fx="51.534412"
+ fy="116.97701"
+ r="4.0344129" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6390"
+ id="linearGradient6405"
+ gradientUnits="userSpaceOnUse"
+ x1="161.3757"
+ y1="104.82714"
+ x2="167.57173"
+ y2="97.579292" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient111919"
+ id="radialGradient6407"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(21.025455,-3.2734777,-3.9103115,-25.115891,-26.906236,447.41248)"
+ cx="11.851825"
+ cy="11.876307"
+ fx="11.851825"
+ fy="11.876307"
+ r="0.594702" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2216"
+ id="radialGradient6428"
+ gradientUnits="userSpaceOnUse"
+ cx="48"
+ cy="135"
+ fx="48"
+ fy="135"
+ r="22.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2893"
+ id="radialGradient6430"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.283191,1.3367127,-1.6254115,1.5438005,147.9631,-126.24786)"
+ cx="42.522038"
+ cy="90.027618"
+ fx="42.522038"
+ fy="90.027618"
+ r="23.213741" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2893"
+ id="radialGradient6432"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.2009832,1.1353587,-1.5212817,1.3112586,142.46674,-93.661198)"
+ cx="42.522038"
+ cy="90.027618"
+ fx="42.522038"
+ fy="90.027618"
+ r="23.213741" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2933"
+ id="radialGradient6434"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.771265,-0.598609,0.690994,0.890291,-21.89012,62.21309)"
+ cx="101.81102"
+ cy="64.503571"
+ fx="101.81102"
+ fy="64.503571"
+ r="7.6594563" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2989"
+ id="linearGradient6436"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.6320556,0,0,2.5472833,-82.491831,-154.22056)"
+ x1="66.307739"
+ y1="98"
+ x2="52.25"
+ y2="96.360046" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2989"
+ id="linearGradient6438"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.044926,0,0,2.044926,21.547495,-96.765417)"
+ x1="30"
+ y1="91.75"
+ x2="31.5"
+ y2="93.9375" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2855"
+ id="linearGradient6440"
+ gradientUnits="userSpaceOnUse"
+ x1="100.38548"
+ y1="52.671547"
+ x2="101.27959"
+ y2="60.268833" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2239"
+ id="linearGradient6442"
+ gradientUnits="userSpaceOnUse"
+ x1="102.3781"
+ y1="32.521889"
+ x2="98.926559"
+ y2="57.392532" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2933"
+ id="radialGradient6444"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.771265,-0.598609,0.690994,0.890291,-21.89012,62.21309)"
+ cx="101.81102"
+ cy="64.503571"
+ fx="101.81102"
+ fy="64.503571"
+ r="7.6594563" />
+ <filter
+ inkscape:collect="always"
+ x="-0.31978164"
+ width="1.6395633"
+ y="-0.42261864"
+ height="1.8452373"
+ id="filter8442">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="14.998273"
+ id="feGaussianBlur8444" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ stroke="#fce94f"
+ fill="#fce94f"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="0.25490196"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8284271"
+ inkscape:cx="116.81424"
+ inkscape:cy="31.362529"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="725"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ width="128px"
+ height="128px" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Jakub Steiner</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:source>http://jimmac.musichall.cz</dc:source>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+ <dc:title>Scanner Device</dc:title>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>device</rdf:li>
+ <rdf:li>input</rdf:li>
+ <rdf:li>scanner</rdf:li>
+ <rdf:li>image</rdf:li>
+ <rdf:li>raster</rdf:li>
+ <rdf:li>bitmap</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Attribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <g
+ id="g2954"
+ transform="matrix(2.0325849,0,0,2.0325849,30.32784,-2.9677125)">
+ <path
+ transform="matrix(1.151316,0,0,0.565573,-5.680921,18.56968)"
+ d="M 42.5 33.25 A 19 15.25 0 1 1 4.5,33.25 A 19 15.25 0 1 1 42.5 33.25 z"
+ sodipodi:ry="15.25"
+ sodipodi:rx="19"
+ sodipodi:cy="33.25"
+ sodipodi:cx="23.5"
+ id="path5234"
+ style="opacity:0.38333333;color:#000000;fill:url(#radialGradient5242);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="czzc"
+ id="path5275"
+ d="M 25.046834,19.008622 C 25.046834,19.008622 33.57631,13.926292 37.06765,14.412428 C 40.55899,14.898564 40.060743,19.786466 43.254834,17.771185 C 46.526198,15.70715 45.199378,7.8716901 45.199378,7.8716901"
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5283);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="ccccccccc"
+ id="path4287"
+ d="M 7.5459416,12.291107 L 2.1542523,33.769476 L 2.331029,39.514719 C 2.331029,40.702219 3.1398494,41.698539 4.4523494,41.636039 L 38.481863,41.636039 C 39.667523,41.687816 40.691572,41.017321 40.603184,39.514719 L 40.691572,33.681088 L 34.681164,12.556273 L 7.5459416,12.291107 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5220);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ transform="translate(-1.646447,-0.441941)"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ sodipodi:ry="1.3258252"
+ sodipodi:rx="1.281631"
+ sodipodi:cy="13.882098"
+ sodipodi:cx="14.18633"
+ id="path5184"
+ style="opacity:1;color:#000000;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5186"
+ sodipodi:cx="14.18633"
+ sodipodi:cy="13.882098"
+ sodipodi:rx="1.281631"
+ sodipodi:ry="1.3258252"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ transform="translate(16.35355,-0.441941)" />
+ <path
+ style="opacity:0.38333333;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 8.379527,13.172561 L 3.1867164,33.735725 L 3.3528741,38.885851 C 3.3528741,40.002018 3.4881086,40.625989 4.7217668,40.567243 L 38.144627,40.567243 C 39.259065,40.61591 39.659099,40.360692 39.576021,38.948351 L 39.659099,33.715146 L 33.884736,13.421799 L 8.379527,13.172561 z "
+ id="path5228"
+ sodipodi:nodetypes="ccccccccc" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ id="path4289"
+ d="M 9.402097,13.437047 L 3.1265241,5.062044 C 2.6845824,4.5317139 3.3033006,3.4416435 4.4523491,3.5300318 L 38.65864,3.5300318 C 39.454135,3.4416435 40.691572,4.5592055 39.896077,5.2663123 L 33.266951,13.539182 L 9.402097,13.437047 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5299);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ id="path4291"
+ d="M 10.993087,16.533748 L 9.313709,28.73134 C 9.2253207,29.151185 9.2695147,29.703612 9.844039,29.703612 L 33.266951,29.703612 C 33.73099,29.703612 33.996154,29.372156 33.885669,28.73134 L 31.675961,16.533748 L 10.993087,16.533748 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5172);fill-opacity:1;fill-rule:evenodd;stroke:#363636;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path5174"
+ d="M 11.747529,17.464967 L 11.046704,22.926962 C 17.587442,23.192127 22.746898,20.421758 31.320568,20.068205 L 30.796519,17.41319 L 11.747529,17.464967 z "
+ style="opacity:0.86666667;color:#000000;fill:url(#radialGradient5182);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cccsccccc"
+ id="path5188"
+ d="M 9.625,12.3125 C 8.774447,12.649651 8.496458,12.999034 7.7803301,13.40625 L 5.2803301,23.46875 C 8.26835,26.384304 13.814131,28.375 20.8125,28.375 C 28.413506,28.375 34.380943,26.017285 37.03217,22.6875 L 34.53217,13.84375 C 33.807902,13.377305 33.515399,12.918304 32.625,12.53125 L 32.59375,12.53125 L 9.625,12.3125 z "
+ style="opacity:0.40555558;color:#000000;fill:url(#radialGradient5273);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path5204"
+ d="M 10.020815,29.173282 L 32.825009,29.173282 C 33.178562,29.151185 33.465824,28.908117 33.443727,28.642952 L 31.410795,17.240855 L 32.648232,28.289398 L 10.020815,29.173282 z "
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ id="path5226"
+ d="M 4.25,4.5624999 L 38.8125,4.5624999"
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 8.46363,34.5625 L 38.259018,34.5625"
+ id="path5230" />
+ <path
+ transform="translate(-0.5,-0.375)"
+ d="M 7.5 34.375 A 1 1 0 1 1 5.5,34.375 A 1 1 0 1 1 7.5 34.375 z"
+ sodipodi:ry="1"
+ sodipodi:rx="1"
+ sodipodi:cy="34.375"
+ sodipodi:cx="6.5"
+ id="path5232"
+ style="opacity:0.38333333;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fce94f;stroke-width:2.93673611;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 11.613399,24.562172 L 31.251986,24.562172"
+ id="path5246" />
+ <path
+ id="path5244"
+ d="M 11.613399,24.5625 L 31.251986,24.5625"
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ id="rect5248"
+ d="M 10.002853,35 L 10.002853,36.538783 C 10.002853,36.601877 9.996434,36.680316 10.002853,36.741254 C 10.013569,36.825885 10.048121,36.9456 10.070343,37.024714 C 10.083931,37.069412 10.120815,37.144186 10.137834,37.186691 C 10.182446,37.291489 10.243011,37.422557 10.30656,37.510645 C 10.332667,37.54513 10.379059,37.600799 10.407796,37.632128 C 10.481203,37.708387 10.590426,37.781066 10.677758,37.8346 C 10.713179,37.855022 10.77549,37.899283 10.812739,37.915588 C 10.878666,37.942255 10.978429,37.983717 11.048955,37.996577 C 11.099737,38.004279 11.165102,37.996577 11.217681,37.996577 L 13.782319,37.996577 C 13.834898,37.996577 13.900263,38.004279 13.951045,37.996577 C 14.021571,37.983717 14.121334,37.942255 14.187262,37.915588 C 14.22451,37.899283 14.286821,37.855022 14.322243,37.8346 C 14.409574,37.781066 14.518798,37.708387 14.592204,37.632128 C 14.620941,37.600799 14.667333,37.54513 14.69344,37.510645 C 14.756989,37.422557 14.817555,37.291489 14.862166,37.186691 C
14.879185,37.144186 14.916069,37.069412 14.929657,37.024714 C 14.951879,36.9456 14.986431,36.825885 14.997147,36.741254 C 15.003566,36.680316 14.997147,36.601877 14.997147,36.538783 L 14.997147,35 L 10.002853,35 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5263);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5261);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 16.002853,35 L 16.002853,36.538783 C 16.002853,36.601877 15.996434,36.680316 16.002853,36.741254 C 16.013569,36.825885 16.048121,36.9456 16.070343,37.024714 C 16.083931,37.069412 16.120815,37.144186 16.137834,37.186691 C 16.182446,37.291489 16.243011,37.422557 16.30656,37.510645 C 16.332667,37.54513 16.379059,37.600799 16.407796,37.632128 C 16.481203,37.708387 16.590426,37.781066 16.677758,37.8346 C 16.713179,37.855022 16.77549,37.899283 16.812739,37.915588 C 16.878666,37.942255 16.978429,37.983717 17.048955,37.996577 C 17.099737,38.004279 17.165102,37.996577 17.217681,37.996577 L 19.782319,37.996577 C 19.834898,37.996577 19.900263,38.004279 19.951045,37.996577 C 20.021571,37.983717 20.121334,37.942255 20.187262,37.915588 C 20.22451,37.899283 20.286821,37.855022 20.322243,37.8346 C 20.409574,37.781066 20.518798,37.708387 20.592204,37.632128 C 20.620941,37.600799 20.667333,37.54513 20.69344,37.510645 C 20.756989,37.422557 20.817555,37.291489 20.862166,37.186691
C 20.879185,37.144186 20.916069,37.069412 20.929657,37.024714 C 20.951879,36.9456 20.986431,36.825885 20.997147,36.741254 C 21.003566,36.680316 20.997147,36.601877 20.997147,36.538783 L 20.997147,35 L 16.002853,35 z "
+ id="path5253" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5267);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 11.001712,35 L 11.001712,35.92327 C 11.001712,35.961126 10.99786,36.00819 11.001712,36.044752 C 11.008141,36.095531 11.028873,36.16736 11.042206,36.214828 C 11.050359,36.241647 11.072489,36.286512 11.0827,36.312015 C 11.109468,36.374893 11.145807,36.453534 11.183936,36.506387 C 11.1996,36.527078 11.227435,36.560479 11.244678,36.579277 C 11.288722,36.625032 11.354256,36.66864 11.406655,36.70076 C 11.427907,36.713013 11.465294,36.73957 11.487643,36.749353 C 11.5272,36.765353 11.587057,36.79023 11.629373,36.797946 C 11.659842,36.802567 11.699061,36.797946 11.730609,36.797946 L 13.269391,36.797946 C 13.300939,36.797946 13.340158,36.802567 13.370627,36.797946 C 13.412943,36.79023 13.4728,36.765353 13.512357,36.749353 C 13.534706,36.73957 13.572093,36.713013 13.593346,36.70076 C 13.645744,36.66864 13.711279,36.625032 13.755322,36.579277 C 13.772565,36.560479 13.8004,36.527078 13.816064,36.506387 C 13.854193,36.453534 13.890533,36.374893 13.9173,36.312015 C 13.927511,
36.286512 13.949641,36.241647 13.957794,36.214828 C 13.971127,36.16736 13.991859,36.095531 13.998288,36.044752 C 14.00214,36.00819 13.998288,35.961126 13.998288,35.92327 L 13.998288,35 L 11.001712,35 z "
+ id="path5265" />
+ <path
+ id="path5269"
+ d="M 17.001712,35 L 17.001712,35.92327 C 17.001712,35.961126 16.99786,36.00819 17.001712,36.044752 C 17.008141,36.095531 17.028873,36.16736 17.042206,36.214828 C 17.050359,36.241647 17.072489,36.286512 17.0827,36.312015 C 17.109468,36.374893 17.145807,36.453534 17.183936,36.506387 C 17.1996,36.527078 17.227435,36.560479 17.244678,36.579277 C 17.288722,36.625032 17.354256,36.66864 17.406655,36.70076 C 17.427907,36.713013 17.465294,36.73957 17.487643,36.749353 C 17.5272,36.765353 17.587057,36.79023 17.629373,36.797946 C 17.659842,36.802567 17.699061,36.797946 17.730609,36.797946 L 19.269391,36.797946 C 19.300939,36.797946 19.340158,36.802567 19.370627,36.797946 C 19.412943,36.79023 19.4728,36.765353 19.512357,36.749353 C 19.534706,36.73957 19.572093,36.713013 19.593346,36.70076 C 19.645744,36.66864 19.711279,36.625032 19.755322,36.579277 C 19.772565,36.560479 19.8004,36.527078 19.816064,36.506387 C 19.854193,36.453534 19.890533,36.374893 19.9173,36.312015 C 19.927511,
36.286512 19.949641,36.241647 19.957794,36.214828 C 19.971127,36.16736 19.991859,36.095531 19.998288,36.044752 C 20.00214,36.00819 19.998288,35.961126 19.998288,35.92327 L 19.998288,35 L 17.001712,35 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5271);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ <g
+ style="opacity:1"
+ id="g3202"
+ transform="matrix(1.5448721,0,0,1.5448721,114.47346,-57.522328)">
+ <path
+ id="path2997"
+ d="M 32.5625,91.75 C 31.007812,92.109375 30.328125,92.984375 30.0625,93.4375 C 29.899923,94.108244 31.422825,94.868151 32.1875,95.25 C 41.669595,99.338092 50.132746,102.77598 50.65625,101.6875 C 51.172719,100.61365 42.617812,95.373532 37.46875,93.3125 C 35.446158,92.444852 33.348865,91.68413 32.5625,91.75 z "
+ style="color:#000000;fill:#d46a07;fill-opacity:1;fill-rule:nonzero;stroke:#744902;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ sodipodi:nodetypes="cccscc" />
+ <g
+ transform="matrix(0.440509,-0.75184,0.828511,0.470567,-92.42202,86.74925)"
+ id="g3023">
+ <path
+ style="fill:url(#linearGradient3436);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
+ d="M 67.77936,126.14246 C 65.968876,125.4161 64.98185,125.33344 62.97064,126.10754 L 64.510394,134.18625 L 67.417523,134.27446 L 67.77936,126.14246 z "
+ id="path3003"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 65.506529,126.60583 L 66.569791,126.95147 L 66.355471,131.40797 L 65.506529,126.60583 z "
+ id="path3021"
+ sodipodi:nodetypes="cccc" />
+ </g>
+ <path
+ id="path3033"
+ d="M 54.92732,107.36363 C 54.283419,104.17543 52.839436,98.98186 51.754148,98.152379 C 49.964607,96.503228 46.661815,97.181309 45.680444,99.412574 C 44.796751,100.94255 45.697249,103.17255 47.405805,103.64105 C 49.325073,104.41047 51.359917,104.975 53.074348,106.17247 C 53.706547,106.54628 54.324208,106.94455 54.92732,107.36363 z "
+ style="fill:url(#radialGradient3438);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ transform="matrix(0.492055,-0.660365,0.801872,0.597496,-70.0626,64.67262)"
+ d="M 54.625 117.0625 A 1.0625 1.4375 0 1 1 52.5,117.0625 A 1.0625 1.4375 0 1 1 54.625 117.0625 z"
+ sodipodi:ry="1.4375"
+ sodipodi:rx="1.0625"
+ sodipodi:cy="117.0625"
+ sodipodi:cx="53.5625"
+ id="path3134"
+ style="color:#000000;fill:#ffffff;fill-opacity:0.67431192;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ id="path3146"
+ d="M 33.875,92.4375 L 32.03125,92.3125 L 37.5625,94.71875 L 39.40625,95.1875 L 33.875,92.4375 z "
+ style="fill:#ffffff;fill-opacity:0.27981651;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+ <path
+ style="fill:#eeeeec;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter8442);opacity:0.5;fill-opacity:1"
+ d="M 23.334524,73.906331 L 27.223611,45.268506 C 33.348855,60.890199 77.464513,78.135574 102.17693,43.854292 C 106.28776,40.27391 130.00743,177.74462 20.506097,110.32233 C -19.795665,112.4388 -8.5377332,57.090399 23.334524,73.906331 z "
+ id="path6446"
+ sodipodi:nodetypes="ccccc" />
+ <g
+ id="g6409"
+ transform="matrix(0.9091712,0,0,0.9091712,-0.5758677,22.056445)">
+ <path
+ transform="matrix(2.2835016,0,0,0.4771485,-39.237912,44.334416)"
+ d="M 70.5 135 A 22.5 22.5 0 1 1 25.5,135 A 22.5 22.5 0 1 1 70.5 135 z"
+ sodipodi:ry="22.5"
+ sodipodi:rx="22.5"
+ sodipodi:cy="135"
+ sodipodi:cx="48"
+ id="path2977"
+ style="opacity:0.42978719;color:#000000;fill:url(#radialGradient6428);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="ccccccccccccc"
+ id="path1959"
+ d="M 34.780295,39.587078 C 34.537179,49.743596 34.294073,59.900119 34.050957,70.056639 C 30.905859,75.588312 23.435197,75.30006 19.237149,79.597115 C 18.245861,85.563174 24.918119,88.409016 28.60862,91.787394 C 39.273866,100.0358 51.552145,106.90671 65.177987,108.48492 C 73.495541,109.52456 82.453024,109.99289 90.300613,106.58834 C 101.20501,101.43838 107.97212,90.16748 110.02999,78.627978 C 112.90199,66.380216 113.15236,53.73772 112.63333,41.229458 C 112.56875,37.454546 112.51534,33.679236 112.39807,29.905466 C 107.36679,35.550971 104.09328,42.617155 98.661495,47.940186 C 90.471959,54.628241 79.767497,56.816085 69.643164,57.710105 C 62.556175,58.252998 54.216482,59.197367 47.933879,54.566511 C 42.854716,50.216782 39.207917,44.536961 34.780295,39.587078 z "
+ style="opacity:1;fill:url(#radialGradient6430);fill-opacity:1;fill-rule:evenodd;stroke:#4c3209;stroke-width:2.80524325;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="opacity:1;fill:url(#radialGradient6432);fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.72527099;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.1330275"
+ d="M 37.556964,46.853207 C 37.329423,55.479853 36.079911,63.238993 35.85237,71.865633 C 32.908767,76.564068 25.374207,76.837022 21.445106,80.486812 C 20.517321,85.554199 27.645283,87.299119 31.099356,90.168605 C 41.081333,97.174585 52.23235,104.37314 64.985256,105.71361 C 72.76995,106.59665 81.153578,106.99444 88.498418,104.10271 C 98.704222,99.728479 105.0378,90.155342 106.96384,80.354032 C 109.65184,69.951149 110.42867,59.903373 109.9429,49.279232 C 109.88245,46.072932 110.00279,40.633899 109.89303,37.428571 C 105.01375,44.097317 103.53544,47.021868 98.451639,51.543089 C 90.786771,57.223726 79.565275,59.595265 70.089549,60.354617 C 63.456592,60.815739 53.098494,62.642101 47.21839,58.708785 C 42.464618,55.014259 41.700929,51.057487 37.556964,46.853207 z "
+ id="path2902"
+ sodipodi:nodetypes="ccccccccccccc" />
+ <g
+ transform="matrix(2.044926,0,0,2.044926,-161.98454,-136.13029)"
+ id="g2949"
+ style="opacity:1">
+ <path
+ transform="matrix(0.676886,0,0,0.676886,31.1096,60.47765)"
+ d="M 108.36411 56.043339 A 7.1594563 7.3362327 0 1 1 94.045202,56.043339 A 7.1594563 7.3362327 0 1 1 108.36411 56.043339 z"
+ sodipodi:ry="7.3362327"
+ sodipodi:rx="7.1594563"
+ sodipodi:cy="56.043339"
+ sodipodi:cx="101.20466"
+ id="path2941"
+ style="opacity:1;color:#000000;fill:url(#radialGradient6434);fill-opacity:1;fill-rule:nonzero;stroke:#888a85;stroke-width:1.96886766;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0.676886,0,0,0.676886,32.42584,61.07594)"
+ d="M 105.00537 57.369164 A 3.5355339 3.7123106 0 1 1 97.934299,57.369164 A 3.5355339 3.7123106 0 1 1 105.00537 57.369164 z"
+ sodipodi:ry="3.7123106"
+ sodipodi:rx="3.5355339"
+ sodipodi:cy="57.369164"
+ sodipodi:cx="101.46983"
+ id="path2943"
+ style="opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ id="path2945"
+ sodipodi:cx="101.46983"
+ sodipodi:cy="57.369164"
+ sodipodi:rx="3.5355339"
+ sodipodi:ry="3.7123106"
+ d="M 105.00537 57.369164 A 3.5355339 3.7123106 0 1 1 97.934299,57.369164 A 3.5355339 3.7123106 0 1 1 105.00537 57.369164 z"
+ transform="matrix(0.383128,0,0,0.352604,61.67752,78.88444)" />
+ </g>
+ <path
+ sodipodi:nodetypes="ccc"
+ id="path2987"
+ d="M 55.033147,93.502733 C 73.676883,94.988637 87.018558,92.779232 82.631796,82.165546 C 112.68111,103.60519 58.542555,98.809563 55.033147,93.502733 z "
+ style="opacity:1;fill:url(#linearGradient6436);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ id="path3215"
+ d="M 81.617177,98.01371 L 85.451413,94.435098 L 90.052493,92.645791 L 93.119881,93.157012 L 86.729491,89.067169 L 78.805404,94.17948 L 81.617177,98.01371 z "
+ style="opacity:1;fill:url(#linearGradient6438);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <g
+ transform="matrix(2.044926,0,0,2.044926,-84.693468,-54.051403)"
+ id="g2906"
+ style="opacity:1">
+ <path
+ transform="matrix(0.776083,-0.563929,0.676567,0.957874,-65.99065,66.76925)"
+ d="M 108.36411 56.043339 A 7.1594563 7.3362327 0 1 1 94.045202,56.043339 A 7.1594563 7.3362327 0 1 1 108.36411 56.043339 z"
+ sodipodi:ry="7.3362327"
+ sodipodi:rx="7.1594563"
+ sodipodi:cy="56.043339"
+ sodipodi:cx="101.20466"
+ id="path1968"
+ style="opacity:1;color:#000000;fill:url(#linearGradient6440);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.2565223;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient6442);stroke-width:1.5155549;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ id="path2863"
+ sodipodi:cx="101.20466"
+ sodipodi:cy="56.043339"
+ sodipodi:rx="7.1594563"
+ sodipodi:ry="7.3362327"
+ d="M 108.36411 56.043339 A 7.1594563 7.3362327 0 1 1 94.045202,56.043339 A 7.1594563 7.3362327 0 1 1 108.36411 56.043339 z"
+ transform="matrix(0.641705,-0.468807,0.559421,0.796302,-46.0024,66.02069)" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ id="path2883"
+ sodipodi:cx="75.48365"
+ sodipodi:cy="57.811108"
+ sodipodi:rx="2.1213202"
+ sodipodi:ry="2.8284271"
+ d="M 77.60497 57.811108 A 2.1213202 2.8284271 0 1 1 73.36233,57.811108 A 2.1213202 2.8284271 0 1 1 77.60497 57.811108 z"
+ transform="matrix(1,0,0,0.96875,-28.54943,3.927918)" />
+ </g>
+ <g
+ transform="matrix(2.044926,0,0,2.044926,-115.97372,-182.65236)"
+ id="g2956"
+ style="opacity:1">
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:url(#radialGradient6444);fill-opacity:1;fill-rule:nonzero;stroke:#888a85;stroke-width:1.33269894;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ id="path1964"
+ sodipodi:cx="101.20466"
+ sodipodi:cy="56.043339"
+ sodipodi:rx="7.1594563"
+ sodipodi:ry="7.3362327"
+ d="M 108.36411 56.043339 A 7.1594563 7.3362327 0 1 1 94.045202,56.043339 A 7.1594563 7.3362327 0 1 1 108.36411 56.043339 z"
+ transform="translate(-12.19759,65.2306)" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ id="path2915"
+ sodipodi:cx="101.46983"
+ sodipodi:cy="57.369164"
+ sodipodi:rx="3.5355339"
+ sodipodi:ry="3.7123106"
+ d="M 105.00537 57.369164 A 3.5355339 3.7123106 0 1 1 97.934299,57.369164 A 3.5355339 3.7123106 0 1 1 105.00537 57.369164 z"
+ transform="translate(-10.25305,66.11449)" />
+ <path
+ transform="matrix(0.566015,0,0,0.520921,32.962,92.42392)"
+ d="M 105.00537 57.369164 A 3.5355339 3.7123106 0 1 1 97.934299,57.369164 A 3.5355339 3.7123106 0 1 1 105.00537 57.369164 z"
+ sodipodi:ry="3.7123106"
+ sodipodi:rx="3.5355339"
+ sodipodi:cy="57.369164"
+ sodipodi:cx="101.46983"
+ id="path2939"
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ sodipodi:type="arc" />
+ </g>
+ </g>
+ <g
+ id="g6398"
+ transform="matrix(1.5633078,0.2616259,-0.2616259,1.5633078,-47.766489,-75.15028)">
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path109229"
+ d="M 180.21126,109.09886 C 177.53122,110.16602 174.60015,110.48012 171.69257,110.86467 C 165.15774,107.20258 155.59277,99.961514 153.36488,95.511158 C 151.85713,92.499334 155.72868,90.815774 162.49773,93.868621 C 168.27761,97.657315 177.97514,104.65501 180.21126,109.09886 z "
+ style="fill:url(#linearGradient6405);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.11112642px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="ccccccccsc"
+ d="M 180.7392,109.41305 L 171.90542,111.24417 C 165.45619,107.41674 155.38336,99.783238 152.16658,95.689417 C 151.90698,93.789631 153.69381,89.968667 159.0405,92.075874 C 166.18366,95.506776 178.47004,104.77774 180.7392,109.41305 z M 178.35856,108.50003 L 172.14589,109.85401 C 166.48677,106.53718 157.51716,99.055538 154.07705,95.818596 C 154.21339,93.369062 155.68013,91.751334 162.17158,95.529359 C 168.13448,98.999767 176.37723,104.45267 178.35856,108.50003 z "
+ style="fill:#727470;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.11112642px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path111900" />
+ <path
+ sodipodi:nodetypes="ccc"
+ id="path111909"
+ d="M 179.86825,109.62371 C 209.85221,118.10824 160.35756,134.56953 172.55735,111.06846 L 179.86825,109.62371 z "
+ style="fill:url(#radialGradient6407);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="ccc"
+ id="path111927"
+ d="M 179.71105,109.78835 C 180.64482,111.65644 173.12122,113.95516 172.75598,111.08863 L 179.71105,109.78835 z "
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cscc"
+ id="path3481"
+ d="M 156.09611,93.958395 C 158.61741,93.571277 173.78598,102.87921 176.00329,107.20664 C 176.67372,108.51508 175.25892,108.47453 174.32392,108.46617 C 175.45824,104.82229 156.21771,94.256684 156.09611,93.958395 z "
+ style="fill:#eeeeec;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ </g>
+</svg>
diff --git a/trunk/data/flegita.svg b/trunk/data/flegita.svg
new file mode 100644
index 0000000..ffee73a
--- /dev/null
+++ b/trunk/data/flegita.svg
@@ -0,0 +1,655 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="90.000000"
+ inkscape:export-xdpi="90.000000"
+ inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+ width="48px"
+ height="48px"
+ id="svg11300"
+ sodipodi:version="0.32"
+ inkscape:version="0.43+devel"
+ sodipodi:docbase="/home/jimmac/src/cvs/tango-art-libre/scalable/devices"
+ sodipodi:docname="input-scanner.svg">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient5293">
+ <stop
+ style="stop-color:#888a85;stop-opacity:1;"
+ offset="0"
+ id="stop5295" />
+ <stop
+ style="stop-color:#6a6b67;stop-opacity:1;"
+ offset="1"
+ id="stop5297" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5277">
+ <stop
+ style="stop-color:#a6a6a6;stop-opacity:1;"
+ offset="0"
+ id="stop5279" />
+ <stop
+ style="stop-color:#a6a6a6;stop-opacity:0;"
+ offset="1"
+ id="stop5281" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5255">
+ <stop
+ style="stop-color:#8e8e8e;stop-opacity:1;"
+ offset="0"
+ id="stop5257" />
+ <stop
+ style="stop-color:#d0d0d0;stop-opacity:1;"
+ offset="1"
+ id="stop5259" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5236">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5238" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5240" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5214">
+ <stop
+ style="stop-color:#7f8578;stop-opacity:1;"
+ offset="0"
+ id="stop5216" />
+ <stop
+ id="stop5222"
+ offset="0.25"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="0.65909094"
+ id="stop5224" />
+ <stop
+ style="stop-color:#666666;stop-opacity:1;"
+ offset="1"
+ id="stop5218" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5190">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5192" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5194" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5176">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5178" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5180" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5166">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5168" />
+ <stop
+ style="stop-color:#434c4f;stop-opacity:1;"
+ offset="1"
+ id="stop5170" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11520">
+ <stop
+ id="stop11522"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop11524"
+ offset="1.0000000"
+ style="stop-color:#dcdcdc;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11508"
+ inkscape:collect="always">
+ <stop
+ id="stop11510"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11512"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11494"
+ inkscape:collect="always">
+ <stop
+ id="stop11496"
+ offset="0"
+ style="stop-color:#ef2929;stop-opacity:1;" />
+ <stop
+ id="stop11498"
+ offset="1"
+ style="stop-color:#ef2929;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11415">
+ <stop
+ id="stop11417"
+ offset="0.0000000"
+ style="stop-color:#204a87;stop-opacity:0.0000000;" />
+ <stop
+ style="stop-color:#204a87;stop-opacity:1.0000000;"
+ offset="0.50000000"
+ id="stop11423" />
+ <stop
+ id="stop11419"
+ offset="1"
+ style="stop-color:#204a87;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11399"
+ inkscape:collect="always">
+ <stop
+ id="stop11401"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11403"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="translate(-60.28571,-0.285714)"
+ y2="34.462429"
+ x2="43.615788"
+ y1="3.7744560"
+ x1="15.828360"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11425"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-60.57143,0.000000)"
+ y2="39.033859"
+ x2="35.679932"
+ y1="9.3458843"
+ x1="9.6957054"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11427"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="33.462429"
+ x2="26.758644"
+ y1="19.774456"
+ x1="13.267134"
+ gradientTransform="translate(-60.85714,0.428571)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11439"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <radialGradient
+ r="8.5000000"
+ fy="39.142857"
+ fx="12.071428"
+ cy="39.142857"
+ cx="12.071428"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.487395,0.000000,20.06483)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11441"
+ xlink:href="#linearGradient11399"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ r="3.8335034"
+ fy="15.048258"
+ fx="27.577173"
+ cy="15.048258"
+ cx="27.577173"
+ id="radialGradient11500"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335034"
+ fy="16.049133"
+ fx="27.577173"
+ cy="16.049133"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11504"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.166583e-14,29.48178)"
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ id="radialGradient11514"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ gradientUnits="userSpaceOnUse"
+ r="20.530962"
+ fy="35.878170"
+ fx="24.445690"
+ cy="35.878170"
+ cx="24.445690"
+ id="radialGradient11526"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,3.185827e-15,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11532"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1348"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,-1.353344e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1350"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1352"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="16.049133"
+ fx="27.577173"
+ fy="16.049133"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1354"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="15.048258"
+ fx="27.577173"
+ fy="15.048258"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.220359e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.049266,-1.696401e-32,0.000000,2.049266,-25.65002,-37.31089)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient5172"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient5182"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932"
+ gradientTransform="matrix(1.968254,1.16303e-7,-9.004103e-8,1.52381,-24.68213,-14.68863)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5196"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223"
+ gradientTransform="matrix(1,0,0,0.5,0,9.681087)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient5220"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient5242"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19"
+ gradientTransform="matrix(1,0,0,0.802632,-1.00267e-15,6.5625)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5261"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5263"
+ gradientUnits="userSpaceOnUse"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5267"
+ gradientUnits="userSpaceOnUse"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168"
+ gradientTransform="matrix(0.6,0,0,0.6,3.8,14)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5271"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.6,0,0,0.6,9.8,14)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5273"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.5,-2,9.681087)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5277"
+ id="linearGradient5283"
+ x1="43.870953"
+ y1="15.846735"
+ x2="47.283165"
+ y2="9.129221"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient5299"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ stroke="#fce94f"
+ fill="#fce94f"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="0.25490196"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.6568542"
+ inkscape:cx="23.909435"
+ inkscape:cy="8.4399038"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="1000"
+ inkscape:window-height="807"
+ inkscape:window-x="607"
+ inkscape:window-y="312" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Jakub Steiner</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:source>http://jimmac.musichall.cz</dc:source>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+ <dc:title>Scanner Device</dc:title>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>device</rdf:li>
+ <rdf:li>input</rdf:li>
+ <rdf:li>scanner</rdf:li>
+ <rdf:li>image</rdf:li>
+ <rdf:li>raster</rdf:li>
+ <rdf:li>bitmap</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Attribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.38333333;color:#000000;fill:url(#radialGradient5242);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5234"
+ sodipodi:cx="23.5"
+ sodipodi:cy="33.25"
+ sodipodi:rx="19"
+ sodipodi:ry="15.25"
+ d="M 42.5 33.25 A 19 15.25 0 1 1 4.5,33.25 A 19 15.25 0 1 1 42.5 33.25 z"
+ transform="matrix(1.151316,0,0,0.565573,-5.680921,18.56968)" />
+ <path
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5283);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 25.046834,19.008622 C 25.046834,19.008622 33.57631,13.926292 37.06765,14.412428 C 40.55899,14.898564 40.060743,19.786466 43.254834,17.771185 C 46.526198,15.70715 45.199378,7.8716901 45.199378,7.8716901"
+ id="path5275"
+ sodipodi:nodetypes="czzc" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5220);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 7.5459416,12.291107 L 2.1542523,33.769476 L 2.331029,39.514719 C 2.331029,40.702219 3.1398494,41.698539 4.4523494,41.636039 L 38.481863,41.636039 C 39.667523,41.687816 40.691572,41.017321 40.603184,39.514719 L 40.691572,33.681088 L 34.681164,12.556273 L 7.5459416,12.291107 z "
+ id="path4287"
+ sodipodi:nodetypes="ccccccccc" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5184"
+ sodipodi:cx="14.18633"
+ sodipodi:cy="13.882098"
+ sodipodi:rx="1.281631"
+ sodipodi:ry="1.3258252"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ transform="translate(-1.646447,-0.441941)" />
+ <path
+ transform="translate(16.35355,-0.441941)"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ sodipodi:ry="1.3258252"
+ sodipodi:rx="1.281631"
+ sodipodi:cy="13.882098"
+ sodipodi:cx="14.18633"
+ id="path5186"
+ style="opacity:1;color:#000000;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="ccccccccc"
+ id="path5228"
+ d="M 8.379527,13.172561 L 3.1867164,33.735725 L 3.3528741,38.885851 C 3.3528741,40.002018 3.4881086,40.625989 4.7217668,40.567243 L 38.144627,40.567243 C 39.259065,40.61591 39.659099,40.360692 39.576021,38.948351 L 39.659099,33.715146 L 33.884736,13.421799 L 8.379527,13.172561 z "
+ style="opacity:0.38333333;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5299);fill-opacity:1.0;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 9.402097,13.437047 L 3.1265241,5.062044 C 2.6845824,4.5317139 3.3033006,3.4416435 4.4523491,3.5300318 L 38.65864,3.5300318 C 39.454135,3.4416435 40.691572,4.5592055 39.896077,5.2663123 L 33.266951,13.539182 L 9.402097,13.437047 z "
+ id="path4289"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5172);fill-opacity:1;fill-rule:evenodd;stroke:#363636;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 10.993087,16.533748 L 9.313709,28.73134 C 9.2253207,29.151185 9.2695147,29.703612 9.844039,29.703612 L 33.266951,29.703612 C 33.73099,29.703612 33.996154,29.372156 33.885669,28.73134 L 31.675961,16.533748 L 10.993087,16.533748 z "
+ id="path4291"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="opacity:0.86666667;color:#000000;fill:url(#radialGradient5182);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 11.747529,17.464967 L 11.046704,22.926962 C 17.587442,23.192127 22.746898,20.421758 31.320568,20.068205 L 30.796519,17.41319 L 11.747529,17.464967 z "
+ id="path5174"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:url(#radialGradient5273);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 9.625,12.3125 C 8.774447,12.649651 8.496458,12.999034 7.7803301,13.40625 L 5.2803301,23.46875 C 8.26835,26.384304 13.814131,28.375 20.8125,28.375 C 28.413506,28.375 34.380943,26.017285 37.03217,22.6875 L 34.53217,13.84375 C 33.807902,13.377305 33.515399,12.918304 32.625,12.53125 L 32.59375,12.53125 L 9.625,12.3125 z "
+ id="path5188"
+ sodipodi:nodetypes="cccsccccc" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 10.020815,29.173282 L 32.825009,29.173282 C 33.178562,29.151185 33.465824,28.908117 33.443727,28.642952 L 31.410795,17.240855 L 32.648232,28.289398 L 10.020815,29.173282 z "
+ id="path5204"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 4.25,4.5624999 L 38.8125,4.5624999"
+ id="path5226" />
+ <path
+ id="path5230"
+ d="M 8.46363,34.5625 L 38.259018,34.5625"
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.38333333;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5232"
+ sodipodi:cx="6.5"
+ sodipodi:cy="34.375"
+ sodipodi:rx="1"
+ sodipodi:ry="1"
+ d="M 7.5 34.375 A 1 1 0 1 1 5.5,34.375 A 1 1 0 1 1 7.5 34.375 z"
+ transform="translate(-0.5,-0.375)" />
+ <path
+ id="path5246"
+ d="M 11.613399,24.562172 L 31.251986,24.562172"
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fce94f;stroke-width:2.93673611;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 11.613399,24.5625 L 31.251986,24.5625"
+ id="path5244" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5263);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 10.002853,35 L 10.002853,36.538783 C 10.002853,36.601877 9.996434,36.680316 10.002853,36.741254 C 10.013569,36.825885 10.048121,36.9456 10.070343,37.024714 C 10.083931,37.069412 10.120815,37.144186 10.137834,37.186691 C 10.182446,37.291489 10.243011,37.422557 10.30656,37.510645 C 10.332667,37.54513 10.379059,37.600799 10.407796,37.632128 C 10.481203,37.708387 10.590426,37.781066 10.677758,37.8346 C 10.713179,37.855022 10.77549,37.899283 10.812739,37.915588 C 10.878666,37.942255 10.978429,37.983717 11.048955,37.996577 C 11.099737,38.004279 11.165102,37.996577 11.217681,37.996577 L 13.782319,37.996577 C 13.834898,37.996577 13.900263,38.004279 13.951045,37.996577 C 14.021571,37.983717 14.121334,37.942255 14.187262,37.915588 C 14.22451,37.899283 14.286821,37.855022 14.322243,37.8346 C 14.409574,37.781066 14.518798,37.708387 14.592204,37.632128 C 14.620941,37.600799 14.667333,37.54513 14.69344,37.510645 C 14.756989,37.422557 14.817555,37.291489 14.862166,37.186691 C 1
4.879185,37.144186 14.916069,37.069412 14.929657,37.024714 C 14.951879,36.9456 14.986431,36.825885 14.997147,36.741254 C 15.003566,36.680316 14.997147,36.601877 14.997147,36.538783 L 14.997147,35 L 10.002853,35 z "
+ id="rect5248" />
+ <path
+ id="path5253"
+ d="M 16.002853,35 L 16.002853,36.538783 C 16.002853,36.601877 15.996434,36.680316 16.002853,36.741254 C 16.013569,36.825885 16.048121,36.9456 16.070343,37.024714 C 16.083931,37.069412 16.120815,37.144186 16.137834,37.186691 C 16.182446,37.291489 16.243011,37.422557 16.30656,37.510645 C 16.332667,37.54513 16.379059,37.600799 16.407796,37.632128 C 16.481203,37.708387 16.590426,37.781066 16.677758,37.8346 C 16.713179,37.855022 16.77549,37.899283 16.812739,37.915588 C 16.878666,37.942255 16.978429,37.983717 17.048955,37.996577 C 17.099737,38.004279 17.165102,37.996577 17.217681,37.996577 L 19.782319,37.996577 C 19.834898,37.996577 19.900263,38.004279 19.951045,37.996577 C 20.021571,37.983717 20.121334,37.942255 20.187262,37.915588 C 20.22451,37.899283 20.286821,37.855022 20.322243,37.8346 C 20.409574,37.781066 20.518798,37.708387 20.592204,37.632128 C 20.620941,37.600799 20.667333,37.54513 20.69344,37.510645 C 20.756989,37.422557 20.817555,37.291489 20.862166,37.186691 C
20.879185,37.144186 20.916069,37.069412 20.929657,37.024714 C 20.951879,36.9456 20.986431,36.825885 20.997147,36.741254 C 21.003566,36.680316 20.997147,36.601877 20.997147,36.538783 L 20.997147,35 L 16.002853,35 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5261);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ id="path5265"
+ d="M 11.001712,35 L 11.001712,35.92327 C 11.001712,35.961126 10.99786,36.00819 11.001712,36.044752 C 11.008141,36.095531 11.028873,36.16736 11.042206,36.214828 C 11.050359,36.241647 11.072489,36.286512 11.0827,36.312015 C 11.109468,36.374893 11.145807,36.453534 11.183936,36.506387 C 11.1996,36.527078 11.227435,36.560479 11.244678,36.579277 C 11.288722,36.625032 11.354256,36.66864 11.406655,36.70076 C 11.427907,36.713013 11.465294,36.73957 11.487643,36.749353 C 11.5272,36.765353 11.587057,36.79023 11.629373,36.797946 C 11.659842,36.802567 11.699061,36.797946 11.730609,36.797946 L 13.269391,36.797946 C 13.300939,36.797946 13.340158,36.802567 13.370627,36.797946 C 13.412943,36.79023 13.4728,36.765353 13.512357,36.749353 C 13.534706,36.73957 13.572093,36.713013 13.593346,36.70076 C 13.645744,36.66864 13.711279,36.625032 13.755322,36.579277 C 13.772565,36.560479 13.8004,36.527078 13.816064,36.506387 C 13.854193,36.453534 13.890533,36.374893 13.9173,36.312015 C 13.927511,36
.286512 13.949641,36.241647 13.957794,36.214828 C 13.971127,36.16736 13.991859,36.095531 13.998288,36.044752 C 14.00214,36.00819 13.998288,35.961126 13.998288,35.92327 L 13.998288,35 L 11.001712,35 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5267);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5271);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 17.001712,35 L 17.001712,35.92327 C 17.001712,35.961126 16.99786,36.00819 17.001712,36.044752 C 17.008141,36.095531 17.028873,36.16736 17.042206,36.214828 C 17.050359,36.241647 17.072489,36.286512 17.0827,36.312015 C 17.109468,36.374893 17.145807,36.453534 17.183936,36.506387 C 17.1996,36.527078 17.227435,36.560479 17.244678,36.579277 C 17.288722,36.625032 17.354256,36.66864 17.406655,36.70076 C 17.427907,36.713013 17.465294,36.73957 17.487643,36.749353 C 17.5272,36.765353 17.587057,36.79023 17.629373,36.797946 C 17.659842,36.802567 17.699061,36.797946 17.730609,36.797946 L 19.269391,36.797946 C 19.300939,36.797946 19.340158,36.802567 19.370627,36.797946 C 19.412943,36.79023 19.4728,36.765353 19.512357,36.749353 C 19.534706,36.73957 19.572093,36.713013 19.593346,36.70076 C 19.645744,36.66864 19.711279,36.625032 19.755322,36.579277 C 19.772565,36.560479 19.8004,36.527078 19.816064,36.506387 C 19.854193,36.453534 19.890533,36.374893 19.9173,36.312015 C 19.927511,36
.286512 19.949641,36.241647 19.957794,36.214828 C 19.971127,36.16736 19.991859,36.095531 19.998288,36.044752 C 20.00214,36.00819 19.998288,35.961126 19.998288,35.92327 L 19.998288,35 L 17.001712,35 z "
+ id="path5269" />
+ </g>
+</svg>
diff --git a/trunk/data/scan-as-layer.svg b/trunk/data/scan-as-layer.svg
new file mode 100644
index 0000000..ce85d90
--- /dev/null
+++ b/trunk/data/scan-as-layer.svg
@@ -0,0 +1,938 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="90.000000"
+ inkscape:export-xdpi="90.000000"
+ inkscape:export-filename="/home/bersace/Projects/gnomescan/libgnomescanui/icons/scan.png"
+ width="48px"
+ height="48px"
+ id="svg11300"
+ sodipodi:version="0.32"
+ inkscape:version="0.44"
+ sodipodi:docbase="/home/bersace/Projects/gnomescan/libgnomescanui/icons"
+ sodipodi:docname="scan.svg">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient5251"
+ inkscape:collect="always">
+ <stop
+ id="stop5253"
+ offset="0"
+ style="stop-color:#c4a000;stop-opacity:1" />
+ <stop
+ id="stop5255"
+ offset="1"
+ style="stop-color:#c4a000;stop-opacity:0" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5245"
+ inkscape:collect="always">
+ <stop
+ id="stop5247"
+ offset="0"
+ style="stop-color:#edd400;stop-opacity:1" />
+ <stop
+ id="stop5249"
+ offset="1"
+ style="stop-color:#edd400;stop-opacity:0" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2187">
+ <stop
+ id="stop2189"
+ offset="0"
+ style="stop-color:#fce94f;stop-opacity:0" />
+ <stop
+ id="stop2191"
+ offset="1"
+ style="stop-color:#fef4a4;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4991">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop4993" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop4995" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5293">
+ <stop
+ style="stop-color:#888a85;stop-opacity:1;"
+ offset="0"
+ id="stop5295" />
+ <stop
+ style="stop-color:#6a6b67;stop-opacity:1;"
+ offset="1"
+ id="stop5297" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5255">
+ <stop
+ style="stop-color:#8e8e8e;stop-opacity:1;"
+ offset="0"
+ id="stop5257" />
+ <stop
+ style="stop-color:#d0d0d0;stop-opacity:1;"
+ offset="1"
+ id="stop5259" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5236">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5238" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5240" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5214">
+ <stop
+ style="stop-color:#7f8578;stop-opacity:1;"
+ offset="0"
+ id="stop5216" />
+ <stop
+ id="stop5222"
+ offset="0.25"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="0.65909094"
+ id="stop5224" />
+ <stop
+ style="stop-color:#666666;stop-opacity:1;"
+ offset="1"
+ id="stop5218" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5190">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5192" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5194" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5176">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5178" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5180" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5166">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5168" />
+ <stop
+ style="stop-color:#434c4f;stop-opacity:1;"
+ offset="1"
+ id="stop5170" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11520">
+ <stop
+ id="stop11522"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop11524"
+ offset="1.0000000"
+ style="stop-color:#dcdcdc;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11508"
+ inkscape:collect="always">
+ <stop
+ id="stop11510"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11512"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11494"
+ inkscape:collect="always">
+ <stop
+ id="stop11496"
+ offset="0"
+ style="stop-color:#ef2929;stop-opacity:1;" />
+ <stop
+ id="stop11498"
+ offset="1"
+ style="stop-color:#ef2929;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11415">
+ <stop
+ id="stop11417"
+ offset="0.0000000"
+ style="stop-color:#204a87;stop-opacity:0.0000000;" />
+ <stop
+ style="stop-color:#204a87;stop-opacity:1.0000000;"
+ offset="0.50000000"
+ id="stop11423" />
+ <stop
+ id="stop11419"
+ offset="1"
+ style="stop-color:#204a87;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11399"
+ inkscape:collect="always">
+ <stop
+ id="stop11401"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11403"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="translate(-60.28571,-0.285714)"
+ y2="34.462429"
+ x2="43.615788"
+ y1="3.7744560"
+ x1="15.828360"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11425"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-60.57143,0.000000)"
+ y2="39.033859"
+ x2="35.679932"
+ y1="9.3458843"
+ x1="9.6957054"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11427"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="33.462429"
+ x2="26.758644"
+ y1="19.774456"
+ x1="13.267134"
+ gradientTransform="translate(-60.85714,0.428571)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11439"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <radialGradient
+ r="8.5000000"
+ fy="39.142857"
+ fx="12.071428"
+ cy="39.142857"
+ cx="12.071428"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.487395,0.000000,20.06483)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11441"
+ xlink:href="#linearGradient11399"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ r="3.8335034"
+ fy="15.048258"
+ fx="27.577173"
+ cy="15.048258"
+ cx="27.577173"
+ id="radialGradient11500"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335034"
+ fy="16.049133"
+ fx="27.577173"
+ cy="16.049133"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11504"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.166583e-14,29.48178)"
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ id="radialGradient11514"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ gradientUnits="userSpaceOnUse"
+ r="20.530962"
+ fy="35.878170"
+ fx="24.445690"
+ cy="35.878170"
+ cx="24.445690"
+ id="radialGradient11526"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,3.185827e-15,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11532"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1348"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,-1.353344e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1350"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1352"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="16.049133"
+ fx="27.577173"
+ fy="16.049133"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1354"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="15.048258"
+ fx="27.577173"
+ fy="15.048258"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.220359e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.049266,-1.696401e-32,0.000000,2.049266,-25.65002,-37.31089)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5196"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223"
+ gradientTransform="matrix(1,0,0,0.5,0,9.681087)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5245"
+ id="linearGradient5192"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0.21522,-13.18093)"
+ x1="12.055804"
+ y1="6.0573254"
+ x2="8.1568136"
+ y2="4.9517078" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5251"
+ id="linearGradient5194"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0.21522,-13.18093)"
+ x1="9.2939711"
+ y1="6.852345"
+ x2="5.6634517"
+ y2="5.8120818" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2187"
+ id="linearGradient5196"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.835576,0,0,0.835576,-1.527868,-14.30956)"
+ x1="8.9829826"
+ y1="9.8545456"
+ x2="24.781313"
+ y2="20.213238" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4991"
+ id="radialGradient5198"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-1.314471,-1.006312e-2,-1.022964e-2,1.336221,46.4363,-18.09082)"
+ cx="12.634145"
+ cy="22.05332"
+ fx="12.634145"
+ fy="22.05332"
+ r="19.0625" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient6203"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.802632,0,6.5625)"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient6205"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,6.71768,11.86044)"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient6207"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,8.354182,11.86044)"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient6209"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,6.71768,11.86044)"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient6211"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.610525,9.516504e-8,-7.367615e-8,1.246859,-11.84199,-0.158542)"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient6213"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.409125,6.71768,19.782)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient6215"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,6.71768,11.86044)"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient6217"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,6.71768,11.86044)"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient6219"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.49095,0,0,0.49095,11.46354,23.31595)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient6221"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.49095,0,0,0.49095,16.37304,23.31595)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient14189"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.591826,0,0,0.591826,13.18954,15.99136)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient14192"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.591826,0,0,0.591826,7.271291,15.99136)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient14195"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550295,2.182084)"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient14198"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550295,2.182084)"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient14207"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.493189,1.550295,11.73128)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient14210"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.941441,1.147186e-7,-8.881442e-8,1.503052,-20.82285,-12.30644)"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient14213"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550298,2.18209)"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient14216"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,3.523054,2.18209)"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient14222"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550298,2.18209)"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient15110"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.802632,0,6.5625)"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient15132"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.802632,0,6.5625)"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient15134"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550298,2.18209)"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient15136"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,3.523054,2.18209)"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient15138"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550298,2.18209)"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient15140"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.941441,1.147186e-7,-8.881442e-8,1.503052,-20.82285,-12.30644)"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient15142"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.493189,1.550295,11.73128)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient15144"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550295,2.182084)"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient15146"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550295,2.182084)"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient15148"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.591826,0,0,0.591826,7.271291,15.99136)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient15150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.591826,0,0,0.591826,13.18954,15.99136)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ </defs>
+ <sodipodi:namedview
+ stroke="#fce94f"
+ fill="#fce94f"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666"
+ borderopacity="1"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="11.313708"
+ inkscape:cx="13.96575"
+ inkscape:cy="30.368253"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:showpageshadow="true"
+ inkscape:window-width="1270"
+ inkscape:window-height="945"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ borderlayer="true"
+ showborder="true" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Jakub Steiner</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:source>http://jimmac.musichall.cz</dc:source>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+ <dc:title>Scanner Device</dc:title>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>device</rdf:li>
+ <rdf:li>input</rdf:li>
+ <rdf:li>scanner</rdf:li>
+ <rdf:li>image</rdf:li>
+ <rdf:li>raster</rdf:li>
+ <rdf:li>bitmap</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Attribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <g
+ id="g15112"
+ transform="translate(-0.606849,0)">
+ <path
+ transform="matrix(1.135631,0,0,0.557869,-2.08048,20.4988)"
+ d="M 42.5 33.25 A 19 15.25 0 1 1 4.5,33.25 A 19 15.25 0 1 1 42.5 33.25 z"
+ sodipodi:ry="15.25"
+ sodipodi:rx="19"
+ sodipodi:cy="33.25"
+ sodipodi:cx="23.5"
+ id="path5234"
+ style="opacity:0.38333333;color:black;fill:url(#radialGradient15132);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="ccccccccc"
+ id="path4287"
+ d="M 10.966196,14.305756 L 5.647954,35.49153 L 5.8223229,41.158509 C 5.8223229,42.32983 6.6201244,43.312578 7.9147447,43.250929 L 41.480685,43.250929 C 42.650195,43.302001 43.660293,42.64064 43.573109,41.158509 L 43.660293,35.404347 L 37.731762,14.567308 L 10.966196,14.305756 z "
+ style="color:black;fill:url(#linearGradient15134);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:2.4960072;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ transform="matrix(0.986377,0,0,0.986377,1.899033,1.746156)"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ sodipodi:ry="1.3258252"
+ sodipodi:rx="1.281631"
+ sodipodi:cy="13.882098"
+ sodipodi:cx="14.18633"
+ id="path5184"
+ style="color:black;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="color:black;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5186"
+ sodipodi:cx="14.18633"
+ sodipodi:cy="13.882098"
+ sodipodi:rx="1.281631"
+ sodipodi:ry="1.3258252"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ transform="matrix(0.986377,0,0,0.986377,19.6538,1.746156)" />
+ <path
+ style="opacity:0.38333333;color:black;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:2.35287166;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 12.526219,15.950141 L 7.6978754,35.070032 L 7.8523708,39.858685 C 7.8523708,40.896511 7.9781146,41.476687 9.125186,41.422063 L 40.202187,41.422063 C 41.238405,41.467315 41.610363,41.230009 41.533116,39.916797 L 41.610363,35.050896 L 36.241288,16.181884 L 12.526219,15.950141 z "
+ id="path5228"
+ sodipodi:nodetypes="ccccccccc" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ id="path4289"
+ d="M 12.797065,15.436085 L 6.6069817,7.1751719 C 6.171059,6.6520662 6.781349,5.5768461 7.9147447,5.6640292 L 41.655055,5.6640292 C 42.439712,5.5768461 43.660293,6.6791828 42.875634,7.3766571 L 36.336816,15.536828 L 12.797065,15.436085 z "
+ style="color:black;fill:url(#linearGradient15136);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:2.4960072;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ id="path4291"
+ d="M 14.366382,18.4906 L 12.709882,30.522028 C 12.622696,30.936154 12.666289,31.481054 13.232987,31.481054 L 36.336816,31.481054 C 36.794533,31.481054 37.056084,31.154114 36.947105,30.522028 L 34.767499,18.4906 L 14.366382,18.4906 z "
+ style="color:black;fill:url(#linearGradient15138);fill-opacity:1;fill-rule:evenodd;stroke:#363636;stroke-width:0.98637736;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path5174"
+ d="M 15.110545,19.409133 L 14.419269,24.79672 C 20.870903,25.058273 25.960073,22.325645 34.416946,21.976908 L 33.900037,19.358063 L 15.110545,19.409133 z "
+ style="opacity:0.86666667;color:black;fill:url(#radialGradient15140);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cccsccccc"
+ id="path5188"
+ d="M 13.016932,14.326857 C 12.177964,14.659415 11.903764,15.004039 11.197391,15.405707 L 8.7314471,25.331129 C 11.678762,28.206964 17.148996,30.170543 24.052027,30.170543 C 31.549488,30.170543 37.435631,27.844944 40.050741,24.560521 L 37.584799,15.837247 C 36.870396,15.377155 36.581879,14.924408 35.70361,14.542627 L 35.672785,14.542627 L 13.016932,14.326857 z "
+ style="opacity:0.40555558;color:black;fill:url(#radialGradient15142);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path5204"
+ d="M 13.407355,30.957949 L 35.900893,30.957949 C 36.249631,30.936154 36.532979,30.696397 36.511183,30.434844 L 34.505945,19.188074 L 35.726525,30.086105 L 13.407355,30.957949 z "
+ style="opacity:0.40555558;color:black;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ id="path5226"
+ d="M 9.2218039,7.7855193 L 40.300166,7.7855193"
+ style="opacity:0.40555558;color:black;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:2.27538943;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:0.40555558;color:black;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:0.98637736;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 11.871382,36.273751 L 41.260877,36.273751"
+ id="path5230" />
+ <path
+ style="color:black;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fce94f;stroke-width:2.89672971;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 14.978243,26.409655 L 34.349299,26.409655"
+ id="path5246" />
+ <path
+ id="path5244"
+ d="M 14.978243,26.409978 L 34.349299,26.409978"
+ style="color:black;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:0.98637712;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ id="rect5248"
+ d="M 13.389637,36.705292 L 13.389637,38.223112 C 13.389637,38.285347 13.383305,38.362717 13.389637,38.422825 C 13.400206,38.506304 13.434289,38.624386 13.456208,38.702424 C 13.46961,38.746512 13.505992,38.820268 13.522779,38.862194 C 13.566784,38.965564 13.626524,39.094847 13.689206,39.181734 C 13.714959,39.215749 13.760718,39.27066 13.789064,39.301563 C 13.861471,39.376784 13.969206,39.448472 14.055348,39.501277 C 14.090286,39.52142 14.151749,39.565077 14.18849,39.581161 C 14.25352,39.607466 14.351923,39.648362 14.421489,39.661046 C 14.47158,39.668644 14.536053,39.661046 14.587915,39.661046 L 17.117617,39.661046 C 17.169479,39.661046 17.233955,39.668644 17.284044,39.661046 C 17.35361,39.648362 17.452012,39.607466 17.517042,39.581161 C 17.553785,39.565077 17.615246,39.52142 17.650185,39.501277 C 17.736326,39.448472 17.844064,39.376784 17.916469,39.301563 C 17.944814,39.27066 17.990575,39.215749 18.016326,39.181734 C 18.079008,39.094847 18.138749,38.965564 18.182752,
38.862194 C 18.19954,38.820268 18.235922,38.746512 18.249324,38.702424 C 18.271244,38.624386 18.305325,38.506304 18.315894,38.422825 C 18.322227,38.362717 18.315894,38.285347 18.315894,38.223112 L 18.315894,36.705292 L 13.389637,36.705292 z "
+ style="color:black;fill:url(#linearGradient15144);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="color:black;fill:url(#linearGradient15146);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 19.307901,36.705292 L 19.307901,38.223112 C 19.307901,38.285347 19.301569,38.362717 19.307901,38.422825 C 19.31847,38.506304 19.352552,38.624386 19.374471,38.702424 C 19.387873,38.746512 19.424256,38.820268 19.441043,38.862194 C 19.485048,38.965564 19.544787,39.094847 19.607471,39.181734 C 19.633222,39.215749 19.678981,39.27066 19.707327,39.301563 C 19.779734,39.376784 19.88747,39.448472 19.973611,39.501277 C 20.00855,39.52142 20.070012,39.565077 20.106754,39.581161 C 20.171784,39.607466 20.270187,39.648362 20.339753,39.661046 C 20.389842,39.668644 20.454317,39.661046 20.506179,39.661046 L 23.03588,39.661046 C 23.087744,39.661046 23.152217,39.668644 23.202308,39.661046 C 23.271873,39.648362 23.370277,39.607466 23.435306,39.581161 C 23.472049,39.565077 23.533509,39.52142 23.568448,39.501277 C 23.654591,39.448472 23.762326,39.376784 23.834734,39.301563 C 23.863078,39.27066 23.908838,39.215749 23.93459,39.181734 C 23.997274,39.094847 24.057014,38.965564 24.101018,
38.862194 C 24.117805,38.820268 24.154185,38.746512 24.167587,38.702424 C 24.189507,38.624386 24.223589,38.506304 24.234158,38.422825 C 24.240491,38.362717 24.234158,38.285347 24.234158,38.223112 L 24.234158,36.705292 L 19.307901,36.705292 z "
+ id="path5253" />
+ <path
+ style="color:black;fill:url(#linearGradient15148);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 14.374888,36.705292 L 14.374888,37.615984 C 14.374888,37.653324 14.371089,37.699746 14.374888,37.735811 C 14.381231,37.785899 14.40168,37.856749 14.414832,37.903569 C 14.422873,37.930024 14.444702,37.974277 14.454774,37.999433 C 14.481176,38.061455 14.517022,38.139025 14.554631,38.191158 C 14.570081,38.211568 14.597536,38.244511 14.614545,38.263054 C 14.657988,38.308186 14.722631,38.351201 14.774317,38.382882 C 14.795278,38.394968 14.832154,38.421164 14.8542,38.430813 C 14.893218,38.446595 14.95226,38.471134 14.994001,38.478744 C 15.024054,38.483302 15.062738,38.478744 15.093857,38.478744 L 16.611675,38.478744 C 16.642794,38.478744 16.681479,38.483302 16.711533,38.478744 C 16.753273,38.471134 16.812313,38.446595 16.851332,38.430813 C 16.873377,38.421164 16.910254,38.394968 16.931218,38.382882 C 16.982903,38.351201 17.047544,38.308186 17.090987,38.263054 C 17.107995,38.244511 17.135451,38.211568 17.150903,38.191158 C 17.188513,38.139025 17.224357,38.061455 17.25
0759,37.999433 C 17.260831,37.974277 17.282659,37.930024 17.2907,37.903569 C 17.303853,37.856749 17.324302,37.785899 17.330643,37.735811 C 17.334443,37.699746 17.330643,37.653324 17.330643,37.615984 L 17.330643,36.705292 L 14.374888,36.705292 z "
+ id="path5265" />
+ <path
+ id="path5269"
+ d="M 20.293153,36.705292 L 20.293153,37.615984 C 20.293153,37.653324 20.289354,37.699746 20.293153,37.735811 C 20.299494,37.785899 20.319943,37.856749 20.333095,37.903569 C 20.341137,37.930024 20.362966,37.974277 20.373037,37.999433 C 20.39944,38.061455 20.435284,38.139025 20.472895,38.191158 C 20.488345,38.211568 20.515801,38.244511 20.532809,38.263054 C 20.576253,38.308186 20.640895,38.351201 20.692579,38.382882 C 20.713541,38.394968 20.750419,38.421164 20.772463,38.430813 C 20.811482,38.446595 20.870524,38.471134 20.912263,38.478744 C 20.942317,38.483302 20.981001,38.478744 21.012121,38.478744 L 22.52994,38.478744 C 22.561057,38.478744 22.599743,38.483302 22.629796,38.478744 C 22.671537,38.471134 22.730579,38.446595 22.769595,38.430813 C 22.791641,38.421164 22.828518,38.394968 22.849481,38.382882 C 22.901166,38.351201 22.965809,38.308186 23.009252,38.263054 C 23.026259,38.244511 23.053715,38.211568 23.069166,38.191158 C 23.106774,38.139025 23.142621,38.061455 23.
169022,37.999433 C 23.179095,37.974277 23.200924,37.930024 23.208965,37.903569 C 23.222116,37.856749 23.242567,37.785899 23.248907,37.735811 C 23.252707,37.699746 23.248907,37.653324 23.248907,37.615984 L 23.248907,36.705292 L 20.293153,36.705292 z "
+ style="color:black;fill:url(#linearGradient15150);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ <g
+ id="g5187"
+ transform="matrix(0,-1.02881,-1.02881,0,19.65961,41.19875)">
+ <path
+ sodipodi:nodetypes="ccccccc"
+ id="path1432"
+ d="M 5.3632149,-11.917699 C 13.701877,-12.290696 28.956836,-13.803874 28.797636,2.4359305 L 36.282377,2.4359305 L 24.732872,15.765565 L 12.62882,2.4359305 C 12.62882,2.4359305 20.342079,2.4359305 20.342079,2.4359305 C 20.799141,-8.5334367 13.43556,-11.040568 5.3632149,-11.917699 z "
+ style="opacity:1;color:black;fill:url(#linearGradient5192);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient5194);stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+ <path
+ style="opacity:1;color:black;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient5196);stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ d="M 7.6441504,-11.777633 C 16.000556,-12.225374 28.041105,-10.535412 28.041105,3.6442369 L 32.976019,3.6442369 C 32.976019,3.6442369 24.66772,13.115613 24.66772,13.115613 L 16.054286,3.8727903 C 16.054286,3.8727903 21.646831,3.8727903 21.646831,3.8727903 C 21.646831,-7.9400936 16.37816,-10.941834 7.6441504,-11.777633 z "
+ id="path2177"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path4989"
+ d="M 35.114959,2.8829334 L 24.749125,14.379248 C 22.723556,12.353679 20.240238,9.4199373 24.361999,3.9542017 C 25.0809,-9.2995187 16.098752,-10.176767 6.8354775,-12.01586 C 17.442727,-11.52634 27.768315,-12.630532 28.807899,2.7854323 L 35.114959,2.8829334 z "
+ style="opacity:0.49431817;color:black;fill:url(#radialGradient5198);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ </g>
+</svg>
diff --git a/trunk/data/scan-preview.svg b/trunk/data/scan-preview.svg
new file mode 100644
index 0000000..fd8544e
--- /dev/null
+++ b/trunk/data/scan-preview.svg
@@ -0,0 +1,982 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="90.000000"
+ inkscape:export-xdpi="90.000000"
+ inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+ width="48px"
+ height="48px"
+ id="svg11300"
+ sodipodi:version="0.32"
+ inkscape:version="0.45"
+ sodipodi:docbase="/home/bersace/Projects/gnome-scan/data"
+ sodipodi:docname="scan-preview.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ sodipodi:modified="true">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient5293">
+ <stop
+ style="stop-color:#888a85;stop-opacity:1;"
+ offset="0"
+ id="stop5295" />
+ <stop
+ style="stop-color:#6a6b67;stop-opacity:1;"
+ offset="1"
+ id="stop5297" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5277">
+ <stop
+ style="stop-color:#a6a6a6;stop-opacity:1;"
+ offset="0"
+ id="stop5279" />
+ <stop
+ style="stop-color:#a6a6a6;stop-opacity:0;"
+ offset="1"
+ id="stop5281" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5255">
+ <stop
+ style="stop-color:#8e8e8e;stop-opacity:1;"
+ offset="0"
+ id="stop5257" />
+ <stop
+ style="stop-color:#d0d0d0;stop-opacity:1;"
+ offset="1"
+ id="stop5259" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5236">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5238" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5240" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5214">
+ <stop
+ style="stop-color:#7f8578;stop-opacity:1;"
+ offset="0"
+ id="stop5216" />
+ <stop
+ id="stop5222"
+ offset="0.25"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="0.65909094"
+ id="stop5224" />
+ <stop
+ style="stop-color:#666666;stop-opacity:1;"
+ offset="1"
+ id="stop5218" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5190">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5192" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5194" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5176">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5178" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5180" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5166">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5168" />
+ <stop
+ style="stop-color:#434c4f;stop-opacity:1;"
+ offset="1"
+ id="stop5170" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11520">
+ <stop
+ id="stop11522"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop11524"
+ offset="1.0000000"
+ style="stop-color:#dcdcdc;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11508"
+ inkscape:collect="always">
+ <stop
+ id="stop11510"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11512"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11494"
+ inkscape:collect="always">
+ <stop
+ id="stop11496"
+ offset="0"
+ style="stop-color:#ef2929;stop-opacity:1;" />
+ <stop
+ id="stop11498"
+ offset="1"
+ style="stop-color:#ef2929;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11415">
+ <stop
+ id="stop11417"
+ offset="0.0000000"
+ style="stop-color:#204a87;stop-opacity:0.0000000;" />
+ <stop
+ style="stop-color:#204a87;stop-opacity:1.0000000;"
+ offset="0.50000000"
+ id="stop11423" />
+ <stop
+ id="stop11419"
+ offset="1"
+ style="stop-color:#204a87;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11399"
+ inkscape:collect="always">
+ <stop
+ id="stop11401"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11403"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="translate(-60.28571,-0.285714)"
+ y2="34.462429"
+ x2="43.615788"
+ y1="3.7744560"
+ x1="15.828360"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11425"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-60.57143,0.000000)"
+ y2="39.033859"
+ x2="35.679932"
+ y1="9.3458843"
+ x1="9.6957054"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11427"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="33.462429"
+ x2="26.758644"
+ y1="19.774456"
+ x1="13.267134"
+ gradientTransform="translate(-60.85714,0.428571)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11439"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <radialGradient
+ r="8.5000000"
+ fy="39.142857"
+ fx="12.071428"
+ cy="39.142857"
+ cx="12.071428"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.487395,0.000000,20.06483)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11441"
+ xlink:href="#linearGradient11399"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ r="3.8335034"
+ fy="15.048258"
+ fx="27.577173"
+ cy="15.048258"
+ cx="27.577173"
+ id="radialGradient11500"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335034"
+ fy="16.049133"
+ fx="27.577173"
+ cy="16.049133"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11504"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.166583e-14,29.48178)"
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ id="radialGradient11514"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ gradientUnits="userSpaceOnUse"
+ r="20.530962"
+ fy="35.878170"
+ fx="24.445690"
+ cy="35.878170"
+ cx="24.445690"
+ id="radialGradient11526"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,3.185827e-15,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11532"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1348"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,-1.353344e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1350"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1352"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="16.049133"
+ fx="27.577173"
+ fy="16.049133"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1354"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="15.048258"
+ fx="27.577173"
+ fy="15.048258"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.220359e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.049266,-1.696401e-32,0.000000,2.049266,-25.65002,-37.31089)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient5172"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient5182"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932"
+ gradientTransform="matrix(1.968254,1.16303e-7,-9.004103e-8,1.52381,-24.68213,-14.68863)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5196"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223"
+ gradientTransform="matrix(1,0,0,0.5,0,9.681087)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient5220"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient5242"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19"
+ gradientTransform="matrix(1,0,0,0.802632,-1.00267e-15,6.5625)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5261"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5263"
+ gradientUnits="userSpaceOnUse"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5267"
+ gradientUnits="userSpaceOnUse"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168"
+ gradientTransform="matrix(0.6,0,0,0.6,3.8,14)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5271"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.6,0,0,0.6,9.8,14)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5273"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.5,-2,9.681087)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5277"
+ id="linearGradient5283"
+ x1="43.870953"
+ y1="15.846735"
+ x2="47.283165"
+ y2="9.129221"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient5299"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ id="linearGradient15662">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.0000000;"
+ offset="0.0000000"
+ id="stop15664" />
+ <stop
+ style="stop-color:#f8f8f8;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop15666" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient259">
+ <stop
+ style="stop-color:#e0e0e0;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop260" />
+ <stop
+ id="stop4886"
+ offset="0.40546969"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop4884"
+ offset="0.53448278"
+ style="stop-color:#cdcdcd;stop-opacity:1.0000000;" />
+ <stop
+ style="stop-color:#494949;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop261" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4668">
+ <stop
+ style="stop-color:#8e8d87;stop-opacity:1;"
+ offset="0"
+ id="stop4670" />
+ <stop
+ id="stop4676"
+ offset="0.27586207"
+ style="stop-color:#cbc9c1;stop-opacity:1.0000000;" />
+ <stop
+ style="stop-color:#8e8d87;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop4672" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4688">
+ <stop
+ style="stop-color:#666666;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop4690" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop4692" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4698">
+ <stop
+ style="stop-color:#fffffd;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop4700" />
+ <stop
+ id="stop4706"
+ offset="0.50000000"
+ style="stop-color:#bbbbb9;stop-opacity:1.0000000;" />
+ <stop
+ style="stop-color:#000000;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop4702" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4733">
+ <stop
+ style="stop-color:#000000;stop-opacity:0.23711340;"
+ offset="0.0000000"
+ id="stop4735" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop4737" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4741">
+ <stop
+ style="stop-color:#dcdcda;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop4743" />
+ <stop
+ style="stop-color:#bab9b7;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop4745" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4762">
+ <stop
+ id="stop4764"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.12371134;" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
+ offset="0.10344828"
+ id="stop4768" />
+ <stop
+ id="stop4766"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.333333,0.000000,27.91667)"
+ r="19.125000"
+ fy="41.875000"
+ fx="24.000000"
+ cy="41.875000"
+ cx="24.000000"
+ id="radialGradient7618"
+ xlink:href="#linearGradient7612"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient7612"
+ inkscape:collect="always">
+ <stop
+ id="stop7614"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop7616"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ y2="30.557772"
+ x2="31.335964"
+ y1="26.580296"
+ x1="27.366341"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient1887"
+ xlink:href="#linearGradient2846"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient2846">
+ <stop
+ style="stop-color:#8a8a8a;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop2848" />
+ <stop
+ style="stop-color:#484848;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop2850" />
+ </linearGradient>
+ <linearGradient
+ y2="31.062500"
+ x2="33.218750"
+ y1="34.000000"
+ x1="30.656250"
+ gradientTransform="matrix(1.334593,0,0,1.291292,-6.973842,-7.460658)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient1883"
+ xlink:href="#linearGradient4440"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient4440">
+ <stop
+ id="stop4442"
+ offset="0"
+ style="stop-color:#7d7d7d;stop-opacity:1;" />
+ <stop
+ style="stop-color:#b1b1b1;stop-opacity:1.0000000;"
+ offset="0.50000000"
+ id="stop4448" />
+ <stop
+ id="stop4444"
+ offset="1.0000000"
+ style="stop-color:#686868;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2366"
+ id="linearGradient2372"
+ x1="18.292673"
+ y1="13.602121"
+ x2="17.500893"
+ y2="25.743469"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ id="linearGradient2366">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop2368" />
+ <stop
+ id="stop2374"
+ offset="0.50000000"
+ style="stop-color:#ffffff;stop-opacity:0.21904762;" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop2370" />
+ </linearGradient>
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ r="8.3085051"
+ fy="21.817987"
+ fx="18.240929"
+ cy="21.817987"
+ cx="18.240929"
+ id="radialGradient4460"
+ xlink:href="#linearGradient4454"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient4454">
+ <stop
+ id="stop4456"
+ offset="0.0000000"
+ style="stop-color:#729fcf;stop-opacity:0.20784314;" />
+ <stop
+ id="stop4458"
+ offset="1.0000000"
+ style="stop-color:#729fcf;stop-opacity:0.67619050;" />
+ </linearGradient>
+ <radialGradient
+ r="6.6562500"
+ fy="13.078408"
+ fx="15.414371"
+ cy="13.078408"
+ cx="15.414371"
+ gradientTransform="matrix(2.592963,0,0,2.252104,-25.05975,-18.941)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient1876"
+ xlink:href="#linearGradient4467"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient4467">
+ <stop
+ id="stop4469"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop4471"
+ offset="1.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.24761905;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5048">
+ <stop
+ id="stop5050"
+ offset="0"
+ style="stop-color:black;stop-opacity:0;" />
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0.5"
+ id="stop5056" />
+ <stop
+ id="stop5052"
+ offset="1"
+ style="stop-color:black;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4762"
+ id="linearGradient2500"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.490161,0,0,0.667712,-47.994316,4.3337825)"
+ x1="15.387969"
+ y1="32.539238"
+ x2="15.487823"
+ y2="58.831264" />
+ </defs>
+ <sodipodi:namedview
+ stroke="#fce94f"
+ fill="#fce94f"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="0.25490196"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.99999999"
+ inkscape:cx="99.705687"
+ inkscape:cy="-19.006911"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="1000"
+ inkscape:window-height="721"
+ inkscape:window-x="219"
+ inkscape:window-y="25" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Jakub Steiner</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:source>http://jimmac.musichall.cz</dc:source>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+ <dc:title>Scanner Device</dc:title>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>device</rdf:li>
+ <rdf:li>input</rdf:li>
+ <rdf:li>scanner</rdf:li>
+ <rdf:li>image</rdf:li>
+ <rdf:li>raster</rdf:li>
+ <rdf:li>bitmap</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Attribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.38333333;color:#000000;fill:url(#radialGradient5242);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5234"
+ sodipodi:cx="23.5"
+ sodipodi:cy="33.25"
+ sodipodi:rx="19"
+ sodipodi:ry="15.25"
+ d="M 42.5 33.25 A 19 15.25 0 1 1 4.5,33.25 A 19 15.25 0 1 1 42.5 33.25 z"
+ transform="matrix(1.151316,0,0,0.565573,-5.680921,18.56968)" />
+ <path
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5283);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 25.046834,19.008622 C 25.046834,19.008622 33.57631,13.926292 37.06765,14.412428 C 40.55899,14.898564 40.060743,19.786466 43.254834,17.771185 C 46.526198,15.70715 45.199378,7.8716901 45.199378,7.8716901"
+ id="path5275"
+ sodipodi:nodetypes="czzc" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5220);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 7.5459416,12.291107 L 2.1542523,33.769476 L 2.331029,39.514719 C 2.331029,40.702219 3.1398494,41.698539 4.4523494,41.636039 L 38.481863,41.636039 C 39.667523,41.687816 40.691572,41.017321 40.603184,39.514719 L 40.691572,33.681088 L 34.681164,12.556273 L 7.5459416,12.291107 z "
+ id="path4287"
+ sodipodi:nodetypes="ccccccccc" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5184"
+ sodipodi:cx="14.18633"
+ sodipodi:cy="13.882098"
+ sodipodi:rx="1.281631"
+ sodipodi:ry="1.3258252"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ transform="translate(-1.646447,-0.441941)" />
+ <path
+ transform="translate(16.35355,-0.441941)"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ sodipodi:ry="1.3258252"
+ sodipodi:rx="1.281631"
+ sodipodi:cy="13.882098"
+ sodipodi:cx="14.18633"
+ id="path5186"
+ style="opacity:1;color:#000000;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="ccccccccc"
+ id="path5228"
+ d="M 8.379527,13.172561 L 3.1867164,33.735725 L 3.3528741,38.885851 C 3.3528741,40.002018 3.4881086,40.625989 4.7217668,40.567243 L 38.144627,40.567243 C 39.259065,40.61591 39.659099,40.360692 39.576021,38.948351 L 39.659099,33.715146 L 33.884736,13.421799 L 8.379527,13.172561 z "
+ style="opacity:0.38333333;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5299);fill-opacity:1.0;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 9.402097,13.437047 L 3.1265241,5.062044 C 2.6845824,4.5317139 3.3033006,3.4416435 4.4523491,3.5300318 L 38.65864,3.5300318 C 39.454135,3.4416435 40.691572,4.5592055 39.896077,5.2663123 L 33.266951,13.539182 L 9.402097,13.437047 z "
+ id="path4289"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5172);fill-opacity:1;fill-rule:evenodd;stroke:#363636;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 10.993087,16.533748 L 9.313709,28.73134 C 9.2253207,29.151185 9.2695147,29.703612 9.844039,29.703612 L 33.266951,29.703612 C 33.73099,29.703612 33.996154,29.372156 33.885669,28.73134 L 31.675961,16.533748 L 10.993087,16.533748 z "
+ id="path4291"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="opacity:0.86666667;color:#000000;fill:url(#radialGradient5182);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 11.747529,17.464967 L 11.046704,22.926962 C 17.587442,23.192127 22.746898,20.421758 31.320568,20.068205 L 30.796519,17.41319 L 11.747529,17.464967 z "
+ id="path5174"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:url(#radialGradient5273);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 9.625,12.3125 C 8.774447,12.649651 8.496458,12.999034 7.7803301,13.40625 L 5.2803301,23.46875 C 8.26835,26.384304 13.814131,28.375 20.8125,28.375 C 28.413506,28.375 34.380943,26.017285 37.03217,22.6875 L 34.53217,13.84375 C 33.807902,13.377305 33.515399,12.918304 32.625,12.53125 L 32.59375,12.53125 L 9.625,12.3125 z "
+ id="path5188"
+ sodipodi:nodetypes="cccsccccc" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 10.020815,29.173282 L 32.825009,29.173282 C 33.178562,29.151185 33.465824,28.908117 33.443727,28.642952 L 31.410795,17.240855 L 32.648232,28.289398 L 10.020815,29.173282 z "
+ id="path5204"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 4.25,4.5624999 L 38.8125,4.5624999"
+ id="path5226" />
+ <path
+ id="path5230"
+ d="M 8.46363,34.5625 L 38.259018,34.5625"
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.38333333;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5232"
+ sodipodi:cx="6.5"
+ sodipodi:cy="34.375"
+ sodipodi:rx="1"
+ sodipodi:ry="1"
+ d="M 7.5 34.375 A 1 1 0 1 1 5.5,34.375 A 1 1 0 1 1 7.5 34.375 z"
+ transform="translate(-0.5,-0.375)" />
+ <path
+ id="path5246"
+ d="M 11.613399,24.562172 L 31.251986,24.562172"
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fce94f;stroke-width:2.93673611;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 11.613399,24.5625 L 31.251986,24.5625"
+ id="path5244" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5263);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 10.002853,35 L 10.002853,36.538783 C 10.002853,36.601877 9.996434,36.680316 10.002853,36.741254 C 10.013569,36.825885 10.048121,36.9456 10.070343,37.024714 C 10.083931,37.069412 10.120815,37.144186 10.137834,37.186691 C 10.182446,37.291489 10.243011,37.422557 10.30656,37.510645 C 10.332667,37.54513 10.379059,37.600799 10.407796,37.632128 C 10.481203,37.708387 10.590426,37.781066 10.677758,37.8346 C 10.713179,37.855022 10.77549,37.899283 10.812739,37.915588 C 10.878666,37.942255 10.978429,37.983717 11.048955,37.996577 C 11.099737,38.004279 11.165102,37.996577 11.217681,37.996577 L 13.782319,37.996577 C 13.834898,37.996577 13.900263,38.004279 13.951045,37.996577 C 14.021571,37.983717 14.121334,37.942255 14.187262,37.915588 C 14.22451,37.899283 14.286821,37.855022 14.322243,37.8346 C 14.409574,37.781066 14.518798,37.708387 14.592204,37.632128 C 14.620941,37.600799 14.667333,37.54513 14.69344,37.510645 C 14.756989,37.422557 14.817555,37.291489 14.862166,37.186691 C 1
4.879185,37.144186 14.916069,37.069412 14.929657,37.024714 C 14.951879,36.9456 14.986431,36.825885 14.997147,36.741254 C 15.003566,36.680316 14.997147,36.601877 14.997147,36.538783 L 14.997147,35 L 10.002853,35 z "
+ id="rect5248" />
+ <path
+ id="path5253"
+ d="M 16.002853,35 L 16.002853,36.538783 C 16.002853,36.601877 15.996434,36.680316 16.002853,36.741254 C 16.013569,36.825885 16.048121,36.9456 16.070343,37.024714 C 16.083931,37.069412 16.120815,37.144186 16.137834,37.186691 C 16.182446,37.291489 16.243011,37.422557 16.30656,37.510645 C 16.332667,37.54513 16.379059,37.600799 16.407796,37.632128 C 16.481203,37.708387 16.590426,37.781066 16.677758,37.8346 C 16.713179,37.855022 16.77549,37.899283 16.812739,37.915588 C 16.878666,37.942255 16.978429,37.983717 17.048955,37.996577 C 17.099737,38.004279 17.165102,37.996577 17.217681,37.996577 L 19.782319,37.996577 C 19.834898,37.996577 19.900263,38.004279 19.951045,37.996577 C 20.021571,37.983717 20.121334,37.942255 20.187262,37.915588 C 20.22451,37.899283 20.286821,37.855022 20.322243,37.8346 C 20.409574,37.781066 20.518798,37.708387 20.592204,37.632128 C 20.620941,37.600799 20.667333,37.54513 20.69344,37.510645 C 20.756989,37.422557 20.817555,37.291489 20.862166,37.186691 C
20.879185,37.144186 20.916069,37.069412 20.929657,37.024714 C 20.951879,36.9456 20.986431,36.825885 20.997147,36.741254 C 21.003566,36.680316 20.997147,36.601877 20.997147,36.538783 L 20.997147,35 L 16.002853,35 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5261);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ id="path5265"
+ d="M 11.001712,35 L 11.001712,35.92327 C 11.001712,35.961126 10.99786,36.00819 11.001712,36.044752 C 11.008141,36.095531 11.028873,36.16736 11.042206,36.214828 C 11.050359,36.241647 11.072489,36.286512 11.0827,36.312015 C 11.109468,36.374893 11.145807,36.453534 11.183936,36.506387 C 11.1996,36.527078 11.227435,36.560479 11.244678,36.579277 C 11.288722,36.625032 11.354256,36.66864 11.406655,36.70076 C 11.427907,36.713013 11.465294,36.73957 11.487643,36.749353 C 11.5272,36.765353 11.587057,36.79023 11.629373,36.797946 C 11.659842,36.802567 11.699061,36.797946 11.730609,36.797946 L 13.269391,36.797946 C 13.300939,36.797946 13.340158,36.802567 13.370627,36.797946 C 13.412943,36.79023 13.4728,36.765353 13.512357,36.749353 C 13.534706,36.73957 13.572093,36.713013 13.593346,36.70076 C 13.645744,36.66864 13.711279,36.625032 13.755322,36.579277 C 13.772565,36.560479 13.8004,36.527078 13.816064,36.506387 C 13.854193,36.453534 13.890533,36.374893 13.9173,36.312015 C 13.927511,36
.286512 13.949641,36.241647 13.957794,36.214828 C 13.971127,36.16736 13.991859,36.095531 13.998288,36.044752 C 14.00214,36.00819 13.998288,35.961126 13.998288,35.92327 L 13.998288,35 L 11.001712,35 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5267);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5271);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 17.001712,35 L 17.001712,35.92327 C 17.001712,35.961126 16.99786,36.00819 17.001712,36.044752 C 17.008141,36.095531 17.028873,36.16736 17.042206,36.214828 C 17.050359,36.241647 17.072489,36.286512 17.0827,36.312015 C 17.109468,36.374893 17.145807,36.453534 17.183936,36.506387 C 17.1996,36.527078 17.227435,36.560479 17.244678,36.579277 C 17.288722,36.625032 17.354256,36.66864 17.406655,36.70076 C 17.427907,36.713013 17.465294,36.73957 17.487643,36.749353 C 17.5272,36.765353 17.587057,36.79023 17.629373,36.797946 C 17.659842,36.802567 17.699061,36.797946 17.730609,36.797946 L 19.269391,36.797946 C 19.300939,36.797946 19.340158,36.802567 19.370627,36.797946 C 19.412943,36.79023 19.4728,36.765353 19.512357,36.749353 C 19.534706,36.73957 19.572093,36.713013 19.593346,36.70076 C 19.645744,36.66864 19.711279,36.625032 19.755322,36.579277 C 19.772565,36.560479 19.8004,36.527078 19.816064,36.506387 C 19.854193,36.453534 19.890533,36.374893 19.9173,36.312015 C 19.927511,36
.286512 19.949641,36.241647 19.957794,36.214828 C 19.971127,36.16736 19.991859,36.095531 19.998288,36.044752 C 20.00214,36.00819 19.998288,35.961126 19.998288,35.92327 L 19.998288,35 L 17.001712,35 z "
+ id="path5269" />
+ <path
+ style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2500);stroke-width:0.94696695;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M -40.482972,24.748093 L -7.708609,24.748093 C -7.343522,24.748093 -6.877034,25.020546 -6.589358,25.432567 C -6.301682,25.844586 -5.295218,27.459106 -4.989974,27.897845 C -4.684731,28.336584 -4.555108,28.752481 -4.555108,29.293499 L -4.555108,40.557246 C -4.555108,41.421039 -4.688614,41.80442 -5.550738,41.80442 L -42.552761,41.80442 C -43.414884,41.80442 -43.610674,41.421039 -43.610674,40.557246 L -43.610674,29.293499 C -43.610674,28.8264 -43.390185,28.15661 -43.062839,27.730258 C -42.649772,27.192258 -41.982056,25.762407 -41.689772,25.365623 C -41.397488,24.968839 -40.86077,24.748093 -40.482972,24.748093 z "
+ id="path4750"
+ sodipodi:nodetypes="cssssssssssss" />
+ <g
+ id="g1890"
+ transform="matrix(0.715678,0,0,0.715678,6.7578527,7.7604018)">
+ <path
+ sodipodi:nodetypes="csscccscccscczzzz"
+ id="path2844"
+ d="M 18.627569,3.1435548 C 10.488439,3.1435548 3.8827682,9.7492259 3.8827682,17.888356 C 3.8827682,26.027486 10.488439,32.633158 18.627569,32.633158 C 22.107124,32.633158 25.17857,31.248765 27.701292,29.230511 C 27.495915,30.237392 27.623257,31.265879 28.457436,31.990436 L 39.42152,41.517846 C 40.654936,42.589175 42.508982,42.448806 43.58031,41.215389 C 44.651638,39.981971 44.511269,38.127927 43.277853,37.056599 L 32.313769,27.529188 C 31.642242,26.945909 30.820891,26.773219 30.007531,26.886466 C 31.994231,24.374044 33.37237,21.337663 33.37237,17.888356 C 33.37237,9.7492259 26.766699,3.1435548 18.627569,3.1435548 z M 18.551954,4.3697381 C 26.191413,4.3697381 31.843729,9.1586886 31.843729,17.661513 C 31.843729,26.336626 26.027039,30.953288 18.551954,30.953288 C 11.249005,30.953288 5.2601806,25.475196 5.2601806,17.661513 C 5.2601806,9.6774061 11.084819,4.369738 18.551954,4.3697381 z "
+ style="opacity:1;color:#000000;fill:#dcdcdc;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient1887);stroke-width:2.79455543;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:#dcdcdc;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 18.602905,3.0803551 C 10.437465,3.0803551 3.8104408,9.7073791 3.8104408,17.872819 C 3.8104408,26.038259 10.437465,32.665283 18.602905,32.665283 C 22.093708,32.665283 25.175082,31.276416 27.70596,29.251638 C 27.499919,30.261774 27.627672,31.293585 28.464547,32.020484 L 39.464073,41.578691 C 40.701476,42.653483 42.561515,42.512661 43.636306,41.275256 C 44.711097,40.037852 44.570274,38.177814 43.332871,37.103023 L 32.333346,27.544815 C 31.659648,26.959651 30.835642,26.786402 30.019653,26.900016 C 32.012775,24.379472 33.395369,21.333276 33.395369,17.872819 C 33.395369,9.7073791 26.768345,3.0803551 18.602905,3.0803551 z M 18.527046,6.2664243 C 24.808154,6.2664245 29.905864,11.364135 29.905864,17.645243 C 29.905864,23.926351 24.808154,29.024061 18.527046,29.024061 C 12.245938,29.024061 7.1482276,23.926351 7.1482276,17.645243 C 7.1482278,11.364135 12.245938,6.2664243 18.527046,6.2664243 z "
+ id="path4430" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient1883);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 39.507004,41.57769 C 39.028332,39.304503 40.904334,36.766268 43.091057,36.789315 C 43.091057,36.789315 32.33069,27.531204 32.33069,27.531204 C 29.385899,27.474498 28.061188,29.80382 28.553876,32.131126 L 39.507004,41.57769 z "
+ id="path4438"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2372);stroke-width:1.12164128;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path4450"
+ sodipodi:cx="17.500893"
+ sodipodi:cy="18.920233"
+ sodipodi:rx="11.048544"
+ sodipodi:ry="11.048544"
+ d="M 28.549437 18.920233 A 11.048544 11.048544 0 1 1 6.4523487,18.920233 A 11.048544 11.048544 0 1 1 28.549437 18.920233 z"
+ transform="matrix(1.245743,0,0,1.245743,-3.425346,-6.177033)" />
+ <rect
+ style="opacity:0.43315507;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.39732063;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="rect4495"
+ width="19.048445"
+ height="4.4404783"
+ x="40.373348"
+ y="0.14086054"
+ rx="2.985508"
+ ry="2.6379704"
+ transform="matrix(0.752986,0.658037,-0.648902,0.760872,0,0)" />
+ <path
+ sodipodi:type="arc"
+ style="color:#000000;fill:url(#radialGradient4460);fill-opacity:1;fill-rule:evenodd;stroke:#3063a3;stroke-width:0.99904466;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dashoffset:0;stroke-opacity:1;visibility:visible"
+ id="path4452"
+ sodipodi:cx="17.589281"
+ sodipodi:cy="18.478292"
+ sodipodi:rx="8.3085051"
+ sodipodi:ry="8.3085051"
+ d="M 25.897786 18.478292 A 8.3085051 8.3085051 0 1 1 9.280776,18.478292 A 8.3085051 8.3085051 0 1 1 25.897786 18.478292 z"
+ transform="matrix(1.398614,0,0,1.398614,-6.224338,-8.298958)" />
+ <path
+ style="opacity:0.83422457;color:#000000;fill:url(#radialGradient1876);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 18.156915,7.3966938 C 12.949325,7.3966938 8.7323681,11.613651 8.7323681,16.821241 C 8.7323681,18.325216 9.1526753,19.709014 9.77954,20.971144 C 11.03192,21.432757 12.362297,21.746827 13.774307,21.746827 C 19.945262,21.746827 24.873589,16.88519 25.254413,10.809698 C 23.523449,8.7641668 21.044374,7.3966938 18.156915,7.3966938 z "
+ id="path4462" />
+ </g>
+ </g>
+</svg>
diff --git a/trunk/data/scan.svg b/trunk/data/scan.svg
new file mode 100644
index 0000000..ce85d90
--- /dev/null
+++ b/trunk/data/scan.svg
@@ -0,0 +1,938 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="90.000000"
+ inkscape:export-xdpi="90.000000"
+ inkscape:export-filename="/home/bersace/Projects/gnomescan/libgnomescanui/icons/scan.png"
+ width="48px"
+ height="48px"
+ id="svg11300"
+ sodipodi:version="0.32"
+ inkscape:version="0.44"
+ sodipodi:docbase="/home/bersace/Projects/gnomescan/libgnomescanui/icons"
+ sodipodi:docname="scan.svg">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient5251"
+ inkscape:collect="always">
+ <stop
+ id="stop5253"
+ offset="0"
+ style="stop-color:#c4a000;stop-opacity:1" />
+ <stop
+ id="stop5255"
+ offset="1"
+ style="stop-color:#c4a000;stop-opacity:0" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5245"
+ inkscape:collect="always">
+ <stop
+ id="stop5247"
+ offset="0"
+ style="stop-color:#edd400;stop-opacity:1" />
+ <stop
+ id="stop5249"
+ offset="1"
+ style="stop-color:#edd400;stop-opacity:0" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2187">
+ <stop
+ id="stop2189"
+ offset="0"
+ style="stop-color:#fce94f;stop-opacity:0" />
+ <stop
+ id="stop2191"
+ offset="1"
+ style="stop-color:#fef4a4;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4991">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop4993" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop4995" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5293">
+ <stop
+ style="stop-color:#888a85;stop-opacity:1;"
+ offset="0"
+ id="stop5295" />
+ <stop
+ style="stop-color:#6a6b67;stop-opacity:1;"
+ offset="1"
+ id="stop5297" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5255">
+ <stop
+ style="stop-color:#8e8e8e;stop-opacity:1;"
+ offset="0"
+ id="stop5257" />
+ <stop
+ style="stop-color:#d0d0d0;stop-opacity:1;"
+ offset="1"
+ id="stop5259" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5236">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5238" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5240" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5214">
+ <stop
+ style="stop-color:#7f8578;stop-opacity:1;"
+ offset="0"
+ id="stop5216" />
+ <stop
+ id="stop5222"
+ offset="0.25"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="0.65909094"
+ id="stop5224" />
+ <stop
+ style="stop-color:#666666;stop-opacity:1;"
+ offset="1"
+ id="stop5218" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5190">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5192" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5194" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5176">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5178" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5180" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5166">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5168" />
+ <stop
+ style="stop-color:#434c4f;stop-opacity:1;"
+ offset="1"
+ id="stop5170" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11520">
+ <stop
+ id="stop11522"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop11524"
+ offset="1.0000000"
+ style="stop-color:#dcdcdc;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11508"
+ inkscape:collect="always">
+ <stop
+ id="stop11510"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11512"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11494"
+ inkscape:collect="always">
+ <stop
+ id="stop11496"
+ offset="0"
+ style="stop-color:#ef2929;stop-opacity:1;" />
+ <stop
+ id="stop11498"
+ offset="1"
+ style="stop-color:#ef2929;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11415">
+ <stop
+ id="stop11417"
+ offset="0.0000000"
+ style="stop-color:#204a87;stop-opacity:0.0000000;" />
+ <stop
+ style="stop-color:#204a87;stop-opacity:1.0000000;"
+ offset="0.50000000"
+ id="stop11423" />
+ <stop
+ id="stop11419"
+ offset="1"
+ style="stop-color:#204a87;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11399"
+ inkscape:collect="always">
+ <stop
+ id="stop11401"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11403"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="translate(-60.28571,-0.285714)"
+ y2="34.462429"
+ x2="43.615788"
+ y1="3.7744560"
+ x1="15.828360"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11425"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-60.57143,0.000000)"
+ y2="39.033859"
+ x2="35.679932"
+ y1="9.3458843"
+ x1="9.6957054"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11427"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="33.462429"
+ x2="26.758644"
+ y1="19.774456"
+ x1="13.267134"
+ gradientTransform="translate(-60.85714,0.428571)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11439"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <radialGradient
+ r="8.5000000"
+ fy="39.142857"
+ fx="12.071428"
+ cy="39.142857"
+ cx="12.071428"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.487395,0.000000,20.06483)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11441"
+ xlink:href="#linearGradient11399"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ r="3.8335034"
+ fy="15.048258"
+ fx="27.577173"
+ cy="15.048258"
+ cx="27.577173"
+ id="radialGradient11500"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335034"
+ fy="16.049133"
+ fx="27.577173"
+ cy="16.049133"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11504"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.166583e-14,29.48178)"
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ id="radialGradient11514"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ gradientUnits="userSpaceOnUse"
+ r="20.530962"
+ fy="35.878170"
+ fx="24.445690"
+ cy="35.878170"
+ cx="24.445690"
+ id="radialGradient11526"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,3.185827e-15,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11532"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1348"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,-1.353344e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1350"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1352"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="16.049133"
+ fx="27.577173"
+ fy="16.049133"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1354"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="15.048258"
+ fx="27.577173"
+ fy="15.048258"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.220359e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.049266,-1.696401e-32,0.000000,2.049266,-25.65002,-37.31089)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5196"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223"
+ gradientTransform="matrix(1,0,0,0.5,0,9.681087)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5245"
+ id="linearGradient5192"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0.21522,-13.18093)"
+ x1="12.055804"
+ y1="6.0573254"
+ x2="8.1568136"
+ y2="4.9517078" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5251"
+ id="linearGradient5194"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0.21522,-13.18093)"
+ x1="9.2939711"
+ y1="6.852345"
+ x2="5.6634517"
+ y2="5.8120818" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2187"
+ id="linearGradient5196"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.835576,0,0,0.835576,-1.527868,-14.30956)"
+ x1="8.9829826"
+ y1="9.8545456"
+ x2="24.781313"
+ y2="20.213238" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4991"
+ id="radialGradient5198"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-1.314471,-1.006312e-2,-1.022964e-2,1.336221,46.4363,-18.09082)"
+ cx="12.634145"
+ cy="22.05332"
+ fx="12.634145"
+ fy="22.05332"
+ r="19.0625" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient6203"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.802632,0,6.5625)"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient6205"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,6.71768,11.86044)"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient6207"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,8.354182,11.86044)"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient6209"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,6.71768,11.86044)"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient6211"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.610525,9.516504e-8,-7.367615e-8,1.246859,-11.84199,-0.158542)"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient6213"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.409125,6.71768,19.782)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient6215"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,6.71768,11.86044)"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient6217"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.818251,0,0,0.818251,6.71768,11.86044)"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient6219"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.49095,0,0,0.49095,11.46354,23.31595)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient6221"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.49095,0,0,0.49095,16.37304,23.31595)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient14189"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.591826,0,0,0.591826,13.18954,15.99136)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient14192"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.591826,0,0,0.591826,7.271291,15.99136)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient14195"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550295,2.182084)"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient14198"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550295,2.182084)"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient14207"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.493189,1.550295,11.73128)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient14210"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.941441,1.147186e-7,-8.881442e-8,1.503052,-20.82285,-12.30644)"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient14213"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550298,2.18209)"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient14216"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,3.523054,2.18209)"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient14222"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550298,2.18209)"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient15110"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.802632,0,6.5625)"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient15132"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.802632,0,6.5625)"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient15134"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550298,2.18209)"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient15136"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,3.523054,2.18209)"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient15138"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550298,2.18209)"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient15140"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.941441,1.147186e-7,-8.881442e-8,1.503052,-20.82285,-12.30644)"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient15142"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.493189,1.550295,11.73128)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient15144"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550295,2.182084)"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient15146"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.986377,0,0,0.986377,1.550295,2.182084)"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient15148"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.591826,0,0,0.591826,7.271291,15.99136)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient15150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.591826,0,0,0.591826,13.18954,15.99136)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ </defs>
+ <sodipodi:namedview
+ stroke="#fce94f"
+ fill="#fce94f"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666"
+ borderopacity="1"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="11.313708"
+ inkscape:cx="13.96575"
+ inkscape:cy="30.368253"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:showpageshadow="true"
+ inkscape:window-width="1270"
+ inkscape:window-height="945"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ borderlayer="true"
+ showborder="true" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Jakub Steiner</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:source>http://jimmac.musichall.cz</dc:source>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+ <dc:title>Scanner Device</dc:title>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>device</rdf:li>
+ <rdf:li>input</rdf:li>
+ <rdf:li>scanner</rdf:li>
+ <rdf:li>image</rdf:li>
+ <rdf:li>raster</rdf:li>
+ <rdf:li>bitmap</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Attribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <g
+ id="g15112"
+ transform="translate(-0.606849,0)">
+ <path
+ transform="matrix(1.135631,0,0,0.557869,-2.08048,20.4988)"
+ d="M 42.5 33.25 A 19 15.25 0 1 1 4.5,33.25 A 19 15.25 0 1 1 42.5 33.25 z"
+ sodipodi:ry="15.25"
+ sodipodi:rx="19"
+ sodipodi:cy="33.25"
+ sodipodi:cx="23.5"
+ id="path5234"
+ style="opacity:0.38333333;color:black;fill:url(#radialGradient15132);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="ccccccccc"
+ id="path4287"
+ d="M 10.966196,14.305756 L 5.647954,35.49153 L 5.8223229,41.158509 C 5.8223229,42.32983 6.6201244,43.312578 7.9147447,43.250929 L 41.480685,43.250929 C 42.650195,43.302001 43.660293,42.64064 43.573109,41.158509 L 43.660293,35.404347 L 37.731762,14.567308 L 10.966196,14.305756 z "
+ style="color:black;fill:url(#linearGradient15134);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:2.4960072;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ transform="matrix(0.986377,0,0,0.986377,1.899033,1.746156)"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ sodipodi:ry="1.3258252"
+ sodipodi:rx="1.281631"
+ sodipodi:cy="13.882098"
+ sodipodi:cx="14.18633"
+ id="path5184"
+ style="color:black;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="color:black;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5186"
+ sodipodi:cx="14.18633"
+ sodipodi:cy="13.882098"
+ sodipodi:rx="1.281631"
+ sodipodi:ry="1.3258252"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ transform="matrix(0.986377,0,0,0.986377,19.6538,1.746156)" />
+ <path
+ style="opacity:0.38333333;color:black;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:2.35287166;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 12.526219,15.950141 L 7.6978754,35.070032 L 7.8523708,39.858685 C 7.8523708,40.896511 7.9781146,41.476687 9.125186,41.422063 L 40.202187,41.422063 C 41.238405,41.467315 41.610363,41.230009 41.533116,39.916797 L 41.610363,35.050896 L 36.241288,16.181884 L 12.526219,15.950141 z "
+ id="path5228"
+ sodipodi:nodetypes="ccccccccc" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ id="path4289"
+ d="M 12.797065,15.436085 L 6.6069817,7.1751719 C 6.171059,6.6520662 6.781349,5.5768461 7.9147447,5.6640292 L 41.655055,5.6640292 C 42.439712,5.5768461 43.660293,6.6791828 42.875634,7.3766571 L 36.336816,15.536828 L 12.797065,15.436085 z "
+ style="color:black;fill:url(#linearGradient15136);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:2.4960072;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="ccccccc"
+ id="path4291"
+ d="M 14.366382,18.4906 L 12.709882,30.522028 C 12.622696,30.936154 12.666289,31.481054 13.232987,31.481054 L 36.336816,31.481054 C 36.794533,31.481054 37.056084,31.154114 36.947105,30.522028 L 34.767499,18.4906 L 14.366382,18.4906 z "
+ style="color:black;fill:url(#linearGradient15138);fill-opacity:1;fill-rule:evenodd;stroke:#363636;stroke-width:0.98637736;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path5174"
+ d="M 15.110545,19.409133 L 14.419269,24.79672 C 20.870903,25.058273 25.960073,22.325645 34.416946,21.976908 L 33.900037,19.358063 L 15.110545,19.409133 z "
+ style="opacity:0.86666667;color:black;fill:url(#radialGradient15140);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cccsccccc"
+ id="path5188"
+ d="M 13.016932,14.326857 C 12.177964,14.659415 11.903764,15.004039 11.197391,15.405707 L 8.7314471,25.331129 C 11.678762,28.206964 17.148996,30.170543 24.052027,30.170543 C 31.549488,30.170543 37.435631,27.844944 40.050741,24.560521 L 37.584799,15.837247 C 36.870396,15.377155 36.581879,14.924408 35.70361,14.542627 L 35.672785,14.542627 L 13.016932,14.326857 z "
+ style="opacity:0.40555558;color:black;fill:url(#radialGradient15142);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path5204"
+ d="M 13.407355,30.957949 L 35.900893,30.957949 C 36.249631,30.936154 36.532979,30.696397 36.511183,30.434844 L 34.505945,19.188074 L 35.726525,30.086105 L 13.407355,30.957949 z "
+ style="opacity:0.40555558;color:black;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ id="path5226"
+ d="M 9.2218039,7.7855193 L 40.300166,7.7855193"
+ style="opacity:0.40555558;color:black;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:2.27538943;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:0.40555558;color:black;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:0.98637736;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 11.871382,36.273751 L 41.260877,36.273751"
+ id="path5230" />
+ <path
+ style="color:black;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fce94f;stroke-width:2.89672971;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 14.978243,26.409655 L 34.349299,26.409655"
+ id="path5246" />
+ <path
+ id="path5244"
+ d="M 14.978243,26.409978 L 34.349299,26.409978"
+ style="color:black;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:0.98637712;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ id="rect5248"
+ d="M 13.389637,36.705292 L 13.389637,38.223112 C 13.389637,38.285347 13.383305,38.362717 13.389637,38.422825 C 13.400206,38.506304 13.434289,38.624386 13.456208,38.702424 C 13.46961,38.746512 13.505992,38.820268 13.522779,38.862194 C 13.566784,38.965564 13.626524,39.094847 13.689206,39.181734 C 13.714959,39.215749 13.760718,39.27066 13.789064,39.301563 C 13.861471,39.376784 13.969206,39.448472 14.055348,39.501277 C 14.090286,39.52142 14.151749,39.565077 14.18849,39.581161 C 14.25352,39.607466 14.351923,39.648362 14.421489,39.661046 C 14.47158,39.668644 14.536053,39.661046 14.587915,39.661046 L 17.117617,39.661046 C 17.169479,39.661046 17.233955,39.668644 17.284044,39.661046 C 17.35361,39.648362 17.452012,39.607466 17.517042,39.581161 C 17.553785,39.565077 17.615246,39.52142 17.650185,39.501277 C 17.736326,39.448472 17.844064,39.376784 17.916469,39.301563 C 17.944814,39.27066 17.990575,39.215749 18.016326,39.181734 C 18.079008,39.094847 18.138749,38.965564 18.182752,
38.862194 C 18.19954,38.820268 18.235922,38.746512 18.249324,38.702424 C 18.271244,38.624386 18.305325,38.506304 18.315894,38.422825 C 18.322227,38.362717 18.315894,38.285347 18.315894,38.223112 L 18.315894,36.705292 L 13.389637,36.705292 z "
+ style="color:black;fill:url(#linearGradient15144);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="color:black;fill:url(#linearGradient15146);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 19.307901,36.705292 L 19.307901,38.223112 C 19.307901,38.285347 19.301569,38.362717 19.307901,38.422825 C 19.31847,38.506304 19.352552,38.624386 19.374471,38.702424 C 19.387873,38.746512 19.424256,38.820268 19.441043,38.862194 C 19.485048,38.965564 19.544787,39.094847 19.607471,39.181734 C 19.633222,39.215749 19.678981,39.27066 19.707327,39.301563 C 19.779734,39.376784 19.88747,39.448472 19.973611,39.501277 C 20.00855,39.52142 20.070012,39.565077 20.106754,39.581161 C 20.171784,39.607466 20.270187,39.648362 20.339753,39.661046 C 20.389842,39.668644 20.454317,39.661046 20.506179,39.661046 L 23.03588,39.661046 C 23.087744,39.661046 23.152217,39.668644 23.202308,39.661046 C 23.271873,39.648362 23.370277,39.607466 23.435306,39.581161 C 23.472049,39.565077 23.533509,39.52142 23.568448,39.501277 C 23.654591,39.448472 23.762326,39.376784 23.834734,39.301563 C 23.863078,39.27066 23.908838,39.215749 23.93459,39.181734 C 23.997274,39.094847 24.057014,38.965564 24.101018,
38.862194 C 24.117805,38.820268 24.154185,38.746512 24.167587,38.702424 C 24.189507,38.624386 24.223589,38.506304 24.234158,38.422825 C 24.240491,38.362717 24.234158,38.285347 24.234158,38.223112 L 24.234158,36.705292 L 19.307901,36.705292 z "
+ id="path5253" />
+ <path
+ style="color:black;fill:url(#linearGradient15148);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 14.374888,36.705292 L 14.374888,37.615984 C 14.374888,37.653324 14.371089,37.699746 14.374888,37.735811 C 14.381231,37.785899 14.40168,37.856749 14.414832,37.903569 C 14.422873,37.930024 14.444702,37.974277 14.454774,37.999433 C 14.481176,38.061455 14.517022,38.139025 14.554631,38.191158 C 14.570081,38.211568 14.597536,38.244511 14.614545,38.263054 C 14.657988,38.308186 14.722631,38.351201 14.774317,38.382882 C 14.795278,38.394968 14.832154,38.421164 14.8542,38.430813 C 14.893218,38.446595 14.95226,38.471134 14.994001,38.478744 C 15.024054,38.483302 15.062738,38.478744 15.093857,38.478744 L 16.611675,38.478744 C 16.642794,38.478744 16.681479,38.483302 16.711533,38.478744 C 16.753273,38.471134 16.812313,38.446595 16.851332,38.430813 C 16.873377,38.421164 16.910254,38.394968 16.931218,38.382882 C 16.982903,38.351201 17.047544,38.308186 17.090987,38.263054 C 17.107995,38.244511 17.135451,38.211568 17.150903,38.191158 C 17.188513,38.139025 17.224357,38.061455 17.25
0759,37.999433 C 17.260831,37.974277 17.282659,37.930024 17.2907,37.903569 C 17.303853,37.856749 17.324302,37.785899 17.330643,37.735811 C 17.334443,37.699746 17.330643,37.653324 17.330643,37.615984 L 17.330643,36.705292 L 14.374888,36.705292 z "
+ id="path5265" />
+ <path
+ id="path5269"
+ d="M 20.293153,36.705292 L 20.293153,37.615984 C 20.293153,37.653324 20.289354,37.699746 20.293153,37.735811 C 20.299494,37.785899 20.319943,37.856749 20.333095,37.903569 C 20.341137,37.930024 20.362966,37.974277 20.373037,37.999433 C 20.39944,38.061455 20.435284,38.139025 20.472895,38.191158 C 20.488345,38.211568 20.515801,38.244511 20.532809,38.263054 C 20.576253,38.308186 20.640895,38.351201 20.692579,38.382882 C 20.713541,38.394968 20.750419,38.421164 20.772463,38.430813 C 20.811482,38.446595 20.870524,38.471134 20.912263,38.478744 C 20.942317,38.483302 20.981001,38.478744 21.012121,38.478744 L 22.52994,38.478744 C 22.561057,38.478744 22.599743,38.483302 22.629796,38.478744 C 22.671537,38.471134 22.730579,38.446595 22.769595,38.430813 C 22.791641,38.421164 22.828518,38.394968 22.849481,38.382882 C 22.901166,38.351201 22.965809,38.308186 23.009252,38.263054 C 23.026259,38.244511 23.053715,38.211568 23.069166,38.191158 C 23.106774,38.139025 23.142621,38.061455 23.
169022,37.999433 C 23.179095,37.974277 23.200924,37.930024 23.208965,37.903569 C 23.222116,37.856749 23.242567,37.785899 23.248907,37.735811 C 23.252707,37.699746 23.248907,37.653324 23.248907,37.615984 L 23.248907,36.705292 L 20.293153,36.705292 z "
+ style="color:black;fill:url(#linearGradient15150);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ <g
+ id="g5187"
+ transform="matrix(0,-1.02881,-1.02881,0,19.65961,41.19875)">
+ <path
+ sodipodi:nodetypes="ccccccc"
+ id="path1432"
+ d="M 5.3632149,-11.917699 C 13.701877,-12.290696 28.956836,-13.803874 28.797636,2.4359305 L 36.282377,2.4359305 L 24.732872,15.765565 L 12.62882,2.4359305 C 12.62882,2.4359305 20.342079,2.4359305 20.342079,2.4359305 C 20.799141,-8.5334367 13.43556,-11.040568 5.3632149,-11.917699 z "
+ style="opacity:1;color:black;fill:url(#linearGradient5192);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient5194);stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+ <path
+ style="opacity:1;color:black;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient5196);stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ d="M 7.6441504,-11.777633 C 16.000556,-12.225374 28.041105,-10.535412 28.041105,3.6442369 L 32.976019,3.6442369 C 32.976019,3.6442369 24.66772,13.115613 24.66772,13.115613 L 16.054286,3.8727903 C 16.054286,3.8727903 21.646831,3.8727903 21.646831,3.8727903 C 21.646831,-7.9400936 16.37816,-10.941834 7.6441504,-11.777633 z "
+ id="path2177"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path4989"
+ d="M 35.114959,2.8829334 L 24.749125,14.379248 C 22.723556,12.353679 20.240238,9.4199373 24.361999,3.9542017 C 25.0809,-9.2995187 16.098752,-10.176767 6.8354775,-12.01586 C 17.442727,-11.52634 27.768315,-12.630532 28.807899,2.7854323 L 35.114959,2.8829334 z "
+ style="opacity:0.49431817;color:black;fill:url(#radialGradient5198);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ </g>
+</svg>
diff --git a/trunk/data/scanner-flatbed.svg b/trunk/data/scanner-flatbed.svg
new file mode 100644
index 0000000..ffee73a
--- /dev/null
+++ b/trunk/data/scanner-flatbed.svg
@@ -0,0 +1,655 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ inkscape:export-ydpi="90.000000"
+ inkscape:export-xdpi="90.000000"
+ inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
+ width="48px"
+ height="48px"
+ id="svg11300"
+ sodipodi:version="0.32"
+ inkscape:version="0.43+devel"
+ sodipodi:docbase="/home/jimmac/src/cvs/tango-art-libre/scalable/devices"
+ sodipodi:docname="input-scanner.svg">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient5293">
+ <stop
+ style="stop-color:#888a85;stop-opacity:1;"
+ offset="0"
+ id="stop5295" />
+ <stop
+ style="stop-color:#6a6b67;stop-opacity:1;"
+ offset="1"
+ id="stop5297" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5277">
+ <stop
+ style="stop-color:#a6a6a6;stop-opacity:1;"
+ offset="0"
+ id="stop5279" />
+ <stop
+ style="stop-color:#a6a6a6;stop-opacity:0;"
+ offset="1"
+ id="stop5281" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5255">
+ <stop
+ style="stop-color:#8e8e8e;stop-opacity:1;"
+ offset="0"
+ id="stop5257" />
+ <stop
+ style="stop-color:#d0d0d0;stop-opacity:1;"
+ offset="1"
+ id="stop5259" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5236">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5238" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5240" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5214">
+ <stop
+ style="stop-color:#7f8578;stop-opacity:1;"
+ offset="0"
+ id="stop5216" />
+ <stop
+ id="stop5222"
+ offset="0.25"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="0.65909094"
+ id="stop5224" />
+ <stop
+ style="stop-color:#666666;stop-opacity:1;"
+ offset="1"
+ id="stop5218" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5190">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5192" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop5194" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5176">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5178" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5180" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5166">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop5168" />
+ <stop
+ style="stop-color:#434c4f;stop-opacity:1;"
+ offset="1"
+ id="stop5170" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11520">
+ <stop
+ id="stop11522"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop11524"
+ offset="1.0000000"
+ style="stop-color:#dcdcdc;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11508"
+ inkscape:collect="always">
+ <stop
+ id="stop11510"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11512"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11494"
+ inkscape:collect="always">
+ <stop
+ id="stop11496"
+ offset="0"
+ style="stop-color:#ef2929;stop-opacity:1;" />
+ <stop
+ id="stop11498"
+ offset="1"
+ style="stop-color:#ef2929;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11415">
+ <stop
+ id="stop11417"
+ offset="0.0000000"
+ style="stop-color:#204a87;stop-opacity:0.0000000;" />
+ <stop
+ style="stop-color:#204a87;stop-opacity:1.0000000;"
+ offset="0.50000000"
+ id="stop11423" />
+ <stop
+ id="stop11419"
+ offset="1"
+ style="stop-color:#204a87;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11399"
+ inkscape:collect="always">
+ <stop
+ id="stop11401"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop11403"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="translate(-60.28571,-0.285714)"
+ y2="34.462429"
+ x2="43.615788"
+ y1="3.7744560"
+ x1="15.828360"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11425"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-60.57143,0.000000)"
+ y2="39.033859"
+ x2="35.679932"
+ y1="9.3458843"
+ x1="9.6957054"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11427"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="33.462429"
+ x2="26.758644"
+ y1="19.774456"
+ x1="13.267134"
+ gradientTransform="translate(-60.85714,0.428571)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient11439"
+ xlink:href="#linearGradient11415"
+ inkscape:collect="always" />
+ <radialGradient
+ r="8.5000000"
+ fy="39.142857"
+ fx="12.071428"
+ cy="39.142857"
+ cx="12.071428"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.487395,0.000000,20.06483)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11441"
+ xlink:href="#linearGradient11399"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ r="3.8335034"
+ fy="15.048258"
+ fx="27.577173"
+ cy="15.048258"
+ cx="27.577173"
+ id="radialGradient11500"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335034"
+ fy="16.049133"
+ fx="27.577173"
+ cy="16.049133"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11504"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.166583e-14,29.48178)"
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ id="radialGradient11514"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ gradientUnits="userSpaceOnUse"
+ r="20.530962"
+ fy="35.878170"
+ fx="24.445690"
+ cy="35.878170"
+ cx="24.445690"
+ id="radialGradient11526"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,3.185827e-15,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient11532"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1348"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,-1.353344e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1350"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1352"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="16.049133"
+ fx="27.577173"
+ fy="16.049133"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient1354"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="15.048258"
+ fx="27.577173"
+ fy="15.048258"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient1356"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.220359e-14,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient1366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.049266,-1.696401e-32,0.000000,2.049266,-25.65002,-37.31089)"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5166"
+ id="linearGradient5172"
+ x1="23.599689"
+ y1="17.461824"
+ x2="23.599689"
+ y2="33.902058"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5176"
+ id="radialGradient5182"
+ cx="23.33452"
+ cy="27.39226"
+ fx="23.33452"
+ fy="27.39226"
+ r="11.136932"
+ gradientTransform="matrix(1.968254,1.16303e-7,-9.004103e-8,1.52381,-24.68213,-14.68863)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5196"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223"
+ gradientTransform="matrix(1,0,0,0.5,0,9.681087)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5214"
+ id="linearGradient5220"
+ x1="22.657747"
+ y1="14.85437"
+ x2="22.657747"
+ y2="41.054031"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5236"
+ id="radialGradient5242"
+ cx="23.5"
+ cy="33.25"
+ fx="23.5"
+ fy="33.25"
+ r="19"
+ gradientTransform="matrix(1,0,0,0.802632,-1.00267e-15,6.5625)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5261"
+ x1="18"
+ y1="36.5"
+ x2="23"
+ y2="36.5"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5263"
+ gradientUnits="userSpaceOnUse"
+ x1="11.998403"
+ y1="36.5"
+ x2="17"
+ y2="36.5"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5267"
+ gradientUnits="userSpaceOnUse"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168"
+ gradientTransform="matrix(0.6,0,0,0.6,3.8,14)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5255"
+ id="linearGradient5271"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.6,0,0,0.6,9.8,14)"
+ x1="14.03125"
+ y1="36.864582"
+ x2="12"
+ y2="36.854168" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5190"
+ id="radialGradient5273"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.5,-2,9.681087)"
+ cx="22.804193"
+ cy="19.362175"
+ fx="22.804193"
+ fy="19.362175"
+ r="18.031223" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5277"
+ id="linearGradient5283"
+ x1="43.870953"
+ y1="15.846735"
+ x2="47.283165"
+ y2="9.129221"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2,0)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5293"
+ id="linearGradient5299"
+ x1="19.483202"
+ y1="5.532073"
+ x2="21.567848"
+ y2="12.289182"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ stroke="#fce94f"
+ fill="#fce94f"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="0.25490196"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.6568542"
+ inkscape:cx="23.909435"
+ inkscape:cy="8.4399038"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="1000"
+ inkscape:window-height="807"
+ inkscape:window-x="607"
+ inkscape:window-y="312" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Jakub Steiner</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:source>http://jimmac.musichall.cz</dc:source>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+ <dc:title>Scanner Device</dc:title>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>device</rdf:li>
+ <rdf:li>input</rdf:li>
+ <rdf:li>scanner</rdf:li>
+ <rdf:li>image</rdf:li>
+ <rdf:li>raster</rdf:li>
+ <rdf:li>bitmap</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Attribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.38333333;color:#000000;fill:url(#radialGradient5242);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5234"
+ sodipodi:cx="23.5"
+ sodipodi:cy="33.25"
+ sodipodi:rx="19"
+ sodipodi:ry="15.25"
+ d="M 42.5 33.25 A 19 15.25 0 1 1 4.5,33.25 A 19 15.25 0 1 1 42.5 33.25 z"
+ transform="matrix(1.151316,0,0,0.565573,-5.680921,18.56968)" />
+ <path
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5283);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 25.046834,19.008622 C 25.046834,19.008622 33.57631,13.926292 37.06765,14.412428 C 40.55899,14.898564 40.060743,19.786466 43.254834,17.771185 C 46.526198,15.70715 45.199378,7.8716901 45.199378,7.8716901"
+ id="path5275"
+ sodipodi:nodetypes="czzc" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5220);fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 7.5459416,12.291107 L 2.1542523,33.769476 L 2.331029,39.514719 C 2.331029,40.702219 3.1398494,41.698539 4.4523494,41.636039 L 38.481863,41.636039 C 39.667523,41.687816 40.691572,41.017321 40.603184,39.514719 L 40.691572,33.681088 L 34.681164,12.556273 L 7.5459416,12.291107 z "
+ id="path4287"
+ sodipodi:nodetypes="ccccccccc" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;color:#000000;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5184"
+ sodipodi:cx="14.18633"
+ sodipodi:cy="13.882098"
+ sodipodi:rx="1.281631"
+ sodipodi:ry="1.3258252"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ transform="translate(-1.646447,-0.441941)" />
+ <path
+ transform="translate(16.35355,-0.441941)"
+ d="M 15.467961 13.882098 A 1.281631 1.3258252 0 1 1 12.904699,13.882098 A 1.281631 1.3258252 0 1 1 15.467961 13.882098 z"
+ sodipodi:ry="1.3258252"
+ sodipodi:rx="1.281631"
+ sodipodi:cy="13.882098"
+ sodipodi:cx="14.18633"
+ id="path5186"
+ style="opacity:1;color:#000000;fill:#888a85;fill-opacity:1;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="ccccccccc"
+ id="path5228"
+ d="M 8.379527,13.172561 L 3.1867164,33.735725 L 3.3528741,38.885851 C 3.3528741,40.002018 3.4881086,40.625989 4.7217668,40.567243 L 38.144627,40.567243 C 39.259065,40.61591 39.659099,40.360692 39.576021,38.948351 L 39.659099,33.715146 L 33.884736,13.421799 L 8.379527,13.172561 z "
+ style="opacity:0.38333333;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5299);fill-opacity:1.0;fill-rule:evenodd;stroke:#555753;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 9.402097,13.437047 L 3.1265241,5.062044 C 2.6845824,4.5317139 3.3033006,3.4416435 4.4523491,3.5300318 L 38.65864,3.5300318 C 39.454135,3.4416435 40.691572,4.5592055 39.896077,5.2663123 L 33.266951,13.539182 L 9.402097,13.437047 z "
+ id="path4289"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5172);fill-opacity:1;fill-rule:evenodd;stroke:#363636;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 10.993087,16.533748 L 9.313709,28.73134 C 9.2253207,29.151185 9.2695147,29.703612 9.844039,29.703612 L 33.266951,29.703612 C 33.73099,29.703612 33.996154,29.372156 33.885669,28.73134 L 31.675961,16.533748 L 10.993087,16.533748 z "
+ id="path4291"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="opacity:0.86666667;color:#000000;fill:url(#radialGradient5182);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 11.747529,17.464967 L 11.046704,22.926962 C 17.587442,23.192127 22.746898,20.421758 31.320568,20.068205 L 30.796519,17.41319 L 11.747529,17.464967 z "
+ id="path5174"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:url(#radialGradient5273);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 9.625,12.3125 C 8.774447,12.649651 8.496458,12.999034 7.7803301,13.40625 L 5.2803301,23.46875 C 8.26835,26.384304 13.814131,28.375 20.8125,28.375 C 28.413506,28.375 34.380943,26.017285 37.03217,22.6875 L 34.53217,13.84375 C 33.807902,13.377305 33.515399,12.918304 32.625,12.53125 L 32.59375,12.53125 L 9.625,12.3125 z "
+ id="path5188"
+ sodipodi:nodetypes="cccsccccc" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 10.020815,29.173282 L 32.825009,29.173282 C 33.178562,29.151185 33.465824,28.908117 33.443727,28.642952 L 31.410795,17.240855 L 32.648232,28.289398 L 10.020815,29.173282 z "
+ id="path5204"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 4.25,4.5624999 L 38.8125,4.5624999"
+ id="path5226" />
+ <path
+ id="path5230"
+ d="M 8.46363,34.5625 L 38.259018,34.5625"
+ style="opacity:0.40555558;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.38333333;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5232"
+ sodipodi:cx="6.5"
+ sodipodi:cy="34.375"
+ sodipodi:rx="1"
+ sodipodi:ry="1"
+ d="M 7.5 34.375 A 1 1 0 1 1 5.5,34.375 A 1 1 0 1 1 7.5 34.375 z"
+ transform="translate(-0.5,-0.375)" />
+ <path
+ id="path5246"
+ d="M 11.613399,24.562172 L 31.251986,24.562172"
+ style="opacity:1;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fce94f;stroke-width:2.93673611;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M 11.613399,24.5625 L 31.251986,24.5625"
+ id="path5244" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5263);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 10.002853,35 L 10.002853,36.538783 C 10.002853,36.601877 9.996434,36.680316 10.002853,36.741254 C 10.013569,36.825885 10.048121,36.9456 10.070343,37.024714 C 10.083931,37.069412 10.120815,37.144186 10.137834,37.186691 C 10.182446,37.291489 10.243011,37.422557 10.30656,37.510645 C 10.332667,37.54513 10.379059,37.600799 10.407796,37.632128 C 10.481203,37.708387 10.590426,37.781066 10.677758,37.8346 C 10.713179,37.855022 10.77549,37.899283 10.812739,37.915588 C 10.878666,37.942255 10.978429,37.983717 11.048955,37.996577 C 11.099737,38.004279 11.165102,37.996577 11.217681,37.996577 L 13.782319,37.996577 C 13.834898,37.996577 13.900263,38.004279 13.951045,37.996577 C 14.021571,37.983717 14.121334,37.942255 14.187262,37.915588 C 14.22451,37.899283 14.286821,37.855022 14.322243,37.8346 C 14.409574,37.781066 14.518798,37.708387 14.592204,37.632128 C 14.620941,37.600799 14.667333,37.54513 14.69344,37.510645 C 14.756989,37.422557 14.817555,37.291489 14.862166,37.186691 C 1
4.879185,37.144186 14.916069,37.069412 14.929657,37.024714 C 14.951879,36.9456 14.986431,36.825885 14.997147,36.741254 C 15.003566,36.680316 14.997147,36.601877 14.997147,36.538783 L 14.997147,35 L 10.002853,35 z "
+ id="rect5248" />
+ <path
+ id="path5253"
+ d="M 16.002853,35 L 16.002853,36.538783 C 16.002853,36.601877 15.996434,36.680316 16.002853,36.741254 C 16.013569,36.825885 16.048121,36.9456 16.070343,37.024714 C 16.083931,37.069412 16.120815,37.144186 16.137834,37.186691 C 16.182446,37.291489 16.243011,37.422557 16.30656,37.510645 C 16.332667,37.54513 16.379059,37.600799 16.407796,37.632128 C 16.481203,37.708387 16.590426,37.781066 16.677758,37.8346 C 16.713179,37.855022 16.77549,37.899283 16.812739,37.915588 C 16.878666,37.942255 16.978429,37.983717 17.048955,37.996577 C 17.099737,38.004279 17.165102,37.996577 17.217681,37.996577 L 19.782319,37.996577 C 19.834898,37.996577 19.900263,38.004279 19.951045,37.996577 C 20.021571,37.983717 20.121334,37.942255 20.187262,37.915588 C 20.22451,37.899283 20.286821,37.855022 20.322243,37.8346 C 20.409574,37.781066 20.518798,37.708387 20.592204,37.632128 C 20.620941,37.600799 20.667333,37.54513 20.69344,37.510645 C 20.756989,37.422557 20.817555,37.291489 20.862166,37.186691 C
20.879185,37.144186 20.916069,37.069412 20.929657,37.024714 C 20.951879,36.9456 20.986431,36.825885 20.997147,36.741254 C 21.003566,36.680316 20.997147,36.601877 20.997147,36.538783 L 20.997147,35 L 16.002853,35 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5261);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ id="path5265"
+ d="M 11.001712,35 L 11.001712,35.92327 C 11.001712,35.961126 10.99786,36.00819 11.001712,36.044752 C 11.008141,36.095531 11.028873,36.16736 11.042206,36.214828 C 11.050359,36.241647 11.072489,36.286512 11.0827,36.312015 C 11.109468,36.374893 11.145807,36.453534 11.183936,36.506387 C 11.1996,36.527078 11.227435,36.560479 11.244678,36.579277 C 11.288722,36.625032 11.354256,36.66864 11.406655,36.70076 C 11.427907,36.713013 11.465294,36.73957 11.487643,36.749353 C 11.5272,36.765353 11.587057,36.79023 11.629373,36.797946 C 11.659842,36.802567 11.699061,36.797946 11.730609,36.797946 L 13.269391,36.797946 C 13.300939,36.797946 13.340158,36.802567 13.370627,36.797946 C 13.412943,36.79023 13.4728,36.765353 13.512357,36.749353 C 13.534706,36.73957 13.572093,36.713013 13.593346,36.70076 C 13.645744,36.66864 13.711279,36.625032 13.755322,36.579277 C 13.772565,36.560479 13.8004,36.527078 13.816064,36.506387 C 13.854193,36.453534 13.890533,36.374893 13.9173,36.312015 C 13.927511,36
.286512 13.949641,36.241647 13.957794,36.214828 C 13.971127,36.16736 13.991859,36.095531 13.998288,36.044752 C 14.00214,36.00819 13.998288,35.961126 13.998288,35.92327 L 13.998288,35 L 11.001712,35 z "
+ style="opacity:1;color:#000000;fill:url(#linearGradient5267);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:1;color:#000000;fill:url(#linearGradient5271);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.39884392;visibility:visible;display:inline;overflow:visible"
+ d="M 17.001712,35 L 17.001712,35.92327 C 17.001712,35.961126 16.99786,36.00819 17.001712,36.044752 C 17.008141,36.095531 17.028873,36.16736 17.042206,36.214828 C 17.050359,36.241647 17.072489,36.286512 17.0827,36.312015 C 17.109468,36.374893 17.145807,36.453534 17.183936,36.506387 C 17.1996,36.527078 17.227435,36.560479 17.244678,36.579277 C 17.288722,36.625032 17.354256,36.66864 17.406655,36.70076 C 17.427907,36.713013 17.465294,36.73957 17.487643,36.749353 C 17.5272,36.765353 17.587057,36.79023 17.629373,36.797946 C 17.659842,36.802567 17.699061,36.797946 17.730609,36.797946 L 19.269391,36.797946 C 19.300939,36.797946 19.340158,36.802567 19.370627,36.797946 C 19.412943,36.79023 19.4728,36.765353 19.512357,36.749353 C 19.534706,36.73957 19.572093,36.713013 19.593346,36.70076 C 19.645744,36.66864 19.711279,36.625032 19.755322,36.579277 C 19.772565,36.560479 19.8004,36.527078 19.816064,36.506387 C 19.854193,36.453534 19.890533,36.374893 19.9173,36.312015 C 19.927511,36
.286512 19.949641,36.241647 19.957794,36.214828 C 19.971127,36.16736 19.991859,36.095531 19.998288,36.044752 C 20.00214,36.00819 19.998288,35.961126 19.998288,35.92327 L 19.998288,35 L 17.001712,35 z "
+ id="path5269" />
+ </g>
+</svg>
diff --git a/trunk/data/scanner-handheld.svg b/trunk/data/scanner-handheld.svg
new file mode 100644
index 0000000..f58c983
--- /dev/null
+++ b/trunk/data/scanner-handheld.svg
@@ -0,0 +1,601 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ id="svg108910"
+ sodipodi:version="0.32"
+ inkscape:version="0.44"
+ version="1.0"
+ sodipodi:docbase="/home/bersace/Projects/flegita/images"
+ sodipodi:docname="handheld.svg"
+ inkscape:export-filename="/home/bersace/Projects/flegita/images/handheld.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs108912">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient113718">
+ <stop
+ style="stop-color:#50524e;stop-opacity:1"
+ offset="0"
+ id="stop113720" />
+ <stop
+ style="stop-color:#888a85;stop-opacity:0;"
+ offset="1"
+ id="stop113722" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient113704">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop113706" />
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop113708" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient111919">
+ <stop
+ style="stop-color:#fce94f;stop-opacity:1;"
+ offset="0"
+ id="stop111921" />
+ <stop
+ style="stop-color:#fce94f;stop-opacity:0;"
+ offset="1"
+ id="stop111923" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient111890">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop111892" />
+ <stop
+ id="stop111898"
+ offset="0.82051283"
+ style="stop-color:#5d5e5b;stop-opacity:0.49803922;" />
+ <stop
+ style="stop-color:#babdb6;stop-opacity:0;"
+ offset="1"
+ id="stop111894" />
+ </linearGradient>
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.284916,0.555005,30.28991)"
+ r="15.821514"
+ fy="42.07798"
+ fx="24.306795"
+ cy="42.07798"
+ cx="24.306795"
+ id="radialGradient4548"
+ xlink:href="#linearGradient4542"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#aigrd3"
+ id="radialGradient2285"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.229703,0,0,0.229703,5.168535,4.180447)"
+ cx="20.8921"
+ cy="64.5679"
+ fx="20.8921"
+ fy="64.5679"
+ r="5.257" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#aigrd2"
+ id="radialGradient2283"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.229703,0,0,0.229703,5.168535,4.180447)"
+ cx="20.8921"
+ cy="114.5684"
+ fx="20.8921"
+ fy="114.5684"
+ r="5.256" />
+ <radialGradient
+ r="38.158695"
+ fy="7.2678967"
+ fx="8.1435566"
+ cy="7.2678967"
+ cx="8.1435566"
+ gradientTransform="matrix(0.968273,0,0,1.032767,3.908555,0.847087)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient15668"
+ xlink:href="#linearGradient15662"
+ inkscape:collect="always" />
+ <radialGradient
+ r="86.708450"
+ fy="35.736916"
+ fx="33.966679"
+ cy="35.736916"
+ cx="33.966679"
+ gradientTransform="matrix(0.960493,0,0,1.041132,0.555005,0.200637)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient15658"
+ xlink:href="#linearGradient259"
+ inkscape:collect="always" />
+ <radialGradient
+ r="37.751713"
+ fy="3.7561285"
+ fx="8.8244190"
+ cy="3.7561285"
+ cx="8.8244190"
+ gradientTransform="matrix(0.968273,0,0,1.032767,3.908555,0.847087)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient15656"
+ xlink:href="#linearGradient269"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient259">
+ <stop
+ style="stop-color:#fafafa;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop260" />
+ <stop
+ style="stop-color:#bbbbbb;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop261" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient269">
+ <stop
+ style="stop-color:#a3a3a3;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop270" />
+ <stop
+ style="stop-color:#4c4c4c;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop271" />
+ </linearGradient>
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ fy="114.5684"
+ fx="20.8921"
+ r="5.256"
+ cy="114.5684"
+ cx="20.8921"
+ id="aigrd2">
+ <stop
+ id="stop15566"
+ style="stop-color:#F0F0F0"
+ offset="0" />
+ <stop
+ id="stop15568"
+ style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+ offset="1.0000000" />
+ </radialGradient>
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ fy="64.5679"
+ fx="20.8921"
+ r="5.257"
+ cy="64.5679"
+ cx="20.8921"
+ id="aigrd3">
+ <stop
+ id="stop15573"
+ style="stop-color:#F0F0F0"
+ offset="0" />
+ <stop
+ id="stop15575"
+ style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+ offset="1.0000000" />
+ </radialGradient>
+ <linearGradient
+ id="linearGradient15662">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop15664" />
+ <stop
+ style="stop-color:#f8f8f8;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop15666" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4542"
+ inkscape:collect="always">
+ <stop
+ id="stop4544"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop4546"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient111890"
+ id="radialGradient111896"
+ cx="29.39954"
+ cy="28.133303"
+ fx="29.39954"
+ fy="28.133303"
+ r="15.224346"
+ gradientTransform="matrix(-2.386251e-3,-0.538908,0.953284,-4.220518e-3,8.329681e-2,40.35007)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient111919"
+ id="radialGradient111925"
+ cx="11.851825"
+ cy="11.876307"
+ fx="11.851825"
+ fy="11.876307"
+ r="0.594702"
+ gradientTransform="matrix(-1.404836,-21.23233,25.36301,-1.678153,-267.1603,284.6982)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient113704"
+ id="linearGradient113710"
+ x1="36.360237"
+ y1="33.055382"
+ x2="45.652027"
+ y2="44.206852"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient113718"
+ id="radialGradient113724"
+ cx="31.1007"
+ cy="30.894655"
+ fx="31.1007"
+ fy="30.894655"
+ r="8.9202849"
+ gradientTransform="matrix(0.513906,-0.672384,1.69627,1.296468,-35.9297,10.42941)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient113718"
+ id="radialGradient113728"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.513906,-0.672384,1.69627,1.296468,-35.9297,10.42941)"
+ cx="31.1007"
+ cy="30.894655"
+ fx="31.1007"
+ fy="30.894655"
+ r="8.9202849" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="-29.145754"
+ inkscape:cy="27.334081"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ width="48px"
+ height="48px"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="1270"
+ inkscape:window-height="945"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ showborder="false" />
+ <metadata
+ id="metadata108915">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g109191"
+ transform="translate(-0.555005,-0.200637)">
+ <g
+ inkscape:label="Shadow"
+ id="layer6">
+ <path
+ transform="translate(0,0.707108)"
+ d="M 40.128309 42.07798 A 15.821514 4.5078058 0 1 1 8.485281,42.07798 A 15.821514 4.5078058 0 1 1 40.128309 42.07798 z"
+ sodipodi:ry="4.5078058"
+ sodipodi:rx="15.821514"
+ sodipodi:cy="42.07798"
+ sodipodi:cx="24.306795"
+ id="path3667"
+ style="opacity:0.7836257;color:black;fill:url(#radialGradient4548);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ </g>
+ <g
+ id="g109195"
+ inkscape:label="Base"
+ style="display:inline">
+ <rect
+ ry="1.1490486"
+ y="3.6464462"
+ x="6.6035528"
+ height="40.920494"
+ width="34.875"
+ id="rect15391"
+ style="color:black;fill:url(#radialGradient15658);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient15656);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ rx="1.1490486" />
+ <rect
+ rx="0.14904857"
+ ry="0.14904857"
+ y="4.5839462"
+ x="7.6660538"
+ height="38.946384"
+ width="32.775887"
+ id="rect15660"
+ style="color:black;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient15668);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+ <g
+ id="g2270"
+ transform="translate(0.646447,-3.798933e-2)">
+ <g
+ transform="matrix(0.229703,0,0,0.229703,4.967081,4.244972)"
+ style="fill:white;fill-opacity:1;fill-rule:nonzero;stroke:black;stroke-miterlimit:4"
+ id="g1440">
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ fy="114.5684"
+ fx="20.892099"
+ r="5.256"
+ cy="114.5684"
+ cx="20.892099"
+ id="radialGradient1442">
+ <stop
+ id="stop1444"
+ style="stop-color:#F0F0F0"
+ offset="0" />
+ <stop
+ id="stop1446"
+ style="stop-color:#474747"
+ offset="1" />
+ </radialGradient>
+ <path
+ id="path1448"
+ d="M 23.428,113.07 C 23.428,115.043 21.828,116.642 19.855,116.642 C 17.881,116.642 16.282,115.042 16.282,113.07 C 16.282,111.096 17.882,109.497 19.855,109.497 C 21.828,109.497 23.428,111.097 23.428,113.07 z "
+ style="stroke:none" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ fy="64.567902"
+ fx="20.892099"
+ r="5.257"
+ cy="64.567902"
+ cx="20.892099"
+ id="radialGradient1450">
+ <stop
+ id="stop1452"
+ style="stop-color:#F0F0F0"
+ offset="0" />
+ <stop
+ id="stop1454"
+ style="stop-color:#474747"
+ offset="1" />
+ </radialGradient>
+ <path
+ id="path1456"
+ d="M 23.428,63.07 C 23.428,65.043 21.828,66.643 19.855,66.643 C 17.881,66.643 16.282,65.043 16.282,63.07 C 16.282,61.096 17.882,59.497 19.855,59.497 C 21.828,59.497 23.428,61.097 23.428,63.07 z "
+ style="stroke:none" />
+ </g>
+ <path
+ id="path15570"
+ d="M 9.9950109,29.952326 C 9.9950109,30.40553 9.6274861,30.772825 9.1742821,30.772825 C 8.7208483,30.772825 8.3535532,30.405301 8.3535532,29.952326 C 8.3535532,29.498892 8.721078,29.131597 9.1742821,29.131597 C 9.6274861,29.131597 9.9950109,29.499122 9.9950109,29.952326 z "
+ style="fill:url(#radialGradient2283);fill-rule:nonzero;stroke:none;stroke-miterlimit:4" />
+ <path
+ id="path15577"
+ d="M 9.9950109,18.467176 C 9.9950109,18.92038 9.6274861,19.287905 9.1742821,19.287905 C 8.7208483,19.287905 8.3535532,18.92038 8.3535532,18.467176 C 8.3535532,18.013742 8.721078,17.646447 9.1742821,17.646447 C 9.6274861,17.646447 9.9950109,18.013972 9.9950109,18.467176 z "
+ style="fill:url(#radialGradient2285);fill-rule:nonzero;stroke:none;stroke-miterlimit:4" />
+ </g>
+ <path
+ sodipodi:nodetypes="cc"
+ id="path15672"
+ d="M 11.505723,5.4942766 L 11.505723,43.400869"
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:0.98855311;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.01754384" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path15674"
+ d="M 12.5,5.0205154 L 12.5,43.038228"
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:white;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.20467828" />
+ </g>
+ <g
+ style="display:inline"
+ inkscape:label="Text"
+ id="layer5">
+ <g
+ id="g2253"
+ transform="matrix(0.909091,0,0,1,2.363628,0)">
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="9"
+ x="15.000002"
+ height="1"
+ width="22.000004"
+ id="rect15686"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="11"
+ x="15.000002"
+ height="1"
+ width="22.000004"
+ id="rect15688"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="13"
+ x="15.000002"
+ height="1"
+ width="22.000004"
+ id="rect15690"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="15"
+ x="15.000002"
+ height="1"
+ width="22.000004"
+ id="rect15692"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="17"
+ x="15.000002"
+ height="1"
+ width="22.000004"
+ id="rect15694"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="19"
+ x="15.000002"
+ height="1"
+ width="22.000004"
+ id="rect15696"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="21"
+ x="15.000002"
+ height="1"
+ width="22.000004"
+ id="rect15698"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="23"
+ x="15.000002"
+ height="1"
+ width="22.000004"
+ id="rect15700"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.068204239"
+ y="25"
+ x="14.999992"
+ height="1"
+ width="9.9000053"
+ id="rect15732"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="29"
+ x="14.999992"
+ height="1"
+ width="22.000004"
+ id="rect15736"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="31"
+ x="14.999992"
+ height="1"
+ width="22.000004"
+ id="rect15738"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="33"
+ x="14.999992"
+ height="1"
+ width="22.000004"
+ id="rect15740"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.15156493"
+ y="35"
+ x="14.999992"
+ height="1"
+ width="22.000004"
+ id="rect15742"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.065390877"
+ rx="0.10609552"
+ y="37"
+ x="14.999992"
+ height="1"
+ width="15.400014"
+ id="rect15744"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ </g>
+ </g>
+ </g>
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.92;fill:url(#radialGradient111896);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.028;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path111003"
+ sodipodi:cx="26.832176"
+ sodipodi:cy="24.387684"
+ sodipodi:rx="14.710346"
+ sodipodi:ry="7.9549518"
+ d="M 41.542522 24.387684 A 14.710346 7.9549518 0 1 1 12.12183,24.387684 A 14.710346 7.9549518 0 1 1 41.542522 24.387684 z"
+ transform="matrix(0.759507,0.650499,-0.650499,0.759507,25.70996,-10.51781)" />
+ <path
+ style="fill:#babdb6;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.11112642px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 17.656433,8.5946208 L 17.796734,17.293277 C 22.531889,23.291141 31.756674,31.428593 36.597056,32.586075 C 41.437437,33.743558 41.893414,27.921071 37.158259,21.923207 C 32.423104,15.925343 22.496814,9.7521033 17.656433,8.5946208 z "
+ id="path109229"
+ sodipodi:nodetypes="ccssc" />
+ <path
+ id="path111900"
+ style="fill:#727470;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.11112642px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 17.234368,8.1481922 L 17.379858,17.168588 C 22.290154,23.388297 31.856139,31.826732 36.875554,33.027026 C 41.894967,34.227321 42.36781,28.189476 37.457514,21.969767 C 32.547218,15.750058 22.253781,9.3484869 17.234368,8.1481922 z M 18.646006,10.27147 L 18.683757,16.629856 C 22.971228,22.060653 31.948857,30.143037 36.331606,31.191084 C 40.714354,32.239133 39.877221,27.949275 35.58975,22.518478 C 31.302279,17.087681 23.028754,11.319519 18.646006,10.27147 z "
+ sodipodi:nodetypes="ccsscccssc" />
+ <path
+ sodipodi:nodetypes="ccsscccssc"
+ d="M 18.502225,9.90752 L 18.56326,16.669346 C 22.732554,21.950453 32.506743,30.410105 36.768689,31.429266 C 41.030634,32.448427 40.360692,27.053883 36.191398,21.772776 C 32.022104,16.49167 22.76417,10.926682 18.502225,9.90752 z M 19.910657,11.772879 L 19.822176,16.488699 C 23.462634,21.099947 32.933683,29.324243 36.655041,30.214132 C 40.376398,31.104022 38.433452,26.72493 34.792994,22.113682 C 31.152536,17.502435 23.632014,12.66277 19.910657,11.772879 z "
+ style="fill:#eeeeec;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.11112642px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path111907" />
+ <path
+ style="fill:url(#radialGradient111925);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 17.21932,9.0441339 C 4.343975,-8.8090522 2.4879618,40.424592 17.408724,16.494009 L 17.21932,9.0441339 z "
+ id="path111909"
+ sodipodi:nodetypes="ccc" />
+ <path
+ style="fill:white;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 17.09305,9.2335371 C 15.065945,8.7310039 14.468582,16.575221 17.345589,16.304605 L 17.09305,9.2335371 z "
+ id="path111927"
+ sodipodi:nodetypes="ccc" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:url(#linearGradient113710);stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 39.127004,31.141221 C 40.391255,31.677489 42.617777,33.42323 43.072203,34.638514 C 43.577312,36.304444 42.083262,38.267938 43.145818,39.683713 C 43.847664,40.703179 45.535911,42.703897 46.223454,43.706853"
+ id="path111001"
+ sodipodi:nodetypes="cccc" />
+ <path
+ style="fill:url(#radialGradient113724);fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:1.11112642px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 18.620082,16.739968 C 21.638842,21.851806 35.339919,32.416887 37.675981,31.641322 C 46.291213,28.781089 27.136271,15.470555 18.620082,16.739968 z "
+ id="path113712"
+ sodipodi:nodetypes="csc" />
+ </g>
+</svg>
diff --git a/trunk/data/scanner-multi-function.svg b/trunk/data/scanner-multi-function.svg
new file mode 100644
index 0000000..b1fb397
--- /dev/null
+++ b/trunk/data/scanner-multi-function.svg
@@ -0,0 +1,1624 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ id="svg76807"
+ sodipodi:version="0.32"
+ inkscape:version="0.44"
+ version="1.0"
+ sodipodi:docbase="/home/bersace/Projects/gnomescan/libgnomescanui/icons"
+ sodipodi:docname="multi-function.svg"
+ inkscape:export-filename="/home/bersace/Projects/flegita/libgnomescanui/icons/multi-function.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs76809">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5372">
+ <stop
+ style="stop-color:#4e6c28;stop-opacity:1"
+ offset="0"
+ id="stop5374" />
+ <stop
+ style="stop-color:#6fa236;stop-opacity:0.99607843"
+ offset="1"
+ id="stop5376" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5346">
+ <stop
+ style="stop-color:#fce94f;stop-opacity:1"
+ offset="0"
+ id="stop5348" />
+ <stop
+ style="stop-color:#fce94f;stop-opacity:0"
+ offset="1"
+ id="stop5350" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5332">
+ <stop
+ style="stop-color:#7a7a7a;stop-opacity:1"
+ offset="0"
+ id="stop5334" />
+ <stop
+ style="stop-color:#f3f3f3;stop-opacity:1"
+ offset="1"
+ id="stop5336" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5318">
+ <stop
+ style="stop-color:#ddd;stop-opacity:1"
+ offset="0"
+ id="stop5320" />
+ <stop
+ style="stop-color:#afafaf;stop-opacity:1"
+ offset="1"
+ id="stop5322" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5306">
+ <stop
+ style="stop-color:#fbfbfb;stop-opacity:0.9137255"
+ offset="0"
+ id="stop5308" />
+ <stop
+ style="stop-color:white;stop-opacity:0"
+ offset="1"
+ id="stop5310" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5296">
+ <stop
+ style="stop-color:#545a5b;stop-opacity:1;"
+ offset="0"
+ id="stop5298" />
+ <stop
+ id="stop5326"
+ offset="0.28"
+ style="stop-color:#353636;stop-opacity:1;" />
+ <stop
+ style="stop-color:#7a7a7a;stop-opacity:1;"
+ offset="1"
+ id="stop5300" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5284">
+ <stop
+ style="stop-color:#4d4d4d;stop-opacity:1;"
+ offset="0"
+ id="stop5286" />
+ <stop
+ id="stop5328"
+ offset="0.16440368"
+ style="stop-color:#7f7f7f;stop-opacity:1;" />
+ <stop
+ style="stop-color:#ababab;stop-opacity:1;"
+ offset="0.79301745"
+ id="stop5420" />
+ <stop
+ style="stop-color:#d8d8d8;stop-opacity:1"
+ offset="1"
+ id="stop5288" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5274">
+ <stop
+ style="stop-color:#737373;stop-opacity:1"
+ offset="0"
+ id="stop5276" />
+ <stop
+ style="stop-color:#555753;stop-opacity:1"
+ offset="1"
+ id="stop5278" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5266">
+ <stop
+ style="stop-color:#cacaca;stop-opacity:1"
+ offset="0"
+ id="stop5268" />
+ <stop
+ style="stop-color:#919191;stop-opacity:1"
+ offset="1"
+ id="stop5270" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3787">
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1"
+ offset="0"
+ id="stop3789" />
+ <stop
+ id="stop3795"
+ offset="0.22"
+ style="stop-color:#9ca097;stop-opacity:1;" />
+ <stop
+ style="stop-color:#91958b;stop-opacity:1;"
+ offset="0.46000001"
+ id="stop3797" />
+ <stop
+ style="stop-color:#65695f;stop-opacity:1;"
+ offset="1"
+ id="stop3791" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4598">
+ <stop
+ style="stop-color:#5e6061;stop-opacity:1;"
+ offset="0"
+ id="stop4600" />
+ <stop
+ style="stop-color:#979a9b;stop-opacity:1;"
+ offset="1"
+ id="stop4602" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3697">
+ <stop
+ style="stop-color:#c1c1c1;stop-opacity:1"
+ offset="0"
+ id="stop3699" />
+ <stop
+ style="stop-color:#a1a1a1;stop-opacity:1"
+ offset="1"
+ id="stop3701" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8742">
+ <stop
+ style="stop-color:#555753;stop-opacity:1"
+ offset="0"
+ id="stop8744" />
+ <stop
+ style="stop-color:#555753;stop-opacity:1"
+ offset="1"
+ id="stop8746" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8732">
+ <stop
+ style="stop-color:#e2e2e0;stop-opacity:1"
+ offset="0"
+ id="stop8734" />
+ <stop
+ style="stop-color:white;stop-opacity:0"
+ offset="1"
+ id="stop8736" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8721">
+ <stop
+ style="stop-color:#7f7f7f;stop-opacity:1;"
+ offset="0"
+ id="stop8723" />
+ <stop
+ style="stop-color:#555;stop-opacity:1;"
+ offset="1"
+ id="stop8725" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8704">
+ <stop
+ style="stop-color:#7d7d7d;stop-opacity:1;"
+ offset="0"
+ id="stop8706" />
+ <stop
+ style="stop-color:#b0b0b0;stop-opacity:1;"
+ offset="1"
+ id="stop8708" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8696">
+ <stop
+ style="stop-color:#464744;stop-opacity:1;"
+ offset="0"
+ id="stop8698" />
+ <stop
+ style="stop-color:#71746e;stop-opacity:1;"
+ offset="1"
+ id="stop8700" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient7803">
+ <stop
+ style="stop-color:#404040;stop-opacity:1;"
+ offset="0"
+ id="stop7805" />
+ <stop
+ style="stop-color:#9a9a9a;stop-opacity:1;"
+ offset="1"
+ id="stop7807" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient105360">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop105362" />
+ <stop
+ id="stop107138"
+ offset="0.69230771"
+ style="stop-color:black;stop-opacity:0.49803922;" />
+ <stop
+ style="stop-color:black;stop-opacity:0"
+ offset="1"
+ id="stop105364" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient103577">
+ <stop
+ style="stop-color:#bebebc;stop-opacity:1;"
+ offset="0"
+ id="stop103579" />
+ <stop
+ style="stop-color:#888a85;stop-opacity:0;"
+ offset="1"
+ id="stop103581" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient100027">
+ <stop
+ style="stop-color:#898983;stop-opacity:1;"
+ offset="0"
+ id="stop100029" />
+ <stop
+ style="stop-color:#888a85;stop-opacity:0;"
+ offset="1"
+ id="stop100031" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8696"
+ id="linearGradient8702"
+ x1="22.738638"
+ y1="32.076389"
+ x2="22.755268"
+ y2="36.388153"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.998329,0,0,0.998329,-0.146872,1.744487)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8704"
+ id="linearGradient8718"
+ x1="38.002602"
+ y1="18.438644"
+ x2="11.197414"
+ y2="18.438644"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.998329,0,0,0.998329,-0.146871,1.744489)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8721"
+ id="linearGradient8727"
+ x1="6.3151019"
+ y1="18.438645"
+ x2="42.572415"
+ y2="18.438645"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.998329,0,0,0.998329,-0.146871,1.744489)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8742"
+ id="linearGradient8748"
+ x1="22.471224"
+ y1="19.310486"
+ x2="22.676788"
+ y2="9.1197958"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.998329,0,0,0.998329,-0.146872,1.744487)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3697"
+ id="linearGradient3703"
+ x1="24.31546"
+ y1="13.662741"
+ x2="24.31546"
+ y2="27.328072"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.998329,0,0,0.998329,-0.146872,1.744487)" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.5,0,9.681087)"
+ r="18.031223"
+ fy="19.362175"
+ fx="22.804193"
+ cy="19.362175"
+ cx="22.804193"
+ id="radialGradient5196"
+ xlink:href="#linearGradient5190"
+ inkscape:collect="always" />
+ <radialGradient
+ r="20.530962"
+ fy="35.878170"
+ fx="24.445690"
+ cy="35.878170"
+ cx="24.445690"
+ gradientTransform="matrix(2.049266,-1.696401e-32,0.000000,2.049266,-25.65002,-37.31089)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient1366"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.220359e-14,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient1356"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335034"
+ fy="15.048258"
+ fx="27.577173"
+ cy="15.048258"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient1354"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335034"
+ fy="16.049133"
+ fx="27.577173"
+ cy="16.049133"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient1352"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="20.530962"
+ fy="35.878170"
+ fx="24.445690"
+ cy="35.878170"
+ cx="24.445690"
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient1350"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,-1.353344e-14,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient1348"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient11532"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,3.185827e-15,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient11526"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient11514"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.166583e-14,29.48178)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient11504"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="16.049133"
+ fx="27.577173"
+ fy="16.049133"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient11500"
+ cx="27.577173"
+ cy="15.048258"
+ fx="27.577173"
+ fy="15.048258"
+ r="3.8335034"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11399"
+ id="radialGradient11441"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.487395,0.000000,20.06483)"
+ cx="12.071428"
+ cy="39.142857"
+ fx="12.071428"
+ fy="39.142857"
+ r="8.5000000" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11415"
+ id="linearGradient11439"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-60.85714,0.428571)"
+ x1="13.267134"
+ y1="19.774456"
+ x2="26.758644"
+ y2="33.462429" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11415"
+ id="linearGradient11427"
+ gradientUnits="userSpaceOnUse"
+ x1="9.6957054"
+ y1="9.3458843"
+ x2="35.679932"
+ y2="39.033859"
+ gradientTransform="translate(-60.57143,0.000000)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11415"
+ id="linearGradient11425"
+ gradientUnits="userSpaceOnUse"
+ x1="15.828360"
+ y1="3.7744560"
+ x2="43.615788"
+ y2="34.462429"
+ gradientTransform="translate(-60.28571,-0.285714)" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient11399">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop11401" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop11403" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11415">
+ <stop
+ style="stop-color:#204a87;stop-opacity:0.0000000;"
+ offset="0.0000000"
+ id="stop11417" />
+ <stop
+ id="stop11423"
+ offset="0.50000000"
+ style="stop-color:#204a87;stop-opacity:1.0000000;" />
+ <stop
+ style="stop-color:#204a87;stop-opacity:0;"
+ offset="1"
+ id="stop11419" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient11494">
+ <stop
+ style="stop-color:#ef2929;stop-opacity:1;"
+ offset="0"
+ id="stop11496" />
+ <stop
+ style="stop-color:#ef2929;stop-opacity:0;"
+ offset="1"
+ id="stop11498" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient11508">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop11510" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop11512" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient11520">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop11522" />
+ <stop
+ style="stop-color:#dcdcdc;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop11524" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5166">
+ <stop
+ id="stop5168"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop5170"
+ offset="1"
+ style="stop-color:#434c4f;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5176"
+ inkscape:collect="always">
+ <stop
+ id="stop5178"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop5180"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5190"
+ inkscape:collect="always">
+ <stop
+ id="stop5192"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop5194"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5214">
+ <stop
+ id="stop5216"
+ offset="0"
+ style="stop-color:#7f8578;stop-opacity:1;" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="0.25"
+ id="stop5222" />
+ <stop
+ id="stop5224"
+ offset="0.65909094"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ <stop
+ id="stop5218"
+ offset="1"
+ style="stop-color:#666666;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5236"
+ inkscape:collect="always">
+ <stop
+ id="stop5238"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop5240"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5255">
+ <stop
+ id="stop5257"
+ offset="0"
+ style="stop-color:#8e8e8e;stop-opacity:1;" />
+ <stop
+ id="stop5259"
+ offset="1"
+ style="stop-color:#d0d0d0;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5277"
+ inkscape:collect="always">
+ <stop
+ id="stop5279"
+ offset="0"
+ style="stop-color:#a6a6a6;stop-opacity:1;" />
+ <stop
+ id="stop5281"
+ offset="1"
+ style="stop-color:#a6a6a6;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5293">
+ <stop
+ id="stop5295"
+ offset="0"
+ style="stop-color:#888a85;stop-opacity:1;" />
+ <stop
+ id="stop5297"
+ offset="1"
+ style="stop-color:#6a6b67;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="12.289182"
+ x2="21.567848"
+ y1="5.532073"
+ x1="19.483202"
+ id="linearGradient2875"
+ xlink:href="#linearGradient5293"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-2,0)"
+ gradientUnits="userSpaceOnUse"
+ y2="9.129221"
+ x2="47.283165"
+ y1="15.846735"
+ x1="43.870953"
+ id="linearGradient2873"
+ xlink:href="#linearGradient5277"
+ inkscape:collect="always" />
+ <radialGradient
+ r="18.031223"
+ fy="19.362175"
+ fx="22.804193"
+ cy="19.362175"
+ cx="22.804193"
+ gradientTransform="matrix(1,0,0,0.5,-2,9.681087)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2871"
+ xlink:href="#linearGradient5190"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="36.854168"
+ x2="12"
+ y1="36.864582"
+ x1="14.03125"
+ gradientTransform="matrix(0.6,0,0,0.6,9.8,14)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient2869"
+ xlink:href="#linearGradient5255"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="matrix(0.6,0,0,0.6,3.8,14)"
+ y2="36.854168"
+ x2="12"
+ y1="36.864582"
+ x1="14.03125"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient2867"
+ xlink:href="#linearGradient5255"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-2,0)"
+ y2="36.5"
+ x2="17"
+ y1="36.5"
+ x1="11.998403"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient2865"
+ xlink:href="#linearGradient5255"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-2,0)"
+ gradientUnits="userSpaceOnUse"
+ y2="36.5"
+ x2="23"
+ y1="36.5"
+ x1="18"
+ id="linearGradient2863"
+ xlink:href="#linearGradient5255"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.802632,-1.00267e-15,6.5625)"
+ r="19"
+ fy="33.25"
+ fx="23.5"
+ cy="33.25"
+ cx="23.5"
+ id="radialGradient2861"
+ xlink:href="#linearGradient5236"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-2,0)"
+ gradientUnits="userSpaceOnUse"
+ y2="41.054031"
+ x2="22.657747"
+ y1="14.85437"
+ x1="22.657747"
+ id="linearGradient2859"
+ xlink:href="#linearGradient5214"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,0.5,0,9.681087)"
+ r="18.031223"
+ fy="19.362175"
+ fx="22.804193"
+ cy="19.362175"
+ cx="22.804193"
+ id="radialGradient2857"
+ xlink:href="#linearGradient5190"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.968254,1.16303e-7,-9.004103e-8,1.52381,-24.68213,-14.68863)"
+ r="11.136932"
+ fy="27.39226"
+ fx="23.33452"
+ cy="27.39226"
+ cx="23.33452"
+ id="radialGradient2855"
+ xlink:href="#linearGradient5176"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-2,0)"
+ gradientUnits="userSpaceOnUse"
+ y2="33.902058"
+ x2="23.599689"
+ y1="17.461824"
+ x1="23.599689"
+ id="linearGradient2853"
+ xlink:href="#linearGradient5166"
+ inkscape:collect="always" />
+ <radialGradient
+ r="20.530962"
+ fy="35.878170"
+ fx="24.445690"
+ cy="35.878170"
+ cx="24.445690"
+ gradientTransform="matrix(2.049266,-1.696401e-32,0.000000,2.049266,-25.65002,-37.31089)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2851"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.220359e-14,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2849"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335034"
+ fy="15.048258"
+ fx="27.577173"
+ cy="15.048258"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2847"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="3.8335034"
+ fy="16.049133"
+ fx="27.577173"
+ cy="16.049133"
+ cx="27.577173"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2845"
+ xlink:href="#linearGradient11494"
+ inkscape:collect="always" />
+ <radialGradient
+ r="20.530962"
+ fy="35.878170"
+ fx="24.445690"
+ cy="35.878170"
+ cx="24.445690"
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2843"
+ xlink:href="#linearGradient11520"
+ inkscape:collect="always" />
+ <radialGradient
+ r="6.5659914"
+ fy="44.565483"
+ fx="30.203562"
+ cy="44.565483"
+ cx="30.203562"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,-1.353344e-14,29.48178)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient2841"
+ xlink:href="#linearGradient11508"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient2839"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,3.185827e-15,29.48178)"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11520"
+ id="radialGradient2837"
+ cx="24.445690"
+ cy="35.878170"
+ fx="24.445690"
+ fy="35.878170"
+ r="20.530962"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11508"
+ id="radialGradient2835"
+ cx="30.203562"
+ cy="44.565483"
+ fx="30.203562"
+ fy="44.565483"
+ r="6.5659914"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.166583e-14,29.48178)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient2833"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
+ cx="27.577173"
+ cy="16.049133"
+ fx="27.577173"
+ fy="16.049133"
+ r="3.8335034" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11494"
+ id="radialGradient2831"
+ cx="27.577173"
+ cy="15.048258"
+ fx="27.577173"
+ fy="15.048258"
+ r="3.8335034"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11399"
+ id="radialGradient2829"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.487395,0.000000,20.06483)"
+ cx="12.071428"
+ cy="39.142857"
+ fx="12.071428"
+ fy="39.142857"
+ r="8.5000000" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11415"
+ id="linearGradient2827"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-60.85714,0.428571)"
+ x1="13.267134"
+ y1="19.774456"
+ x2="26.758644"
+ y2="33.462429" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11415"
+ id="linearGradient2825"
+ gradientUnits="userSpaceOnUse"
+ x1="9.6957054"
+ y1="9.3458843"
+ x2="35.679932"
+ y2="39.033859"
+ gradientTransform="translate(-60.57143,0.000000)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient11415"
+ id="linearGradient2823"
+ gradientUnits="userSpaceOnUse"
+ x1="15.828360"
+ y1="3.7744560"
+ x2="43.615788"
+ y2="34.462429"
+ gradientTransform="translate(-60.28571,-0.285714)" />
+ <linearGradient
+ id="linearGradient2809">
+ <stop
+ style="stop-color:#204a87;stop-opacity:0.0000000;"
+ offset="0.0000000"
+ id="stop2811" />
+ <stop
+ id="stop2813"
+ offset="0.50000000"
+ style="stop-color:#204a87;stop-opacity:1.0000000;" />
+ <stop
+ style="stop-color:#204a87;stop-opacity:0;"
+ offset="1"
+ id="stop2815" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2791">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop2793" />
+ <stop
+ style="stop-color:#dcdcdc;stop-opacity:1.0000000;"
+ offset="1.0000000"
+ id="stop2795" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2785">
+ <stop
+ id="stop2787"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop2789"
+ offset="1"
+ style="stop-color:#434c4f;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2763">
+ <stop
+ id="stop2765"
+ offset="0"
+ style="stop-color:#7f8578;stop-opacity:1;" />
+ <stop
+ style="stop-color:#c8c8c8;stop-opacity:1;"
+ offset="0.25"
+ id="stop2767" />
+ <stop
+ id="stop2769"
+ offset="0.65909094"
+ style="stop-color:#c8c8c8;stop-opacity:1;" />
+ <stop
+ id="stop2771"
+ offset="1"
+ style="stop-color:#666666;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2751">
+ <stop
+ id="stop2753"
+ offset="0"
+ style="stop-color:#8e8e8e;stop-opacity:1;" />
+ <stop
+ id="stop2755"
+ offset="1"
+ style="stop-color:#d0d0d0;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2739">
+ <stop
+ id="stop2741"
+ offset="0"
+ style="stop-color:#888a85;stop-opacity:1;" />
+ <stop
+ id="stop2743"
+ offset="1"
+ style="stop-color:#6a6b67;stop-opacity:1;" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient105360"
+ id="radialGradient3785"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.931234,-2.145049e-7,7.856845e-8,-0.411493,46.28045,53.33274)"
+ cx="23.786119"
+ cy="42.554111"
+ fx="23.786119"
+ fy="42.554111"
+ r="23.518359" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3787"
+ id="linearGradient3793"
+ x1="26.1686"
+ y1="4.9114609"
+ x2="26.1686"
+ y2="34.024757"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.939946,0,0,0.939946,1.449492,2.850387)" />
+ <linearGradient
+ id="linearGradient259">
+ <stop
+ style="stop-color:#a5a5a5;stop-opacity:1"
+ offset="0.0000000"
+ id="stop260" />
+ <stop
+ style="stop-color:#efefef;stop-opacity:1"
+ offset="1.0000000"
+ id="stop261" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient269">
+ <stop
+ style="stop-color:#a3a3a3;stop-opacity:1.0000000;"
+ offset="0.0000000"
+ id="stop270" />
+ <stop
+ style="stop-color:#4b4b4b;stop-opacity:1"
+ offset="1.0000000"
+ id="stop271" />
+ </linearGradient>
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ fy="114.5684"
+ fx="20.8921"
+ r="5.256"
+ cy="114.5684"
+ cx="20.8921"
+ id="aigrd2">
+ <stop
+ id="stop15566"
+ style="stop-color:#F0F0F0"
+ offset="0" />
+ <stop
+ id="stop15568"
+ style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+ offset="1.0000000" />
+ </radialGradient>
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ fy="64.5679"
+ fx="20.8921"
+ r="5.257"
+ cy="64.5679"
+ cx="20.8921"
+ id="aigrd3">
+ <stop
+ id="stop15573"
+ style="stop-color:#F0F0F0"
+ offset="0" />
+ <stop
+ id="stop15575"
+ style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+ offset="1.0000000" />
+ </radialGradient>
+ <linearGradient
+ id="linearGradient15662">
+ <stop
+ style="stop-color:white;stop-opacity:1"
+ offset="0.0000000"
+ id="stop15664" />
+ <stop
+ style="stop-color:#c1c1c1;stop-opacity:1"
+ offset="1.0000000"
+ id="stop15666" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient259"
+ id="radialGradient4215"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.913425,0,0,-0.105205,46.02856,37.26767)"
+ cx="34.353741"
+ cy="57.108116"
+ fx="34.353741"
+ fy="57.108116"
+ r="86.708450" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient269"
+ id="radialGradient4217"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.920824,0,0,-0.3326,42.83934,44.6248)"
+ cx="8.8244190"
+ cy="3.7561285"
+ fx="8.8244190"
+ fy="3.7561285"
+ r="37.751713" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient15662"
+ id="radialGradient4224"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.920824,0,0,-0.3326,42.83934,44.6248)"
+ cx="8.1435566"
+ cy="7.2678967"
+ fx="8.1435566"
+ fy="7.2678967"
+ r="38.158695" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ fy="114.5684"
+ fx="20.892099"
+ r="5.256"
+ cy="114.5684"
+ cx="20.892099"
+ id="radialGradient1442">
+ <stop
+ id="stop1444"
+ style="stop-color:#F0F0F0"
+ offset="0" />
+ <stop
+ id="stop1446"
+ style="stop-color:#474747"
+ offset="1" />
+ </radialGradient>
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ fy="64.567902"
+ fx="20.892099"
+ r="5.257"
+ cy="64.567902"
+ cx="20.892099"
+ id="radialGradient1450">
+ <stop
+ id="stop1452"
+ style="stop-color:#F0F0F0"
+ offset="0" />
+ <stop
+ id="stop1454"
+ style="stop-color:#474747"
+ offset="1" />
+ </radialGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#aigrd2"
+ id="radialGradient4314"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.232404,0,-1.500874e-2,-7.870153e-2,39.93591,43.31434)"
+ cx="20.8921"
+ cy="114.5684"
+ fx="20.8921"
+ fy="114.5684"
+ r="5.256" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#aigrd3"
+ id="radialGradient4320"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.137905,0,-8.905939e-3,-4.67002e-2,38.01309,41.41036)"
+ cx="20.8921"
+ cy="64.5679"
+ fx="20.8921"
+ fy="64.5679"
+ r="5.257" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5266"
+ id="linearGradient5272"
+ x1="18.857048"
+ y1="6.2365055"
+ x2="18.796385"
+ y2="9.7720394"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.958149,0,0,1.030029,1.005823,2.940901)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5274"
+ id="linearGradient5280"
+ x1="17.05895"
+ y1="2.3474181"
+ x2="17.05895"
+ y2="9.0649319"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.958149,0,0,1.030029,1.005823,2.940901)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5284"
+ id="linearGradient5290"
+ x1="16.663012"
+ y1="3.5087314"
+ x2="26.235657"
+ y2="5.8947182"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.958149,0,0,1.030029,1.005823,2.940901)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5296"
+ id="linearGradient5302"
+ x1="12.536742"
+ y1="2.480001"
+ x2="21.009315"
+ y2="7.61233"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.958149,0,0,1.030029,1.005823,2.940901)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5306"
+ id="radialGradient5314"
+ cx="42.394287"
+ cy="12.819988"
+ fx="42.394287"
+ fy="12.819988"
+ r="11.900307"
+ gradientTransform="matrix(-2.066384,8.797981e-2,-1.225107e-2,-0.332533,129.3856,10.71729)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5318"
+ id="linearGradient5324"
+ x1="10.635056"
+ y1="3.6186414"
+ x2="7.2175159"
+ y2="8.0380592"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.958149,0,0,1.030029,1.005823,2.940901)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5332"
+ id="linearGradient5338"
+ x1="14.5625"
+ y1="2.4374999"
+ x2="28.75"
+ y2="2.4374999"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.958149,0,0,1.030029,1.005823,2.940901)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5346"
+ id="radialGradient5366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-2.370177,0.103387,-0.103574,-1.289822,101.9837,28.196)"
+ cx="29.767492"
+ cy="12.729201"
+ fx="29.767492"
+ fy="12.729201"
+ r="3.8255122" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5372"
+ id="linearGradient5384"
+ gradientUnits="userSpaceOnUse"
+ x1="20.353785"
+ y1="20.998568"
+ x2="26.766504"
+ y2="24.054565" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="21.046054"
+ inkscape:cy="37.745146"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ width="48px"
+ height="48px"
+ inkscape:showpageshadow="false"
+ showgrid="false"
+ inkscape:window-width="1270"
+ inkscape:window-height="945"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ showborder="true"
+ showguides="true"
+ inkscape:guide-bbox="true" />
+ <metadata
+ id="metadata76812">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.76119403;fill:url(#radialGradient3785);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.898;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path104473"
+ sodipodi:cx="24.130018"
+ sodipodi:cy="38.45406"
+ sodipodi:rx="23.069359"
+ sodipodi:ry="8.4383411"
+ d="M 47.199377 38.45406 A 23.069359 8.4383411 0 1 1 1.0606594,38.45406 A 23.069359 8.4383411 0 1 1 47.199377 38.45406 z"
+ transform="matrix(0.91418,0,0,1.139861,2.236642,-4.353286)" />
+ <path
+ style="fill:url(#linearGradient3793);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 7.6804869,5.1585771 C 6.7416456,5.4139959 2.1954335,12.120822 2.1954335,13.229437 C 2.1954335,15.744876 6.6410764,37.117637 7.6804869,38.068894 C 8.7581562,39.055163 39.463567,39.210386 40.590808,38.068894 C 42.051078,36.590165 46.173809,15.646928 46.075862,13.229437 C 46.027015,12.023863 42.860819,6.1220321 40.590808,5.1585771 C 38.950892,4.4625513 9.2194187,4.7398993 7.6804869,5.1585771 z "
+ id="path76858"
+ sodipodi:nodetypes="cssssss" />
+ <path
+ id="path78630"
+ style="fill:url(#linearGradient8748);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 7.6804869,5.1585771 C 6.7416456,5.4139959 2.1954335,12.120822 2.1954335,13.229437 C 2.1954335,15.744876 6.6410764,37.117637 7.6804869,38.068894 C 8.7581562,39.055163 39.463567,39.210386 40.590808,38.068894 C 42.051078,36.590165 46.173809,15.646928 46.075862,13.229437 C 46.027015,12.023863 42.860819,6.1220321 40.590808,5.1585771 C 38.950892,4.4625513 9.2194187,4.7398993 7.6804869,5.1585771 z M 8.8558714,6.3472805 C 7.9840867,6.5844556 3.6450983,12.694748 3.6450983,13.724178 C 3.6450983,16.059951 7.8907005,36.02364 8.8558714,36.906952 C 9.8565667,37.822775 38.368818,37.966912 39.415546,36.906952 C 40.771513,35.533842 44.599777,16.086491 44.508826,13.841671 C 44.463469,12.722207 41.523421,7.2419198 39.415546,6.3472805 C 37.892762,5.7009687 10.284882,5.958507 8.8558714,6.3472805 z "
+ sodipodi:nodetypes="csssssccsssssc" />
+ <path
+ id="path78637"
+ style="fill:url(#linearGradient3703);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 43.175297,15.128436 C 42.347412,22.339427 40.501136,30.19393 38.392435,35.895436 C 37.415801,36.88442 10.812774,36.749936 9.8790883,35.895436 C 8.9454029,35.040936 5.1585472,15.274699 5.1585472,15.274699 C 17.701925,15.962008 30.280802,16.313736 43.175297,15.128436 z M 3.6646442,13.803407 C 2.9618958,15.192959 7.8127411,36.092063 8.7824091,36.979573 C 9.7878733,37.899847 38.438558,38.045927 39.489,36.979573 C 40.847463,35.600532 45.191453,15.659096 44.606765,13.803407 C 41.838676,14.790019 10.350538,14.844206 3.6646442,13.803407 z "
+ sodipodi:nodetypes="ccscccsscc" />
+ <path
+ style="fill:url(#linearGradient8718);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient8727);stroke-width:0.99832964px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
+ d="M 7.3699402,18.560283 L 6.6568476,23.028566 C 19.677787,26.129762 28.598701,25.717065 41.855269,22.894862 L 41.186744,18.38201 C 28.470074,18.830451 19.763603,18.946434 7.3699402,18.560283 z "
+ id="path95515"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="fill:url(#linearGradient8702);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 12.831492,29.446191 C 11.997122,29.722259 12.500742,34.479747 12.176575,35.43255 C 11.982696,36.002404 9.3072715,43.238167 9.8843618,43.946483 C 10.805311,45.076847 36.788488,44.703055 37.390912,44.048813 C 37.961721,43.428909 34.568615,34.839204 34.40285,34.286445 C 34.229636,33.708843 34.687799,29.637123 33.758165,29.343861 C 33.10319,29.137242 13.947536,29.076927 12.831492,29.446191 z "
+ id="path80425"
+ sodipodi:nodetypes="cssssss" />
+ <path
+ id="path85739"
+ style="fill:#3c4041;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 12.831492,28.429725 C 11.997122,28.705793 12.500742,34.479747 12.176575,35.43255 C 11.982696,36.002404 9.3072715,43.238167 9.8843618,43.946483 C 10.805311,45.076847 36.788488,44.703055 37.390912,44.048813 C 37.961721,43.428909 34.568615,34.839204 34.40285,34.286445 C 34.229636,33.708843 34.687799,28.620657 33.758165,28.327395 C 33.10319,28.120776 13.947536,28.060461 12.831492,28.429725 z M 14.049249,29.592079 C 13.344562,29.825237 13.769906,34.859758 13.496123,35.664474 C 13.332376,36.145757 11.07278,42.2569 11.560177,42.855126 C 12.337987,43.809804 35.152539,43.494109 35.661335,42.941551 C 36.143423,42.417996 33.277693,35.163348 33.13769,34.6965 C 32.991398,34.208671 33.378351,29.753333 32.593206,29.50565 C 32.04003,29.331149 14.991831,29.280205 14.049249,29.592079 z "
+ sodipodi:nodetypes="csssssccsssssc" />
+ <path
+ style="color:black;fill:url(#radialGradient4215);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient4217);stroke-width:0.55341274;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ d="M 35.096105,43.866353 L 11.692027,43.866353 C 10.659384,44.133615 10.333655,43.348231 10.611984,42.578608 L 13.644414,31.165741 C 13.774555,30.675941 14.039527,30.481087 14.350596,30.480329 L 32.493212,30.436135 C 33.091483,30.434677 33.158164,30.660449 33.300591,31.238204 C 34.051277,34.283363 36.176149,42.578608 36.176149,42.578608 C 36.548973,43.959301 36.117477,43.866353 35.096105,43.866353 z "
+ id="rect15391"
+ sodipodi:nodetypes="cccsssscc" />
+ <path
+ style="color:black;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient4224);stroke-width:0.55341274;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ d="M 35.73015,43.356733 L 11.2826,43.356733 C 11.204073,43.356733 11.140854,43.335326 11.140854,43.308732 L 14.256365,30.862167 C 14.256365,30.835575 14.319584,30.814167 14.39811,30.814167 L 32.531559,30.814167 C 32.610087,30.814167 32.673305,30.835575 32.673305,30.862167 L 35.871896,43.308732 C 35.871896,43.335326 35.808679,43.356733 35.73015,43.356733 z "
+ id="rect15660"
+ sodipodi:nodetypes="ccccccccc" />
+ <g
+ id="g4310"
+ transform="matrix(0.467774,0,0,0.467774,17.09261,19.18922)">
+ <path
+ style="fill:white;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-miterlimit:4"
+ d="M 32.419081,34.324698 C 32.389469,34.16942 32.737316,34.043576 33.195849,34.043576 C 33.654615,34.043576 34.050243,34.169499 34.07984,34.324698 C 34.109467,34.480055 33.76162,34.605899 33.303087,34.605899 C 32.844553,34.605899 32.448693,34.479976 32.419081,34.324698 z "
+ id="path1448" />
+ <path
+ id="path15570"
+ d="M 32.79412,34.415554 C 32.764508,34.260276 33.112355,34.134432 33.570887,34.134432 C 34.029652,34.134432 34.425279,34.260355 34.454877,34.415554 C 34.484504,34.570911 34.136657,34.696755 33.678125,34.696755 C 33.219592,34.696755 32.823733,34.570832 32.79412,34.415554 z "
+ style="fill:url(#radialGradient4314);fill-rule:nonzero;stroke:none;stroke-miterlimit:4" />
+ </g>
+ <g
+ id="g4316"
+ transform="matrix(0.939946,0,0,0.939946,1.002935,2.850387)">
+ <path
+ style="fill:white;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-miterlimit:4"
+ d="M 33.998021,38.411059 C 33.98045,38.318919 34.186848,38.244199 34.458934,38.244199 C 34.731158,38.244199 34.965917,38.318919 34.983489,38.411059 C 35.001069,38.503245 34.794662,38.577919 34.522576,38.577919 C 34.25049,38.577919 34.015593,38.503198 33.998021,38.411059 z "
+ id="path1456" />
+ <path
+ id="path15577"
+ d="M 34.220564,38.464971 C 34.202993,38.372832 34.40939,38.298111 34.681476,38.298111 C 34.953699,38.298111 35.188458,38.372832 35.206029,38.464971 C 35.22361,38.557158 35.017203,38.631831 34.745117,38.631831 C 34.473032,38.631831 34.238135,38.557111 34.220564,38.464971 z "
+ style="fill:url(#radialGradient4320);fill-rule:nonzero;stroke:none;stroke-miterlimit:4" />
+ </g>
+ <g
+ id="g4322"
+ transform="matrix(0.939946,0,-1.524286e-2,0.939946,1.089182,2.850387)">
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:0.58203113;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.01754384"
+ d="M 33.23592,42.782429 L 31.840066,29.794763"
+ id="path15672"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:white;stroke-width:0.58637685;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.20467828"
+ d="M 32.541809,42.836654 L 31.273545,29.916624"
+ id="path15674"
+ sodipodi:nodetypes="cc" />
+ </g>
+ <g
+ id="g4326"
+ transform="matrix(0.893686,0,0,0.939946,2.069684,2.850387)">
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-41.581284"
+ x="-31.365614"
+ height="0.342623"
+ width="17.959145"
+ id="rect15686"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-40.896038"
+ x="-31.255129"
+ height="0.342623"
+ width="17.693979"
+ id="rect15688"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-40.210793"
+ x="-31.210934"
+ height="0.342623"
+ width="17.561396"
+ id="rect15690"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-39.525543"
+ x="-31.16674"
+ height="0.342623"
+ width="17.384621"
+ id="rect15692"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-38.840298"
+ x="-31.122545"
+ height="0.342623"
+ width="17.274134"
+ id="rect15694"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-38.155052"
+ x="-31.056255"
+ height="0.342623"
+ width="17.119455"
+ id="rect15696"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-37.469807"
+ x="-31.056255"
+ height="0.342623"
+ width="17.053164"
+ id="rect15698"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-36.784561"
+ x="-30.967867"
+ height="0.342623"
+ width="16.876387"
+ id="rect15700"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.070658915"
+ y="-36.099316"
+ x="-30.901583"
+ height="0.342623"
+ width="7.6275225"
+ id="rect15732"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-34.728825"
+ x="-30.813194"
+ height="0.342623"
+ width="16.522835"
+ id="rect15736"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-34.043575"
+ x="-30.769001"
+ height="0.342623"
+ width="16.346058"
+ id="rect15738"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-33.35833"
+ x="-30.702709"
+ height="0.342623"
+ width="16.191378"
+ id="rect15740"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.15701973"
+ y="-32.66003"
+ x="-30.636417"
+ height="0.31651801"
+ width="16.014599"
+ id="rect15742"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ <rect
+ transform="scale(-1,-1)"
+ ry="0.070851199"
+ rx="0.10991389"
+ y="-31.987839"
+ x="-30.614321"
+ height="0.342623"
+ width="11.835577"
+ id="rect15744"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ </g>
+ <path
+ style="fill:url(#linearGradient5272);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5280);stroke-width:0.99343807px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
+ d="M 17.774263,3.5834799 L 16.503927,2.3088849 C 14.185545,2.1155198 11.657045,1.6262566 9.1248774,2.5820125 C 6.8574172,4.6735484 5.0689612,6.8938192 3.7047757,9.2281154 C 3.182732,11.116914 3.2080479,12.123081 3.1119519,13.325026 C 17.424408,14.868026 30.985761,14.113858 45.298218,13.233985 C 45.729453,10.726023 43.082185,5.931844 40.640318,4.5849475 C 35.398146,4.3673953 31.340519,4.8860443 26.070292,4.7361091"
+ id="path5256"
+ sodipodi:nodetypes="cccccccc" />
+ <path
+ style="fill:url(#radialGradient5314);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 39.624049,5.4953726 C 39.624049,5.4953726 43.469178,10.468284 42.418789,10.86688 C 40.685993,11.524431 18.349542,12.391387 19.89149,11.23105 C 25.611891,9.1139047 27.774431,6.0788908 39.624049,5.4953726 z "
+ id="path5304"
+ sodipodi:nodetypes="cscc" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:url(#linearGradient5324);stroke-width:0.99343807px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
+ d="M 15.995792,3.1282675 C 13.894504,2.7415967 11.859224,2.6387608 9.9828657,3.21931 C 8.0015584,4.982086 6.0494425,6.7867045 4.7321425,9.5012425 C 4.3029082,10.408556 4.1169395,11.446627 4.1393187,12.596688 C 18.442743,14.276728 31.383044,13.025996 44.620705,12.414603 C 43.23745,8.4941616 41.854194,6.9565499 40.47094,5.4043299 L 29.546046,5.5864148"
+ id="path5316"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ style="fill:url(#linearGradient5290);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5302);stroke-width:0.99343807px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
+ d="M 17.152378,3.1972195 L 14.576626,8.7149955 L 16.014577,10.948772 L 28.75904,8.1576952 L 29.002832,1.7607348 C 28.680301,0.73067313 28.154254,1.0132996 27.682887,0.94324744 L 18.133569,4.1407803 L 17.152378,3.1972195 z "
+ id="path5282"
+ sodipodi:nodetypes="cccccccc" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:url(#linearGradient5338);stroke-width:0.89409429;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 17.414102,4.3571901 C 16.755375,5.6018077 16.216418,7.2970625 15.557691,8.5416803 L 16.336185,10.022347 L 27.893843,7.4472751 L 28.073495,1.7821195"
+ id="path5330"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="fill:url(#radialGradient5366);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 38.6248,14.129929 L 22.627907,14.840105 C 28.444376,24.083703 38.425859,17.51413 38.6248,14.129929 z "
+ id="path5344"
+ sodipodi:nodetypes="ccc" />
+ <path
+ sodipodi:nodetypes="ccc"
+ id="path5342"
+ d="M 32.613303,14.432116 L 28.162903,14.637766 C 29.588582,17.785948 33.362515,14.919265 32.613303,14.432116 z "
+ style="fill:#eeeeec;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <g
+ id="g5380"
+ transform="matrix(1.018434,0,0,1.018434,-0.174873,-1.130096)">
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path5368"
+ d="M 19.75,21.625 C 19.435176,22.171294 19.232321,22.74558 19.25,23.375 C 21.990075,23.650125 24.434385,23.557309 26.9375,23.4375 C 27.15401,22.733386 26.966221,22.164037 26.6875,21.625 C 24.375,21.494779 22.0625,21.421956 19.75,21.625 z "
+ style="fill:#a6d166;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:url(#linearGradient5384);stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 19.75,21.625 C 19.435176,22.171294 19.232321,22.74558 19.25,23.375 C 21.990075,23.650125 24.434385,23.557309 26.9375,23.4375 C 27.15401,22.733386 26.966221,22.164037 26.6875,21.625 C 24.375,21.494779 22.0625,21.421956 19.75,21.625 z "
+ id="path5370"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+ </g>
+</svg>
diff --git a/trunk/data/scanner-sheetfed.svg b/trunk/data/scanner-sheetfed.svg
new file mode 100644
index 0000000..adba4fe
--- /dev/null
+++ b/trunk/data/scanner-sheetfed.svg
@@ -0,0 +1,751 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.44"
+ version="1.0"
+ sodipodi:docbase="/home/bersace/Projects/flegita/libgnomescanui/icons"
+ sodipodi:docname="sheetfed.svg"
+ inkscape:export-filename="/home/bersace/Projects/flegita/libgnomescanui/icons/sheetfed.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs4">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient6092">
+ <stop
+ style="stop-color:#2d2d2d;stop-opacity:1"
+ offset="0"
+ id="stop6094" />
+ <stop
+ style="stop-color:#656565;stop-opacity:1"
+ offset="1"
+ id="stop6096" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient7648"
+ gradientUnits="userSpaceOnUse"
+ x1="21.9326"
+ y1="24.6274"
+ x2="21.9326"
+ y2="7.1091"
+ style="stroke-dasharray:none;stroke-miterlimit:4.0000000;stroke-width:1.2166667">
+ <stop
+ offset="0"
+ style="stop-color:#8595bc;stop-opacity:1;"
+ id="stop7650" />
+ <stop
+ offset="1"
+ style="stop-color:#041a3b;stop-opacity:1;"
+ id="stop7652" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient7648"
+ id="linearGradient7671"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.379207,0,0,1.001167,-9.640233,5.235373)"
+ x1="21.9326"
+ y1="24.627399"
+ x2="21.9326"
+ y2="7.1090999" />
+ <radialGradient
+ id="aigrd3"
+ cx="20.8921"
+ cy="64.5679"
+ r="5.257"
+ fx="20.8921"
+ fy="64.5679"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#F0F0F0"
+ id="stop15573" />
+ <stop
+ offset="1.0000000"
+ style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+ id="stop15575" />
+ </radialGradient>
+ <radialGradient
+ id="aigrd2"
+ cx="20.8921"
+ cy="114.5684"
+ r="5.256"
+ fx="20.8921"
+ fy="114.5684"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#F0F0F0"
+ id="stop15566" />
+ <stop
+ offset="1.0000000"
+ style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+ id="stop15568" />
+ </radialGradient>
+ <linearGradient
+ id="linearGradient15662">
+ <stop
+ id="stop15664"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop15666"
+ offset="1.0000000"
+ style="stop-color:#f8f8f8;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient269">
+ <stop
+ id="stop270"
+ offset="0.0000000"
+ style="stop-color:#a3a3a3;stop-opacity:1.0000000;" />
+ <stop
+ id="stop271"
+ offset="1.0000000"
+ style="stop-color:#4c4c4c;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient259">
+ <stop
+ id="stop260"
+ offset="0.0000000"
+ style="stop-color:#fafafa;stop-opacity:1.0000000;" />
+ <stop
+ id="stop261"
+ offset="1.0000000"
+ style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4542">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop4544" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop4546" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient9156">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop9158" />
+ <stop
+ id="stop9164"
+ offset="0.73000002"
+ style="stop-color:black;stop-opacity:0.74117649;" />
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop9160" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient8256">
+ <stop
+ style="stop-color:#424242;stop-opacity:1"
+ offset="0"
+ id="stop8258" />
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop8260" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient6416">
+ <stop
+ style="stop-color:#fce94f;stop-opacity:1;"
+ offset="0"
+ id="stop6418" />
+ <stop
+ style="stop-color:#fce94f;stop-opacity:0.62908012"
+ offset="1"
+ id="stop6420" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4616"
+ inkscape:collect="always">
+ <stop
+ id="stop4618"
+ offset="0"
+ style="stop-color:white;stop-opacity:0.4065282" />
+ <stop
+ id="stop4620"
+ offset="1"
+ style="stop-color:white;stop-opacity:0.8278932" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4598">
+ <stop
+ style="stop-color:#424242;stop-opacity:0.85490197"
+ offset="0"
+ id="stop4600" />
+ <stop
+ style="stop-color:#656565;stop-opacity:1"
+ offset="1"
+ id="stop4602" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4590">
+ <stop
+ style="stop-color:#1b1b1b;stop-opacity:0.85490197"
+ offset="0"
+ id="stop4592" />
+ <stop
+ style="stop-color:#6d6d6d;stop-opacity:1"
+ offset="1"
+ id="stop4594" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4582">
+ <stop
+ style="stop-color:black;stop-opacity:0.63798219"
+ offset="0"
+ id="stop4584" />
+ <stop
+ style="stop-color:black;stop-opacity:0.42729971"
+ offset="1"
+ id="stop4586" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4574">
+ <stop
+ style="stop-color:#5c3566;stop-opacity:1"
+ offset="0"
+ id="stop4576" />
+ <stop
+ style="stop-color:#75507b;stop-opacity:1"
+ offset="1"
+ id="stop4578" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4574"
+ id="linearGradient4580"
+ x1="25.001011"
+ y1="29.303871"
+ x2="25.001011"
+ y2="28.116371"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4582"
+ id="linearGradient4588"
+ x1="25.001011"
+ y1="31.053871"
+ x2="25.001011"
+ y2="28.866371"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4590"
+ id="linearGradient4596"
+ x1="24.71875"
+ y1="31.181992"
+ x2="24.71875"
+ y2="32.596821"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4616"
+ id="linearGradient4608"
+ gradientUnits="userSpaceOnUse"
+ x1="25.001011"
+ y1="29.491371"
+ x2="25.001011"
+ y2="28.366371" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6416"
+ id="radialGradient6422"
+ cx="25.124388"
+ cy="26.679316"
+ fx="25.124388"
+ fy="26.679316"
+ r="16.108776"
+ gradientTransform="matrix(-1.134883,0,0,-0.29198,53.63763,38.55404)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient8256"
+ id="linearGradient8262"
+ x1="5.1251097"
+ y1="20.658211"
+ x2="1.375"
+ y2="13.875"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9156"
+ id="radialGradient9162"
+ cx="24.200354"
+ cy="45.235249"
+ fx="24.200354"
+ fy="45.235249"
+ r="21.75"
+ gradientTransform="matrix(-1,7.498197e-7,-2.204008e-7,-0.293106,48.45036,51.75869)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#aigrd2"
+ id="radialGradient4212"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.288272,0,0,-0.288272,-1.692428,50.46688)"
+ cx="20.8921"
+ cy="114.5684"
+ fx="20.8921"
+ fy="114.5684"
+ r="5.256" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#aigrd3"
+ id="radialGradient4214"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.288272,0,0,-0.288272,-1.692428,50.46688)"
+ cx="20.8921"
+ cy="64.5679"
+ fx="20.8921"
+ fy="64.5679"
+ r="5.257" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4542"
+ id="radialGradient4226"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.254977,0,0,-0.357563,-7.647133,16.0199)"
+ cx="24.306795"
+ cy="42.07798"
+ fx="24.306795"
+ fy="42.07798"
+ r="15.821514" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient15662"
+ id="radialGradient4273"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.968273,0,0,1.032767,3.35356,0.646455)"
+ cx="8.1435566"
+ cy="7.2678967"
+ fx="8.1435566"
+ fy="7.2678967"
+ r="38.158695" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient259"
+ id="radialGradient4276"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.960492,0,0,1.041131,-5.854e-8,3.73821e-6)"
+ cx="33.966679"
+ cy="35.736916"
+ fx="33.966679"
+ fy="35.736916"
+ r="86.708450" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient269"
+ id="radialGradient4278"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.968273,0,0,1.032767,3.35356,0.646455)"
+ cx="8.8244190"
+ cy="3.7561285"
+ fx="8.8244190"
+ fy="3.7561285"
+ r="37.751713" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient15662"
+ id="radialGradient4307"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.968273,0,0,1.032767,3.35356,0.646455)"
+ cx="8.1435566"
+ cy="7.2678967"
+ fx="8.1435566"
+ fy="7.2678967"
+ r="38.158695" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient259"
+ id="radialGradient4309"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.960492,0,0,1.041131,-5.9428e-7,3.97e-6)"
+ cx="33.966679"
+ cy="35.736916"
+ fx="33.966679"
+ fy="35.736916"
+ r="86.708450" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient269"
+ id="radialGradient4311"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.968273,0,0,1.032767,3.35356,0.646455)"
+ cx="8.8244190"
+ cy="3.7561285"
+ fx="8.8244190"
+ fy="3.7561285"
+ r="37.751713" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6092"
+ id="linearGradient6098"
+ x1="23.533968"
+ y1="30.71545"
+ x2="23.533968"
+ y2="33.278572"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="4"
+ inkscape:cx="31.773476"
+ inkscape:cy="31.123615"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:showpageshadow="false"
+ width="48px"
+ height="48px"
+ inkscape:window-width="1270"
+ inkscape:window-height="945"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ showgrid="false"
+ showborder="false" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/SourceCode" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ transform="translate(6.25e-2,-1.9375)"
+ style="opacity:0.5;fill:url(#radialGradient9162);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 46,38.5 C 46,42.295 36.256,45.375 24.25,45.375 C 12.244,45.375 2.5,42.295 2.5,38.5 C 2.5,34.705 12.244,31.625 24.25,31.625 C 36.256,31.625 46,34.705 46,38.5 z "
+ id="path8269" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.7836257;color:black;fill:url(#radialGradient4226);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path4142"
+ sodipodi:cx="24.306795"
+ sodipodi:cy="42.07798"
+ sodipodi:rx="15.821514"
+ sodipodi:ry="4.5078058"
+ d="M 40.128309 42.07798 A 15.821514 4.5078058 0 1 1 8.485281,42.07798 A 15.821514 4.5078058 0 1 1 40.128309 42.07798 z"
+ transform="matrix(0.796827,0,0,-0.796827,6.093441,43.56149)" />
+ <path
+ style="color:black;fill:url(#radialGradient4309);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient4311);stroke-width:0.7968269;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ d="M 39.144667,24.934782 L 39.144667,9.676668 C 39.144667,9.0872858 38.670182,8.6128016 38.080801,8.6128016 L 12.419196,8.6128016 C 11.829814,8.6128016 11.35533,9.0872858 11.35533,9.676668 L 11.35533,24.963716"
+ id="path4290" />
+ <path
+ style="color:black;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient4307);stroke-width:0.7968269;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ d="M 38.318665,25.107684 L 38.318665,9.5767989 C 38.318665,9.5003473 38.257118,9.4387995 38.180667,9.4387995 L 12.339958,9.4387995 C 12.263506,9.4387995 12.201959,9.5003473 12.201959,9.5767989 L 12.201959,25.013438"
+ id="path4286" />
+ <g
+ style="display:inline"
+ transform="matrix(0.796827,0,0,-0.796827,6.608548,44.1552)"
+ id="g4148">
+ <g
+ id="g4150"
+ style="fill:white;fill-opacity:1;fill-rule:nonzero;stroke:black;stroke-miterlimit:4"
+ transform="matrix(0.229703,0,0,0.229703,4.967081,4.244972)">
+ <radialGradient
+ id="radialGradient4152"
+ cx="20.892099"
+ cy="114.5684"
+ r="5.256"
+ fx="20.892099"
+ fy="114.5684"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#F0F0F0"
+ id="stop4154" />
+ <stop
+ offset="1"
+ style="stop-color:#474747"
+ id="stop4156" />
+ </radialGradient>
+ <path
+ style="stroke:none"
+ d="M 23.428,113.07 C 23.428,115.043 21.828,116.642 19.855,116.642 C 17.881,116.642 16.282,115.042 16.282,113.07 C 16.282,111.096 17.882,109.497 19.855,109.497 C 21.828,109.497 23.428,111.097 23.428,113.07 z "
+ id="path4158" />
+ <radialGradient
+ id="radialGradient4160"
+ cx="20.892099"
+ cy="64.567902"
+ r="5.257"
+ fx="20.892099"
+ fy="64.567902"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#F0F0F0"
+ id="stop4162" />
+ <stop
+ offset="1"
+ style="stop-color:#474747"
+ id="stop4164" />
+ </radialGradient>
+ <path
+ style="stroke:none"
+ d="M 23.428,63.07 C 23.428,65.043 21.828,66.643 19.855,66.643 C 17.881,66.643 16.282,65.043 16.282,63.07 C 16.282,61.096 17.882,59.497 19.855,59.497 C 21.828,59.497 23.428,61.097 23.428,63.07 z "
+ id="path4166" />
+ </g>
+ <path
+ style="fill:url(#radialGradient4212);fill-rule:nonzero;stroke:none;stroke-miterlimit:4"
+ d="M 9.9950109,29.952326 C 9.9950109,30.40553 9.6274861,30.772825 9.1742821,30.772825 C 8.7208483,30.772825 8.3535532,30.405301 8.3535532,29.952326 C 8.3535532,29.498892 8.721078,29.131597 9.1742821,29.131597 C 9.6274861,29.131597 9.9950109,29.499122 9.9950109,29.952326 z "
+ id="path4168" />
+ <path
+ style="fill:url(#radialGradient4214);fill-rule:nonzero;stroke:none;stroke-miterlimit:4"
+ d="M 9.9950109,18.467176 C 9.9950109,18.92038 9.6274861,19.287905 9.1742821,19.287905 C 8.7208483,19.287905 8.3535532,18.92038 8.3535532,18.467176 C 8.3535532,18.013742 8.721078,17.646447 9.1742821,17.646447 C 9.6274861,17.646447 9.9950109,18.013972 9.9950109,18.467176 z "
+ id="path4170" />
+ </g>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:black;stroke-width:0.85077548;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.01754384;display:inline"
+ d="M 13.524255,38.163707 L 14.461755,31.508239 L 14.461755,9.1027703"
+ id="path4172"
+ sodipodi:nodetypes="ccc" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:white;stroke-width:0.860627;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.20467828;display:inline"
+ d="M 14.629957,38.446439 L 15.317457,31.368154 L 15.317457,9.414869"
+ id="path4174"
+ sodipodi:nodetypes="ccc" />
+ <rect
+ ry="0.065390863"
+ rx="0.13778628"
+ y="-19.423304"
+ x="18.842661"
+ height="0.7968269"
+ width="15.936543"
+ id="rect4176"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible"
+ transform="scale(1,-1)" />
+ <rect
+ ry="0.065390863"
+ rx="0.13778628"
+ y="-17.829651"
+ x="18.842661"
+ height="0.7968269"
+ width="15.936543"
+ id="rect4178"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible"
+ transform="scale(1,-1)" />
+ <rect
+ ry="0.065390863"
+ rx="0.13778628"
+ y="-16.235996"
+ x="18.842661"
+ height="0.7968269"
+ width="15.936543"
+ id="rect4180"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible"
+ transform="scale(1,-1)" />
+ <rect
+ ry="0.065390863"
+ rx="0.096450455"
+ y="-14.642344"
+ x="18.842661"
+ height="0.7968269"
+ width="11.155587"
+ id="rect4182"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible"
+ transform="scale(1,-1)" />
+ <g
+ id="g5376"
+ style="opacity:0.66477272"
+ transform="matrix(0.796827,0,0,-0.796827,6.093441,44.12494)">
+ <g
+ transform="matrix(0.608982,0,0,0.606219,12.8233,10.5572)"
+ id="g7654">
+ <path
+ style="fill:url(#linearGradient7671);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.2166667;stroke-miterlimit:4"
+ d="M 5.512695,30 L 39.643234,30 L 39.643234,19.627375 L 5.512695,19.627375 L 5.512695,30 z "
+ id="path7644" />
+ <path
+ id="path16203"
+ d="M 5.512695,5.6791358 L 39.643234,5.6791358 L 39.643234,19.627375 L 5.512695,19.627375 L 5.512695,5.6791358 z "
+ style="fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.2166667;stroke-miterlimit:4" />
+ <g
+ transform="matrix(1.189217,0,0,1.189217,-3.525355,-6.535408)"
+ style="fill-rule:nonzero;stroke:black;stroke-width:2.00241709;stroke-miterlimit:4"
+ id="g16205">
+ <g
+ id="g16207">
+ <path
+ id="path16209"
+ d="M 18.4,15.4 C 18.4,17.6 16.6,19.5 14.3,19.5 C 12.1,19.5 10.2,17.7 10.2,15.4 C 10.2,13.2 12,11.3 14.3,11.3 C 16.5,11.3 18.4,13.1 18.4,15.4 z "
+ style="opacity:0.04999994;fill:#e8f52f;stroke:none" />
+ <path
+ id="path16211"
+ d="M 18,15.4 C 18,17.4 16.4,19.1 14.3,19.1 C 12.3,19.1 10.6,17.5 10.6,15.4 C 10.6,13.4 12.2,11.7 14.3,11.7 C 16.3,11.7 18,13.3 18,15.4 L 18,15.4 z "
+ style="opacity:0.20829994;fill:#ecf751;stroke:none" />
+ <path
+ id="path16213"
+ d="M 17.6,15.4 C 17.6,17.2 16.1,18.7 14.3,18.7 C 12.5,18.7 11,17.2 11,15.4 C 11,13.6 12.5,12.1 14.3,12.1 C 16.1,12.1 17.6,13.6 17.6,15.4 L 17.6,15.4 z "
+ style="opacity:0.36669994;fill:#f0f972;stroke:none" />
+ <path
+ id="path16215"
+ d="M 17.2,15.4 C 17.2,17 15.9,18.3 14.3,18.3 C 12.7,18.3 11.4,17 11.4,15.4 C 11.4,13.8 12.7,12.5 14.3,12.5 C 15.9,12.5 17.2,13.8 17.2,15.4 z "
+ style="opacity:0.525;fill:#f4fa95;stroke:none" />
+ <path
+ id="path16217"
+ d="M 16.8,15.4 C 16.8,16.8 15.7,17.9 14.3,17.9 C 12.9,17.9 11.8,16.8 11.8,15.4 C 11.8,14 12.9,12.9 14.3,12.9 C 15.7,12.9 16.8,14 16.8,15.4 L 16.8,15.4 z "
+ style="opacity:0.6833;fill:#f7fcb7;stroke:none" />
+ <path
+ id="path16219"
+ d="M 16.4,15.4 C 16.4,16.6 15.4,17.5 14.3,17.5 C 13.2,17.5 12.2,16.5 12.2,15.4 C 12.2,14.3 13.2,13.3 14.3,13.3 C 15.4,13.3 16.4,14.3 16.4,15.4 z "
+ style="opacity:0.8417;fill:#fbfddb;stroke:none" />
+ <path
+ id="path16221"
+ d="M 16,15.4 C 16,16.4 15.2,17.2 14.2,17.2 C 13.2,17.2 12.4,16.4 12.4,15.4 C 12.4,14.4 13.2,13.6 14.2,13.6 C 15.2,13.6 16,14.4 16,15.4 L 16,15.4 z "
+ style="fill:white;stroke:none" />
+ </g>
+ </g>
+ <path
+ id="path16223"
+ d="M 25.015859,21.649044 L 33.697148,21.649044 L 35.362052,22.124732 L 32.507931,22.124732 C 32.507931,22.124732 35.362052,22.362574 36.789115,24.146401 C 38.216174,25.811305 35.12421,27.832976 35.12421,27.832976 C 35.12421,27.832976 35.12421,27.832976 35.12421,27.832976 C 35.005288,27.47621 34.291756,24.622087 32.864696,23.43287 C 31.794399,22.481496 30.605182,22.243652 30.605182,22.243652 L 25.015859,22.243652 L 25.015859,21.767966 L 25.015859,21.649044 z "
+ style="opacity:0.3;fill-rule:nonzero;stroke:none;stroke-width:1.2166667;stroke-miterlimit:4" />
+ <path
+ id="path16225"
+ d="M 30.724106,22.362574 L 25.729391,22.362574 L 35.005288,27.595131 L 30.724106,22.362574 L 30.724106,22.362574 z "
+ style="opacity:0.3;fill-rule:nonzero;stroke:none;stroke-width:1.2166667;stroke-miterlimit:4" />
+ <path
+ id="path16227"
+ d="M 25.015859,21.767966 L 33.697148,21.767966 L 35.005288,20.935513 L 32.151167,20.935513 C 32.151167,20.935513 34.767443,20.459827 35.12421,17.486782 C 35.480973,14.513739 31.080869,11.183931 31.080869,11.183931 C 31.080869,11.183931 31.080869,11.183931 31.080869,11.302853 C 31.19979,12.016383 32.389007,17.011096 31.556557,18.913846 C 31.19979,20.578747 30.129495,20.935513 30.129495,20.935513 L 24.659094,20.935513 L 24.896938,21.767966 L 25.015859,21.767966 z "
+ style="fill:#515151;fill-rule:nonzero;stroke:none;stroke-width:1.2166667;stroke-miterlimit:4" />
+ <path
+ id="path16229"
+ d="M 30.248418,20.459827 L 25.253704,20.459827 L 31.19979,11.421773 L 30.248418,20.459827 z "
+ style="fill:#515151;fill-rule:nonzero;stroke:none;stroke-width:1.2166667;stroke-miterlimit:4" />
+ </g>
+ <rect
+ y="14.485752"
+ x="16.508501"
+ height="13.997463"
+ width="19.995502"
+ id="rect8163"
+ style="opacity:1;color:black;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#9e9e9e;stroke-width:0.99999863;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:url(#linearGradient8262);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 5.375,30.75 C 4.2814062,30.75 1.7206686,31.495272 2.375,26.875 C 2.7846165,23.982674 5.7869105,23.428479 5.75,20.375 C 5.7118201,17.216506 1.875,13.625 1.875,13.625"
+ id="path8254"
+ sodipodi:nodetypes="cssc" />
+ <path
+ id="path1890"
+ style="fill:url(#linearGradient4580);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 24.998042,35.781979 L 42.171838,35.779817 C 43.323767,35.758137 44.730102,35.33663 44.962262,32.195353 L 45.033812,30.214465 C 45.102454,27.686042 43.41346,25.124459 41.778317,25.202502 L 25.005867,25.205255 L 8.2216796,25.202502 C 6.5865366,25.124459 4.9646092,27.848483 4.9661851,30.214465 L 5.0377348,32.195353 C 5.2698946,35.33663 6.6762294,35.758137 7.8281584,35.779817 L 24.998042,35.781979 z "
+ sodipodi:nodetypes="ccccccccccc" />
+ <path
+ sodipodi:nodetypes="ccccccccccc"
+ d="M 24.998042,37.034037 L 42.171838,37.031364 C 43.323767,37.004553 44.730102,36.483294 44.962262,32.598611 L 45.033812,30.148932 C 45.102454,27.022142 43.41346,23.854344 41.778317,23.950856 L 25.005867,23.954259 L 8.2216796,23.950856 C 6.5865366,23.854344 4.9646092,27.223026 4.9661851,30.148932 L 5.0377348,32.598611 C 5.2698946,36.483294 6.6762294,37.004553 7.8281584,37.031364 L 24.998042,37.034037 z "
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path2785" />
+ <path
+ id="path2787"
+ style="fill:url(#linearGradient4588);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 42.171838,35.779817 C 43.323767,35.758137 44.730102,35.33663 44.962262,32.195353 L 45.033812,30.214465 C 45.102454,27.686042 43.41346,25.124459 41.778317,25.202502 L 8.2216796,25.202502 C 6.5865366,25.124459 4.9646092,27.848483 4.9661851,30.214465 L 5.0377348,32.195353 C 5.2698946,35.33663 6.6762294,35.758137 7.8281584,35.779817 L 42.171838,35.779817 z M 41.36079,35.064291 C 42.458309,35.045543 43.798217,34.681067 44.019411,31.964804 L 44.087579,30.25193 C 44.152982,28.065603 42.543765,26.292545 40.985856,26.360029 L 9.0142358,26.360029 C 7.4563275,26.292545 5.9110103,28.206067 5.9125117,30.25193 L 5.9806819,31.964804 C 6.2018759,34.681067 7.5417837,35.045543 8.6393029,35.064291 L 41.36079,35.064291 z "
+ sodipodi:nodetypes="cccccccccccccccccc" />
+ <path
+ style="fill:url(#linearGradient4596);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6098);stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="M 8.2842854,30.25365 L 41.15226,30.25365 L 40.682718,32.333361 L 41.5905,33.340451 L 8.0964684,33.231577 L 8.8790392,32.333361 L 8.2842854,30.25365 z "
+ id="path3679"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+ d="M 41.351482,34.943014 C 42.448377,34.92404 43.787522,34.731916 44.008591,31.982687 L 44.076722,30.249024 C 44.142084,28.036163 42.533784,26.147832 40.976762,26.216135 L 9.023331,26.216135 C 7.4663088,26.147832 5.9218708,28.178331 5.9233715,30.249024 L 5.9915028,31.982687 C 6.2125708,34.731916 7.5517164,34.92404 8.6486108,34.943014 L 41.351482,34.943014 z M 40.579183,34.140012 C 41.624266,34.123605 42.900159,34.158171 43.110786,31.780912 L 43.175697,30.281814 C 43.237975,28.368352 41.705639,27.181097 40.222161,27.240158 L 9.7780219,27.240158 C 8.2945445,27.181097 6.8230566,28.491285 6.8244862,30.281814 L 6.8893995,31.780912 C 7.1000258,34.158171 8.3759179,34.123605 9.4210015,34.140012 L 40.579183,34.140012 z "
+ style="fill:url(#linearGradient4608);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path4606"
+ sodipodi:nodetypes="cccccccccccccccccc" />
+ <g
+ id="g4292">
+ <path
+ id="rect4144"
+ d="M 10.242815,31.645359 L 6.6803149,38.667452 C 6.6803149,39.304024 7.1927904,39.8165 7.8293632,39.8165 L 43.420634,39.8165 C 44.057206,39.8165 44.569682,39.304024 44.569682,38.667452 L 40.257182,31.082859"
+ style="color:black;fill:url(#radialGradient4276);fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient4278);stroke-width:0.860627;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ id="rect4146"
+ d="M 11.157232,31.594257 L 7.6884819,38.735614 C 7.6884819,38.818186 7.7549575,38.884662 7.8375305,38.884662 L 43.372246,38.884662 C 43.454819,38.884662 43.521295,38.818186 43.521295,38.735614 L 39.365044,32.063007"
+ style="color:black;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#radialGradient4273);stroke-width:0.860627;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible"
+ sodipodi:nodetypes="cccccc" />
+ <rect
+ transform="scale(1,-1)"
+ ry="0.065390863"
+ rx="0.13778628"
+ y="-37.521587"
+ x="17.610889"
+ height="0.90112346"
+ width="18.775045"
+ id="rect1768"
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible" />
+ </g>
+ <rect
+ style="color:black;fill:#9b9b9b;fill-opacity:0.54970757;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.08187136;visibility:visible;display:block;overflow:visible"
+ id="rect1770"
+ width="14.39254"
+ height="0.86063015"
+ x="17.860889"
+ y="-35.800331"
+ rx="0.096450455"
+ ry="0.065390863"
+ transform="scale(1,-1)" />
+ <path
+ id="path5529"
+ style="fill:url(#radialGradient6422);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 10.827573,30.764272 L 39.244426,30.764272 C 61.892123,36.833267 -10.512288,37.224634 10.827573,30.764272 z M 11.59375,25.21875 C 6.149667,23.041556 47.660094,23.100865 38.65625,25.1875"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="fill:white;fill-opacity:0.99703264;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 11.269514,30.852661 C 5.8029816,34.242132 47.726484,32.95849 39.023455,30.808466 L 11.269514,30.852661 z "
+ id="path6424"
+ sodipodi:nodetypes="ccc" />
+ </g>
+</svg>
diff --git a/trunk/doc/Makefile.am b/trunk/doc/Makefile.am
new file mode 100644
index 0000000..10ce815
--- /dev/null
+++ b/trunk/doc/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = ref
diff --git a/trunk/doc/ref/Makefile.am b/trunk/doc/ref/Makefile.am
new file mode 100644
index 0000000..e4f8f2d
--- /dev/null
+++ b/trunk/doc/ref/Makefile.am
@@ -0,0 +1,114 @@
+## Process this file with automake to produce Makefile.in
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.9
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=gnome-scan- API_VERSION@
+
+# The top-level SGML file. You can change this if you want to.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting the functions and macros.
+# e.g. DOC_SOURCE_DIR=../../../gtk
+DOC_SOURCE_DIR=$(top_srcdir)/lib
+
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
+SCANGOBJ_OPTIONS=
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
+SCAN_OPTIONS=
+
+# Extra options to supply to gtkdoc-mkdb.
+# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS=
+
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS=
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
+HFILE_GLOB=$(top_srcdir)/lib/gnome*.h
+CFILE_GLOB=$(top_srcdir)/lib/gnome*.c
+
+# Header files to ignore when scanning.
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
+IGNORE_HFILES=
+
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES= \
+ $(srcdir)/images/*.png
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
+content_files= \
+ version.xml \
+ gallery.xml
+
+
+# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
+# These files must be listed here *and* in content_files
+# e.g. expand_content_files=running.sgml
+expand_content_files=
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+INCLUDES= \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/lib \
+ -I$(top_builddir)/lib \
+ $(GNOME_SCAN_CFLAGS)
+
+GTKDOC_LIBS= \
+ $(GNOME_SCAN_LIBS) \
+ $(INTLLIBS) \
+ -lsane \
+ -L$(top_builddir)/lib -l SONAME@
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+# Other files to distribute
+# e.g. EXTRA_DIST += version.xml.in
+EXTRA_DIST += \
+ version.xml.in
+
+
+gallery.xml: $(HTML_IMAGES)
+ echo -n > $@;
+ echo "<para role=\"gallery\" align=\"center\">" > $@;
+ for f in $(srcdir)/images/*.png; do \
+ i=$$(basename $$f); \
+ o=$${i/.png/}; \
+ echo "<link linkend=\"$$o\">" >> $@; \
+ echo " <para>$$o</para>" >> $@; \
+ echo " <inlinegraphic fileref=\"$$i\" format=\"PNG\" />" >> $@; \
+ echo "</link>" >> $@; \
+ done;
+ echo "</para>" >> $@;
+
+
+purge: clean
+ rm -rf html xml *.stamp gallery.xml;
+ rm -rf $(DOC_MODULE).{args,hierarchy,interfaces,prerequisites,signals};
+ rm -rf $(DOC_MODULE)-{decl*,undocumented,unused}.txt
+
diff --git a/trunk/doc/ref/gallery.xml b/trunk/doc/ref/gallery.xml
new file mode 100644
index 0000000..f74f5f3
--- /dev/null
+++ b/trunk/doc/ref/gallery.xml
@@ -0,0 +1,22 @@
+<para role="gallery" align="center">
+<link linkend="GnomeScanAcquisitionDialog">
+ <para>GnomeScanAcquisitionDialog</para>
+ <inlinegraphic fileref="GnomeScanAcquisitionDialog.png" format="PNG" />
+</link>
+<link linkend="GnomeScanDialog">
+ <para>GnomeScanDialog</para>
+ <inlinegraphic fileref="GnomeScanDialog.png" format="PNG" />
+</link>
+<link linkend="GSParamSpecEnum">
+ <para>GSParamSpecEnum</para>
+ <inlinegraphic fileref="GSParamSpecEnum.png" format="PNG" />
+</link>
+<link linkend="GSParamSpecFilenames">
+ <para>GSParamSpecFilenames</para>
+ <inlinegraphic fileref="GSParamSpecFilenames.png" format="PNG" />
+</link>
+<link linkend="GSParamSpecOutputFilename">
+ <para>GSParamSpecOutputFilename</para>
+ <inlinegraphic fileref="GSParamSpecOutputFilename.png" format="PNG" />
+</link>
+</para>
diff --git a/trunk/doc/ref/gnome-scan-1.0-docs.sgml b/trunk/doc/ref/gnome-scan-1.0-docs.sgml
new file mode 100644
index 0000000..2a4b4a3
--- /dev/null
+++ b/trunk/doc/ref/gnome-scan-1.0-docs.sgml
@@ -0,0 +1,59 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
+ [
+ <!ENTITY version SYSTEM "version.xml">
+ ]>
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+ <bookinfo>
+ <title>Gnome Scan Reference Manual</title>
+ <releaseinfo>For Gnome Scan &version;</releaseinfo>
+ </bookinfo>
+
+ <part id="core">
+ <title>Gnome Scan Core Reference</title>
+
+ <chapter id="setup">
+ <title>Using Gnome Scan</title>
+ <xi:include href="xml/gnome-scan-init.xml"/>
+ <xi:include href="xml/gnome-scan-dialog.xml"/>
+ <xi:include href="xml/gnome-scan-job.xml"/>
+ <xi:include href="xml/gnome-scan-settings.xml"/>
+ </chapter>
+
+ <chapter id="extends">
+ <title>Extending For Application</title>
+ <xi:include href="xml/gnome-scan-plugin.xml"/>
+ <xi:include href="xml/gnome-scan-sink.xml"/>
+ <xi:include href="xml/gnome-scan-param-specs.xml"/>
+ <xi:include href="xml/gnome-scan-param-widget.xml"/>
+ <xi:include href="xml/gnome-scan-preview-plugin.xml"/>
+ </chapter>
+ </part>
+
+ <part id="internals">
+ <title>Gnome Scan Internals</title>
+ <xi:include href="xml/gnome-scan-types.xml"/>
+ <xi:include href="xml/gnome-scan-utils.xml"/>
+
+ <chapter id="backend">
+ <title>Writing Backend</title>
+ <xi:include href="xml/gnome-scan-module.xml"/>
+ <xi:include href="xml/gnome-scan-backend.xml"/>
+ <xi:include href="xml/gnome-scanner.xml"/>
+ </chapter>
+ </part>
+
+
+ <index id="symbols">
+ <title>Index</title>
+ </index>
+ <index role="hierarchy" id="hierarchy">
+ <title>Object Hierarchy</title>
+ <xi:include href="xml/tree_index.sgml"/>
+ </index>
+ <index role="gallery" id="gallery">
+ <title>Widget Gallery</title>
+ <xi:include href="gallery.xml" />
+ </index>
+</book>
diff --git a/trunk/doc/ref/gnome-scan-1.0-sections.txt b/trunk/doc/ref/gnome-scan-1.0-sections.txt
new file mode 100644
index 0000000..a0cbfbf
--- /dev/null
+++ b/trunk/doc/ref/gnome-scan-1.0-sections.txt
@@ -0,0 +1,551 @@
+<SECTION>
+<FILE>gnome-scan-backend</FILE>
+<TITLE>GnomeScanBackend</TITLE>
+GnomeScanBackend
+gnome_scan_backend_new
+gnome_scan_backend_probe_scanners
+gnome_scan_backend_add_scanner
+gnome_scan_backend_remove_scanner
+gnome_scan_backend_probe_done
+<SUBSECTION Standard>
+GNOME_SCAN_BACKEND
+GNOME_IS_SCAN_BACKEND
+GNOME_TYPE_SCAN_BACKEND
+gnome_scan_backend_get_type
+GNOME_SCAN_BACKEND_CLASS
+GNOME_IS_SCAN_BACKEND_CLASS
+GNOME_SCAN_BACKEND_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-enum-widget</FILE>
+GnomeScanEnumWidget
+<SUBSECTION Standard>
+GNOME_SCAN_ENUM_WIDGET
+GNOME_IS_SCAN_ENUM_WIDGET
+GNOME_TYPE_SCAN_ENUM_WIDGET
+GNOME_SCAN_ENUM_WIDGET_CLASS
+GNOME_IS_SCAN_ENUM_WIDGET_CLASS
+GNOME_SCAN_ENUM_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-range-widget</FILE>
+GnomeScanRangeWidget
+<SUBSECTION Standard>
+GNOME_SCAN_RANGE_WIDGET
+GNOME_IS_SCAN_RANGE_WIDGET
+GNOME_TYPE_SCAN_RANGE_WIDGET
+GNOME_SCAN_RANGE_WIDGET_CLASS
+GNOME_IS_SCAN_RANGE_WIDGET_CLASS
+GNOME_SCAN_RANGE_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-number-widget</FILE>
+GnomeScanNumberWidget
+<SUBSECTION Standard>
+GNOME_SCAN_NUMBER_WIDGET
+GNOME_IS_SCAN_NUMBER_WIDGET
+GNOME_TYPE_SCAN_NUMBER_WIDGET
+GNOME_SCAN_NUMBER_WIDGET_CLASS
+GNOME_IS_SCAN_NUMBER_WIDGET_CLASS
+GNOME_SCAN_NUMBER_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-preview-plugin-rotation</FILE>
+<TITLE>GnomeScanPreviewPluginRotation</TITLE>
+GnomeScanPreviewPluginRotation
+<SUBSECTION Standard>
+GNOME_SCAN_PREVIEW_PLUGIN_ROTATION
+GNOME_IS_SCAN_PREVIEW_PLUGIN_ROTATION
+GNOME_TYPE_SCAN_PREVIEW_PLUGIN_ROTATION
+gnome_scan_preview_plugin_rotation_get_type
+GNOME_SCAN_PREVIEW_PLUGIN_ROTATION_CLASS
+GNOME_IS_SCAN_PREVIEW_PLUGIN_ROTATION_CLASS
+GNOME_SCAN_PREVIEW_PLUGIN_ROTATION_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-preview-sink</FILE>
+<TITLE>GnomeScanPreviewSink</TITLE>
+GnomeScanPreviewSink
+gnome_scan_preview_sink_new
+gnome_scan_preview_sink_get_pixbuf
+<SUBSECTION Standard>
+GNOME_SCAN_PREVIEW_SINK
+GNOME_IS_SCAN_PREVIEW_SINK
+GNOME_TYPE_SCAN_PREVIEW_SINK
+gnome_scan_preview_sink_get_type
+GNOME_SCAN_PREVIEW_SINK_CLASS
+GNOME_IS_SCAN_PREVIEW_SINK_CLASS
+GNOME_SCAN_PREVIEW_SINK_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-page-orientation-widget</FILE>
+GnomeScanPageOrientationWidget
+<SUBSECTION Standard>
+GNOME_SCAN_PAGE_ORIENTATION_WIDGET
+GNOME_IS_SCAN_PAGE_ORIENTATION_WIDGET
+GNOME_TYPE_SCAN_PAGE_ORIENTATION_WIDGET
+GNOME_SCAN_PAGE_ORIENTATION_WIDGET_CLASS
+GNOME_IS_SCAN_PAGE_ORIENTATION_WIDGET_CLASS
+GNOME_SCAN_PAGE_ORIENTATION_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-module-manager</FILE>
+<TITLE>GnomeScanModuleManager</TITLE>
+GnomeScanModuleManager
+gnome_scan_module_manager_new
+gnome_scan_module_manager_query_modules
+gnome_scan_module_manager_unload_modules
+<SUBSECTION Standard>
+GNOME_SCAN_MODULE_MANAGER
+GNOME_IS_SCAN_MODULE_MANAGER
+GNOME_TYPE_SCAN_MODULE_MANAGER
+gnome_scan_module_manager_get_type
+GNOME_SCAN_MODULE_MANAGER_CLASS
+GNOME_IS_SCAN_MODULE_MANAGER_CLASS
+GNOME_SCAN_MODULE_MANAGER_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-dialog</FILE>
+<TITLE>GnomeScanDialog</TITLE>
+GnomeScanDialog
+gnome_scan_dialog_new
+gnome_scan_dialog_run
+<SUBSECTION Standard>
+GNOME_SCAN_DIALOG
+GNOME_IS_SCAN_DIALOG
+GNOME_TYPE_SCAN_DIALOG
+gnome_scan_dialog_get_type
+GNOME_SCAN_DIALOG_CLASS
+GNOME_IS_SCAN_DIALOG_CLASS
+GNOME_SCAN_DIALOG_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-module</FILE>
+GS_DEFINE_MODULE_TYPE
+<TITLE>GnomeScanModule</TITLE>
+GnomeScanModule
+gnome_scan_module_new
+<SUBSECTION Private>
+NOT_IMPLEMENTED
+<SUBSECTION Standard>
+GNOME_SCAN_MODULE
+GNOME_IS_SCAN_MODULE
+GNOME_TYPE_SCAN_MODULE
+gnome_scan_module_get_type
+GNOME_SCAN_MODULE_CLASS
+GNOME_IS_SCAN_MODULE_CLASS
+GNOME_SCAN_MODULE_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-string-widget</FILE>
+GnomeScanStringWidget
+<SUBSECTION Standard>
+GNOME_SCAN_STRING_WIDGET
+GNOME_IS_SCAN_STRING_WIDGET
+GNOME_TYPE_SCAN_STRING_WIDGET
+GNOME_SCAN_STRING_WIDGET_CLASS
+GNOME_IS_SCAN_STRING_WIDGET_CLASS
+GNOME_SCAN_STRING_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-settings</FILE>
+<TITLE>GnomeScanSettings</TITLE>
+GnomeScanSettings
+gnome_scan_settings_new
+gnome_scan_settings_init_value
+gnome_scan_settings_set
+gnome_scan_settings_set_transform
+gnome_scan_settings_set_double
+gnome_scan_settings_set_int
+gnome_scan_settings_set_boolean
+gnome_scan_settings_set_enum
+gnome_scan_settings_set_boxed
+gnome_scan_settings_set_object
+gnome_scan_settings_set_pointer
+gnome_scan_settings_get
+gnome_scan_settings_get_transformed
+gnome_scan_settings_get_string
+gnome_scan_settings_get_double
+gnome_scan_settings_get_int
+gnome_scan_settings_get_boolean
+gnome_scan_settings_get_enum
+gnome_scan_settings_get_boxed
+gnome_scan_settings_get_object
+gnome_scan_settings_get_pointer
+gnome_scan_settings_get_all
+<SUBSECTION Standard>
+GNOME_SCAN_SETTINGS
+GNOME_IS_SCAN_SETTINGS
+GNOME_TYPE_SCAN_SETTINGS
+gnome_scan_settings_get_type
+GNOME_SCAN_SETTINGS_CLASS
+GNOME_IS_SCAN_SETTINGS_CLASS
+GNOME_SCAN_SETTINGS_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-plugin</FILE>
+<TITLE>GnomeScanPlugin</TITLE>
+GnomeScanPlugin
+gnome_scan_plugin_params_add
+gnome_scan_plugin_params_remove
+gnome_scan_plugin_params_clear
+gnome_scan_plugin_params_changed
+gnome_scan_plugin_configure
+gnome_scan_plugin_configure_frame
+gnome_scan_plugin_start_frame
+gnome_scan_plugin_work
+gnome_scan_plugin_end_frame
+gnome_scan_plugin_end_scan
+gnome_scan_plugin_get_child_nodes
+<SUBSECTION Private>
+gnome_scan_plugin_get_name
+gnome_scan_plugin_get_params
+gnome_scan_plugin_params_get_groups
+gnome_scan_plugin_params_get_other_groups
+gnome_scan_plugin_get_param_group
+gnome_scan_plugin_get_param_groups
+gnome_scan_plugin_params_lookup
+gnome_scan_plugin_params_foreach
+<SUBSECTION Standard>
+GNOME_SCAN_PLUGIN
+GNOME_IS_SCAN_PLUGIN
+GNOME_TYPE_SCAN_PLUGIN
+gnome_scan_plugin_get_type
+GNOME_SCAN_PLUGIN_CLASS
+GNOME_IS_SCAN_PLUGIN_CLASS
+GNOME_SCAN_PLUGIN_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-boolean-widget</FILE>
+GnomeScanBooleanWidget
+<SUBSECTION Standard>
+GNOME_SCAN_BOOLEAN_WIDGET
+GNOME_IS_SCAN_BOOLEAN_WIDGET
+GNOME_TYPE_SCAN_BOOLEAN_WIDGET
+GNOME_SCAN_BOOLEAN_WIDGET_CLASS
+GNOME_IS_SCAN_BOOLEAN_WIDGET_CLASS
+GNOME_SCAN_BOOLEAN_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-param-widget</FILE>
+GS_DEFINE_PARAM_WIDGET
+GS_DEFINE_PARAM_WIDGET_HEADER
+<TITLE>GnomeScanParamWidget</TITLE>
+GnomeScanParamWidget
+gnome_scan_param_widget_new
+gnome_scan_param_widget_set_value
+gnome_scan_param_widget_changed
+<SUBSECTION Private>
+gnome_scan_param_widget_get_value
+gnome_scan_param_widget_get_param_spec
+gnome_scan_param_widget_shows_label
+gnome_scan_param_widget_expands
+<SUBSECTION Standard>
+GNOME_SCAN_PARAM_WIDGET
+GNOME_IS_SCAN_PARAM_WIDGET
+GNOME_TYPE_SCAN_PARAM_WIDGET
+gnome_scan_param_widget_get_type
+GNOME_SCAN_PARAM_WIDGET_CLASS
+GNOME_IS_SCAN_PARAM_WIDGET_CLASS
+GNOME_SCAN_PARAM_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-job</FILE>
+<TITLE>GnomeScanJob</TITLE>
+GnomeScanJob
+gnome_scan_job_new
+gnome_scan_job_set_settings
+gnome_scan_job_get_settings
+gnome_scan_job_add_processor
+gnome_scan_job_set_sink
+<SUBSECTION Private>
+gnome_scan_job_set_scanner
+gnome_scan_job_get_scanner
+gnome_scan_job_get_processors
+gnome_scan_job_get_sink
+gnome_scan_job_configure
+gnome_scan_job_run
+gnome_scan_job_run_once
+gnome_scan_job_cancel
+<SUBSECTION Standard>
+GNOME_SCAN_JOB
+GNOME_IS_SCAN_JOB
+GNOME_TYPE_SCAN_JOB
+gnome_scan_job_get_type
+GNOME_SCAN_JOB_CLASS
+GNOME_IS_SCAN_JOB_CLASS
+GNOME_SCAN_JOB_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scanner</FILE>
+GnomeScannerStatus
+GnomeScanEvent
+<TITLE>GnomeScanner</TITLE>
+GnomeScanner
+gnome_scanner_settings_changed
+gnome_scanner_set_status
+<SUBSECTION Private>
+gnome_scanner_get_icon_name
+gnome_scanner_get_status
+gnome_scanner_get_status_string
+gnome_scanner_get_output_format
+<SUBSECTION Standard>
+GNOME_SCANNER
+GNOME_IS_SCANNER
+GNOME_TYPE_SCANNER
+gnome_scanner_get_type
+GNOME_SCANNER_CLASS
+GNOME_IS_SCANNER_CLASS
+GNOME_SCANNER_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-preview-area</FILE>
+<TITLE>GnomeScanPreviewArea</TITLE>
+GnomeScanPreviewArea
+gnome_scan_preview_area_new
+gnome_scan_preview_area_set_pixbuf
+gnome_scan_preview_area_get_resolution
+gnome_scan_preview_area_get_size
+gnome_scan_preview_area_update
+gnome_scan_preview_area_select_plugin
+<SUBSECTION Standard>
+GNOME_SCAN_PREVIEW_AREA
+GNOME_IS_SCAN_PREVIEW_AREA
+GNOME_TYPE_SCAN_PREVIEW_AREA
+gnome_scan_preview_area_get_type
+GNOME_SCAN_PREVIEW_AREA_CLASS
+GNOME_IS_SCAN_PREVIEW_AREA_CLASS
+GNOME_SCAN_PREVIEW_AREA_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-param-specs</FILE>
+GS_DEFINE_PARAM
+GS_PARAM_GROUP_SCANNER_FRONT
+GS_PARAM_GROUP_FORMAT
+GS_PARAM_GROUP_SINK_FRONT
+GS_PARAM_GROUP_PREVIEW
+GS_PARAM_GROUP_HIDDEN
+
+gs_param_spec_get_group
+gs_param_spec_get_group_string
+gs_param_spec_set_group
+gs_param_spec_set_group_from_string
+gs_param_spec_set_domain
+gs_param_spec_get_domain
+gs_param_spec_set_unit
+gs_param_spec_get_unit
+gs_param_spec_set_index
+gs_param_spec_get_index
+gs_param_spec_set_widget_type
+
+gs_param_spec_boolean
+gs_param_spec_int
+gs_param_spec_double
+gs_param_spec_string
+gs_param_spec_pointer
+gs_param_spec_range
+gs_param_spec_enum
+gs_param_spec_paper_size
+gs_param_spec_page_orientation
+
+<SUBSECTION Private>
+GS_PARAM_GROUP_QUARK
+GS_PARAM_DOMAIN_QUARK
+GS_PARAM_UNIT_QUARK
+GS_PARAM_INDEX_QUARK
+GS_PARAM_WIDGET_TYPE_QUARK
+GS_PARAM_FORMATS_QUARK
+gs_group_quark
+gs_domain_quark
+gs_unit_quark
+gs_index_quark
+gs_widget_type_quark
+gs_formats_quark
+
+gs_scanner_front_quark
+gs_format_quark
+gs_sink_front_quark
+gs_preview_quark
+gs_hidden_quark
+
+gs_param_spec_get_widget_type
+gs_param_spec_cmp_index
+gs_param_spec_cmp_name
+gs_param_values_cmp
+
+GS_TYPE_PARAM_RANGE
+GSParamSpecRange
+
+GS_TYPE_PARAM_ENUM
+GS_PARAM_SPEC_ENUM
+GS_IS_PARAM_SPEC_ENUM
+GSParamSpecEnum
+gs_param_enum_get_type
+
+GS_TYPE_PARAM_PAPER_SIZE
+GS_PARAM_SPEC_PAPER_SIZE
+GS_IS_PARAM_SPEC_PAPER_SIZE
+GSParamSpecPaperSize
+gs_param_paper_size_get_type
+gs_param_paper_size_get_extent
+
+GS_TYPE_PARAM_PAGE_ORIENTATION
+GS_PARAM_SPEC_PAGE_ORIENTATION
+GS_IS_PARAM_SPEC_PAGE_ORIENTATION
+GSParamSpecPageOrientation
+gs_param_page_orientation_get_type
+<SUBSECTION Standard>
+GS_PARAM_SPEC_RANGE
+GS_IS_PARAM_SPEC_RANGE
+gs_param_range_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-preview-plugin</FILE>
+GS_DEFINE_PREVIEW_PLUGIN
+<TITLE>GnomeScanPreviewPlugin</TITLE>
+GnomeScanPreviewPlugin
+gnome_scan_preview_plugin
+gnome_scan_preview_plugin_freeze
+gnome_scan_preview_plugin_thaw
+gnome_scan_preview_plugin_changed
+gnome_scan_preview_plugin_draw_buffer
+gnome_scan_preview_plugin_destroy
+<SUBSECTION Private>
+GSPP_MAX_WATCH
+GnomeScanPreviewPluginTypeInfo
+gnome_scan_preview_plugin_type_register_static
+<SUBSECTION Standard>
+GNOME_SCAN_PREVIEW_PLUGIN
+GNOME_IS_SCAN_PREVIEW_PLUGIN
+GNOME_TYPE_SCAN_PREVIEW_PLUGIN
+gnome_scan_preview_plugin_get_type
+GNOME_SCAN_PREVIEW_PLUGIN_CLASS
+GNOME_IS_SCAN_PREVIEW_PLUGIN_CLASS
+GNOME_SCAN_PREVIEW_PLUGIN_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-paper-size-widget</FILE>
+GnomeScanPaperSizeWidget
+<SUBSECTION Standard>
+GNOME_SCAN_PAPER_SIZE_WIDGET
+GNOME_IS_SCAN_PAPER_SIZE_WIDGET
+GNOME_TYPE_SCAN_PAPER_SIZE_WIDGET
+GNOME_SCAN_PAPER_SIZE_WIDGET_CLASS
+GNOME_IS_SCAN_PAPER_SIZE_WIDGET_CLASS
+GNOME_SCAN_PAPER_SIZE_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-sink</FILE>
+<TITLE>GnomeScanSink</TITLE>
+GnomeScanSink
+<SUBSECTION Standard>
+GNOME_SCAN_SINK
+GNOME_IS_SCAN_SINK
+GNOME_TYPE_SCAN_SINK
+gnome_scan_sink_get_type
+GNOME_SCAN_SINK_CLASS
+GNOME_IS_SCAN_SINK_CLASS
+GNOME_SCAN_SINK_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-processor-common</FILE>
+<TITLE>GnomeScanProcessorCommon</TITLE>
+GnomeScanProcessorCommon
+gnome_scan_processor_common_new
+<SUBSECTION Standard>
+GNOME_SCAN_PROCESSOR_COMMON
+GNOME_IS_SCAN_PROCESSOR_COMMON
+GNOME_TYPE_SCAN_PROCESSOR_COMMON
+gnome_scan_processor_common_get_type
+GNOME_SCAN_PROCESSOR_COMMON_CLASS
+GNOME_IS_SCAN_PROCESSOR_COMMON_CLASS
+GNOME_SCAN_PROCESSOR_COMMON_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-acquisition-dialog</FILE>
+<TITLE>GnomeScanAcquisitionDialog</TITLE>
+GnomeScanAcquisitionDialog
+gnome_scan_acquisition_dialog_new
+gnome_scan_acquisition_dialog_run
+<SUBSECTION Standard>
+GNOME_SCAN_ACQUISITION_DIALOG
+GNOME_IS_SCAN_ACQUISITION_DIALOG
+GNOME_TYPE_SCAN_ACQUISITION_DIALOG
+gnome_scan_acquisition_dialog_get_type
+GNOME_SCAN_ACQUISITION_DIALOG_CLASS
+GNOME_IS_SCAN_ACQUISITION_DIALOG_CLASS
+GNOME_SCAN_ACQUISITION_DIALOG_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-types</FILE>
+<SUBSECTION Standard>
+GNOME_TYPE_SCANNER_STATUS
+GNOME_TYPE_SCAN_UNIT
+gnome_scanner_status_get_type
+gs_param_unit_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-init</FILE>
+gnome_scan_init
+gnome_scan_exit
+<SUBSECTION Standard>
+GS_STOCK_SCAN
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-preview-plugin-area</FILE>
+GNOME_TYPE_SCAN_PREVIEW_PLUGIN_AREA
+GNOME_SCAN_PREVIEW_PLUGIN_AREA
+GnomeScanPreviewPluginArea
+gnome_scan_preview_plugin_area_get_type
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan</FILE>
+</SECTION>
+
+<SECTION>
+<FILE>head-comment</FILE>
+</SECTION>
+
+<SECTION>
+<FILE>gnome-scan-utils</FILE>
+GS_DEFINE_QUARK
+gnome_scan_format_new
+GnomeScanFormat
+GnomeScanUnit
+<SUBSECTION Private>
+MM_PER_INCH
+gs_convert
+gs_convert_to_mm
+gs_convert_from_mm
+gs_rectangle_convert
+gs_rectangle_convert_to_mm
+gs_rectangle_convert_from_mm
+</SECTION>
+
diff --git a/trunk/doc/ref/gnome-scan-1.0.types b/trunk/doc/ref/gnome-scan-1.0.types
new file mode 100644
index 0000000..7ba3104
--- /dev/null
+++ b/trunk/doc/ref/gnome-scan-1.0.types
@@ -0,0 +1,17 @@
+gnome_scan_backend_get_type
+gnome_scan_module_get_type
+gnome_scan_module_manager_get_type
+gnome_scan_settings_get_type
+gnome_scan_plugin_get_type
+gnome_scanner_get_type
+gnome_scan_sink_get_type
+gnome_scan_preview_sink_get_type
+gnome_scan_processor_common_get_type
+gnome_scan_job_get_type
+gnome_scan_acquisition_dialog_get_type
+gnome_scan_preview_area_get_type
+gnome_scan_dialog_get_type
+gnome_scan_param_widget_get_type
+gnome_scan_preview_plugin_get_type
+gnome_scan_preview_plugin_rotation_get_type
+gnome_scan_preview_plugin_area_get_type
diff --git a/trunk/doc/ref/images/GnomeScanDialog.png b/trunk/doc/ref/images/GnomeScanDialog.png
new file mode 100644
index 0000000..20e73c3
Binary files /dev/null and b/trunk/doc/ref/images/GnomeScanDialog.png differ
diff --git a/trunk/doc/ref/tmpl/gnome-scan-1.0-unused.sgml b/trunk/doc/ref/tmpl/gnome-scan-1.0-unused.sgml
new file mode 100644
index 0000000..ada5bea
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-1.0-unused.sgml
@@ -0,0 +1,840 @@
+<!-- ##### SECTION ./tmpl/gnome-scan-processor.sgml:Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/gnome-scan-processor.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/gnome-scan-processor.sgml:Short_Description ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/gnome-scan-processor.sgml:Stability_Level ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/gnome-scan-processor.sgml:Title ##### -->
+GnomeScanProcessor
+
+
+<!-- ##### MACRO GNOME_TYPE_SCANNER_STATUS ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GNOME_TYPE_SCAN_UNIT ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GNOME_TYPE_SPARAM_FLAGS ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GSPP_MAX_WATCH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ENUM GSParamFlags ##### -->
+<para>
+
+</para>
+
+ GS_PARAM_DISABLED:
+
+<!-- ##### STRUCT GSParamSpecEnum ##### -->
+<para>
+
+</para>
+
+ values:
+ default_value:
+
+<!-- ##### STRUCT GSParamSpecFilenames ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT GSParamSpecOutputFilename ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT GSParamSpecPageOrientation ##### -->
+<para>
+
+</para>
+
+ default_value:
+
+<!-- ##### STRUCT GSParamSpecPaperSize ##### -->
+<para>
+
+</para>
+
+ default_ps:
+ enumeration:
+
+<!-- ##### STRUCT GSParamSpecRange ##### -->
+<para>
+
+</para>
+
+ minimum:
+ maximum:
+ step:
+ default_value:
+
+<!-- ##### MACRO GS_IS_PARAM_SPEC_ENUM ##### -->
+<para>
+
+</para>
+
+ p:
+
+<!-- ##### MACRO GS_IS_PARAM_SPEC_PAGE_ORIENTATION ##### -->
+<para>
+
+</para>
+
+ p:
+
+<!-- ##### MACRO GS_IS_PARAM_SPEC_PAPER_SIZE ##### -->
+<para>
+
+</para>
+
+ p:
+
+<!-- ##### MACRO GS_PARAM_DOMAIN_QUARK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_PARAM_FORMATS_QUARK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_PARAM_GROUP_QUARK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_PARAM_INDEX_QUARK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_PARAM_SPEC_ENUM ##### -->
+<para>
+
+</para>
+
+ p:
+
+<!-- ##### MACRO GS_PARAM_SPEC_PAGE_ORIENTATION ##### -->
+<para>
+
+</para>
+
+ p:
+
+<!-- ##### MACRO GS_PARAM_SPEC_PAPER_SIZE ##### -->
+<para>
+
+</para>
+
+ p:
+
+<!-- ##### MACRO GS_PARAM_UNIT_QUARK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_PARAM_WIDGET_TYPE_QUARK ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_STOCK_SCAN ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_TYPE_PARAM_ENUM ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_TYPE_PARAM_PAGE_ORIENTATION ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_TYPE_PARAM_PAPER_SIZE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GS_TYPE_PARAM_RANGE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG GnomeScanJob:processor ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SIGNAL GnomeScanParamWidget::changed ##### -->
+<para>
+
+</para>
+
+ scanparamwidget: the object which received the signal.
+ arg1:
+
+<!-- ##### SIGNAL GnomeScanPlugin::changed ##### -->
+<para>
+
+</para>
+
+ scanplugin: the object which received the signal.
+
+<!-- ##### SIGNAL GnomeScanPreviewArea::area-selected ##### -->
+<para>
+
+</para>
+
+ scanpreviewarea: the object which received the signal.
+ arg1:
+
+<!-- ##### SIGNAL GnomeScanPreviewArea::draw-buffer ##### -->
+<para>
+
+</para>
+
+ scanpreviewarea: the object which received the signal.
+ Param2:
+
+<!-- ##### ARG GnomeScanPreviewArea:area ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT GnomeScanPreviewPluginTypeInfo ##### -->
+<para>
+
+</para>
+
+ instance_size:
+ class_init:
+ init:
+
+<!-- ##### STRUCT GnomeScanProcessor ##### -->
+<para>
+
+</para>
+
+ parent_instance:
+
+<!-- ##### ARG GnomeScanSettings:values ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO MM_PER_INCH ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO NOT_IMPLEMENTED ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO REFDBG ##### -->
+<para>
+
+</para>
+
+ o:
+
+<!-- ##### FUNCTION g_sparam_flags_get_type ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_job_cancel ##### -->
+<para>
+
+</para>
+
+ job:
+
+<!-- ##### FUNCTION gnome_scan_job_configure ##### -->
+<para>
+
+</para>
+
+ job:
+
+<!-- ##### FUNCTION gnome_scan_job_get_processors ##### -->
+<para>
+
+</para>
+
+ job:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_job_get_scanner ##### -->
+<para>
+
+</para>
+
+ job:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_job_get_sink ##### -->
+<para>
+
+</para>
+
+ job:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_job_run ##### -->
+<para>
+
+</para>
+
+ job:
+
+<!-- ##### FUNCTION gnome_scan_job_run_once ##### -->
+<para>
+
+</para>
+
+ job:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_job_set_scanner ##### -->
+<para>
+
+</para>
+
+ job:
+ scanner:
+
+<!-- ##### FUNCTION gnome_scan_new_from_type_name ##### -->
+<para>
+
+</para>
+
+ type_name:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_param_widget_expands ##### -->
+<para>
+
+</para>
+
+ widget:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_param_widget_get_param_spec ##### -->
+<para>
+
+</para>
+
+ widget:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_param_widget_get_value ##### -->
+<para>
+
+</para>
+
+ widget:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_param_widget_new_with_value ##### -->
+<para>
+
+</para>
+
+ pspec:
+ value:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_param_widget_shows_label ##### -->
+<para>
+
+</para>
+
+ widget:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_plugin_get_buffer ##### -->
+<para>
+
+</para>
+
+ plugin:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_plugin_get_name ##### -->
+<para>
+
+</para>
+
+ plugin:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_plugin_get_param_group ##### -->
+<para>
+
+</para>
+
+ plugin:
+ group:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_plugin_get_param_groups ##### -->
+<para>
+
+</para>
+
+ plugin:
+ group0:
+ Varargs:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_plugin_get_params ##### -->
+<para>
+
+</para>
+
+ plugin:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_plugin_params_foreach ##### -->
+<para>
+
+</para>
+
+ plugin:
+ func:
+ user_data:
+
+<!-- ##### FUNCTION gnome_scan_plugin_params_get_groups ##### -->
+<para>
+
+</para>
+
+ plugin:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_plugin_params_get_other_groups ##### -->
+<para>
+
+</para>
+
+ plugin:
+ known_group0:
+ Varargs:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_plugin_params_lookup ##### -->
+<para>
+
+</para>
+
+ plugin:
+ name:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_pluging_set_buffer ##### -->
+<para>
+
+</para>
+
+ plugin:
+ buffer:
+
+<!-- ##### FUNCTION gnome_scan_preview_area_get_area ##### -->
+<para>
+
+</para>
+
+ preview_area:
+ unit:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_preview_area_get_pixbuf ##### -->
+<para>
+
+</para>
+
+ preview_area:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scan_preview_area_set_area ##### -->
+<para>
+
+</para>
+
+ preview_area:
+ area:
+ unit:
+
+<!-- ##### FUNCTION gnome_scan_preview_area_set_resolution ##### -->
+<para>
+
+</para>
+
+ preview_area:
+ resolution:
+
+<!-- ##### FUNCTION gnome_scan_preview_plugin_type_register_static ##### -->
+<para>
+
+</para>
+
+ name:
+ pinfo:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scanner_get_icon_name ##### -->
+<para>
+
+</para>
+
+ scanner:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scanner_get_output_format ##### -->
+<para>
+
+</para>
+
+ scanner:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scanner_get_status ##### -->
+<para>
+
+</para>
+
+ scanner:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scanner_get_status_string ##### -->
+<para>
+
+</para>
+
+ scanner:
+ Returns:
+
+<!-- ##### FUNCTION gnome_scanner_status_get_type ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_convert ##### -->
+<para>
+
+</para>
+
+ val:
+ from:
+ to:
+ res:
+ Returns:
+
+<!-- ##### FUNCTION gs_convert_from_mm ##### -->
+<para>
+
+</para>
+
+ val:
+ unit:
+ res:
+ Returns:
+
+<!-- ##### FUNCTION gs_convert_to_mm ##### -->
+<para>
+
+</para>
+
+ val:
+ unit:
+ res:
+ Returns:
+
+<!-- ##### FUNCTION gs_domain_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_format_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_formats_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_group_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_hidden_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_index_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_param_enum_get_type ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_param_flags_get_type ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_param_page_orientation_get_type ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_param_paper_size_get_extent ##### -->
+<para>
+
+</para>
+
+ ps:
+ unit:
+ width:
+ height:
+
+<!-- ##### FUNCTION gs_param_paper_size_get_type ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_param_spec_cmp_index ##### -->
+<para>
+
+</para>
+
+ a:
+ b:
+ Returns:
+
+<!-- ##### FUNCTION gs_param_spec_cmp_name ##### -->
+<para>
+
+</para>
+
+ a:
+ b:
+ Returns:
+
+<!-- ##### FUNCTION gs_param_spec_filenames ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ formats:
+ flags:
+ Returns:
+
+<!-- ##### FUNCTION gs_param_spec_filenames_get_formats ##### -->
+<para>
+
+</para>
+
+ pspec:
+ Returns:
+
+<!-- ##### FUNCTION gs_param_spec_get_widget_type ##### -->
+<para>
+
+</para>
+
+ spec:
+ Returns:
+
+<!-- ##### FUNCTION gs_param_spec_output_filename ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ formats:
+ flags:
+ Returns:
+
+<!-- ##### FUNCTION gs_param_spec_output_filename_get_formats ##### -->
+<para>
+
+</para>
+
+ pspec:
+ Returns:
+
+<!-- ##### FUNCTION gs_param_unit_get_type ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_param_values_cmp ##### -->
+<para>
+
+</para>
+
+ pspec:
+ a:
+ b:
+ Returns:
+
+<!-- ##### FUNCTION gs_preview_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_rectangle_convert ##### -->
+<para>
+
+</para>
+
+ r:
+ from:
+ to:
+ res:
+ Returns:
+
+<!-- ##### FUNCTION gs_rectangle_convert_from_mm ##### -->
+<para>
+
+</para>
+
+ r:
+ unit:
+ res:
+ Returns:
+
+<!-- ##### FUNCTION gs_rectangle_convert_to_mm ##### -->
+<para>
+
+</para>
+
+ r:
+ unit:
+ res:
+ Returns:
+
+<!-- ##### FUNCTION gs_scanner_front_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_sink_front_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_unit_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+<!-- ##### FUNCTION gs_widget_type_quark ##### -->
+<para>
+
+</para>
+
+ Returns:
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-acquisition-dialog.sgml b/trunk/doc/ref/tmpl/gnome-scan-acquisition-dialog.sgml
new file mode 100644
index 0000000..9022a5e
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-acquisition-dialog.sgml
@@ -0,0 +1,48 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanAcquisitionDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanAcquisitionDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG GnomeScanAcquisitionDialog:job ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gnome_scan_acquisition_dialog_new ##### -->
+<para>
+
+</para>
+
+ parent:
+ job:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_acquisition_dialog_run ##### -->
+<para>
+
+</para>
+
+ dialog:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-backend.sgml b/trunk/doc/ref/tmpl/gnome-scan-backend.sgml
new file mode 100644
index 0000000..47b0990
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-backend.sgml
@@ -0,0 +1,91 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanBackend
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanBackend ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SIGNAL GnomeScanBackend::probe-done ##### -->
+<para>
+
+</para>
+
+ scanbackend: the object which received the signal.
+
+<!-- ##### SIGNAL GnomeScanBackend::scanner-added ##### -->
+<para>
+
+</para>
+
+ scanbackend: the object which received the signal.
+ arg1:
+
+<!-- ##### SIGNAL GnomeScanBackend::scanner-removed ##### -->
+<para>
+
+</para>
+
+ scanbackend: the object which received the signal.
+ arg1:
+
+<!-- ##### FUNCTION gnome_scan_backend_new ##### -->
+<para>
+
+</para>
+
+ backend_type:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_backend_probe_scanners ##### -->
+<para>
+
+</para>
+
+ backend:
+
+
+<!-- ##### FUNCTION gnome_scan_backend_add_scanner ##### -->
+<para>
+
+</para>
+
+ backend:
+ scanner:
+
+
+<!-- ##### FUNCTION gnome_scan_backend_remove_scanner ##### -->
+<para>
+
+</para>
+
+ backend:
+ scanner:
+
+
+<!-- ##### FUNCTION gnome_scan_backend_probe_done ##### -->
+<para>
+
+</para>
+
+ backend:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-boolean-widget.sgml b/trunk/doc/ref/tmpl/gnome-scan-boolean-widget.sgml
new file mode 100644
index 0000000..f2f800d
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-boolean-widget.sgml
@@ -0,0 +1,26 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-boolean-widget
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanBooleanWidget ##### -->
+<para>
+
+</para>
+
+ parent_instance:
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-dialog.sgml b/trunk/doc/ref/tmpl/gnome-scan-dialog.sgml
new file mode 100644
index 0000000..eb9d039
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-dialog.sgml
@@ -0,0 +1,48 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG GnomeScanDialog:job ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gnome_scan_dialog_new ##### -->
+<para>
+
+</para>
+
+ parent:
+ job:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_dialog_run ##### -->
+<para>
+
+</para>
+
+ dialog:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-enum-widget.sgml b/trunk/doc/ref/tmpl/gnome-scan-enum-widget.sgml
new file mode 100644
index 0000000..360584b
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-enum-widget.sgml
@@ -0,0 +1,26 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-enum-widget
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanEnumWidget ##### -->
+<para>
+
+</para>
+
+ parent_instance:
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-init.sgml b/trunk/doc/ref/tmpl/gnome-scan-init.sgml
new file mode 100644
index 0000000..f5f530c
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-init.sgml
@@ -0,0 +1,35 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-init
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### FUNCTION gnome_scan_init ##### -->
+<para>
+
+</para>
+
+ argc:
+ argv:
+
+
+<!-- ##### FUNCTION gnome_scan_exit ##### -->
+<para>
+
+</para>
+
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-job.sgml b/trunk/doc/ref/tmpl/gnome-scan-job.sgml
new file mode 100644
index 0000000..8c601a8
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-job.sgml
@@ -0,0 +1,89 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanJob
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanJob ##### -->
+<para>
+
+</para>
+
+ progress:
+ stage:
+ done:
+
+<!-- ##### ARG GnomeScanJob:scanner ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanJob:settings ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanJob:sink ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gnome_scan_job_new ##### -->
+<para>
+
+</para>
+
+ settings:
+ sink:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_job_set_settings ##### -->
+<para>
+
+</para>
+
+ job:
+ settings:
+
+
+<!-- ##### FUNCTION gnome_scan_job_get_settings ##### -->
+<para>
+
+</para>
+
+ job:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_job_add_processor ##### -->
+<para>
+
+</para>
+
+ job:
+ processor:
+
+
+<!-- ##### FUNCTION gnome_scan_job_set_sink ##### -->
+<para>
+
+</para>
+
+ job:
+ sink:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-module-manager.sgml b/trunk/doc/ref/tmpl/gnome-scan-module-manager.sgml
new file mode 100644
index 0000000..b331bc2
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-module-manager.sgml
@@ -0,0 +1,55 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanModuleManager
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanModuleManager ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG GnomeScanModuleManager:path ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gnome_scan_module_manager_new ##### -->
+<para>
+
+</para>
+
+ path:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_module_manager_query_modules ##### -->
+<para>
+
+</para>
+
+ manager:
+
+
+<!-- ##### FUNCTION gnome_scan_module_manager_unload_modules ##### -->
+<para>
+
+</para>
+
+ manager:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-module.sgml b/trunk/doc/ref/tmpl/gnome-scan-module.sgml
new file mode 100644
index 0000000..1a30a27
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-module.sgml
@@ -0,0 +1,51 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanModule
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO GS_DEFINE_MODULE_TYPE ##### -->
+<para>
+
+</para>
+
+ TN:
+ t_n:
+ T_P:
+
+
+<!-- ##### STRUCT GnomeScanModule ##### -->
+<para>
+
+</para>
+
+ init:
+ finalize:
+
+<!-- ##### ARG GnomeScanModule:filename ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gnome_scan_module_new ##### -->
+<para>
+
+</para>
+
+ filename:
+ Returns:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-number-widget.sgml b/trunk/doc/ref/tmpl/gnome-scan-number-widget.sgml
new file mode 100644
index 0000000..38bdea2
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-number-widget.sgml
@@ -0,0 +1,25 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-number-widget
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### TYPEDEF GnomeScanNumberWidget ##### -->
+<para>
+
+</para>
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-page-orientation-widget.sgml b/trunk/doc/ref/tmpl/gnome-scan-page-orientation-widget.sgml
new file mode 100644
index 0000000..af07abf
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-page-orientation-widget.sgml
@@ -0,0 +1,25 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-page-orientation-widget
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanPageOrientationWidget ##### -->
+<para>
+
+</para>
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-paper-size-widget.sgml b/trunk/doc/ref/tmpl/gnome-scan-paper-size-widget.sgml
new file mode 100644
index 0000000..150cf48
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-paper-size-widget.sgml
@@ -0,0 +1,25 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-paper-size-widget
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanPaperSizeWidget ##### -->
+<para>
+
+</para>
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-param-specs.sgml b/trunk/doc/ref/tmpl/gnome-scan-param-specs.sgml
new file mode 100644
index 0000000..1b203fe
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-param-specs.sgml
@@ -0,0 +1,300 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-param-specs
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO GS_DEFINE_PARAM ##### -->
+<para>
+
+</para>
+
+ prefix:
+ Prefix:
+ param_name:
+ ParamName:
+ VALUE_TYPE:
+
+
+<!-- ##### MACRO GS_PARAM_GROUP_SCANNER_FRONT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO GS_PARAM_GROUP_FORMAT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO GS_PARAM_GROUP_SINK_FRONT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO GS_PARAM_GROUP_PREVIEW ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO GS_PARAM_GROUP_HIDDEN ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION gs_param_spec_get_group ##### -->
+<para>
+
+</para>
+
+ spec:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_get_group_string ##### -->
+<para>
+
+</para>
+
+ spec:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_set_group ##### -->
+<para>
+
+</para>
+
+ spec:
+ group:
+
+
+<!-- ##### FUNCTION gs_param_spec_set_group_from_string ##### -->
+<para>
+
+</para>
+
+ spec:
+ group:
+
+
+<!-- ##### FUNCTION gs_param_spec_set_domain ##### -->
+<para>
+
+</para>
+
+ spec:
+ domain:
+
+
+<!-- ##### FUNCTION gs_param_spec_get_domain ##### -->
+<para>
+
+</para>
+
+ spec:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_set_unit ##### -->
+<para>
+
+</para>
+
+ spec:
+ unit:
+
+
+<!-- ##### FUNCTION gs_param_spec_get_unit ##### -->
+<para>
+
+</para>
+
+ spec:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_set_index ##### -->
+<para>
+
+</para>
+
+ spec:
+ index:
+
+
+<!-- ##### FUNCTION gs_param_spec_get_index ##### -->
+<para>
+
+</para>
+
+ spec:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_set_widget_type ##### -->
+<para>
+
+</para>
+
+ spec:
+ type:
+
+
+<!-- ##### FUNCTION gs_param_spec_boolean ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ default_value:
+ flags:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_int ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ minimum:
+ maximum:
+ default_value:
+ flags:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_double ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ minimum:
+ maximum:
+ default_value:
+ flags:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_string ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ default_value:
+ flags:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_pointer ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ widget:
+ flags:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_range ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ minimum:
+ maximum:
+ step:
+ default_value:
+ flags:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_enum ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ values:
+ default_value:
+ flags:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_paper_size ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ default_ps:
+ enumeration:
+ flags:
+ Returns:
+
+
+<!-- ##### FUNCTION gs_param_spec_page_orientation ##### -->
+<para>
+
+</para>
+
+ name:
+ nick:
+ blurb:
+ group:
+ default_value:
+ flags:
+ Returns:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-param-widget.sgml b/trunk/doc/ref/tmpl/gnome-scan-param-widget.sgml
new file mode 100644
index 0000000..35e6ac6
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-param-widget.sgml
@@ -0,0 +1,98 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanParamWidget
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO GS_DEFINE_PARAM_WIDGET ##### -->
+<para>
+
+</para>
+
+ TypeName:
+ type_name:
+
+
+<!-- ##### MACRO GS_DEFINE_PARAM_WIDGET_HEADER ##### -->
+<para>
+
+</para>
+
+ TypeName:
+ type_name:
+
+
+<!-- ##### STRUCT GnomeScanParamWidget ##### -->
+<para>
+
+</para>
+
+ settings:
+ plugin:
+ pspec:
+ value:
+ shows_label:
+ expands:
+ shows_unit:
+
+<!-- ##### ARG GnomeScanParamWidget:param-spec ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanParamWidget:plugin ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanParamWidget:settings ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanParamWidget:value ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gnome_scan_param_widget_new ##### -->
+<para>
+
+</para>
+
+ settings:
+ plugin:
+ pspec:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_param_widget_set_value ##### -->
+<para>
+
+</para>
+
+ widget:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_param_widget_changed ##### -->
+<para>
+
+</para>
+
+ widget:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-plugin.sgml b/trunk/doc/ref/tmpl/gnome-scan-plugin.sgml
new file mode 100644
index 0000000..c6bd802
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-plugin.sgml
@@ -0,0 +1,146 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanPlugin
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanPlugin ##### -->
+<para>
+
+</para>
+
+ params:
+
+<!-- ##### SIGNAL GnomeScanPlugin::params-changed ##### -->
+<para>
+
+</para>
+
+ scanplugin: the object which received the signal.
+ Param2:
+
+<!-- ##### ARG GnomeScanPlugin:blurb ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanPlugin:name ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanPlugin:params ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gnome_scan_plugin_params_add ##### -->
+<para>
+
+</para>
+
+ plugin:
+ param:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_params_remove ##### -->
+<para>
+
+</para>
+
+ plugin:
+ param:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_params_clear ##### -->
+<para>
+
+</para>
+
+ plugin:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_params_changed ##### -->
+<para>
+
+</para>
+
+ plugin:
+ spec:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_configure ##### -->
+<para>
+
+</para>
+
+ plugin:
+ settings:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_configure_frame ##### -->
+<para>
+
+</para>
+
+ plugin:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_start_frame ##### -->
+<para>
+
+</para>
+
+ plugin:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_work ##### -->
+<para>
+
+</para>
+
+ plugin:
+ progress:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_end_frame ##### -->
+<para>
+
+</para>
+
+ plugin:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_end_scan ##### -->
+<para>
+
+</para>
+
+ plugin:
+
+
+<!-- ##### FUNCTION gnome_scan_plugin_get_child_nodes ##### -->
+<para>
+
+</para>
+
+ plugin:
+ root:
+ Returns:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-preview-area.sgml b/trunk/doc/ref/tmpl/gnome-scan-preview-area.sgml
new file mode 100644
index 0000000..9589eee
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-preview-area.sgml
@@ -0,0 +1,98 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanPreviewArea
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanPreviewArea ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SIGNAL GnomeScanPreviewArea::preview-received ##### -->
+<para>
+
+</para>
+
+ scanpreviewarea: the object which received the signal.
+ arg1:
+
+<!-- ##### ARG GnomeScanPreviewArea:pixbuf ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanPreviewArea:resolution ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gnome_scan_preview_area_new ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_area_set_pixbuf ##### -->
+<para>
+
+</para>
+
+ preview_area:
+ pixbuf:
+ resolution:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_area_get_resolution ##### -->
+<para>
+
+</para>
+
+ preview_area:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_area_get_size ##### -->
+<para>
+
+</para>
+
+ preview_area:
+ width:
+ height:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_area_update ##### -->
+<para>
+
+</para>
+
+ preview_area:
+ invalid_rect:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_area_select_plugin ##### -->
+<para>
+
+</para>
+
+ pa:
+ plugin:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-preview-plugin-area.sgml b/trunk/doc/ref/tmpl/gnome-scan-preview-plugin-area.sgml
new file mode 100644
index 0000000..3e94be6
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-preview-plugin-area.sgml
@@ -0,0 +1,48 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-preview-plugin-area
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO GNOME_TYPE_SCAN_PREVIEW_PLUGIN_AREA ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO GNOME_SCAN_PREVIEW_PLUGIN_AREA ##### -->
+<para>
+
+</para>
+
+ obj:
+
+
+<!-- ##### STRUCT GnomeScanPreviewPluginArea ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION gnome_scan_preview_plugin_area_get_type ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-preview-plugin-rotation.sgml b/trunk/doc/ref/tmpl/gnome-scan-preview-plugin-rotation.sgml
new file mode 100644
index 0000000..074c9d1
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-preview-plugin-rotation.sgml
@@ -0,0 +1,25 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanPreviewPluginRotation
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanPreviewPluginRotation ##### -->
+<para>
+
+</para>
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-preview-plugin.sgml b/trunk/doc/ref/tmpl/gnome-scan-preview-plugin.sgml
new file mode 100644
index 0000000..ee3fa1f
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-preview-plugin.sgml
@@ -0,0 +1,98 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanPreviewPlugin
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO GS_DEFINE_PREVIEW_PLUGIN ##### -->
+<para>
+
+</para>
+
+ Name:
+ name:
+ options:
+
+
+<!-- ##### STRUCT GnomeScanPreviewPlugin ##### -->
+<para>
+
+</para>
+
+ plugin:
+ preview_area:
+ settings:
+ pspec:
+ settings_changed:
+ preview_changed:
+ frozen:
+
+<!-- ##### FUNCTION gnome_scan_preview_plugin ##### -->
+<para>
+
+</para>
+
+ type:
+ plugin:
+ pspec:
+ gspa:
+ settings:
+ bbox:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_plugin_freeze ##### -->
+<para>
+
+</para>
+
+ gspp:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_plugin_thaw ##### -->
+<para>
+
+</para>
+
+ gspp:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_plugin_changed ##### -->
+<para>
+
+</para>
+
+ gspp:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_plugin_draw_buffer ##### -->
+<para>
+
+</para>
+
+ gspp:
+ gspa:
+ cr:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_plugin_destroy ##### -->
+<para>
+
+</para>
+
+ gspp:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-preview-sink.sgml b/trunk/doc/ref/tmpl/gnome-scan-preview-sink.sgml
new file mode 100644
index 0000000..baeb435
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-preview-sink.sgml
@@ -0,0 +1,42 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanPreviewSink
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanPreviewSink ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION gnome_scan_preview_sink_new ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_preview_sink_get_pixbuf ##### -->
+<para>
+
+</para>
+
+ sink:
+ Returns:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-processor-common.sgml b/trunk/doc/ref/tmpl/gnome-scan-processor-common.sgml
new file mode 100644
index 0000000..83c065f
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-processor-common.sgml
@@ -0,0 +1,33 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanProcessorCommon
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanProcessorCommon ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION gnome_scan_processor_common_new ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-processor.sgml b/trunk/doc/ref/tmpl/gnome-scan-processor.sgml
new file mode 100644
index 0000000..78a8ab2
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-processor.sgml
@@ -0,0 +1,28 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanProcessor
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanProcessor ##### -->
+<para>
+
+</para>
+
+ parent_instance:
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-range-widget.sgml b/trunk/doc/ref/tmpl/gnome-scan-range-widget.sgml
new file mode 100644
index 0000000..a19f391
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-range-widget.sgml
@@ -0,0 +1,26 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-range-widget
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanRangeWidget ##### -->
+<para>
+
+</para>
+
+ parent_instance:
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-settings.sgml b/trunk/doc/ref/tmpl/gnome-scan-settings.sgml
new file mode 100644
index 0000000..83f91ab
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-settings.sgml
@@ -0,0 +1,254 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanSettings
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanSettings ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SIGNAL GnomeScanSettings::changed ##### -->
+<para>
+
+</para>
+
+ scansettings: the object which received the signal.
+ arg1:
+
+<!-- ##### FUNCTION gnome_scan_settings_new ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_init_value ##### -->
+<para>
+
+</para>
+
+ settings:
+ pspec:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_set ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_set_transform ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_set_double ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_set_int ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_set_boolean ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_set_enum ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ type:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_set_boxed ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ type:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_set_object ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_set_pointer ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ value:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_transformed ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ type:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_string ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_double ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_int ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_boolean ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_enum ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ type:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_boxed ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ type:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_object ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_pointer ##### -->
+<para>
+
+</para>
+
+ settings:
+ name:
+ Returns:
+
+
+<!-- ##### FUNCTION gnome_scan_settings_get_all ##### -->
+<para>
+
+</para>
+
+ settings:
+ Returns:
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-sink.sgml b/trunk/doc/ref/tmpl/gnome-scan-sink.sgml
new file mode 100644
index 0000000..eb01567
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-sink.sgml
@@ -0,0 +1,25 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanSink
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanSink ##### -->
+<para>
+
+</para>
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-string-widget.sgml b/trunk/doc/ref/tmpl/gnome-scan-string-widget.sgml
new file mode 100644
index 0000000..618a4f5
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-string-widget.sgml
@@ -0,0 +1,26 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-string-widget
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### STRUCT GnomeScanStringWidget ##### -->
+<para>
+
+</para>
+
+ parent_instance:
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-types.sgml b/trunk/doc/ref/tmpl/gnome-scan-types.sgml
new file mode 100644
index 0000000..33f99ac
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-types.sgml
@@ -0,0 +1,19 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-types
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan-utils.sgml b/trunk/doc/ref/tmpl/gnome-scan-utils.sgml
new file mode 100644
index 0000000..cb03895
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan-utils.sgml
@@ -0,0 +1,66 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan-utils
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO GS_DEFINE_QUARK ##### -->
+<para>
+
+</para>
+
+ quark_name:
+ String:
+
+
+<!-- ##### FUNCTION gnome_scan_format_new ##### -->
+<para>
+
+</para>
+
+ name:
+ domain:
+ description:
+ mime_types:
+ extensions:
+ Returns:
+
+
+<!-- ##### STRUCT GnomeScanFormat ##### -->
+<para>
+
+</para>
+
+ name:
+ domain:
+ description:
+ mime_types:
+ extensions:
+
+<!-- ##### ENUM GnomeScanUnit ##### -->
+<para>
+
+</para>
+
+ GS_UNIT_NONE:
+ GS_UNIT_PIXEL:
+ GS_UNIT_POINT:
+ GS_UNIT_MM:
+ GS_UNIT_BIT:
+ GS_UNIT_DPI:
+ GS_UNIT_PERCENT:
+ GS_UNIT_MICROSECOND:
+
diff --git a/trunk/doc/ref/tmpl/gnome-scan.sgml b/trunk/doc/ref/tmpl/gnome-scan.sgml
new file mode 100644
index 0000000..9568992
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scan.sgml
@@ -0,0 +1,19 @@
+<!-- ##### SECTION Title ##### -->
+gnome-scan
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
diff --git a/trunk/doc/ref/tmpl/gnome-scanner.sgml b/trunk/doc/ref/tmpl/gnome-scanner.sgml
new file mode 100644
index 0000000..ee8e419
--- /dev/null
+++ b/trunk/doc/ref/tmpl/gnome-scanner.sgml
@@ -0,0 +1,95 @@
+<!-- ##### SECTION Title ##### -->
+GnomeScanner
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### ENUM GnomeScannerStatus ##### -->
+<para>
+
+</para>
+
+ GNOME_SCANNER_UNKNOWN:
+ GNOME_SCANNER_READY:
+ GNOME_SCANNER_BUSY:
+
+<!-- ##### TYPEDEF GnomeScanEvent ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT GnomeScanner ##### -->
+<para>
+
+</para>
+
+ status:
+
+<!-- ##### SIGNAL GnomeScanner::event ##### -->
+<para>
+
+</para>
+
+ scanner: the object which received the signal.
+ arg1:
+
+<!-- ##### SIGNAL GnomeScanner::settings-changed ##### -->
+<para>
+
+</para>
+
+ scanner: the object which received the signal.
+
+<!-- ##### SIGNAL GnomeScanner::status-changed ##### -->
+<para>
+
+</para>
+
+ scanner: the object which received the signal.
+
+<!-- ##### ARG GnomeScanner:icon-name ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanner:sensors ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GnomeScanner:status ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gnome_scanner_settings_changed ##### -->
+<para>
+
+</para>
+
+ scanner:
+
+
+<!-- ##### FUNCTION gnome_scanner_set_status ##### -->
+<para>
+
+</para>
+
+ scanner:
+ status:
+
+
diff --git a/trunk/doc/ref/tmpl/head-comment.sgml b/trunk/doc/ref/tmpl/head-comment.sgml
new file mode 100644
index 0000000..dd3d637
--- /dev/null
+++ b/trunk/doc/ref/tmpl/head-comment.sgml
@@ -0,0 +1,19 @@
+<!-- ##### SECTION Title ##### -->
+head-comment
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
diff --git a/trunk/doc/ref/version.xml.in b/trunk/doc/ref/version.xml.in
new file mode 100644
index 0000000..d78bda9
--- /dev/null
+++ b/trunk/doc/ref/version.xml.in
@@ -0,0 +1 @@
+ VERSION@
diff --git a/trunk/flegita.desktop.in b/trunk/flegita.desktop.in
new file mode 100644
index 0000000..651c3d9
--- /dev/null
+++ b/trunk/flegita.desktop.in
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+_Name=Scanner Utility
+_Comment=Simply scan images
+Exec=flegita
+Icon=flegita
+Terminal=false
+Type=Application
+X-GNOME-DocPath=flegita/flegita.xml
+Categories=GNOME;Application;Graphics;
diff --git a/trunk/gnome-scan.anjuta b/trunk/gnome-scan.anjuta
new file mode 100644
index 0000000..02f4ca3
--- /dev/null
+++ b/trunk/gnome-scan.anjuta
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<anjuta>
+ <plugin name="GBF Project Manager"
+ url="http://anjuta.org/plugins/"
+ mandatory="yes">
+ <require group="Anjuta Plugin"
+ attribute="Interfaces"
+ value="IAnjutaProjectManager"/>
+ <require group="Project"
+ attribute="Supported-Project-Types"
+ value="automake"/>
+ </plugin>
+ <plugin name="Symbol Browser"
+ url="http://anjuta.org/plugins/"
+ mandatory="yes">
+ <require group="Anjuta Plugin"
+ attribute="Location"
+ value="anjuta-symbol-browser:SymbolBrowserPlugin"/>
+ </plugin>
+ <plugin name="Make Build System"
+ url="http://anjuta.org/plugins/"
+ mandatory="yes">
+ <require group="Anjuta Plugin"
+ attribute="Interfaces"
+ value="IAnjutaBuildable"/>
+ <require group="Build"
+ attribute="Supported-Build-Types"
+ value="make"/>
+ </plugin>
+ <plugin name="Subversion" mandatory="no">
+ <require group="Anjuta Plugin"
+ attribute="Location"
+ value="anjuta-subversion:Subversion"/>
+ <require group="Anjuta Plugin"
+ attribute="Interfaces"
+ value="IAnjutaVcs"/>
+ </plugin>
+ <plugin name="Task Manager"
+ url="http://anjuta.org/plugins/"
+ mandatory="no">
+ <require group="Anjuta Plugin"
+ attribute="Interfaces"
+ value="IAnjutaTodo"/>
+ </plugin>
+ <plugin name="Debug Manager"
+ url="http://anjuta.org/plugins/"
+ mandatory="no">
+ <require group="Anjuta Plugin"
+ attribute="Interfaces"
+ value="IAnjutaDebuggerManager"/>
+ </plugin>
+</anjuta>
diff --git a/trunk/gnome-scan.pc.in b/trunk/gnome-scan.pc.in
new file mode 100644
index 0000000..9855e92
--- /dev/null
+++ b/trunk/gnome-scan.pc.in
@@ -0,0 +1,11 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+
+Name: Gnome Scan
+Description: Scan backend and frontend for the Gnome desktop
+Version: @VERSION@
+Requires: @REQUIRES@
+Libs: -L${libdir} -l SONAME@
+Cflags: -I${includedir}/@PACKAGE_NAME -@API_VERSION@
diff --git a/trunk/lib/Makefile.am b/trunk/lib/Makefile.am
new file mode 100644
index 0000000..c3c67e6
--- /dev/null
+++ b/trunk/lib/Makefile.am
@@ -0,0 +1,229 @@
+INCLUDES = \
+ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DICON_DIR=\""@ICON_DIR@"\"
+
+AM_CFLAGS = \
+ -Wall -g
+
+EXTRA_DIST = \
+ gnome-scan-types.h.tpl \
+ gnome-scan-types.c.tpl
+
+BUILT_HEADER = \
+ $(srcdir)/gnome-scan-types.h
+
+BUILT_SOURCE = \
+ $(srcdir)/gnome-scan-types.c
+
+types_deps = \
+ gnome-scan-param-specs.h \
+ gnome-scanner.h \
+ gnome-scan-utils.h \
+ $(NULL)
+
+lib_LTLIBRARIES = \
+ lib SONAME@.la
+
+lib SONAME@_la_SOURCES = \
+ $(BUILT_SOURCE) \
+ $(BUILT_HEADER) \
+ gnome-scan-settings.h \
+ gnome-scan-settings.c \
+ gnome-scan-plugin.h \
+ gnome-scan-plugin.c \
+ gnome-scanner.h \
+ gnome-scanner.c \
+ gnome-scan-sink.h \
+ gnome-scan-sink.c \
+ gnome-scan-backend.h \
+ gnome-scan-backend.c \
+ gnome-scan-job.h \
+ gnome-scan-job.c \
+ gnome-scan-preview-area.h \
+ gnome-scan-preview-area.c \
+ gnome-scan-param-widget.h \
+ gnome-scan-param-widget.c \
+ gnome-scan-acquisition-dialog.h \
+ gnome-scan-acquisition-dialog.c \
+ gnome-scan-dialog.h \
+ gnome-scan-dialog.c \
+ gnome-scan-module-manager.h \
+ gnome-scan-module-manager.c \
+ gnome-scan-module.h \
+ gnome-scan-module.c \
+ gnome-scan-param-specs.c \
+ gnome-scan-param-specs.h \
+ gnome-scan-init.c \
+ gnome-scan-init.h \
+ gnome-scan-range-widget.h \
+ gnome-scan-range-widget.c \
+ gnome-scan-enum-widget.h \
+ gnome-scan-enum-widget.c \
+ gnome-scan-number-widget.h \
+ gnome-scan-number-widget.c \
+ gnome-scan-string-widget.h \
+ gnome-scan-string-widget.c \
+ gnome-scan-boolean-widget.h \
+ gnome-scan-boolean-widget.c \
+ gnome-scan-paper-size-widget.h \
+ gnome-scan-paper-size-widget.c \
+ gnome-scan-page-orientation-widget.h \
+ gnome-scan-page-orientation-widget.c \
+ gnome-scan-utils.h \
+ gnome-scan-utils.c \
+ gnome-scan-preview-sink.h \
+ gnome-scan-preview-sink.c \
+ gnome-scan-preview-plugin.h \
+ gnome-scan-preview-plugin.c \
+ gnome-scan-preview-plugin-area.h \
+ gnome-scan-preview-plugin-area.c \
+ gnome-scan-processor-common.h \
+ gnome-scan-processor-common.c \
+ gnome-scan-preview-plugin-rotation.h \
+ gnome-scan-preview-plugin-rotation.c \
+ gnome-scan-private.h
+
+
+gnome-scan-types.%: $(types_deps) Makefile gnome-scan-types.%.tpl
+ test ! -e $@ && touch $@; exit 0;
+ test -w $@ && glib-mkenums --template $(srcdir)/$ tpl $(types_deps) > $@; exit 0
+
+
+lib SONAME@_la_CFLAGS = \
+ $(GNOME_SCAN_CFLAGS) \
+ -DMODULE_DIR="\"@MODULE_DIR \""
+
+lib SONAME@_la_LIBADD = \
+ $(GNOME_SCAN_LIBS)
+
+includegsdir = $(includedir)/gnome-scan- API_VERSION@
+includegs_HEADERS = \
+ gnome-scan.h \
+ $(BUILT_HEADER) \
+ gnome-scan-utils.h \
+ gnome-scan-settings.h \
+ gnome-scan-plugin.h \
+ gnome-scanner.h \
+ gnome-scan-sink.h \
+ gnome-scan-backend.h \
+ gnome-scan-job.h \
+ gnome-scan-preview-area.h \
+ gnome-scan-param-widget.h \
+ gnome-scan-acquisition-dialog.h \
+ gnome-scan-dialog.h \
+ gnome-scan-module-manager.h \
+ gnome-scan-module.h \
+ gnome-scan-param-specs.h \
+ gnome-scan-init.h
+
+## File created by the gnome-build tools
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/trunk/lib/gnome-scan-acquisition-dialog.c b/trunk/lib/gnome-scan-acquisition-dialog.c
new file mode 100644
index 0000000..b9c5df0
--- /dev/null
+++ b/trunk/lib/gnome-scan-acquisition-dialog.c
@@ -0,0 +1,342 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-acquisition-dialog
+ * @short_description: Give the user the acquisition control
+ * @include: gnome-scan.h
+ *
+ * The acquisition process might be long, the
+ * #GnomeScanAcquisitionDialog primarily shows a progress bar and of
+ * course, allow user to cancel the job.
+ *
+ * The #GnomeScanAcquisitionDialog also has nice UI to handle mass
+ * acquisition. This is done through a simple UI in order to make it
+ * very quick. The dialog shows a stop button which either cancel a
+ * running acquisition or end the mass acquisition process. Ideally,
+ * the scanner has automatic document feeder and the user just puts
+ * its photos/document page and trigger acquisition. However, since
+ * most scanner does not have such feature (e.g. flatbed scanner or
+ * sheetfed scanner), #GnomeScanAcquisitionDialog shows a Next button
+ * that redo the scan with the same configuration. The idea is to
+ * allow the user to put page, configure, trigger, put next page,
+ * press Enter, and loop until there is not other page.
+ *
+ * The acquisition and processing is done in a work thread. See
+ * #GnomeScanJob and gnome_scan_job_run().
+ **/
+
+#include <glib/gi18n.h>
+#include "gnome-scan-private.h"
+#include "gnome-scan-acquisition-dialog.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_ACQUISITION_DIALOG, GnomeScanAcquisitionDialogPrivate))
+
+typedef struct _GnomeScanAcquisitionDialogPrivate GnomeScanAcquisitionDialogPrivate;
+
+struct _GnomeScanAcquisitionDialogPrivate
+{
+ GnomeScanJob *job;
+
+ GtkWidget *progressbar;
+ GtkWidget *state_label;
+ GtkWidget *forward;
+ GThread* job_thread;
+ gboolean disposed;
+};
+
+enum
+{
+ PROP_0,
+ PROP_JOB
+};
+
+
+static GObjectClass* parent_class = NULL;
+
+static void gsad_run (GnomeScanAcquisitionDialog *dialog);
+static gboolean gsad_monitor (GnomeScanAcquisitionDialog *dialog);
+static void gsad_close (GnomeScanAcquisitionDialog *dialog);
+static void gsad_forward (GnomeScanAcquisitionDialog *dialog);
+
+G_DEFINE_TYPE (GnomeScanAcquisitionDialog, gnome_scan_acquisition_dialog, GTK_TYPE_DIALOG);
+
+static void
+gnome_scan_acquisition_dialog_init (GnomeScanAcquisitionDialog *object)
+{
+ GnomeScanAcquisitionDialogPrivate *priv = GET_PRIVATE (object);
+ GtkWidget *label, *button, *hbox, *icon, *text_box;
+ GtkWidget *vbox = GTK_DIALOG (object)->vbox;
+ GtkWidget *action_area = GTK_DIALOG (object)->action_area;
+
+ /* parent properties */
+ g_object_set (object,
+ "title", _("Acquisition"),
+ "window-position", GTK_WIN_POS_CENTER,
+ "has-separator", FALSE,
+ "border-width", 6,
+ "resizable", FALSE,
+ NULL);
+
+ g_signal_connect_swapped (object, "delete-event",
+ (GCallback) gsad_close,
+ object);
+
+ /* container border */
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+ gtk_box_set_spacing (GTK_BOX (vbox), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (object)->action_area), 6);
+
+
+ hbox = gtk_hbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 6);
+
+ icon = gtk_image_new_from_icon_name ("scanner", GTK_ICON_SIZE_DIALOG);
+ gtk_misc_set_padding (GTK_MISC (icon), 6, 6);
+ gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, TRUE, 0);
+
+ text_box = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (hbox), text_box, TRUE, TRUE, 0);
+
+ /* primary text */
+ label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (label),
+ g_strconcat ("<span size=\"x-large\"><b>", _("Acquisition"), "</b></span>",NULL));
+ gtk_misc_set_alignment (GTK_MISC (label), 0., .5);
+ gtk_box_pack_start (GTK_BOX (text_box), label, FALSE, TRUE, 0);
+
+ /* secondary text */
+ label = gtk_label_new (_("The software now acquires and processes images "
+ "according to the settings."));
+ gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+ gtk_box_pack_start (GTK_BOX (text_box), label, FALSE, TRUE, 0);
+
+ /* progress bar */
+ priv->progressbar = gtk_progress_bar_new ();
+ /*gtk_progress_bar_set_text (GTK_PROGRESS_BAR (priv->progressbar),
+ _("Waiting for device"));*/
+ gtk_box_pack_start (GTK_BOX (vbox), priv->progressbar,
+ FALSE, TRUE, 0);
+
+ /* state label */
+ priv->state_label = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (priv->state_label),
+ g_strconcat ("<i>", _("Waiting for device"), "</i>", NULL));
+ gtk_misc_set_alignment (GTK_MISC (priv->state_label), 0., .5);
+ gtk_box_pack_start (GTK_BOX (vbox), priv->state_label, FALSE, TRUE, 0);
+
+ /* buttons */
+ button = gtk_button_new_from_stock (GTK_STOCK_STOP);
+ g_signal_connect_swapped (button, "clicked",
+ (GCallback) gsad_close,
+ object);
+ gtk_box_pack_start (GTK_BOX (action_area), button, FALSE, FALSE, 0);
+
+ button = priv->forward = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD);
+ g_signal_connect_swapped (button, "clicked",
+ G_CALLBACK (gsad_forward),
+ object);
+ gtk_box_pack_start (GTK_BOX (action_area), button, FALSE, FALSE, 0);
+}
+
+static void
+gnome_scan_acquisition_dialog_dispose (GObject *object)
+{
+ GnomeScanAcquisitionDialogPrivate *priv = GET_PRIVATE(object);
+
+ if (!priv->disposed) {
+ g_object_unref(priv->job);
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+static void
+gnome_scan_acquisition_dialog_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_acquisition_dialog_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_ACQUISITION_DIALOG (object));
+
+ switch (prop_id)
+ {
+ case PROP_JOB:
+ GET_PRIVATE (object)->job = GNOME_SCAN_JOB (g_value_dup_object (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_acquisition_dialog_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_ACQUISITION_DIALOG (object));
+
+ switch (prop_id)
+ {
+ case PROP_JOB:
+ g_value_set_object (value, GET_PRIVATE (object)->job);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * gnome_scan_acquisition_dialog_class_init:
+ * @klass:
+ *
+ *
+ **/
+static void
+gnome_scan_acquisition_dialog_class_init (GnomeScanAcquisitionDialogClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
+
+ g_type_class_add_private (klass, sizeof (GnomeScanAcquisitionDialogPrivate));
+ object_class->finalize = gnome_scan_acquisition_dialog_finalize;
+ object_class->finalize = gnome_scan_acquisition_dialog_dispose;
+ object_class->set_property = gnome_scan_acquisition_dialog_set_property;
+ object_class->get_property = gnome_scan_acquisition_dialog_get_property;
+
+ /**
+ * GnomeScanAcquisitionDialog:job:
+ *
+ * The job being monitored by the #GnomeScanAcquisitionDialog.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_JOB,
+ g_param_spec_object ("job",
+ "Job",
+ "The job the dialog is handling",
+ GNOME_TYPE_SCAN_JOB,
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+}
+
+
+/**
+ * gnome_scan_acquisition_dialog_new:
+ * @parent: the parent #GtkWindow
+ * @job: the #GnomeScanJob to run
+ *
+ * Create a new dialog ready to run @job
+ *
+ * Returns: a new #GnomeScanAcquisitionDialog
+ **/
+GtkWidget*
+gnome_scan_acquisition_dialog_new (GtkWindow *parent, GnomeScanJob *job)
+{
+ GObject* object= g_object_new (GNOME_TYPE_SCAN_ACQUISITION_DIALOG,
+ "transient-for", parent,
+ "job", job,
+ NULL);
+ return GTK_WIDGET (object);
+}
+
+/**
+ * gnome_scan_acquisition_dialog_run:
+ * @dialog: a #GnomeScanAcquisitionDialog
+ *
+ * Start a #GMainLoop, run #GnomeScanAcquisitionDialog:job in a worker
+ * thread, monitor progress and allow user to control the execution of
+ * the job. Note that the progressbar is updated about 24 times per
+ * seconds.
+ **/
+void
+gnome_scan_acquisition_dialog_run (GnomeScanAcquisitionDialog *dialog)
+{
+ gtk_init_add ((GtkFunction) gsad_run, dialog);
+ gtk_main ();
+}
+
+
+
+/* INTERNALS */
+
+/* ThreadFunc */
+static void
+gsad_job_run (GnomeScanJob *job)
+{
+ gnome_scan_job_run (job);
+ g_thread_exit (NULL);
+}
+
+static void
+gsad_run (GnomeScanAcquisitionDialog *dialog)
+{
+ GnomeScanAcquisitionDialogPrivate *priv = GET_PRIVATE (dialog);
+ GError *error = NULL;
+
+ gtk_widget_show_all (GTK_WIDGET (dialog));
+ gtk_widget_set_sensitive (priv->forward, FALSE);
+ /* ~24 updates per second -> update each 42 microseconds */
+ g_timeout_add (42, (GSourceFunc) gsad_monitor, dialog);
+ gnome_scan_job_configure (priv->job);
+ priv->job_thread = g_thread_create ((GThreadFunc) gsad_job_run,
+ priv->job, TRUE, &error);
+}
+
+static gboolean
+gsad_monitor (GnomeScanAcquisitionDialog *dialog)
+{
+ GnomeScanAcquisitionDialogPrivate *priv = GET_PRIVATE (dialog);
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->progressbar),
+ priv->job->progress);
+ gtk_label_set_markup (GTK_LABEL (priv->state_label),
+ g_strdup_printf ("<i>%s</i>", priv->job->stage));
+
+ gtk_widget_set_sensitive (priv->forward,
+ priv->job->done);
+ if (GTK_WIDGET_CAN_FOCUS(priv->forward))
+ gtk_widget_grab_focus (priv->forward);
+ return !priv->job->done;
+}
+
+/* callbacks */
+static void
+gsad_close (GnomeScanAcquisitionDialog *dialog)
+{
+ GnomeScanAcquisitionDialogPrivate *priv = GET_PRIVATE (dialog);
+ gtk_widget_hide (GTK_WIDGET (dialog));
+ gnome_scan_job_cancel (priv->job);
+ g_thread_join (priv->job_thread);
+ gtk_main_quit ();
+}
+
+static void
+gsad_forward (GnomeScanAcquisitionDialog *dialog)
+{
+ gsad_run (dialog);
+}
diff --git a/trunk/lib/gnome-scan-acquisition-dialog.h b/trunk/lib/gnome-scan-acquisition-dialog.h
new file mode 100644
index 0000000..41deccb
--- /dev/null
+++ b/trunk/lib/gnome-scan-acquisition-dialog.h
@@ -0,0 +1,62 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_ACQUISITION_DIALOG_H_
+#define _GNOME_SCAN_ACQUISITION_DIALOG_H_
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include "gnome-scan-job.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_ACQUISITION_DIALOG (gnome_scan_acquisition_dialog_get_type ())
+#define GNOME_SCAN_ACQUISITION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_ACQUISITION_DIALOG, GnomeScanAcquisitionDialog))
+#define GNOME_SCAN_ACQUISITION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_ACQUISITION_DIALOG, GnomeScanAcquisitionDialogClass))
+#define GNOME_IS_SCAN_ACQUISITION_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_ACQUISITION_DIALOG))
+#define GNOME_IS_SCAN_ACQUISITION_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_ACQUISITION_DIALOG))
+#define GNOME_SCAN_ACQUISITION_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_ACQUISITION_DIALOG, GnomeScanAcquisitionDialogClass))
+
+typedef struct _GnomeScanAcquisitionDialogClass GnomeScanAcquisitionDialogClass;
+typedef struct _GnomeScanAcquisitionDialog GnomeScanAcquisitionDialog;
+
+struct _GnomeScanAcquisitionDialogClass
+{
+ GtkDialogClass parent_class;
+};
+
+/**
+ * GnomeScanAcquisitionDialog:
+ *
+ * A struct with a looonnnng name.
+ **/
+struct _GnomeScanAcquisitionDialog
+{
+ GtkDialog parent_instance;
+};
+
+GType gnome_scan_acquisition_dialog_get_type (void) G_GNUC_CONST;
+GtkWidget* gnome_scan_acquisition_dialog_new (GtkWindow *parent, GnomeScanJob *job);
+void gnome_scan_acquisition_dialog_run (GnomeScanAcquisitionDialog *dialog);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_ACQUISITION_DIALOG_H_ */
diff --git a/trunk/lib/gnome-scan-backend.c b/trunk/lib/gnome-scan-backend.c
new file mode 100644
index 0000000..dd8295d
--- /dev/null
+++ b/trunk/lib/gnome-scan-backend.c
@@ -0,0 +1,250 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION:gnome-scan-backend
+ * @short_description: Probe scanners
+ *
+ * In Gnome Scan, the so called "backend" is only responsible to probe
+ * devices. In fact, the scanner is only responsible to detect scanner
+ * plug and unplug and trigger signal about that. Probing is just a
+ * way to add already plugged scanner just like adding a hotplugged
+ * scanner.
+ *
+ * The backend itseld does not maintain a public list of scanner, it's
+ * up to the UI to maintain a list of scanner (e.g. through a
+ * #GtkListStore).
+ *
+ * #GnomeScanBackend is the base class for real backend. If you want
+ * to instanciate all backends, just initialize all #GnomeScanModules
+ * and instanciate each g_type_children() of #GnomeScanBackend.
+ **/
+#include "gnome-scan-backend.h"
+#include "gnome-scan-module.h"
+
+enum
+{
+ PROP_0,
+};
+
+enum
+{
+ SCANNER_ADDED,
+ SCANNER_REMOVED,
+ PROBE_DONE,
+ LAST_SIGNAL
+};
+
+
+static GObjectClass* parent_class = NULL;
+static guint scan_backend_signals[LAST_SIGNAL] = { 0 };
+
+G_DEFINE_TYPE (GnomeScanBackend, gnome_scan_backend, G_TYPE_OBJECT);
+
+static void
+gnome_scan_backend_init (GnomeScanBackend *object)
+{
+}
+
+static void
+gnome_scan_backend_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+#if 0
+static void
+gnome_scan_backend_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_BACKEND (object));
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_backend_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_BACKEND (object));
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+#endif
+
+static void
+gnome_scan_backend_scanner_added (GnomeScanBackend *backend, GnomeScanner *scanner, gpointer data)
+{
+ /* TODO: Add default signal handler implementation here */
+}
+
+static void
+gnome_scan_backend_scanner_removed (GnomeScanBackend *backend, GnomeScanner *scanner, gpointer data)
+{
+ /* TODO: Add default signal handler implementation here */
+}
+
+static void
+gnome_scan_backend_class_init (GnomeScanBackendClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
+
+ object_class->finalize = gnome_scan_backend_finalize;
+
+ klass->scanner_added = gnome_scan_backend_scanner_added;
+ klass->scanner_removed = gnome_scan_backend_scanner_removed;
+
+ /**
+ * GnomeScanBackend::scanner-added:
+ * @backend: the emitting #GnomeScanBackend
+ * @scanner: the newly added #GnomeScanner
+ *
+ * This backend is triggered each time it discover a new scanner
+ * during probe or on plug.
+ **/
+ scan_backend_signals[SCANNER_ADDED] =
+ g_signal_new ("scanner-added",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GnomeScanBackendClass, scanner_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, GNOME_TYPE_SCANNER);
+
+ /**
+ * GnomeScanBackend::scanner-removed:
+ * @backend: the emitting #GnomeScanBackend
+ * @scanner: the scanner removed
+ *
+ * This signal is emitted as a scanner is lost. Every reference to
+ * this scanner must be removed.
+ **/
+ scan_backend_signals[SCANNER_REMOVED] =
+ g_signal_new ("scanner-removed",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GnomeScanBackendClass, scanner_removed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, GNOME_TYPE_SCANNER);
+
+ /**
+ * GnomeScanBackend::probe-done:
+ * @backend: the emitting #GnomeScanBackend
+ *
+ * This signal allow app to know if the backend has found a
+ * scanner during probe. If the #GnomeScanBackend::probe-done
+ * signal is emitted and no #GnomeScanBackend::scanner-added
+ * signal has been sent, this mean that no scanner has been found
+ * at all. Remember the backend does not handle a list of
+ * #GnomeScanner.
+ **/
+ scan_backend_signals[PROBE_DONE] =
+ g_signal_new ("probe-done",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GnomeScanBackendClass, probe_done),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
+
+/**
+ * gnome_scan_backend_new:
+ * @backend_type: the top level backend GType
+ *
+ * Instanciate a new backend of type @type. It check wether @type is a
+ * child type of #GnomeScanBackend.
+ *
+ * Returns: a new #GnomeScanBackend.
+ **/
+GnomeScanBackend*
+gnome_scan_backend_new (GType backend_type)
+{
+ g_return_val_if_fail (g_type_is_a (backend_type, GNOME_TYPE_SCAN_BACKEND), NULL);
+ return GNOME_SCAN_BACKEND (g_object_new (backend_type, NULL));
+}
+
+/**
+ * gnome_scan_backend_probe_scanners:
+ * @backend: a #GnomeScanBackend
+ *
+ * Trigger probe. Ideally called in a new thread through g_thread_create().
+ *
+ * See: g_thread_create()
+ **/
+void
+gnome_scan_backend_probe_scanners (GnomeScanBackend *backend)
+{
+ GNOME_SCAN_BACKEND_GET_CLASS (backend)->probe_scanners (backend);
+ gnome_scan_backend_probe_done (backend);
+}
+
+/**
+ * gnome_scan_backend_add_scanner:
+ * @backend: a #GnomeScanBackend
+ * @scanner: a new #GnomeScanner
+ *
+ * This function is used by child class to trigger
+ * #GnomeScanBackend::scanner-added signal.
+ **/
+void
+gnome_scan_backend_add_scanner (GnomeScanBackend *backend, GnomeScanner *scanner)
+{
+ g_signal_emit (backend, scan_backend_signals[SCANNER_ADDED], 0, scanner);
+}
+
+/**
+ * gnome_scan_backend_remove_scanner:
+ * @backend: a #GnomeScanBackend
+ * @scanner: a deprecated #GnomeScanner
+ *
+ * Trigger #GnomeScanBackend::scanner-removed upon @scanner. This
+ * function is to be used only by child class.
+ **/
+void
+gnome_scan_backend_remove_scanner (GnomeScanBackend *backend, GnomeScanner *scanner)
+{
+ g_signal_emit (backend, scan_backend_signals[SCANNER_REMOVED], 0, scanner);
+}
+
+/**
+ * gnome_scan_backend_probe_done:
+ * @backend: a #GnomeScanBackend
+ *
+ * Trigger #GnomeScanBackend::probe-done signal. Used by child class.
+ **/
+void
+gnome_scan_backend_probe_done (GnomeScanBackend *backend)
+{
+ g_signal_emit (backend, scan_backend_signals[PROBE_DONE], 0);
+}
diff --git a/trunk/lib/gnome-scan-backend.h b/trunk/lib/gnome-scan-backend.h
new file mode 100644
index 0000000..fa4aff0
--- /dev/null
+++ b/trunk/lib/gnome-scan-backend.h
@@ -0,0 +1,77 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_BACKEND_H_
+#define _GNOME_SCAN_BACKEND_H_
+
+#include <glib-object.h>
+#include "gnome-scanner.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_BACKEND (gnome_scan_backend_get_type ())
+#define GNOME_SCAN_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_BACKEND, GnomeScanBackend))
+#define GNOME_SCAN_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_BACKEND, GnomeScanBackendClass))
+#define GNOME_IS_SCAN_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_BACKEND))
+#define GNOME_IS_SCAN_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_BACKEND))
+#define GNOME_SCAN_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_BACKEND, GnomeScanBackendClass))
+
+typedef struct _GnomeScanBackendClass GnomeScanBackendClass;
+typedef struct _GnomeScanBackend GnomeScanBackend;
+
+struct _GnomeScanBackendClass
+{
+ GObjectClass parent_class;
+
+ /* API */
+ void (* probe_scanners) (GnomeScanBackend *backend);
+
+ /* Signals */
+ void (* scanner_added) (GnomeScanBackend *backend, GnomeScanner *scanner, gpointer data);
+ void (* scanner_removed) (GnomeScanBackend *backend, GnomeScanner *scanner, gpointer data);
+ void (* probe_done) (GnomeScanBackend *backend, gpointer data);
+};
+
+/**
+ * GnomeScanBackend:
+ *
+ * The #GnomeScanBackend is only responsible to probe scanners,
+ * emitting signal on scanner plug or unplug. Ideally, most of the
+ * acquisition work is done through #GnomeScanner.
+ **/
+struct _GnomeScanBackend
+{
+ /*< private >*/
+ GObject parent_instance;
+};
+
+GType gnome_scan_backend_get_type (void) G_GNUC_CONST;
+GnomeScanBackend* gnome_scan_backend_new (GType backend_type);
+void gnome_scan_backend_probe_scanners (GnomeScanBackend *backend);
+void gnome_scan_backend_add_scanner (GnomeScanBackend *backend,
+ GnomeScanner *scanner);
+void gnome_scan_backend_remove_scanner (GnomeScanBackend *backend,
+ GnomeScanner *scanner);
+void gnome_scan_backend_probe_done (GnomeScanBackend *backend);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_BACKEND_H_ */
diff --git a/trunk/lib/gnome-scan-boolean-widget.c b/trunk/lib/gnome-scan-boolean-widget.c
new file mode 100644
index 0000000..30a771e
--- /dev/null
+++ b/trunk/lib/gnome-scan-boolean-widget.c
@@ -0,0 +1,82 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <glib/gi18n.h>
+#include "gnome-scan-param-specs.h"
+#include "gnome-scan-boolean-widget.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_BOOLEAN_WIDGET, GnomeScanBooleanWidgetPrivate))
+
+typedef struct _GnomeScanBooleanWidgetPrivate GnomeScanBooleanWidgetPrivate;
+struct _GnomeScanBooleanWidgetPrivate
+{
+ GtkWidget *check;
+};
+
+static void gsbw_toggled (GtkToggleButton *button, GnomeScanParamWidget *gspw);
+
+GS_DEFINE_PARAM_WIDGET (GnomeScanBooleanWidget, gnome_scan_boolean_widget);
+
+static void
+gnome_scan_boolean_widget_init (GnomeScanBooleanWidget *object)
+{
+ GNOME_SCAN_PARAM_WIDGET(object)->shows_unit = TRUE;
+}
+
+static void
+gnome_scan_boolean_widget_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gnome_scan_boolean_widget_parent_class)->finalize (object);
+}
+
+
+static void
+gnome_scan_boolean_widget_build (GnomeScanParamWidget *gspw)
+{
+ GnomeScanBooleanWidgetPrivate *priv = GET_PRIVATE (gspw);
+ gspw->shows_label = TRUE;
+ priv->check = gtk_check_button_new_with_label (dgettext (gs_param_spec_get_domain (gspw->pspec),
+ g_param_spec_get_nick (gspw->pspec)));
+ gtk_box_pack_start (GTK_BOX (gspw), priv->check, TRUE, TRUE, FALSE);
+
+ g_signal_connect (GET_PRIVATE (gspw)->check, "toggled",
+ (GCallback) gsbw_toggled,
+ gspw);
+}
+
+static void
+gnome_scan_boolean_widget_set (GnomeScanParamWidget *gspw, GValue *value)
+{
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_PRIVATE (gspw)->check),
+ g_value_get_boolean (gspw->value));
+}
+
+static void
+gsbw_toggled (GtkToggleButton *button, GnomeScanParamWidget *gspw)
+{
+ g_value_set_boolean (gspw->value,
+ gtk_toggle_button_get_active (button));
+ gnome_scan_param_widget_changed (gspw);
+}
+
diff --git a/trunk/lib/gnome-scan-boolean-widget.h b/trunk/lib/gnome-scan-boolean-widget.h
new file mode 100644
index 0000000..e326ff8
--- /dev/null
+++ b/trunk/lib/gnome-scan-boolean-widget.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_BOOLEAN_WIDGET_H_
+#define _GNOME_SCAN_BOOLEAN_WIDGET_H_
+
+#include <glib-object.h>
+#include "gnome-scan-param-widget.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_BOOLEAN_WIDGET (gnome_scan_boolean_widget_get_type ())
+#define GNOME_SCAN_BOOLEAN_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_BOOLEAN_WIDGET, GnomeScanBooleanWidget))
+#define GNOME_SCAN_BOOLEAN_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_BOOLEAN_WIDGET, GnomeScanBooleanWidgetClass))
+#define GNOME_IS_SCAN_BOOLEAN_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_BOOLEAN_WIDGET))
+#define GNOME_IS_SCAN_BOOLEAN_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_BOOLEAN_WIDGET))
+#define GNOME_SCAN_BOOLEAN_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_BOOLEAN_WIDGET, GnomeScanBooleanWidgetClass))
+
+typedef struct _GnomeScanBooleanWidget GnomeScanBooleanWidget;
+struct _GnomeScanBooleanWidget
+{
+ GnomeScanParamWidget parent_instance;
+};
+
+GS_DEFINE_PARAM_WIDGET_HEADER (GnomeScanBooleanWidget, gnome_scan_boolean_widget);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_BOOLEAN_WIDGET_H_ */
diff --git a/trunk/lib/gnome-scan-dialog.c b/trunk/lib/gnome-scan-dialog.c
new file mode 100644
index 0000000..71820be
--- /dev/null
+++ b/trunk/lib/gnome-scan-dialog.c
@@ -0,0 +1,1438 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-dialog
+ * @short_description: Scan configuration dialog
+ * @include: gnome-scan.h
+ *
+ * The goal of the #GnomeScanDialog is to allow the user to configure
+ * a #GnomeScanJob, and trigger the execution of this job by running a
+ * #GnomeScanAcquisitionDialog on it.
+ **/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib/gi18n.h>
+#include "gnome-scan-private.h"
+#include "gnome-scan-init.h"
+#include "gnome-scan-dialog.h"
+#include "gnome-scan-acquisition-dialog.h"
+#include "gnome-scan-preview-area.h"
+#include "gnome-scan-param-widget.h"
+#include "gnome-scan-module-manager.h"
+#include "gnome-scan-module.h"
+#include "gnome-scan-backend.h"
+#include "gnome-scan-param-specs.h"
+#include "gnome-scanner.h"
+#include "gnome-scan-preview-sink.h"
+#include "gnome-scan-preview-plugin.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_DIALOG, GnomeScanDialogPrivate))
+
+#define GTK_WIDGET_SET_VISIBLE(wid,show) if(wid){gtk_widget_set_no_show_all(wid,!show); \
+if(show){gtk_widget_show_all(wid);}else{gtk_widget_hide(wid);}}
+
+#define GTK_BOX_SET_VISIBLE(box,show,hval) GTK_WIDGET_SET_VISIBLE(box,show); \
+gsd_add_to_box_show(g_object_get_qdata(G_OBJECT (box), GSD_PAGE_QUARK),show?1:hval); \
+GTK_WIDGET_SET_VISIBLE(gtk_widget_get_parent(box),gsd_get_box_show(gtk_widget_get_parent(box)))
+
+#define gsd_get_box_show(box) (guint)g_object_get_data(G_OBJECT(box),BOX_SHOWN)
+#define gsd_set_box_show(box,val) g_object_set_data(G_OBJECT(box),BOX_SHOWN,(gpointer)(val))
+#define gsd_init_box_show(box) gsd_set_box_show(box,0)
+#define gsd_add_to_box_show(box,val) gsd_set_box_show(box,gsd_get_box_show(box)+(val))
+
+#define BOX_SHOWN "box-show"
+#define PREVIEW_RES 75.
+
+typedef struct _GnomeScanDialogPrivate GnomeScanDialogPrivate;
+
+struct _GnomeScanDialogPrivate
+{
+ /* Properties */
+ GnomeScanJob* job;
+
+ /* Internals */
+ gboolean disposed;
+ GSList* backends;
+ gint probing_backends;
+ gboolean probe_done;
+ gint scanner_count;
+ gulong scanner_changed_handler;
+ gboolean run;
+
+ /* Widgets */
+ GtkWidget* notebook;
+
+ /* General */
+ GtkWidget* general_page;
+ GtkWidget* front_scanner_box;
+ GtkWidget* front_sink_box;
+ /* front_custom_box ? */
+ GtkListStore* scanners;
+ GtkTreeSelection* scanner_selection;
+
+ /* preview */
+ GtkWidget* preview_page;
+ GtkWidget* preview_acquisition_box;
+ GtkWidget* preview_progress;
+ GtkWidget* preview_stage;
+ GtkWidget* preview_box;
+ GtkWidget* preview_area;
+ GtkWidget* preview_bbox;
+ GnomeScanJob* preview_job;
+ GValue* preview_res;
+ GValue* saved_res;
+ GValue* saved_origin;
+ GValue* saved_paper_size;
+
+ /* advanced tab */
+ GtkWidget* advanced_page;
+ GtkWidget* advanced_container;
+ GtkWidget* advanced_box;
+
+ GtkWidget* sink_box;
+ GtkWidget* sink_page;
+ GtkWidget* custom_widget;
+
+ /* processing */
+ GtkWidget *processing_page;
+ GtkWidget *processing_container;
+ GtkWidget *processing_box;
+
+};
+
+enum
+{
+ PAGE_GENERAL,
+ PAGE_PREVIEW,
+ PAGE_ADVANCED,
+ PAGE_PROCESSING,
+ PAGE_SINK,
+ PAGE_CUSTOM
+};
+
+enum
+{
+ COLUMN_ICON,
+ COLUMN_NAME,
+ COLUMN_STATUS,
+ COLUMN_OBJECT,
+ N_COLUMNS
+};
+
+enum
+{
+ PROP_0,
+ PROP_JOB
+};
+
+static GtkDialogClass* parent_class = NULL;
+
+static void gsd_message_dialog (GnomeScanDialog *dialog,
+ GtkMessageType mtype,
+ GtkButtonsType btype,
+ const gchar* primary,
+ const gchar* secondary);
+static void gsd_build_group_box (GnomeScanDialog *dialog,
+ GtkWidget *page,
+ GtkBox *box,
+ GnomeScanPlugin *plugin,
+ GQuark group);
+
+static void gsd_show_hide_param_widget (GParamSpec *param,
+ GnomeScanDialog *dialog);
+
+/* INTERNALS */
+
+static void gsd_load_backends (GnomeScanDialog *dialog);
+static gboolean gsd_select_scanner_if_ready (GnomeScanDialog *gsd);
+static void gsd_scanner_added (GnomeScanBackend *backend,
+ GnomeScanner *scanner,
+ GnomeScanDialog *dialog);
+static void gsd_scanner_removed (GnomeScanBackend *backend,
+ GnomeScanner *scanner,
+ GnomeScanDialog *dialog);
+static void gsd_plugin_params_changed (GnomeScanPlugin *plugin,
+ GParamSpec *pspec,
+ GnomeScanDialog* gsd);
+static void gsd_scanner_status_changed (GnomeScanner *scanner,
+ GnomeScanDialog *gsd);
+static void gsd_probe_done (GnomeScanBackend *backend,
+ GnomeScanDialog *dialog);
+
+/* UI */
+
+static void gsd_build_general_ui (GnomeScanDialog *dialog);
+static void gsd_build_preview_ui (GnomeScanDialog *dialog);
+static void gsd_build_processing_ui (GnomeScanDialog *dialog);
+static void gsd_build_sink_ui (GnomeScanDialog *dialog);
+static void gsd_build_scanner_ui (GnomeScanDialog *gsd);
+static void gsd_scanner_selected (GtkTreeSelection *selection,
+ GnomeScanDialog *dialog);
+static void gsd_destroy_param (GParamSpec *param,
+ GnomeScanDialog *dialog);
+
+/* PREVIEW */
+static void gsd_preview_scanner_selected (GnomeScanDialog *gsd);
+
+GS_DEFINE_QUARK (gsd_page, "page");
+#define GSD_PAGE_QUARK (gsd_page_quark())
+
+GS_DEFINE_QUARK (gsd_group, "group");
+#define GSD_GROUP_QUARK (gsd_group_quark())
+
+GS_DEFINE_QUARK (gsd_table, "table");
+#define GSD_TABLE_QUARK (gsd_table_quark())
+
+GS_DEFINE_QUARK (gsd_widget, "widget");
+#define GSD_WIDGET_QUARK (gsd_widget_quark())
+
+GS_DEFINE_QUARK (gsd_plugin, "plugin");
+#define GSD_PLUGIN_QUARK (gsd_plugin_quark())
+
+GS_DEFINE_QUARK (gsd_label, "label");
+#define GSD_LABEL_QUARK (gsd_label_quark())
+
+G_DEFINE_TYPE (GnomeScanDialog, gnome_scan_dialog, GTK_TYPE_DIALOG);
+
+static void
+gnome_scan_dialog_init (GnomeScanDialog *object)
+{
+ GnomeScanDialogPrivate* priv = GET_PRIVATE (object);
+
+ priv->preview_res = g_new0 (GValue, 1);
+ g_value_init (priv->preview_res, G_TYPE_DOUBLE);
+ g_value_set_double (priv->preview_res, PREVIEW_RES);
+}
+
+GObject*
+gnome_scan_dialog_constructor (GType type, guint n, GObjectConstructParam *params)
+{
+ GnomeScanDialogPrivate* priv;
+ GObject* object;
+ GnomeScanDialog *dialog;
+ GtkWidget *widget;
+ GtkWidget *label;
+ GSList *node;
+
+ object =
+ G_OBJECT_CLASS (gnome_scan_dialog_parent_class)->constructor (type, n,
+ params);
+ widget = GTK_WIDGET (object);
+ dialog = GNOME_SCAN_DIALOG (widget);
+ priv = GET_PRIVATE (dialog);
+
+ while (gtk_events_pending ())
+ gtk_main_iteration ();
+
+ /* Dialog */
+ gtk_dialog_add_button (GTK_DIALOG (widget),
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL);
+
+ gtk_dialog_add_button (GTK_DIALOG (widget),
+ GS_STOCK_SCAN,
+ GTK_RESPONSE_APPLY);
+
+ /* Notebook */
+ priv->notebook = gtk_notebook_new ();
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (widget)->vbox), priv->notebook,
+ TRUE, TRUE, 0);
+ /* dialog.border_width + notebook.border_width = 6 + 6 = 12 */
+ gtk_container_set_border_width (GTK_CONTAINER (priv->notebook), 6);
+
+ /* General */
+ label = gtk_label_new_with_mnemonic (_("_General"));
+ priv->general_page = gtk_vbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (priv->general_page), 12);
+ gtk_notebook_insert_page (GTK_NOTEBOOK (priv->notebook),
+ priv->general_page, label,
+ PAGE_GENERAL);
+
+ /* Preview */
+ label = gtk_label_new_with_mnemonic (_("Pre_view"));
+ priv->preview_page = gtk_vbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (priv->preview_page), 12);
+ gtk_widget_set_no_show_all (priv->preview_page, TRUE);
+ gtk_notebook_insert_page (GTK_NOTEBOOK (priv->notebook),
+ priv->preview_page, label,
+ PAGE_PREVIEW);
+
+ /* Advanced */
+ label = gtk_label_new_with_mnemonic (_("_Advanced"));
+ priv->advanced_page = gtk_alignment_new (.5, .5, 1., 1.);
+ gtk_notebook_insert_page (GTK_NOTEBOOK (priv->notebook),
+ priv->advanced_page, label,
+ PAGE_ADVANCED);
+ gtk_widget_set_no_show_all (priv->advanced_page, TRUE);
+
+ /* Processing */
+ label = gtk_label_new_with_mnemonic (_("P_rocessing"));
+ priv->processing_box = gtk_vbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (priv->processing_box), 6);
+ priv->processing_page = priv->processing_box;
+ gtk_notebook_insert_page (GTK_NOTEBOOK (priv->notebook),
+ priv->processing_page, label,
+ PAGE_PROCESSING);
+
+ /* Sink */
+ label = gtk_label_new_with_mnemonic (_("_Output"));
+ priv->sink_box = gtk_vbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (priv->sink_box), 6);
+
+ priv->sink_page = priv->sink_box;
+ /*scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_set_no_show_all (priv->sink_page, TRUE);
+ gtk_container_set_border_width (GTK_CONTAINER (scrolled), 12);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
+ priv->sink_box);
+ */
+ gtk_notebook_insert_page (GTK_NOTEBOOK (priv->notebook),
+ priv->sink_page, label,
+ PAGE_SINK);
+
+ gtk_widget_show_all (priv->notebook);
+
+ gsd_build_general_ui (dialog);
+ gsd_build_preview_ui (dialog);
+ gsd_build_processing_ui (dialog);
+ gsd_build_sink_ui (dialog);
+
+ /* configure preview job */
+ GnomeScanSink*sink = gnome_scan_preview_sink_new();
+ priv->preview_job = gnome_scan_job_new (gnome_scan_job_get_settings(priv->job),
+ sink);
+ g_object_unref(sink);
+ for (node = gnome_scan_job_get_processors (priv->job)->next; node; node = node->next)
+ gnome_scan_job_add_processor (priv->preview_job, node->data);
+
+
+ return object;
+}
+
+static void
+gnome_scan_dialog_dispose (GObject *object)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (object);
+ GSList *node;
+ GnomeScanner *scanner;
+ GnomeScanSink *sink;
+
+ if (!priv->disposed) {
+ /* freeing all scanner params */
+ if (scanner = gnome_scan_job_get_scanner(priv->job)) {
+ gnome_scan_plugin_params_foreach (GNOME_SCAN_PLUGIN(scanner),
+ (GFunc) gsd_destroy_param,
+ object);
+ }
+
+ /* unref all processors params */
+ for (node = gnome_scan_job_get_processors (priv->job); node; node = node->next) {
+ gnome_scan_plugin_params_foreach (GNOME_SCAN_PLUGIN(node->data),
+ (GFunc) gsd_destroy_param,
+ object);
+ }
+
+ /* unref all sink params */
+ if (sink = gnome_scan_job_get_sink(priv->job)) {
+ gnome_scan_plugin_params_foreach (GNOME_SCAN_PLUGIN(sink),
+ (GFunc) gsd_destroy_param,
+ object);
+ }
+
+ /* unref scanners and backends */
+ g_object_unref (priv->scanners);
+ for (node = priv->backends; node; node = node->next) {
+ g_object_unref (node->data);
+ }
+
+ /* unref jobs */
+ g_object_unref(priv->job);
+ g_object_unref(priv->preview_job);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+gnome_scan_dialog_finalize (GObject *object)
+{
+ GnomeScanDialogPrivate* priv = GET_PRIVATE (object);
+
+ g_value_unset (priv->preview_res);
+ g_free (priv->preview_res);
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_dialog_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_DIALOG (object));
+
+ switch (prop_id)
+ {
+ case PROP_JOB:
+ GET_PRIVATE (object)->job = GNOME_SCAN_JOB (g_value_dup_object (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_dialog_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_DIALOG (object));
+
+ switch (prop_id)
+ {
+ case PROP_JOB:
+ g_value_set_object (value, GET_PRIVATE (object)->job);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_dialog_class_init (GnomeScanDialogClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = GTK_DIALOG_CLASS (g_type_class_peek_parent (klass));
+
+ g_type_class_add_private (klass, sizeof (GnomeScanDialogPrivate));
+
+ object_class->constructor = gnome_scan_dialog_constructor;
+ object_class->finalize = gnome_scan_dialog_finalize;
+ object_class->dispose = gnome_scan_dialog_dispose;
+ object_class->set_property = gnome_scan_dialog_set_property;
+ object_class->get_property = gnome_scan_dialog_get_property;
+
+
+ /**
+ * GnomeScanDialog:job:
+ *
+ * The job the dialog is configuring.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_JOB,
+ g_param_spec_object ("job",
+ "Job",
+ "The job the dialog will configure",
+ GNOME_TYPE_SCAN_JOB,
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+}
+
+
+
+
+/**
+ * gnome_scan_dialog_new:
+ * @parent: The parent #GtkWindow
+ * @job: the job to configure
+ *
+ * Instanciate the new dialog and populate it considering job scanner,
+ * processor and sink.
+ *
+ * Returns: a new #GnomeScanDialog
+ */
+GtkWidget*
+gnome_scan_dialog_new (GtkWindow *parent, GnomeScanJob *job)
+{
+ GObject* object = g_object_new (GNOME_TYPE_SCAN_DIALOG,
+ "border-width", 6,
+ "window-position", GTK_WIN_POS_CENTER,
+ "default-width", 320,
+ "default-height", 420,
+ /* translator: this is the dialog title */
+ "title", _("Scan"),
+ "has-separator", FALSE,
+ "modal", TRUE,
+ "icon-name", "scanner",
+ "transient-for", parent,
+ "job", job,
+ NULL);
+
+ return GTK_WIDGET (object);
+}
+
+/**
+ * gnome_scan_dialog_run:
+ * @dialog: a #GnomeScanDialog
+ *
+ * Run the dialog. If no backends are loaded, a popup is shown, and
+ * the function returns. If no scanners has been detected, the dialog
+ * wait for scanner plug through #GnomeScanBackend::scanner-added
+ * signal, and present a warning popup to user asking him to ensure
+ * device is plugged, etc.
+ *
+ * Once the dialog has been applied, a #GnomeScanAquisitionDialog is
+ * run on the #GnomeScanDialog:job.
+ *
+ * See: #GnomeScanJob
+ **/
+void
+gnome_scan_dialog_run (GnomeScanDialog *dialog)
+{
+ GnomeScanDialogPrivate* priv = GET_PRIVATE (dialog);
+ GtkWidget* acquisition_dialog;
+ GtkWindow* parent = NULL;
+ gint response;
+
+ gsd_load_backends (dialog);
+
+ if (g_slist_length (priv->backends) == 0) {
+ gsd_message_dialog (dialog, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ _("Unable to detect scanners!"),
+ _("No drivers has been found."));
+ return;
+ }
+
+ if (priv->probe_done && !priv->scanner_count) {
+ gsd_message_dialog (dialog, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+ _("No device found!"),
+ _("Ensure your device is plugged, powered, supported and configured. "
+ "The dialog will run until you plug a scanner or cancel."));
+ }
+
+ priv->run = TRUE;
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_hide (GTK_WIDGET (dialog));
+
+ if (response == GTK_RESPONSE_APPLY) {
+ g_object_get (dialog, "transient-for", &parent, NULL);
+ acquisition_dialog = gnome_scan_acquisition_dialog_new (parent, priv->job);
+ gnome_scan_acquisition_dialog_run (GNOME_SCAN_ACQUISITION_DIALOG (acquisition_dialog));
+ gtk_widget_destroy(acquisition_dialog);
+ }
+
+ return;
+}
+
+
+
+/* INTERNAL */
+static void
+gsd_message_dialog (GnomeScanDialog *dialog,
+ GtkMessageType mtype,
+ GtkButtonsType btype,
+ const gchar* primary,
+ const gchar* secondary)
+{
+ GtkWidget* message_dialog;
+ GtkWindow* parent = NULL;
+
+ g_object_get (dialog, "transient-for", &parent, NULL);
+ if (!(parent && GTK_WIDGET_VISIBLE (GTK_WIDGET (parent))) && GTK_WIDGET_VISIBLE (GTK_WIDGET (dialog))) {
+ parent = GTK_WINDOW (dialog);
+ }
+ else {
+ parent = NULL;
+ }
+
+ message_dialog = gtk_message_dialog_new (parent,
+ GTK_DIALOG_MODAL
+ | GTK_DIALOG_DESTROY_WITH_PARENT,
+ mtype, btype, g_strdup (primary));
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message_dialog),
+ g_strdup (secondary));
+
+ gtk_dialog_run (GTK_DIALOG (message_dialog));
+ gtk_widget_destroy (message_dialog);
+}
+
+
+
+
+
+static void
+gsd_build_group_box (GnomeScanDialog *dialog, GtkWidget *page, GtkBox *box, GnomeScanPlugin *plugin, GQuark group)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE(dialog);
+ GtkWidget *label, *group_box, *alignment, *table, *widget, *eventbox;
+ GSList *node = NULL;
+ const gchar *domain;
+ gboolean expands, shows_label;
+ gboolean box_expands = FALSE;
+ gint count = 0;
+
+ node = gnome_scan_plugin_get_param_group (plugin, group);
+ if (!node)
+ return;
+
+ group_box = gtk_vbox_new (FALSE, 6);
+ gtk_widget_set_no_show_all (group_box, FALSE);
+ gsd_init_box_show (group_box);
+ g_object_set_qdata (G_OBJECT (group_box), GSD_PAGE_QUARK, page);
+ gtk_box_pack_start (box, GTK_WIDGET (group_box), FALSE, TRUE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (group_box), 6);
+
+ /* group label */
+ label = gtk_label_new (NULL);
+ domain = node ? gs_param_spec_get_domain (node->data) : GETTEXT_PACKAGE;
+ domain = domain ? domain : GETTEXT_PACKAGE;
+ gtk_label_set_markup (GTK_LABEL (label),
+ g_strdup_printf ("<b>%s</b>",
+ dgettext (domain,
+ g_quark_to_string (group))));
+ gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
+ gtk_box_pack_start (GTK_BOX (group_box), label, FALSE, TRUE, 0);
+
+ /* group's children are padded. */
+ alignment = gtk_alignment_new (1., 0., 1., 1.);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 24, 0);
+ gtk_box_pack_start (GTK_BOX (group_box), alignment, TRUE, TRUE, 0);
+
+ table = gtk_table_new (0, 2, FALSE);
+ gtk_table_set_col_spacings (GTK_TABLE (table), 6);
+ gtk_table_set_row_spacings (GTK_TABLE (table), 4);
+ gtk_container_add (GTK_CONTAINER (alignment), table);
+ g_object_set_qdata (G_OBJECT (group_box), GSD_TABLE_QUARK, table);
+
+ for (; node ; node = node->next)
+ {
+ widget = gnome_scan_param_widget_new (gnome_scan_job_get_settings (priv->job),
+ plugin, node->data);
+
+ if (!widget)
+ continue;
+
+ expands = gnome_scan_param_widget_expands (GNOME_SCAN_PARAM_WIDGET (widget));
+ shows_label = gnome_scan_param_widget_shows_label (GNOME_SCAN_PARAM_WIDGET (widget));
+ box_expands = box_expands || expands;
+
+ gtk_widget_set_tooltip_text (widget,
+ dgettext (gs_param_spec_get_domain (node->data),
+ g_param_spec_get_blurb (node->data)));
+
+ gtk_widget_set_no_show_all (widget, FALSE);
+ gsd_add_to_box_show (group_box, 1);
+ g_object_set_qdata (G_OBJECT (widget), GSD_GROUP_QUARK, group_box);
+ g_param_spec_set_qdata (node->data, GSD_WIDGET_QUARK, widget);
+
+
+ /* Colspan if widgets shows label itself */
+ if (shows_label) {
+ gtk_table_attach (GTK_TABLE (table), widget,
+ 0, 2,
+ count, count+1,
+ GTK_EXPAND | GTK_FILL,
+ (expands ? GTK_EXPAND | GTK_FILL : GTK_FILL),
+ 0, 0);
+ label = NULL;
+ }
+ else {
+ label = gtk_label_new (g_strdup_printf ("%s:",
+ dgettext (gs_param_spec_get_domain (node->data),
+ g_param_spec_get_nick (node->data))));
+ gtk_misc_set_alignment (GTK_MISC (label), 0., .5);
+
+ gtk_widget_set_tooltip_text (label,
+ dgettext (gs_param_spec_get_domain (node->data),
+ g_param_spec_get_blurb (node->data)));
+ gtk_table_attach (GTK_TABLE (table), label,
+ 0, 1,
+ count, count+1,
+ GTK_FILL,
+ GTK_FILL,
+ 0, 0);
+ gtk_table_attach (GTK_TABLE (table), widget,
+ 1, 2,
+ count, count+1,
+ GTK_EXPAND | GTK_FILL,
+ (expands ? GTK_EXPAND : GTK_FILL) | GTK_FILL,
+ 0, 0);
+ }
+ g_object_set_qdata (G_OBJECT (widget), GSD_LABEL_QUARK, label);
+ count++;
+ }
+
+ /* special handling of front page */
+ box_expands = box_expands || group == GS_PARAM_GROUP_SCANNER_FRONT;
+
+ /* update packing */
+ if (GTK_IS_BOX (page)) {
+ gtk_box_set_child_packing (GTK_BOX (page), GTK_WIDGET (box),
+ box_expands, TRUE, 0, GTK_PACK_START);
+ }
+ gtk_box_set_child_packing (GTK_BOX (box), GTK_WIDGET (group_box),
+ box_expands, TRUE, 0, GTK_PACK_START);
+ gtk_box_set_child_packing (GTK_BOX (group_box), GTK_WIDGET (alignment),
+ box_expands, TRUE, 0, GTK_PACK_START);
+
+ gsd_add_to_box_show (page, 1);
+
+ gtk_widget_set_no_show_all (page, FALSE);
+ gtk_widget_show_all (page);
+ gtk_widget_realize (page);
+}
+
+static void
+gsd_show_hide_param_widget (GParamSpec *param, GnomeScanDialog *dialog)
+{
+ gboolean show = param->flags & G_PARAM_WRITABLE;
+ GtkWidget *widget = g_param_spec_get_qdata (param, GSD_WIDGET_QUARK);
+
+ if (!widget)
+ return;
+
+ gboolean shown = !gtk_widget_get_no_show_all (widget);
+
+ if ((show && shown) || show == shown)
+ return;
+
+ gint inc = show ? 1 : -1;
+
+ GtkWidget *label = g_object_get_qdata (G_OBJECT (widget), GSD_LABEL_QUARK);
+ GtkWidget *group = g_object_get_qdata (G_OBJECT (widget), GSD_GROUP_QUARK);
+ GtkWidget *page = g_object_get_qdata (G_OBJECT (group), GSD_PAGE_QUARK);
+
+ GTK_WIDGET_SET_VISIBLE (widget, show);
+ GTK_WIDGET_SET_VISIBLE (label, show);
+
+ gsd_add_to_box_show (group, inc);
+ guint count = gsd_get_box_show (group);
+ GTK_WIDGET_SET_VISIBLE (group, count);
+
+ if (count == 0) {
+ inc = -1;
+ }
+ else if (count == 1) {
+ inc = 1;
+ }
+ else {
+ inc = 0;
+ }
+ gsd_add_to_box_show (page, inc);
+ count = gsd_get_box_show (page);
+ GTK_WIDGET_SET_VISIBLE (page, count);
+}
+
+static void
+gsd_destroy_param (GParamSpec *param, GnomeScanDialog *dialog)
+{
+ GtkWidget *widget = g_param_spec_get_qdata (param, GSD_WIDGET_QUARK);
+ if (!widget) {
+ GnomeScanPreviewPlugin *plugin = g_param_spec_get_qdata (param, GSD_PLUGIN_QUARK);
+ if (plugin) {
+ gnome_scan_preview_plugin_destroy (plugin);
+ }
+ return;
+ }
+
+ gboolean shown = !gtk_widget_get_no_show_all (widget);
+ GtkWidget *label = g_object_get_qdata (G_OBJECT (widget), GSD_LABEL_QUARK);
+ GtkWidget *group = g_object_get_qdata (G_OBJECT (widget), GSD_GROUP_QUARK);
+ GtkWidget *table = g_object_get_qdata (G_OBJECT (group), GSD_TABLE_QUARK);
+ GtkWidget *page = g_object_get_qdata (G_OBJECT (group), GSD_PAGE_QUARK);
+
+ /* first destroy param specific widget : label and param widget */
+ if (label)
+ gtk_widget_destroy (label);
+
+ gtk_widget_destroy (widget);
+ g_param_spec_set_qdata (param, GSD_WIDGET_QUARK, NULL);
+
+ /* decrement group box_show count */
+ if (shown) {
+ gsd_add_to_box_show (group, -1);
+ }
+
+ /* decrement page box_show count if now more widget are shown */
+ guint count = gsd_get_box_show (group);
+ if (count == 0 && shown) {
+ gsd_add_to_box_show (page, -1);
+ }
+
+ /* hide page if no more groups to show */
+ count = gsd_get_box_show (page);
+ GTK_WIDGET_SET_VISIBLE (page, (count > 0));
+
+ /* if group has no more children, destroy it */
+ count = g_list_length (GTK_TABLE (table)->children);
+ if (count == 0) {
+ gtk_widget_destroy (group);
+ }
+}
+
+
+
+
+
+
+/* INTERNALS */
+
+static void
+gsd_load_backends (GnomeScanDialog *dialog)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (dialog);
+ GnomeScanBackend *backend;
+ GThread *thread;
+ GError *error = NULL;
+ GType *backend_types;
+ GdkCursor *watch_cursor = gdk_cursor_new(GDK_WATCH);
+ gint i;
+ guint n;
+ backend_types = g_type_children (GNOME_TYPE_SCAN_BACKEND, &n);
+ priv->probing_backends = 0;
+ priv->probe_done = FALSE;
+
+ for (i = 0 ; i < n ; i++) {
+ backend = gnome_scan_backend_new (backend_types[i]);
+ priv->backends = g_slist_append (priv->backends, backend);
+
+ if (priv->backends) {
+ g_signal_connect (backend, "scanner-added",
+ (GCallback) gsd_scanner_added, dialog);
+ g_signal_connect (backend, "scanner-removed",
+ (GCallback) gsd_scanner_removed, dialog);
+ g_signal_connect (backend, "probe-done",
+ (GCallback) gsd_probe_done, dialog);
+
+ priv->probing_backends++;
+
+ gdk_window_set_cursor(GTK_WIDGET(dialog)->window,
+ watch_cursor);
+ thread = g_thread_create ((GThreadFunc) gnome_scan_backend_probe_scanners,
+ backend, FALSE, &error);
+ }
+ }
+ gdk_cursor_unref (watch_cursor);
+}
+
+static void
+gsd_scanner_added (GnomeScanBackend *backend, GnomeScanner *scanner, GnomeScanDialog *dialog)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (dialog);
+ GtkTreeIter* iter = g_new0 (GtkTreeIter, 1);
+
+ gtk_list_store_insert_with_values (priv->scanners, iter, G_MAXINT,
+ COLUMN_ICON, gnome_scanner_get_icon_name (scanner),
+ COLUMN_NAME, gnome_scan_plugin_get_name (GNOME_SCAN_PLUGIN (scanner)),
+ COLUMN_STATUS, gnome_scanner_get_status_string (GNOME_SCANNER (scanner)),
+ COLUMN_OBJECT, scanner,
+ -1);
+ g_object_set_data (G_OBJECT (scanner), "iter", iter);
+ g_signal_connect (scanner, "status-changed",
+ (GCallback) gsd_scanner_status_changed,
+ dialog);
+
+ priv->scanner_count++;
+}
+
+static void
+gsd_scanner_removed (GnomeScanBackend *backend, GnomeScanner *scanner, GnomeScanDialog *dialog)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (dialog);
+ GtkTreeIter *iter;
+ iter = g_object_steal_data (G_OBJECT (scanner), "iter");
+ gtk_list_store_remove (priv->scanners, iter);
+ g_free (iter);
+ priv->scanner_count--;
+}
+
+
+static void
+gsd_scanner_status_changed (GnomeScanner *scanner, GnomeScanDialog *gsd)
+{
+ GtkTreeIter *iter;
+ iter = g_object_get_data (G_OBJECT (scanner), "iter");
+ gtk_list_store_set (GET_PRIVATE (gsd)->scanners, iter,
+ COLUMN_STATUS, gnome_scanner_get_status_string (scanner),
+ -1);
+}
+
+static void
+gsd_plugin_params_changed (GnomeScanPlugin *plugin, GParamSpec *pspec, GnomeScanDialog* gsd)
+{
+ if (pspec) {
+ gsd_show_hide_param_widget (pspec, gsd);
+ }
+}
+
+static void
+gsd_probe_done (GnomeScanBackend *backend, GnomeScanDialog *dialog)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (dialog);
+ GdkCursor *arrow_cursor;
+
+ priv->probe_done = !--priv->probing_backends;
+ if (!priv->scanner_count && GTK_WIDGET_VISIBLE (GTK_WIDGET (dialog))) {
+ gsd_message_dialog (dialog, GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+ _("No device found !"),
+ _("Ensure your device is plugged, powered, supported and configured."));
+ }
+
+ if (priv->probe_done) {
+ arrow_cursor = gdk_cursor_new(GDK_LEFT_PTR);
+ gdk_window_set_cursor (GTK_WIDGET(dialog)->window,
+ arrow_cursor);
+ gdk_cursor_unref (arrow_cursor);
+ }
+}
+
+/* GENERAL */
+static void
+gsd_build_general_ui (GnomeScanDialog *dialog)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (dialog);
+ GtkWidget *tree_view, *scrolled;
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *renderer;
+
+ priv->scanners = gtk_list_store_new (N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ GNOME_TYPE_SCANNER);
+
+ /* Tree View */
+ tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (priv->scanners));
+ g_object_set (tree_view, "search-column", COLUMN_NAME, NULL);
+
+ /* Icon */
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ g_object_set (renderer, "stock-size", GTK_ICON_SIZE_SMALL_TOOLBAR, NULL);
+ column = gtk_tree_view_column_new_with_attributes (NULL, renderer,
+ "icon-name", COLUMN_ICON,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
+
+ /* Name */
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes (_("Scanner"), renderer,
+ "text", COLUMN_NAME,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
+
+ /* Status */
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes (_("Status"), renderer,
+ "text", COLUMN_STATUS,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
+
+
+ priv->scanner_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
+ g_signal_connect (priv->scanner_selection, "changed",
+ (GCallback) gsd_scanner_selected, dialog);
+
+ /* Scrolled Window */
+ scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
+ tree_view);
+ gtk_box_pack_start (GTK_BOX (priv->general_page), scrolled, TRUE, TRUE, 0);
+ gtk_widget_set_size_request (scrolled, -1, 128);
+
+ /* Scanner front box */
+ priv->front_scanner_box = gtk_hbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (priv->general_page), priv->front_scanner_box,
+ FALSE, TRUE, 0);
+ gsd_init_box_show (priv->front_scanner_box);
+
+ /* Sink front box */
+ priv->front_sink_box = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (priv->general_page), priv->front_sink_box,
+ FALSE, TRUE, 0);
+ gsd_init_box_show (priv->front_sink_box);
+
+ gtk_widget_show_all (priv->general_page);
+
+}
+
+static void
+gsd_scanner_selected (GtkTreeSelection *selection, GnomeScanDialog *dialog)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (dialog);
+ GnomeScanner *scanner;
+ GtkTreeIter iter;
+ GtkTreeModel *model = GTK_TREE_MODEL (priv->scanners);
+
+ scanner = gnome_scan_job_get_scanner (priv->job);
+
+ if (priv->scanner_changed_handler) {
+ g_signal_handler_disconnect (scanner, priv->scanner_changed_handler);
+
+ gnome_scan_plugin_params_foreach (GNOME_SCAN_PLUGIN (scanner),
+ (GFunc) gsd_destroy_param,
+ dialog);
+ }
+
+ gtk_tree_selection_get_selected (selection,
+ &model,
+ &iter);
+ gtk_tree_model_get (model, &iter,
+ COLUMN_OBJECT, &scanner,
+ -1);
+
+ gnome_scan_job_set_scanner (priv->job, scanner);
+ gnome_scan_job_set_scanner (priv->preview_job, scanner);
+
+ g_timeout_add (10, (GSourceFunc) gsd_select_scanner_if_ready, dialog);
+}
+
+
+
+static gboolean
+gsd_select_scanner_if_ready (GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ GnomeScanner *scanner = gnome_scan_job_get_scanner (priv->job);
+ if (gnome_scanner_get_status (scanner) != GNOME_SCANNER_READY) {
+ return TRUE;
+ }
+ else {
+ priv->scanner_changed_handler =
+ g_signal_connect (scanner, "params-changed",
+ (GCallback) gsd_plugin_params_changed,
+ gsd);
+
+
+ gsd_build_scanner_ui (gsd);
+ return FALSE;
+ }
+}
+
+static void
+gsd_build_sink_ui (GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ GnomeScanSink *sink = gnome_scan_job_get_sink (priv->job);
+ GSList *node, *groups = NULL;
+
+ gsd_build_group_box (gsd, priv->general_page,
+ GTK_BOX (priv->front_sink_box),
+ GNOME_SCAN_PLUGIN (sink),
+ GS_PARAM_GROUP_SINK_FRONT);
+
+ groups = gnome_scan_plugin_params_get_other_groups (GNOME_SCAN_PLUGIN (sink),
+ GS_PARAM_GROUP_SINK_FRONT,
+ GS_PARAM_GROUP_HIDDEN,
+ 0);
+ for (node = groups; node ; node = node->next) {
+ gsd_build_group_box (gsd, priv->sink_page,
+ GTK_BOX (priv->sink_box),
+ GNOME_SCAN_PLUGIN (sink),
+ (GQuark) node->data);
+ }
+
+ gnome_scan_plugin_params_foreach (GNOME_SCAN_PLUGIN (sink),
+ (GFunc) gsd_show_hide_param_widget,
+ gsd);
+ g_signal_connect (sink, "params-changed",
+ (GCallback) gsd_plugin_params_changed,
+ gsd);
+
+}
+
+
+static void
+gsd_build_scanner_ui (GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ GtkWidget *widget;
+ GSList *node, *groups = NULL;
+ GList *params;
+ GnomeScanner *scanner = gnome_scan_job_get_scanner (priv->job);
+
+ /* front box */
+ gsd_build_group_box (gsd, priv->front_scanner_box,
+ GTK_BOX (priv->front_scanner_box),
+ GNOME_SCAN_PLUGIN (scanner),
+ GS_PARAM_GROUP_FORMAT);
+
+ gsd_build_group_box (gsd, priv->front_scanner_box,
+ GTK_BOX (priv->front_scanner_box),
+ GNOME_SCAN_PLUGIN (scanner),
+ GS_PARAM_GROUP_SCANNER_FRONT);
+ /* preview */
+ if (node = gnome_scan_plugin_get_param_group (GNOME_SCAN_PLUGIN (scanner), GS_PARAM_GROUP_PREVIEW)) {
+ gsd_preview_scanner_selected (gsd);
+ GTK_WIDGET_SET_VISIBLE (priv->preview_page, TRUE);
+ }
+ else {
+ GTK_WIDGET_SET_VISIBLE (priv->preview_page, FALSE);
+ }
+
+ /* advanced */
+
+ /* That's ugly to use a scrolled window while the dialog has enough place for
+ e.g. 3 options. So we use a scrolled window only beginning with an arbitrary
+ amount of options. Otherwise, we pack directly the box in the notebook.
+ TODO: count only advanced options. */
+
+ params = gnome_scan_plugin_get_params (GNOME_SCAN_PLUGIN (scanner));
+
+ /* clean advanced tab */
+ widget = gtk_bin_get_child (GTK_BIN (priv->advanced_page));
+ if (widget)
+ gtk_widget_destroy (widget);
+
+ /* create the containing box */
+ priv->advanced_box = gtk_vbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (priv->advanced_box), 6);
+
+ /* determine which widget is the root of the page. 12 is completely arbitrary,
+ waiting for "dialog is too big" bug report */
+ if (g_list_length (params) > 12) {
+ priv->advanced_container = gtk_scrolled_window_new (NULL, NULL);
+ gtk_container_set_border_width (GTK_CONTAINER (priv->advanced_container), 12);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->advanced_container),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (priv->advanced_container),
+ priv->advanced_box);
+ }
+ else {
+ priv->advanced_container = priv->advanced_box;
+ }
+
+ gtk_container_add (GTK_CONTAINER (priv->advanced_page),
+ priv->advanced_container);
+
+ gtk_widget_realize (priv->advanced_page);
+
+ /* get unknown groups, trim manually handled groups */
+ groups = gnome_scan_plugin_params_get_other_groups (GNOME_SCAN_PLUGIN (scanner),
+ GS_PARAM_GROUP_SCANNER_FRONT,
+ GS_PARAM_GROUP_PREVIEW,
+ GS_PARAM_GROUP_FORMAT,
+ GS_PARAM_GROUP_HIDDEN,
+ 0);
+
+ /* build each group in the advanced page */
+ for (node = groups; node ; node = node->next) {
+ gsd_build_group_box (gsd, priv->advanced_page,
+ GTK_BOX (priv->advanced_box),
+ GNOME_SCAN_PLUGIN (scanner),
+ (GQuark) node->data);
+ }
+
+ gnome_scan_plugin_params_foreach (GNOME_SCAN_PLUGIN (scanner),
+ (GFunc) gsd_show_hide_param_widget,
+ gsd);
+}
+
+
+static void
+gsd_update_scanner_ui (GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ GnomeScanner *scanner = gnome_scan_job_get_scanner (priv->job);
+
+ gnome_scan_plugin_params_foreach (GNOME_SCAN_PLUGIN (scanner),
+ (GFunc) gsd_show_hide_param_widget,
+ gsd);
+}
+
+/* PROCESSING */
+
+static void
+gsd_build_processing_ui(GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ GSList *proc;
+ proc = gnome_scan_job_get_processors (priv->job);
+ GSList *node, *groups = NULL;
+
+ /* loop each processor and add options */
+ for (; proc; proc = proc->next) {
+ groups = gnome_scan_plugin_params_get_other_groups (GNOME_SCAN_PLUGIN (proc->data),
+ GS_PARAM_GROUP_PREVIEW,
+ GS_PARAM_GROUP_HIDDEN,
+ 0);
+ for (node = groups; node ; node = node->next) {
+ gsd_build_group_box (gsd, priv->processing_page,
+ GTK_BOX (priv->processing_box),
+ GNOME_SCAN_PLUGIN (proc->data),
+ (GQuark) node->data);
+ }
+ gnome_scan_plugin_params_foreach (GNOME_SCAN_PLUGIN (proc->data),
+ (GFunc) gsd_show_hide_param_widget,
+ gsd);
+ g_signal_connect (GNOME_SCAN_PLUGIN(proc->data), "params-changed",
+ (GCallback) gsd_plugin_params_changed,
+ gsd);
+ }
+}
+
+/* PREVIEW */
+
+static void
+gsd_preview_scanner_selected (GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ GtkWidget*widget = GTK_WIDGET (gsd);
+ GParamSpec *pspec;
+ GSParamSpecPaperSize *psps;
+ GtkPaperSize *ps;
+ GnomeScanner *scanner;
+ GdkPixbuf *pixbuf;
+ GnomeScanPreviewPlugin *plugin;
+ GSList *node = NULL, *node0 = NULL;
+ GType type;
+ gboolean first = TRUE;
+
+ /* add buttons */
+ scanner = gnome_scan_job_get_scanner (priv->job);
+ node0 = gnome_scan_plugin_get_param_group (GNOME_SCAN_PLUGIN (scanner),
+ GS_PARAM_GROUP_PREVIEW);
+
+ for (node = gnome_scan_job_get_processors (priv->job); node; node = node->next) {
+ node0 = g_slist_concat(node0,
+ gnome_scan_plugin_get_param_group (GNOME_SCAN_PLUGIN(node->data),
+ GS_PARAM_GROUP_PREVIEW));
+ }
+
+ for (node = node0; node ; node = node->next) {
+ pspec = node->data;
+ type = gs_param_spec_get_widget_type (pspec);
+ g_debug("new preview plugin : %s", g_type_name(type));
+ plugin = gnome_scan_preview_plugin (type,
+ GNOME_SCAN_PLUGIN (scanner),
+ pspec,
+ priv->preview_area,
+ gnome_scan_job_get_settings (priv->job),
+ GTK_BOX (priv->preview_bbox));
+ g_param_spec_set_qdata (pspec, GSD_PLUGIN_QUARK, plugin);
+
+ if (first)
+ gnome_scan_preview_area_select_plugin (GNOME_SCAN_PREVIEW_AREA (priv->preview_area),
+ plugin);
+ first = FALSE;
+ }
+
+ /* create empty preview */
+ pspec = gnome_scan_plugin_params_lookup (GNOME_SCAN_PLUGIN (scanner),
+ "paper-size");
+ psps = GS_PARAM_SPEC_PAPER_SIZE (pspec);
+ ps = psps->enumeration->next->data;
+ gint width = (gint) gs_convert (gtk_paper_size_get_width (ps, GTK_UNIT_MM), GS_UNIT_MM, GS_UNIT_PIXEL, PREVIEW_RES);
+ gint height = (gint) gs_convert (gtk_paper_size_get_height (ps, GTK_UNIT_MM), GS_UNIT_MM, GS_UNIT_PIXEL, PREVIEW_RES);
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
+ FALSE, 8,
+ width,
+ height);
+ /* transform a 24bit RGB pixel to 32bit RGBApixel */
+ guint32 pixel = (widget->style->bg[GTK_WIDGET_STATE (widget)].pixel << 8) | 0x000000FF;
+ gdk_pixbuf_fill (pixbuf, pixel);
+ /* TODO: put a nice icon, back in gnome-scan 0.4 ;) */
+ gnome_scan_preview_area_set_pixbuf (GNOME_SCAN_PREVIEW_AREA (priv->preview_area),
+ pixbuf,
+ PREVIEW_RES);
+ g_object_unref (G_OBJECT (pixbuf));
+}
+
+static gboolean
+gsd_preview_end_refresh (GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ GnomeScanPreviewSink *sink = GNOME_SCAN_PREVIEW_SINK (gnome_scan_job_get_sink (priv->preview_job));
+ GnomeScanSettings *settings = gnome_scan_job_get_settings (priv->preview_job);
+
+ /* first, restore settings */
+ gnome_scan_settings_set_boolean (settings, "preview", FALSE);
+ gnome_scan_settings_set (settings, "resolution", priv->saved_res);
+
+ /* restore UI */
+ GTK_WIDGET_SET_VISIBLE (priv->preview_acquisition_box, FALSE);
+ GTK_WIDGET_SET_VISIBLE (priv->preview_box, TRUE);
+
+ /* then, update preview. */
+ GdkPixbuf *pixbuf = gnome_scan_preview_sink_get_pixbuf (sink);
+ if (!GDK_IS_PIXBUF (pixbuf)) {
+ g_warning (G_STRLOC ": preview failed");
+ return FALSE;
+ }
+
+ gnome_scan_preview_area_set_pixbuf (GNOME_SCAN_PREVIEW_AREA (priv->preview_area),
+ pixbuf,
+ PREVIEW_RES);
+ return FALSE;
+}
+
+static gboolean
+gsd_preview_monitor (GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (priv->preview_progress),
+ priv->preview_job->progress);
+ gtk_label_set_markup (GTK_LABEL (priv->preview_stage),
+ g_strdup_printf ("<i>%s</i>", priv->preview_job->stage));
+
+ if (priv->preview_job->progress == 1.)
+ g_idle_add ((GSourceFunc) gsd_preview_end_refresh, gsd);
+
+ return (priv->preview_job->progress < 1.);
+}
+
+static void
+gsd_preview_refresh (GtkButton *button, GnomeScanDialog *gsd)
+{
+ static GdkPoint origin = {0, 0};
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ GError *error = NULL;
+ GValue *value;
+ GParamSpec *pspec;
+ GnomeScanSettings *settings = gnome_scan_job_get_settings (priv->preview_job);
+ GnomeScanner *scanner = gnome_scan_job_get_scanner (priv->preview_job);
+
+ GTK_WIDGET_SET_VISIBLE(priv->preview_acquisition_box, TRUE);
+ GTK_WIDGET_SET_VISIBLE(priv->preview_box, FALSE);
+
+ /* CONFIGURE */
+
+ /* USE hard coded RESOLUTION */
+ priv->saved_res = gnome_scan_settings_get (settings, "resolution");
+ /* transform to int or double */
+ pspec = gnome_scan_plugin_params_lookup (GNOME_SCAN_PLUGIN (scanner), "resolution");
+ value = g_new0 (GValue, 1);
+ g_value_init (value, G_PARAM_SPEC_VALUE_TYPE (pspec));
+ g_param_value_set_default (pspec, value);
+ g_value_transform (priv->preview_res, value);
+ gnome_scan_settings_set (settings, "resolution", value);
+ g_value_unset (value);
+ g_free (value);
+ /* asking preview mode */
+ gnome_scan_settings_set_boolean (settings, "preview", TRUE);
+
+ gnome_scan_job_configure (priv->preview_job);
+
+ /* TRIGGER */
+ g_timeout_add (42, (GSourceFunc) gsd_preview_monitor, gsd);
+ g_thread_create ((GThreadFunc) gnome_scan_job_run_once,
+ priv->preview_job, FALSE, &error);
+}
+
+
+
+static void
+gsd_preview_cancel_refresh (GtkButton *button, GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+
+ gnome_scan_job_cancel (priv->preview_job);
+ GTK_WIDGET_SET_VISIBLE (priv->preview_acquisition_box, FALSE);
+ GTK_WIDGET_SET_VISIBLE (priv->preview_box, TRUE);
+}
+
+
+static void
+gsd_build_preview_ui (GnomeScanDialog *gsd)
+{
+ GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
+ GtkWidget *box, *hbox, *vbox, *alignment, *child, *scrolled;
+
+ /* acquisition "dialog" */
+ priv->preview_acquisition_box = alignment = gtk_alignment_new (.5, .5, 0., 0.);
+ gtk_box_pack_start (GTK_BOX (priv->preview_page), alignment, TRUE, FALSE, 0);
+
+ box = gtk_vbox_new (FALSE, 6);
+ gtk_container_add (GTK_CONTAINER (alignment), box);
+
+ hbox = gtk_hbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0);
+
+ child = gtk_image_new_from_icon_name ("scan-preview", GTK_ICON_SIZE_DIALOG);
+ gtk_box_pack_start (GTK_BOX (hbox), child, FALSE, FALSE, 0);
+
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, FALSE, 0);
+
+ child = gtk_label_new (NULL);
+ gtk_misc_set_alignment (GTK_MISC (child), 0., .5);
+ gtk_label_set_markup (GTK_LABEL (child),
+ g_strconcat ("<big><b>",
+ _("Acquiring Preview"),
+ "</b></big>",
+ NULL));
+ gtk_box_pack_start (GTK_BOX (vbox), child, FALSE, FALSE, 0);
+
+ child = gtk_label_new (_("The software preview acquisition and processing."));
+ gtk_misc_set_alignment (GTK_MISC (child), 0., .5);
+ gtk_box_pack_start (GTK_BOX (vbox), child, FALSE, FALSE, 0);
+
+ priv->preview_progress = gtk_progress_bar_new ();
+ gtk_box_pack_start (GTK_BOX (box), priv->preview_progress, FALSE, FALSE, 0);
+
+ priv->preview_stage = gtk_label_new (NULL);
+ gtk_misc_set_alignment (GTK_MISC (priv->preview_stage), 0., .5);
+ gtk_label_set_markup (GTK_LABEL (priv->preview_stage),
+ /* translator: initial state before preview begin. */
+ g_strconcat("<i>", _("Inactive"), "</i>", NULL));
+ gtk_box_pack_start (GTK_BOX (box), priv->preview_stage, FALSE, FALSE, 0);
+
+ hbox = gtk_hbutton_box_new ();
+ gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, TRUE, 0);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox),
+ GTK_BUTTONBOX_END);
+
+ child = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
+ g_signal_connect (child, "clicked",
+ (GCallback) gsd_preview_cancel_refresh,
+ gsd);
+ gtk_container_add (GTK_CONTAINER (hbox), child);
+
+
+ /* preview dialog */
+ priv->preview_box = box = gtk_hbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (priv->preview_page), box, TRUE, TRUE, 0);
+
+ scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+ gtk_box_pack_start (GTK_BOX (box), scrolled, TRUE, TRUE, 0);
+
+ priv->preview_area = gnome_scan_preview_area_new ();
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
+ priv->preview_area);
+
+ priv->preview_bbox = vbox = gtk_vbutton_box_new ();
+ gtk_box_set_spacing (GTK_BOX (vbox), 4);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (vbox),
+ GTK_BUTTONBOX_START);
+ gtk_box_pack_start (GTK_BOX (box), vbox, FALSE, TRUE, 0);
+
+ child = gtk_button_new_from_stock (GTK_STOCK_REFRESH);
+ gtk_container_add (GTK_CONTAINER (vbox), child);
+ g_signal_connect (child, "clicked",
+ (GCallback) gsd_preview_refresh,
+ gsd);
+
+ GTK_WIDGET_SET_VISIBLE (priv->preview_acquisition_box, FALSE);
+ GTK_WIDGET_SET_VISIBLE (priv->preview_box, TRUE);
+}
+
diff --git a/trunk/lib/gnome-scan-dialog.h b/trunk/lib/gnome-scan-dialog.h
new file mode 100644
index 0000000..0b94353
--- /dev/null
+++ b/trunk/lib/gnome-scan-dialog.h
@@ -0,0 +1,68 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_DIALOG_H_
+#define _GNOME_SCAN_DIALOG_H_
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include "gnome-scan-job.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_DIALOG (gnome_scan_dialog_get_type ())
+#define GNOME_SCAN_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_DIALOG, GnomeScanDialog))
+#define GNOME_SCAN_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_DIALOG, GnomeScanDialogClass))
+#define GNOME_IS_SCAN_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_DIALOG))
+#define GNOME_IS_SCAN_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_DIALOG))
+#define GNOME_SCAN_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_DIALOG, GnomeScanDialogClass))
+
+typedef struct _GnomeScanDialogClass GnomeScanDialogClass;
+typedef struct _GnomeScanDialog GnomeScanDialog;
+
+struct _GnomeScanDialogClass
+{
+ GtkDialogClass parent_class;
+};
+
+/**
+ * GnomeScanDialog:
+ *
+ * The #GnomeScanDialog is an autofilled #GtkDialog that present a
+ * graphical interface consistent with #GtkPrintUnixDialog available
+ * Gtk+ since 2.10, but intirely adapted to scanning. You should not
+ * touch #GtkDialog vbox, however, if you want to add a About button
+ * or similar, use #GtkDialog action_area.
+ **/
+struct _GnomeScanDialog
+{
+ /*< private >*/
+ GtkDialog parent_instance;
+};
+
+GType gnome_scan_dialog_get_type (void) G_GNUC_CONST;
+GtkWidget* gnome_scan_dialog_new (GtkWindow *parent,
+ GnomeScanJob *job);
+void gnome_scan_dialog_run (GnomeScanDialog *dialog);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_DIALOG_H_ */
diff --git a/trunk/lib/gnome-scan-enum-widget.c b/trunk/lib/gnome-scan-enum-widget.c
new file mode 100644
index 0000000..70d65b0
--- /dev/null
+++ b/trunk/lib/gnome-scan-enum-widget.c
@@ -0,0 +1,157 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <glib/gi18n.h>
+#include "gnome-scan-enum-widget.h"
+#include "gnome-scan-param-specs.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_ENUM_WIDGET, GnomeScanEnumWidgetPrivate))
+
+typedef struct _GnomeScanEnumWidgetPrivate GnomeScanEnumWidgetPrivate;
+struct _GnomeScanEnumWidgetPrivate
+{
+ GtkWidget* combo;
+ GtkListStore* liststore;
+};
+
+enum
+{
+ ENUM_LABEL,
+ ENUM_VALUE,
+ ENUM_N_COLUMNS
+};
+
+
+static void gsew_selected (GtkComboBox *combo, GnomeScanEnumWidget *gspw);
+
+GS_DEFINE_PARAM_WIDGET (GnomeScanEnumWidget, gnome_scan_enum_widget);
+
+static void
+gnome_scan_enum_widget_init (GnomeScanEnumWidget *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gnome_scan_enum_widget_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gnome_scan_enum_widget_parent_class)->finalize (object);
+}
+
+
+
+static void
+gnome_scan_enum_widget_build (GnomeScanParamWidget *gspw)
+{
+ GnomeScanEnumWidgetPrivate *priv = GET_PRIVATE (gspw);
+ GtkCellRenderer *renderer;
+ GtkTreeIter iter;
+ GValueArray *values = GS_PARAM_SPEC_ENUM (gspw->pspec)->values;
+ GValue *label;
+ const gchar *slabel;
+ gint i;
+
+
+ priv->liststore = gtk_list_store_new (ENUM_N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_VALUE);
+ priv->combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (priv->liststore));
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->combo), renderer, TRUE);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->combo), renderer,
+ "text", ENUM_LABEL);
+
+ gtk_box_pack_start (GTK_BOX (gspw), priv->combo, FALSE, FALSE, 0);
+
+ /* available values */
+ label = g_new0 (GValue, 1);
+ g_value_init (label, G_TYPE_STRING);
+ for (i = 0; i < values->n_values; i++) {
+
+ if (G_VALUE_HOLDS_STRING (values->values+i)) {
+ slabel = dgettext (gs_param_spec_get_domain (gspw->pspec),
+ g_value_get_string (values->values+i));
+ }
+ else {
+ g_value_transform ((values->values+i), label);
+ slabel = g_value_get_string(label);
+ }
+
+ gtk_list_store_append (priv->liststore, &iter);
+ gtk_list_store_set (priv->liststore, &iter,
+ ENUM_LABEL, slabel,
+ ENUM_VALUE, (values->values+i),
+ -1);
+ }
+ g_value_unset (label);
+ g_free (label);
+
+ g_signal_connect (priv->combo, "changed",
+ (GCallback) gsew_selected,
+ GNOME_SCAN_ENUM_WIDGET (gspw));
+
+}
+
+static void
+gnome_scan_enum_widget_set (GnomeScanParamWidget *gspw, GValue *value)
+{
+ GnomeScanEnumWidgetPrivate *priv = GET_PRIVATE (gspw);
+ GtkTreeIter iter;
+ GValue *test_value;
+
+ gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->liststore), &iter);
+ for (; gtk_list_store_iter_is_valid (priv->liststore, &iter)
+ ; gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->liststore), &iter)) {
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->liststore), &iter,
+ ENUM_VALUE, &test_value,
+ -1);
+ if (gs_param_values_cmp (gspw->pspec, value, test_value) == 0) {
+ gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->combo),
+ &iter);
+ break;
+ }
+ }
+}
+
+
+static void
+gsew_selected (GtkComboBox *combo, GnomeScanEnumWidget *gsew)
+{
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (gsew);
+ GnomeScanEnumWidgetPrivate *priv = GET_PRIVATE (gsew);
+ GtkTreeIter iter;
+ GValue *value;
+
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->combo), &iter);
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->liststore), &iter,
+ ENUM_VALUE, &value,
+ -1);
+
+ g_value_copy (value, gspw->value);
+ gnome_scan_param_widget_changed (gspw);
+}
+
+
+
diff --git a/trunk/lib/gnome-scan-enum-widget.h b/trunk/lib/gnome-scan-enum-widget.h
new file mode 100644
index 0000000..203603c
--- /dev/null
+++ b/trunk/lib/gnome-scan-enum-widget.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_ENUM_WIDGET_H_
+#define _GNOME_SCAN_ENUM_WIDGET_H_
+
+#include <glib-object.h>
+#include "gnome-scan-param-widget.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_ENUM_WIDGET (gnome_scan_enum_widget_get_type ())
+#define GNOME_SCAN_ENUM_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_ENUM_WIDGET, GnomeScanEnumWidget))
+#define GNOME_SCAN_ENUM_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_ENUM_WIDGET, GnomeScanEnumWidgetClass))
+#define GNOME_IS_SCAN_ENUM_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_ENUM_WIDGET))
+#define GNOME_IS_SCAN_ENUM_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_ENUM_WIDGET))
+#define GNOME_SCAN_ENUM_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_ENUM_WIDGET, GnomeScanEnumWidgetClass))
+
+typedef struct _GnomeScanEnumWidget GnomeScanEnumWidget;
+struct _GnomeScanEnumWidget
+{
+ GnomeScanParamWidget parent_instance;
+};
+
+GS_DEFINE_PARAM_WIDGET_HEADER (GnomeScanEnumWidget, gnome_scan_enum_widget);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_ENUM_WIDGET_H_ */
diff --git a/trunk/lib/gnome-scan-init.c b/trunk/lib/gnome-scan-init.c
new file mode 100644
index 0000000..4a3ec48
--- /dev/null
+++ b/trunk/lib/gnome-scan-init.c
@@ -0,0 +1,129 @@
+/*-*- c -*-*/
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-init
+ * @title: Init and loading
+ * @short_description: Module loading and various registration
+ * @include: gnome-scan.h
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gegl.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+#include "gnome-scan-init.h"
+#include "gnome-scan-module-manager.h"
+
+static GnomeScanModuleManager *module_manager = NULL;
+static GtkIconFactory *factory = NULL;
+
+static GtkStockItem items[] = {
+ { GS_STOCK_SCAN,
+ N_("_Scan"),
+ 0, /* modifier */
+ 0, /* keyval */
+ GETTEXT_PACKAGE }
+};
+
+/**
+ * gnome_scan_init:
+ * @argc: a pointer to arg count
+ * @argv: a pointer to arg values.
+ *
+ * This function must be called before any other gnome_scan
+ * function. It initialize #GnomeScanModules and register various
+ * stuffs like #GtkStockItem, etc.
+ **/
+void
+gnome_scan_init (gint *argc, gchar ***argv)
+{
+ g_debug ("Initializing %s for %s (%s)",
+ PACKAGE_STRING,
+ g_get_application_name(),
+ g_get_prgname());
+ gchar *path;
+ guint i, n_items;
+ n_items = G_N_ELEMENTS (items);
+ GtkIconSet *set;
+ GtkIconSource *source;
+ gchar* filename;
+
+ gegl_init (argc, argv);
+
+ /* load modules */
+ path = g_strjoin (G_SEARCHPATH_SEPARATOR_S,
+ MODULE_DIR, "modules", "../modules", NULL);
+
+ module_manager = gnome_scan_module_manager_new (path);
+ gnome_scan_module_manager_query_modules (module_manager);
+
+ /* init i18n */
+ bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+
+ /* add stock items */
+ gtk_stock_add_static (items, n_items);
+
+ factory = gtk_icon_factory_new ();
+ for (i = 0; i < n_items; i++) {
+ set = gtk_icon_set_new ();
+ filename = g_build_filename (ICON_DIR,
+ "scalable",
+ "actions",
+ g_strconcat (items[i].stock_id,
+ ".svg", NULL),
+ NULL);
+ source = gtk_icon_source_new ();
+ gtk_icon_source_set_icon_name (source, items[i].stock_id);
+ gtk_icon_source_set_direction_wildcarded (source, TRUE);
+ gtk_icon_source_set_size_wildcarded (source, TRUE);
+ gtk_icon_source_set_state_wildcarded (source, TRUE);
+ gtk_icon_set_add_source (set, source);
+ gtk_icon_source_free (source);
+ gtk_icon_factory_add (factory,
+ items[i].stock_id,
+ set);
+ gtk_icon_set_unref (set);
+ }
+ gtk_icon_factory_add_default (factory);
+
+ gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+ ICON_DIR);
+}
+
+/**
+ * gnome_scan_exit:
+ *
+ * This function should be called once you're finished with gnome
+ * scan. It will unload modules, remove stock icons, exit
+ * dependencies, etc.
+ **/
+void
+gnome_scan_exit ()
+{
+ gtk_icon_factory_remove_default (factory);
+ g_object_unref (factory);
+ gegl_exit ();
+ gnome_scan_module_manager_unload_modules (module_manager);
+}
+
diff --git a/trunk/lib/gnome-scan-init.h b/trunk/lib/gnome-scan-init.h
new file mode 100644
index 0000000..b198919
--- /dev/null
+++ b/trunk/lib/gnome-scan-init.h
@@ -0,0 +1,36 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_INIT_H
+#define _GNOME_SCAN_INIT_H
+
+#include <glib-object.h>
+
+/**
+ * Stock item for scan action.
+ **/
+#define GS_STOCK_SCAN "scan"
+
+G_BEGIN_DECLS
+
+void gnome_scan_init (gint *argc, gchar ***argv);
+void gnome_scan_exit (void);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_INIT_H */
diff --git a/trunk/lib/gnome-scan-job.c b/trunk/lib/gnome-scan-job.c
new file mode 100644
index 0000000..e304889
--- /dev/null
+++ b/trunk/lib/gnome-scan-job.c
@@ -0,0 +1,575 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION: gnome-scan-job
+ * @short_description: Handling acquisition, processing and outputting
+ * @include: gnome-scan.h
+ *
+ * In Gnome Scan, the job of scanning is divided in three parts :
+ * acquiring, processing and outputting. The first stage is handled by
+ * #GnomeScanner plugin. The second is handled using
+ * #GeglOperation. The latter is handled by #GnomeScanSink plugin.
+ *
+ * The purpose of GnomeScanJob is to marshal the configuration and
+ * execution of these three part, allowing to easily delegate job
+ * execution in a worker thread.
+ **/
+#include <glib/gi18n.h>
+#include "gnome-scan-private.h"
+#include <gegl.h>
+#include "gnome-scan-processor-common.h"
+#include "gnome-scan-job.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), GNOME_TYPE_SCAN_JOB, GnomeScanJobPrivate))
+
+typedef struct _GnomeScanJobPrivate GnomeScanJobPrivate;
+
+struct _GnomeScanJobPrivate
+{
+ gboolean disposed;
+ GnomeScanSettings *settings;
+ GnomeScanner *scanner;
+ GSList *processors;
+ GnomeScanSink *sink;
+
+ GeglNode *root;
+ GeglNode *gegl_convert;
+ GeglNode *gegl_sink;
+ GList *nodes;
+ GeglProcessor *gegl_processor;
+ gboolean ready;
+};
+
+enum
+{
+ PROP_0,
+ PROP_SETTINGS,
+ PROP_SCANNER,
+ PROP_SINK
+};
+
+
+static GObjectClass* parent_class = NULL;
+
+G_DEFINE_TYPE (GnomeScanJob, gnome_scan_job, G_TYPE_OBJECT);
+
+static void
+gnome_scan_job_init (GnomeScanJob *object)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE (object);
+
+ priv->processors = NULL;
+ priv->settings = NULL;
+ priv->sink = NULL;
+}
+
+static void
+gnome_scan_job_dispose (GObject *object)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE(object);
+
+ if (!priv->disposed) {
+ g_object_unref(priv->settings);
+ g_object_unref(priv->sink);
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+gnome_scan_job_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_JOB (object));
+
+ switch (prop_id)
+ {
+ case PROP_SETTINGS:
+ gnome_scan_job_set_settings (GNOME_SCAN_JOB (object),
+ GNOME_SCAN_SETTINGS (g_value_get_object (value)));
+ break;
+ case PROP_SCANNER:
+ gnome_scan_job_set_scanner (GNOME_SCAN_JOB (object),
+ GNOME_SCANNER (g_value_get_object (value)));
+ break;
+ case PROP_SINK:
+ gnome_scan_job_set_sink (GNOME_SCAN_JOB (object),
+ GNOME_SCAN_SINK (g_value_get_object (value)));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_job_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_JOB (object));
+
+ switch (prop_id)
+ {
+ case PROP_SETTINGS:
+ g_value_set_object (value,
+ gnome_scan_job_get_settings (GNOME_SCAN_JOB (object)));
+ break;
+ case PROP_SCANNER:
+ g_value_set_object (value,
+ gnome_scan_job_get_scanner (GNOME_SCAN_JOB (object)));
+ break;
+ case PROP_SINK:
+ g_value_set_object (value,
+ gnome_scan_job_get_sink (GNOME_SCAN_JOB (object)));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_job_class_init (GnomeScanJobClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
+
+ g_type_class_add_private (klass, sizeof (GnomeScanJobPrivate));
+
+ object_class->dispose = gnome_scan_job_dispose;
+ object_class->set_property = gnome_scan_job_set_property;
+ object_class->get_property = gnome_scan_job_get_property;
+
+ /**
+ * GnomeScanJob:settings:
+ *
+ * The #GnomeScanSettings object containing all user settings for
+ * plugins.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_SETTINGS,
+ g_param_spec_object ("settings",
+ "Settings",
+ "The set of parameters value for scanner and sink plugin.",
+ GNOME_TYPE_SCAN_SETTINGS,
+ G_PARAM_READWRITE));
+
+ /**
+ * GnomeScanJob:scanner:
+ *
+ * The #GnomeScanner responsible of image acquisition.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_SCANNER,
+ g_param_spec_object ("scanner",
+ "Scanner",
+ "The input scanner used for this job.",
+ GNOME_TYPE_SCANNER,
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
+
+
+ /**
+ * GnomeScanJob:sink:
+ *
+ * The sink responsible to output acquired images.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_SINK,
+ g_param_spec_object ("sink",
+ "Sink",
+ "The sink responsible to connect the job to the application.",
+ GNOME_TYPE_SCAN_SINK,
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**
+ * gnome_scan_job_new:
+ * @settings: a #GnomeScanSettings or NULL
+ * @sink: the #GnomeScanSink
+ *
+ *
+ * Instanciate a new job. If @settings is null, a new
+ * #GnomeScanSettings is created.
+ *
+ * Returns: a new #GnomeScanJob
+ **/
+GnomeScanJob*
+gnome_scan_job_new (GnomeScanSettings *settings,
+ GnomeScanSink *sink)
+{
+ if (settings == NULL) {
+ settings = gnome_scan_settings_new();
+ }
+ else
+ g_object_ref(settings);
+
+ GObject *object = g_object_new (GNOME_TYPE_SCAN_JOB,
+ "settings", settings,
+ "sink", sink,
+ NULL);
+ g_object_unref(settings);
+
+ gnome_scan_job_add_processor (GNOME_SCAN_JOB(object),
+ gnome_scan_processor_common_new());
+
+ return GNOME_SCAN_JOB (object);
+}
+
+/**
+ * gnome_scan_job_set_settings:
+ * @job: a #GnomeScanJob
+ * @settings: a #GnomeScanSettings
+ *
+ * Set the settings for this job.
+ **/
+void
+gnome_scan_job_set_settings (GnomeScanJob *job,
+ GnomeScanSettings *settings)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE(job);
+
+ if (priv->settings)
+ g_object_unref(priv->settings);
+
+ priv->settings = g_object_ref(settings);
+}
+
+/**
+ * gnome_scan_job_get_settings:
+ * @job: a #GnomeScanJob
+ *
+ * Retrieve the settings used by the job.
+ *
+ * Returns: the @job #GnomeScanSettings
+ **/
+GnomeScanSettings*
+gnome_scan_job_get_settings (GnomeScanJob *job)
+{
+ return GET_PRIVATE (job)->settings;
+}
+
+
+/**
+ * gnome_scan_job_set_scanner:
+ * @job: a #GnomeScanJob
+ * @scanner: a #GnomeScanner
+ *
+ * Set the source of the acquisition.
+ **/
+void
+gnome_scan_job_set_scanner (GnomeScanJob *job, GnomeScanner *scanner)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE (job);
+
+ if (priv->scanner)
+ g_object_unref (priv->scanner);
+
+ priv->scanner = g_object_ref (scanner);
+}
+
+/**
+ * gnome_scan_job_get_scanner:
+ * @job: a #GnomeScanJob
+ *
+ * Retrieve the scanner used to acquire image.
+ *
+ * Returns: a #GnomeScanner
+ **/
+GnomeScanner*
+gnome_scan_job_get_scanner (GnomeScanJob *job)
+{
+ return GET_PRIVATE (job)->scanner;
+}
+
+/**
+ * gnome_scan_job_add_processor:
+ * @job: a #GnomeScanJob
+ * @processor: a #GnomeScanPlugin
+ *
+ * Add @processor as plugin for building the pipeline.
+ **/
+void
+gnome_scan_job_add_processor (GnomeScanJob *job,
+ GnomeScanPlugin *processor)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE(job);
+ priv->processors = g_slist_append(priv->processors, processor);
+}
+
+/**
+ * gnome_scan_job_get_processors:
+ * @job: a #GnomeScanJob
+ *
+ * Returns: the list of processors
+ */
+GSList*
+gnome_scan_job_get_processors (GnomeScanJob *job)
+{
+ return GET_PRIVATE(job)->processors;
+}
+
+/**
+ * gnome_scan_job_set_sink:
+ * @job: a #GnomeScanJob
+ * @sink: a #GnomeScanSink
+ *
+ * Set the scan sink.
+ **/
+void
+gnome_scan_job_set_sink (GnomeScanJob *job,
+ GnomeScanSink *sink)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE(job);
+
+ if (priv->sink)
+ g_object_unref(priv->sink);
+
+ priv->sink = g_object_ref(sink);
+}
+
+/**
+ * gnome_scan_job_get_sink:
+ * @job: a #GnomeScanJob
+ *
+ * Retrieve the sink used to output acquired image.
+ *
+ * Returns: a #GnomeScanSink
+ **/
+GnomeScanSink*
+gnome_scan_job_get_sink (GnomeScanJob *job)
+{
+ return GET_PRIVATE (job)->sink;
+}
+
+/**
+ * gnome_scan_job_configure:
+ * @job: a #GnomeScanJob
+ *
+ * Must be called before running @job. This will ask @job plugins to
+ * read their settings from :settings in order to bear ready for
+ * processing images.
+ **/
+void
+gnome_scan_job_configure (GnomeScanJob *job)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE (job);
+
+ job->done = FALSE;
+ job->stage = _("Configuring");
+ job->progress = 0.;
+
+ gnome_scan_plugin_configure (GNOME_SCAN_PLUGIN (priv->scanner),
+ priv->settings);
+ gnome_scan_plugin_configure (GNOME_SCAN_PLUGIN (priv->sink),
+ priv->settings);
+
+ priv->ready = TRUE;
+}
+
+void
+gsj_build_pipeline(GnomeScanJob *job)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE(job);
+ GList *node, *node0;
+ GSList *snode;
+ GeglNode *root;
+ gchar *op0, *op1;
+
+ priv->root = root = gegl_node_new();
+ /* scanner */
+ node0 = node = gnome_scan_plugin_get_child_nodes (GNOME_SCAN_PLUGIN (priv->scanner),
+ root);
+ /* processing */
+ for (snode = priv->processors; snode; snode = snode->next) {
+ gnome_scan_plugin_configure(GNOME_SCAN_PLUGIN(snode->data), priv->settings);
+ node = g_list_concat (node,
+ gnome_scan_plugin_get_child_nodes (GNOME_SCAN_PLUGIN (snode->data),
+ root));
+ }
+
+ /* convert */
+ priv->gegl_convert = gegl_node_new_child(root,
+ "operation", "convert-format",
+ NULL);
+ node = g_list_append (node, priv->gegl_convert);
+
+ /* sink */
+ node = g_list_concat (node,
+ gnome_scan_plugin_get_child_nodes (GNOME_SCAN_PLUGIN (priv->sink),
+ root));
+
+ for (node = node0; node->next ; node = node->next) {
+ gegl_node_get (node->data, "operation", &op0, NULL);
+ gegl_node_get (node->next->data, "operation", &op1, NULL);
+ g_debug ("Connecting %s to %s", op0, op1);
+ g_free (op0);
+ g_free (op1);
+ gegl_node_connect_to (node->data, "output",
+ node->next->data, "input");
+ }
+
+ priv->gegl_sink = g_object_ref(node->data);
+ priv->nodes = node0;
+}
+
+void
+gsj_destroy_pipeline(GnomeScanJob *job)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE(job);
+
+ if (!priv->root)
+ return;
+
+ g_object_unref(priv->root);
+ priv->root = NULL;
+ g_list_free(priv->nodes);
+ priv->nodes = NULL;
+}
+
+/**
+ * gnome_scan_job_run:
+ * @job: a #GnomeScanJob
+ *
+ * Configure, iterate each part of the job and monitor task
+ * progress. You should call this function in a new thread. Ideally,
+ * you should never use this function directly and use
+ * #GnomeScanAcquisitionDialog instead.
+ *
+ * See: gnome_scan_job_run_once(), #GnomeScanAcquisitionDialog or g_thread_create()
+ **/
+void
+gnome_scan_job_run (GnomeScanJob *job)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE (job);
+ job->stop = FALSE;
+
+ /* acquire */
+ gint count = 0;
+
+ while (gnome_scan_job_run_once (job))
+ count++;
+
+ /* unconfigure */
+ gnome_scan_plugin_end_scan (GNOME_SCAN_PLUGIN (priv->sink));
+
+ /* finish */
+ job->progress = 1.;
+ job->stage = _("Job completed");
+ job->done = TRUE;
+}
+
+/**
+ * gnome_scan_job_run_once:
+ * @job: a #GnomeScanJob
+ *
+ * Acquire one image and process it, updated job progress, stage,
+ * etc. Can be stop at any time using gnome_scan_job_cancel().
+ **/
+gboolean
+gnome_scan_job_run_once (GnomeScanJob *job)
+{
+ GnomeScanJobPrivate *priv = GET_PRIVATE (job);
+ gdouble progress = 0.;
+
+#define stop(job) if(job->stop){gsj_destroy_pipeline(job);return FALSE;}
+
+ job->stage = _("Waiting for device");
+
+ gsj_build_pipeline(job);
+
+ if (!gnome_scan_plugin_start_frame (GNOME_SCAN_PLUGIN (priv->scanner))) {
+ gsj_destroy_pipeline(job);
+ return FALSE;
+ }
+
+ gegl_node_set (priv->gegl_convert,
+ "format", gnome_scanner_get_output_format (priv->scanner),
+ NULL);
+
+ job->stage = _("Acquiring from scanner");
+
+ while (!job->stop && gnome_scan_plugin_work (GNOME_SCAN_PLUGIN (priv->scanner), &progress)) {
+ job->progress = progress / 3;
+ }
+
+ stop(job);
+
+ /* configure the pipeline just before launching process. */
+ gnome_scan_plugin_end_frame (GNOME_SCAN_PLUGIN (priv->scanner));
+ gnome_scan_plugin_configure_frame (GNOME_SCAN_PLUGIN (priv->sink));
+
+ /* process */
+ job->progress = .33;
+ job->stage = _("Processing page");
+ progress = 0.;
+
+ GeglProcessor *processor = gegl_node_new_processor (priv->gegl_sink, NULL);
+ while (!job->stop && gegl_processor_work (processor, &progress)) {
+ job->progress = .33 + progress / 3;
+ }
+ gegl_processor_destroy (processor);
+
+ stop(job);
+
+ /* sink */
+ job->progress = .66;
+ job->stage = _("Outputting page");
+ progress = 0.;
+
+ if (!gnome_scan_plugin_start_frame (GNOME_SCAN_PLUGIN (priv->sink))) {
+ gsj_destroy_pipeline(job);
+ return FALSE;
+ }
+
+ while (!job->stop && gnome_scan_plugin_work (GNOME_SCAN_PLUGIN (priv->sink), &progress)) {
+ job->progress = .66 + progress / 3;
+ }
+
+ stop(job);
+
+ gnome_scan_plugin_end_frame (GNOME_SCAN_PLUGIN (priv->sink));
+
+ job->progress = 1.;
+
+ gsj_destroy_pipeline(job);
+
+#undef stop
+
+ return TRUE;
+}
+
+/**
+ * gnome_scan_job_cancel:
+ * @job: a running #GnomeScanJob
+ *
+ * Ask the job to stop. The function returns immediatly, however the
+ * job will actually stop as soon as possible.
+ **/
+void
+gnome_scan_job_cancel (GnomeScanJob *job)
+{
+ job->stop = TRUE;
+}
+
diff --git a/trunk/lib/gnome-scan-job.h b/trunk/lib/gnome-scan-job.h
new file mode 100644
index 0000000..f35b53e
--- /dev/null
+++ b/trunk/lib/gnome-scan-job.h
@@ -0,0 +1,108 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_JOB_H_
+#define _GNOME_SCAN_JOB_H_
+
+#include <glib-object.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include "gnome-scan-settings.h"
+#include "gnome-scanner.h"
+#include "gnome-scan-sink.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_JOB (gnome_scan_job_get_type ())
+#define GNOME_SCAN_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_JOB, GnomeScanJob))
+#define GNOME_SCAN_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_JOB, GnomeScanJobClass))
+#define GNOME_IS_SCAN_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_JOB))
+#define GNOME_IS_SCAN_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_JOB))
+#define GNOME_SCAN_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_JOB, GnomeScanJobClass))
+
+typedef struct _GnomeScanJobClass GnomeScanJobClass;
+typedef struct _GnomeScanJob GnomeScanJob;
+
+struct _GnomeScanJobClass
+{
+ GObjectClass parent_class;
+};
+
+/**
+ * GnomeScanJob:
+ * @progress: a fraction indicating the progress of the execution
+ * (from 0 to 1)
+ * @stage: a description of the current stage being executed.
+ *
+ *
+ * A #GnomeScanJob object handle the acquisition, processing and
+ * outputing of images. Use gnome_scan_job_run() to execute the
+ * job. During its execution, the job will fill @progress and @stage
+ * in order you to know what he is doing. This way, the main thread
+ * can know what the worker thread is doing.
+ **/
+struct _GnomeScanJob
+{
+ /*< private >*/
+ GObject parent_instance;
+
+ gboolean stop;
+ /*< public >*/
+ gdouble progress;
+ gchar* stage;
+ gboolean done;
+};
+
+GType gnome_scan_job_get_type (void) G_GNUC_CONST;
+GnomeScanJob*
+gnome_scan_job_new (GnomeScanSettings *settings,
+ GnomeScanSink *sink);
+
+void gnome_scan_job_set_settings (GnomeScanJob *job,
+ GnomeScanSettings *settings);
+GnomeScanSettings*
+ gnome_scan_job_get_settings (GnomeScanJob *job);
+
+void gnome_scan_job_set_scanner (GnomeScanJob *job,
+ GnomeScanner *scanner);
+GnomeScanner*
+ gnome_scan_job_get_scanner (GnomeScanJob *job);
+
+void gnome_scan_job_add_processor (GnomeScanJob *job,
+ GnomeScanPlugin *processor);
+
+GSList* gnome_scan_job_get_processors (GnomeScanJob *job);
+
+void gnome_scan_job_set_sink (GnomeScanJob *job,
+ GnomeScanSink *sink);
+GnomeScanSink*
+ gnome_scan_job_get_sink (GnomeScanJob *job);
+
+void gnome_scan_job_configure (GnomeScanJob *job);
+void gnome_scan_job_run (GnomeScanJob *job);
+gboolean gnome_scan_job_run_once (GnomeScanJob *job);
+void gnome_scan_job_cancel (GnomeScanJob *job);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_JOB_H_ */
diff --git a/trunk/lib/gnome-scan-module-manager.c b/trunk/lib/gnome-scan-module-manager.c
new file mode 100644
index 0000000..c2f0464
--- /dev/null
+++ b/trunk/lib/gnome-scan-module-manager.c
@@ -0,0 +1,235 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION: gnome-scan-module-manager
+ * @short_description: Finding installed modules
+ *
+ * The #GnomeScanModuleManager search in a list of path shared object,
+ * and instanciate a #GnomeScanModule for each shared object. Upon
+ * initialization, the #GnomeScanModule will register new GTypes. This
+ * implementation is meant to be portable, but never tested on other
+ * plateform that GNU/Linux.
+ **/
+
+#include "gnome-scan-module-manager.h"
+#include "gnome-scan-module.h"
+
+enum {
+ PROP_0,
+ PROP_PATH
+};
+
+
+static GObjectClass* parent_class = NULL;
+
+static gboolean gsmm_is_valid_module_name (const gchar*name);
+
+G_DEFINE_TYPE (GnomeScanModuleManager, gnome_scan_module_manager, G_TYPE_OBJECT);
+
+static void
+gnome_scan_module_manager_init (GnomeScanModuleManager *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+#if 0
+static GObject*
+gnome_scan_module_manager_constructor (GType type,
+ guint n_params,
+ GObjectConstructParam *params)
+{
+ GnomeScanModuleManager *manager;
+ GObject *object;
+
+ object =
+ G_OBJECT_CLASS (gnome_scan_module_manager_parent_class)->constructor (type,
+ n_params,
+ params);
+ manager = GNOME_SCAN_MODULE_MANAGER (object);
+
+ if (manager->path)
+ gnome_scan_module_manager_query_modules (manager);
+
+ return object;
+}
+#endif
+
+static void
+gnome_scan_module_manager_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_module_manager_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_MODULE_MANAGER (object));
+
+ switch (prop_id)
+ {
+ case PROP_PATH:
+ GNOME_SCAN_MODULE_MANAGER (object)->path = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_module_manager_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_MODULE_MANAGER (object));
+
+ switch (prop_id)
+ {
+ case PROP_PATH:
+ g_value_set_string (value, GNOME_SCAN_MODULE_MANAGER (object)->path);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_module_manager_class_init (GnomeScanModuleManagerClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
+
+ /*object_class->constructor = gnome_scan_module_manager_constructor;*/
+ object_class->finalize = gnome_scan_module_manager_finalize;
+ object_class->set_property = gnome_scan_module_manager_set_property;
+ object_class->get_property = gnome_scan_module_manager_get_property;
+
+ /**
+ * GnomeScanModuleManager:path:
+ *
+ * The search path where are installed #GnomeScanModule shared
+ * object. A search path is a string formed by a list of absolute
+ * path to directory separated by #G_SEARCHPATH_SEPARATOR.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_PATH,
+ g_param_spec_string ("path",
+ "Path",
+ "Module path",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+/**
+ * gnome_scan_module_manager_new:
+ * @path: Search path.
+ *
+ * Create a new #GnomeScanModuleManager which will handle @path.
+ *
+ * Returns: a new #GnomeScanModuleManager
+ **/
+GnomeScanModuleManager*
+gnome_scan_module_manager_new (gchar *path)
+{
+ return g_object_new (GNOME_TYPE_SCAN_MODULE_MANAGER,
+ "path", path,
+ NULL);
+}
+
+/**
+ * gnome_scan_module_manager_query_modules:
+ * @manager: a #GnomeScanModuleManager
+ *
+ * Search for shared objects in path, instanciate and initialize a
+ * #GnomeScanModule for each shared object. Note that it won't search
+ * in subdirectories.
+ **/
+void
+gnome_scan_module_manager_query_modules (GnomeScanModuleManager *manager)
+{
+ GnomeScanModule *module;
+ GDir *dir;
+ GError *error = NULL;
+ gchar **paths = g_strsplit (manager->path, G_SEARCHPATH_SEPARATOR_S, -1);
+ const gchar *name;
+ gchar *filename;
+ guint i;
+
+ for (i = 0; paths[i]; i++) {
+ dir = g_dir_open (paths[i], 0, &error);
+ if (!dir) {
+ /* Show warning only for absolute path, else should be devel pathâ?¦ */
+ if (paths[i][0] == '/')
+ g_warning ("%s: Error while searching for modules: %s",
+ G_STRLOC, error->message);
+ g_clear_error (&error);
+ continue;
+ }
+
+ /* Scan for lib*.{so,la} */
+ while ((name = g_dir_read_name (dir))) {
+ if (gsmm_is_valid_module_name (name)) {
+ filename = g_build_filename (paths[i], name, NULL);
+ module = gnome_scan_module_new (filename);
+
+ if (!g_type_module_use (G_TYPE_MODULE (module))) {
+ g_warning (g_module_error ());
+ }
+ manager->modules = g_slist_append (manager->modules, module);
+ }
+ }
+ }
+}
+
+/**
+ * gnome_scan_module_manager_unload_modules:
+ * @manager: a #GnomeScanModuleManager
+ *
+ * Search for shared objects in path, instanciate and initialize a
+ * #GnomeScanModule for each shared object. Note that it won't search
+ * in subdirectories.
+ **/
+void
+gnome_scan_module_manager_unload_modules (GnomeScanModuleManager *manager)
+{
+ GSList *node;
+
+ for (node = manager->modules; node ; node = node->next) {
+ g_type_module_unuse (G_TYPE_MODULE (node->data));
+ }
+}
+
+static gboolean
+gsmm_is_valid_module_name (const gchar*name)
+{
+ return g_str_has_prefix (name, "lib")
+ && (g_str_has_suffix (name, G_MODULE_SUFFIX)
+ || g_str_has_suffix (name, ".la"));
+}
diff --git a/trunk/lib/gnome-scan-module-manager.h b/trunk/lib/gnome-scan-module-manager.h
new file mode 100644
index 0000000..5c1d198
--- /dev/null
+++ b/trunk/lib/gnome-scan-module-manager.h
@@ -0,0 +1,66 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_MODULE_MANAGER_H_
+#define _GNOME_SCAN_MODULE_MANAGER_H_
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_MODULE_MANAGER (gnome_scan_module_manager_get_type ())
+#define GNOME_SCAN_MODULE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_MODULE_MANAGER, GnomeScanModuleManager))
+#define GNOME_SCAN_MODULE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_MODULE_MANAGER, GnomeScanModuleManagerClass))
+#define GNOME_IS_SCAN_MODULE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_MODULE_MANAGER))
+#define GNOME_IS_SCAN_MODULE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_MODULE_MANAGER))
+#define GNOME_SCAN_MODULE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_MODULE_MANAGER, GnomeScanModuleManagerClass))
+
+typedef struct _GnomeScanModuleManagerClass GnomeScanModuleManagerClass;
+typedef struct _GnomeScanModuleManager GnomeScanModuleManager;
+
+struct _GnomeScanModuleManagerClass
+{
+ GObjectClass parent_class;
+};
+
+/**
+ * GnomeScanModuleManager:
+ *
+ * The #GnomeScanModuleManager object find and load all installed
+ * #GnomeScanModule.
+ **/
+struct _GnomeScanModuleManager
+{
+ /*< private >*/
+ GObject parent_instance;
+
+ gchar *path;
+ GSList *modules;
+};
+
+GType gnome_scan_module_manager_get_type (void) G_GNUC_CONST;
+GnomeScanModuleManager*
+ gnome_scan_module_manager_new (gchar *path);
+void gnome_scan_module_manager_query_modules (GnomeScanModuleManager *manager);
+void gnome_scan_module_manager_unload_modules (GnomeScanModuleManager *manager);
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_MODULE_MANAGER_H_ */
diff --git a/trunk/lib/gnome-scan-module.c b/trunk/lib/gnome-scan-module.c
new file mode 100644
index 0000000..c4e7111
--- /dev/null
+++ b/trunk/lib/gnome-scan-module.c
@@ -0,0 +1,174 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-module
+ * @short_description: Module loading and initialization
+ *
+ * A module represent the library opened with #GModule where are
+ * stored a list of #GObjects.
+ **/
+#include "gnome-scan-module.h"
+
+enum
+{
+ PROP_0,
+ PROP_FILENAME
+};
+
+static gboolean gnome_scan_module_load (GTypeModule *gmodule);
+static void gnome_scan_module_unload (GTypeModule *gmodule);
+
+static GTypeModuleClass* parent_class = NULL;
+
+G_DEFINE_TYPE (GnomeScanModule, gnome_scan_module, G_TYPE_TYPE_MODULE);
+
+static void
+gnome_scan_module_init (GnomeScanModule *object)
+{
+ GnomeScanModule *module = GNOME_SCAN_MODULE (object);
+ module->filename = NULL;
+ module->library = NULL;
+ module->init = NULL;
+ module->finalize = NULL;
+}
+
+static void
+gnome_scan_module_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_module_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_MODULE (object));
+ GnomeScanModule *module = GNOME_SCAN_MODULE (object);
+
+ switch (prop_id)
+ {
+ case PROP_FILENAME:
+ g_free (module->filename);
+ module->filename = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_module_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_MODULE (object));
+ GnomeScanModule *module = GNOME_SCAN_MODULE (object);
+
+ switch (prop_id)
+ {
+ case PROP_FILENAME:
+ g_value_set_string (value, module->filename);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_module_class_init (GnomeScanModuleClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = G_TYPE_MODULE_CLASS (klass);
+
+ object_class->finalize = gnome_scan_module_finalize;
+ object_class->set_property = gnome_scan_module_set_property;
+ object_class->get_property = gnome_scan_module_get_property;
+
+ parent_class->load = gnome_scan_module_load;
+ parent_class->unload = gnome_scan_module_unload;
+
+ /**
+ * GnomeScanModule:filename:
+ *
+ * The path to the shared object.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_FILENAME,
+ g_param_spec_string ("filename",
+ "Filename",
+ "Library filename for use with GModule",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+}
+
+static gboolean
+gnome_scan_module_load (GTypeModule *gmodule)
+{
+ GnomeScanModule *module = GNOME_SCAN_MODULE (gmodule);
+
+ g_return_val_if_fail (module->filename, FALSE);
+
+ module->library = g_module_open (module->filename, G_MODULE_BIND_MASK);
+ if (!module->library) {
+ g_warning (g_module_error ());
+ return FALSE;
+ }
+
+ if (!g_module_symbol (module->library, "gnome_scan_module_init",
+ (gpointer *) &module->init) ||
+ !g_module_symbol (module->library, "gnome_scan_module_finalize",
+ (gpointer *) &module->finalize))
+ {
+ g_warning ("%s does not contains a valid %s", module->filename, G_OBJECT_TYPE_NAME (gmodule));
+ return FALSE;
+ }
+
+ module->init (module);
+ return TRUE;
+}
+
+static void
+gnome_scan_module_unload (GTypeModule *gmodule)
+{
+ GnomeScanModule *module = GNOME_SCAN_MODULE (module);
+ module->finalize (module);
+}
+
+
+/**
+ * gnome_scan_module_new:
+ * @filename: The path to shared object
+ *
+ * Open and initialize a new module. This function should be used only
+ * by #GnomeScanModuleManager.
+ *
+ * Returns: a new #GnomeScanModule
+ **/
+GnomeScanModule*
+gnome_scan_module_new (gchar *filename)
+{
+ return g_object_new (GNOME_TYPE_SCAN_MODULE,
+ "filename", filename,
+ NULL);
+}
+
diff --git a/trunk/lib/gnome-scan-module.h b/trunk/lib/gnome-scan-module.h
new file mode 100644
index 0000000..4aa7f13
--- /dev/null
+++ b/trunk/lib/gnome-scan-module.h
@@ -0,0 +1,161 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_MODULE_H_
+#define _GNOME_SCAN_MODULE_H_
+
+#include <glib-object.h>
+#include <gmodule.h>
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_MODULE (gnome_scan_module_get_type ())
+#define GNOME_SCAN_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_MODULE, GnomeScanModule))
+#define GNOME_SCAN_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_MODULE, GnomeScanModuleClass))
+#define GNOME_IS_SCAN_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_MODULE))
+#define GNOME_IS_SCAN_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_MODULE))
+#define GNOME_SCAN_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_MODULE, GnomeScanModuleClass))
+
+#define NOT_IMPLEMENTED g_warning("%s:%i '%s' not implemented", __FILE__, __LINE__, __FUNCTION__)
+
+/**
+ * GS_DEFINE_MODULE_TYPE:
+ * @TN: Capitalized type name
+ * @t_n: Type function prefix
+ * @T_P: Parent GType macro
+ *
+ * Convenient macro used to declare a dynamicly registered type.
+ *
+ * For example:
+ * <programlisting>
+GS_DEFINE_MODULE_TYPE (FooBar, foo_bar, G_TYPE_OBJECT)
+ * </programlisting>
+ *
+ * expands to:
+ *
+ * <programlisting>
+static void foo_bar_init (FooBar *self);
+static void foo_bar_class_init (FooBarClass *klass);
+
+static GType foo_bar_type = 0;
+GType
+foo_bar_get_type ()
+{ return foo_bar_type; }
+
+void
+foo_bar_register_type (GTypeModule *module)
+{
+ if (!foo_bar_type)
+ {
+ static const GTypeInfo type_info =
+ {
+ sizeof (FooBarClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) foo_bar_class_init,
+ NULL,
+ NULL,
+ sizeof (FooBar),
+ 0,
+ (GInstanceInitFunc) foo_bar_init
+ };
+
+ foo_bar_type =
+ g_type_module_register_type (module, G_TYPE_OBJECT,
+ g_intern_static_string ("FooBar"), &type_info, 0);
+ }
+}
+ * </programlisting>
+ *
+ * See: G_DEFINE_TYPE
+ **/
+#define GS_DEFINE_MODULE_TYPE(TN, t_n, T_P) static void t_n##_init (TN *self); \
+static void t_n##_class_init (TN##Class *klass); \
+\
+static GType t_n##_type = 0; \
+GType \
+t_n##_get_type () \
+{ return t_n##_type; } \
+\
+void \
+t_n##_register_type (GTypeModule *module) \
+{ \
+ if (!t_n##_type)\
+ { \
+ static const GTypeInfo type_info = \
+ { \
+ sizeof (TN##Class), \
+ (GBaseInitFunc) NULL, \
+ (GBaseFinalizeFunc) NULL, \
+ (GClassInitFunc) t_n##_class_init, \
+ NULL, /* class_finalize */ \
+ NULL, /* class_data */ \
+ sizeof (TN), \
+ 0, /* n_preallocs */ \
+ (GInstanceInitFunc) t_n##_init \
+ }; \
+\
+ t_n##_type = \
+ g_type_module_register_type (module, T_P, \
+ g_intern_static_string (#TN), &type_info, 0); \
+ } \
+}
+
+
+typedef struct _GnomeScanModuleClass GnomeScanModuleClass;
+typedef struct _GnomeScanModule GnomeScanModule;
+
+struct _GnomeScanModuleClass
+{
+ GTypeModuleClass parent_class;
+};
+
+/**
+ * GnomeScanModule:
+ *
+ * A #GnomeScanModule handle the loading, initialization, finalization
+ * and unloading of a module. If you want to extends Gnome Scan, you
+ * must implement two function, one for @init and one for @finalize,
+ * called gnome_scan_module_init() and
+ * gnome_scan_module_finalize(). You should prefix function prototypes
+ * with #G_MODULE_EXPORT.
+ */
+struct _GnomeScanModule
+{
+ /*< private >*/
+ GTypeModule parent_instance;
+
+ gchar* filename;
+ GModule* library;
+
+ /* GnomeScanModule very complex API */
+ /*< public >*/
+ void (* init) (GnomeScanModule *module);
+ void (* finalize) (GnomeScanModule *module);
+};
+
+GType gnome_scan_module_get_type (void) G_GNUC_CONST;
+GnomeScanModule*
+ gnome_scan_module_new (gchar *filename);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_MODULE_H_ */
diff --git a/trunk/lib/gnome-scan-number-widget.c b/trunk/lib/gnome-scan-number-widget.c
new file mode 100644
index 0000000..e060b3d
--- /dev/null
+++ b/trunk/lib/gnome-scan-number-widget.c
@@ -0,0 +1,114 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <glib/gi18n.h>
+#include "gnome-scan-number-widget.h"
+#include "gnome-scan-param-specs.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_NUMBER_WIDGET, GnomeScanNumberWidgetPrivate))
+
+
+typedef struct _GnomeScanNumberWidgetPrivate GnomeScanNumberWidgetPrivate;
+struct _GnomeScanNumberWidgetPrivate
+{
+ GtkWidget *spin;
+ GtkObject *adj;
+};
+
+static void gsnw_value_changed (GtkAdjustment *adjustment,
+ GnomeScanNumberWidget *gsnw);
+
+GS_DEFINE_PARAM_WIDGET (GnomeScanNumberWidget, gnome_scan_number_widget);
+
+static void
+gnome_scan_number_widget_init (GnomeScanNumberWidget *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gnome_scan_number_widget_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gnome_scan_number_widget_parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_number_widget_build (GnomeScanParamWidget *gspw)
+{
+ GnomeScanNumberWidgetPrivate *priv = GET_PRIVATE (gspw);
+ guint digits = 0;
+
+ switch (G_PARAM_SPEC_VALUE_TYPE (gspw->pspec)) {
+ case G_TYPE_INT:
+ priv->adj = gtk_adjustment_new (0.,
+ (gdouble) G_MININT, (gdouble) G_MAXINT,
+ 1., 1., 0.);
+ digits = 0;
+ break;
+ case G_TYPE_DOUBLE:
+ priv->adj = gtk_adjustment_new (0.,
+ G_MINDOUBLE, G_MAXDOUBLE,
+ .1, .1, 0.);
+ digits = 2;
+ break;
+ }
+ priv->spin = gtk_spin_button_new (GTK_ADJUSTMENT (priv->adj),
+ 1., digits);
+ gtk_box_pack_start (GTK_BOX (gspw), priv->spin , FALSE, FALSE, 0);
+
+ g_signal_connect (priv->adj, "value-changed",
+ (GCallback) gsnw_value_changed,
+ GNOME_SCAN_NUMBER_WIDGET (gspw));
+}
+
+static void
+gnome_scan_number_widget_show (GnomeScanParamWidget *gspw)
+{
+}
+
+static void
+gnome_scan_number_widget_set (GnomeScanParamWidget *gspw, GValue *value)
+{
+ GValue *vdouble = g_new0 (GValue, 1);
+ g_value_init (vdouble, G_TYPE_DOUBLE);
+ g_value_transform (value, vdouble);
+ gtk_adjustment_set_value (GTK_ADJUSTMENT (GET_PRIVATE (gspw)->adj),
+ g_value_get_double (vdouble));
+ g_value_unset (vdouble);
+ g_free (vdouble);
+}
+
+
+static void
+gsnw_value_changed (GtkAdjustment *adjustment, GnomeScanNumberWidget *gsnw)
+{
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (gsnw);
+ GValue *vdouble = g_new0 (GValue, 1);
+ g_value_init (vdouble, G_TYPE_DOUBLE);
+ g_value_set_double (vdouble, gtk_adjustment_get_value (adjustment));
+ g_value_transform (vdouble, gspw->value);
+ g_value_unset (vdouble);
+ g_free (vdouble);
+ gnome_scan_param_widget_changed (gspw);
+}
diff --git a/trunk/lib/gnome-scan-number-widget.h b/trunk/lib/gnome-scan-number-widget.h
new file mode 100644
index 0000000..39fe891
--- /dev/null
+++ b/trunk/lib/gnome-scan-number-widget.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_NUMBER_WIDGET_H_
+#define _GNOME_SCAN_NUMBER_WIDGET_H_
+
+#include <glib-object.h>
+#include "gnome-scan-param-widget.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_NUMBER_WIDGET (gnome_scan_number_widget_get_type ())
+#define GNOME_SCAN_NUMBER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_NUMBER_WIDGET, GnomeScanNumberWidget))
+#define GNOME_SCAN_NUMBER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_NUMBER_WIDGET, GnomeScanNumberWidgetClass))
+#define GNOME_IS_SCAN_NUMBER_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_NUMBER_WIDGET))
+#define GNOME_IS_SCAN_NUMBER_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_NUMBER_WIDGET))
+#define GNOME_SCAN_NUMBER_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_NUMBER_WIDGET, GnomeScanNumberWidgetClass))
+
+typedef struct _GnomeScanNumberWidgetClass GnomeScanNumberWidget;
+struct _GnomeScanNumberWidget
+{
+ GnomeScanParamWidget parent_instance;
+};
+
+GS_DEFINE_PARAM_WIDGET_HEADER (GnomeScanNumberWidget, gnome_scan_number_widget);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_NUMBER_WIDGET_H_ */
diff --git a/trunk/lib/gnome-scan-page-orientation-widget.c b/trunk/lib/gnome-scan-page-orientation-widget.c
new file mode 100644
index 0000000..c594697
--- /dev/null
+++ b/trunk/lib/gnome-scan-page-orientation-widget.c
@@ -0,0 +1,139 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:
+ * @short_description: #GnomeScanPageOrientationWidget class
+ *
+ **/
+#include <glib/gi18n.h>
+#include "gnome-scan-page-orientation-widget.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_PAGE_ORIENTATION_WIDGET, GnomeScanPageOrientationWidgetPrivate))
+
+typedef struct _GnomeScanPageOrientationWidgetPrivate GnomeScanPageOrientationWidgetPrivate;
+struct _GnomeScanPageOrientationWidgetPrivate
+{
+ GSList* group;
+ GtkWidget* table;
+ GtkWidget* portrait;
+ /*GtkWidget* rportrait;*/
+ GtkWidget* landscape;
+ /*GtkWidget* rlandscape;*/
+};
+
+
+GS_DEFINE_PARAM_WIDGET (GnomeScanPageOrientationWidget, gnome_scan_page_orientation_widget);
+
+static void
+gnome_scan_page_orientation_widget_init (GnomeScanPageOrientationWidget *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gnome_scan_page_orientation_widget_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gnome_scan_page_orientation_widget_parent_class)->finalize (object);
+}
+
+static void
+gspow_changed (GtkToggleButton *button, GnomeScanParamWidget *gspw)
+{
+ GtkPageOrientation po = gtk_toggle_button_get_active (button) ?
+ GTK_PAGE_ORIENTATION_PORTRAIT : GTK_PAGE_ORIENTATION_LANDSCAPE;
+ g_value_set_enum (gspw->value, po);
+ gnome_scan_param_widget_changed (gspw);
+}
+
+static void
+gnome_scan_page_orientation_widget_build (GnomeScanParamWidget *gspw)
+{
+ GnomeScanPageOrientationWidgetPrivate *priv = GET_PRIVATE (gspw);
+ GtkWidget *box, *icon, *label;
+
+ gspw->shows_label = TRUE;
+ gspw->shows_unit = TRUE;
+
+ /* portrait */
+ icon = gtk_image_new_from_icon_name ("gtk-orientation-portrait",
+ GTK_ICON_SIZE_BUTTON);
+ label = gtk_label_new_with_mnemonic (dgettext("gtk20", "Portrait"));
+
+ box = gtk_hbox_new (FALSE, 4);
+ gtk_box_pack_start (GTK_BOX (box), icon, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 0);
+
+ priv->portrait = gtk_radio_button_new (NULL);
+ g_signal_connect (priv->portrait, "toggled",
+ G_CALLBACK (gspow_changed),
+ gspw);
+ priv->group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (priv->portrait));
+ gtk_container_add (GTK_CONTAINER (priv->portrait), box);
+
+ /* landscape */
+ icon = gtk_image_new_from_icon_name ("gtk-orientation-landscape",
+ GTK_ICON_SIZE_BUTTON);
+ label = gtk_label_new_with_mnemonic (dgettext("gtk20", "Landscape"));
+
+ box = gtk_hbox_new (FALSE, 4);
+ gtk_box_pack_start (GTK_BOX (box), icon, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 0);
+
+ priv->landscape = gtk_radio_button_new (priv->group);
+ gtk_container_add (GTK_CONTAINER (priv->landscape), box);
+
+
+ /* reverse ? */
+
+ priv->table = gtk_table_new (2, 1, TRUE);
+ gtk_table_attach_defaults (GTK_TABLE (priv->table), priv->portrait,
+ 0, 1, 0, 1);
+ gtk_table_attach_defaults (GTK_TABLE (priv->table), priv->landscape,
+ 0, 1, 1, 2);
+
+ gtk_box_pack_start (GTK_BOX (gspw), priv->table, FALSE, FALSE, 0);
+}
+
+static void
+gnome_scan_page_orientation_widget_set (GnomeScanParamWidget *gspw, GValue *value)
+{
+ GnomeScanPageOrientationWidgetPrivate *priv = GET_PRIVATE (gspw);
+ guint val = g_value_get_enum (value);
+
+ switch (val) {
+ case GTK_PAGE_ORIENTATION_PORTRAIT:
+ case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->portrait), TRUE);
+ break;
+ case GTK_PAGE_ORIENTATION_LANDSCAPE:
+ case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->landscape), TRUE);
+ break;
+ }
+}
+
+
diff --git a/trunk/lib/gnome-scan-page-orientation-widget.h b/trunk/lib/gnome-scan-page-orientation-widget.h
new file mode 100644
index 0000000..1fa68c5
--- /dev/null
+++ b/trunk/lib/gnome-scan-page-orientation-widget.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_PAGE_ORIENTATION_WIDGET_H_
+#define _GNOME_SCAN_PAGE_ORIENTATION_WIDGET_H_
+
+#include "gnome-scan-param-widget.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PAGE_ORIENTATION_WIDGET (gnome_scan_page_orientation_widget_get_type ())
+#define GNOME_SCAN_PAGE_ORIENTATION_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PAGE_ORIENTATION_WIDGET, GnomeScanPageOrientationWidget))
+#define GNOME_SCAN_PAGE_ORIENTATION_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_PAGE_ORIENTATION_WIDGET, GnomeScanPageOrientationWidgetClass))
+#define GNOME_IS_SCAN_PAGE_ORIENTATION_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_PAGE_ORIENTATION_WIDGET))
+#define GNOME_IS_SCAN_PAGE_ORIENTATION_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_PAGE_ORIENTATION_WIDGET))
+#define GNOME_SCAN_PAGE_ORIENTATION_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_PAGE_ORIENTATION_WIDGET, GnomeScanPageOrientationWidgetClass))
+
+typedef struct _GnomeScanPageOrientationWidget GnomeScanPageOrientationWidget;
+
+/**
+ * GnomeScanPageOrientationWidget:
+ *
+ *
+ **/
+struct _GnomeScanPageOrientationWidget
+{
+ /*< private >*/
+ GnomeScanParamWidget parent_instance;
+};
+
+
+GS_DEFINE_PARAM_WIDGET_HEADER (GnomeScanPageOrientationWidget, gnome_scan_page_orientation_widget);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PAGE_ORIENTATION_WIDGET_H_ */
diff --git a/trunk/lib/gnome-scan-paper-size-widget.c b/trunk/lib/gnome-scan-paper-size-widget.c
new file mode 100644
index 0000000..aa6b6f2
--- /dev/null
+++ b/trunk/lib/gnome-scan-paper-size-widget.c
@@ -0,0 +1,199 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:
+ * @short_description: #GnomeScanPaperSizeWidget class
+ *
+ **/
+#include <glib/gi18n.h>
+#include "gnome-scan-paper-size-widget.h"
+#include "gnome-scan-param-specs.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_PAPER_SIZE_WIDGET, GnomeScanPaperSizeWidgetPrivate))
+
+typedef struct _GnomeScanPaperSizeWidgetPrivate GnomeScanPaperSizeWidgetPrivate;
+struct _GnomeScanPaperSizeWidgetPrivate
+{
+ GtkListStore *paper_names;
+ GtkWidget *combo;
+ GtkWidget *label;
+};
+
+enum
+ {
+ COL_DISPLAY_NAME,
+ COL_PS,
+ N_COLUMNS
+ };
+
+GS_DEFINE_PARAM_WIDGET (GnomeScanPaperSizeWidget, gnome_scan_paper_size_widget);
+
+static void
+gnome_scan_paper_size_widget_init (GnomeScanPaperSizeWidget *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gnome_scan_paper_size_widget_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gnome_scan_paper_size_widget_parent_class)->finalize (object);
+}
+
+static void
+gspsw_update_label (GnomeScanPaperSizeWidget *gspsw, GtkPaperSize *ps)
+{
+ GnomeScanPaperSizeWidgetPrivate *priv = GET_PRIVATE (gspsw);
+ gchar *display_name = NULL;
+
+ /* translators: this is the paper size width and height expressed in
+ millimeters, shown just below the selector. */
+ display_name = g_strdup_printf (_("%.0f x %.0f mm"),
+ gtk_paper_size_get_width (ps, GTK_UNIT_MM),
+ gtk_paper_size_get_height (ps, GTK_UNIT_MM));
+
+ gtk_label_set_text (GTK_LABEL (priv->label),
+ display_name);
+
+ g_free (display_name);
+}
+
+static void
+gspsw_selected (GtkComboBox *combo, GnomeScanPaperSizeWidget *gspsw)
+{
+ GnomeScanPaperSizeWidgetPrivate *priv = GET_PRIVATE (gspsw);
+ GtkTreeIter iter;
+ GtkPaperSize *ps;
+
+ gtk_combo_box_get_active_iter (combo, &iter);
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->paper_names), &iter,
+ COL_PS, &ps,
+ -1);
+ gspsw_update_label (gspsw, ps);
+ g_value_set_boxed (GNOME_SCAN_PARAM_WIDGET (gspsw)->value, ps);
+ gnome_scan_param_widget_changed (GNOME_SCAN_PARAM_WIDGET (gspsw));
+
+ /* update "origin" if needed */
+#define settings GNOME_SCAN_PARAM_WIDGET (gspsw)->settings
+ if (g_str_equal (gtk_paper_size_get_name (ps), "maximal")) {
+ GdkPoint *o = gnome_scan_settings_get_pointer (settings, "origin");
+ if (!o) {
+ o = g_new0 (GdkPoint, 1);
+ }
+ o->x = o->y = 0;
+ gnome_scan_settings_set_pointer (settings, "origin", o);
+ }
+#undef settings
+}
+
+
+static void
+gnome_scan_paper_size_widget_build (GnomeScanParamWidget *gspw)
+{
+ GnomeScanPaperSizeWidgetPrivate *priv = GET_PRIVATE (gspw);
+ GtkWidget *box;
+ GtkCellRenderer *renderer;
+ GtkTreeIter iter;
+ GtkPaperSize *ps;
+ GSList *node;
+ gint i;
+
+ gspw->shows_label = TRUE;
+ gspw->shows_unit = TRUE;
+
+ /* store */
+ priv->paper_names = gtk_list_store_new (N_COLUMNS,
+ G_TYPE_STRING,
+ GTK_TYPE_PAPER_SIZE);
+
+ node = GS_PARAM_SPEC_PAPER_SIZE (gspw->pspec)->enumeration;
+ for (; node; node = node->next) {
+ ps = node->data;
+ gtk_list_store_append (priv->paper_names, &iter);
+ gtk_list_store_set (priv->paper_names, &iter,
+ COL_DISPLAY_NAME, gtk_paper_size_get_display_name(ps),
+ COL_PS, ps,
+ -1);
+ }
+
+ /* combo */
+ priv->combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (priv->paper_names));
+
+ renderer = gtk_cell_renderer_text_new();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->combo), renderer, TRUE);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->combo), renderer,
+ "text", COL_DISPLAY_NAME);
+
+ /* label */
+ priv->label = gtk_label_new (NULL);
+
+ box = gtk_vbox_new (FALSE, 4);
+ gtk_box_pack_start (GTK_BOX (box), priv->combo, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (box), priv->label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (gspw), box, FALSE, FALSE, 0);
+
+
+ g_signal_connect (GET_PRIVATE (gspw)->combo, "changed",
+ (GCallback) gspsw_selected,
+ GNOME_SCAN_PAPER_SIZE_WIDGET (gspw));
+}
+
+static void
+gnome_scan_paper_size_widget_set (GnomeScanParamWidget *gspw, GValue *value)
+{
+ GnomeScanPaperSizeWidgetPrivate *priv = GET_PRIVATE (gspw);
+ GtkTreeIter iter;
+ GtkPaperSize *ps = NULL;
+ GtkPaperSize *def = g_value_get_boxed (value);
+
+ /* loop model searching the one selected */
+ gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->paper_names), &iter);
+ for (; gtk_list_store_iter_is_valid (priv->paper_names, &iter)
+ ; gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->paper_names), &iter)) {
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->paper_names), &iter,
+ COL_PS, &ps,
+ -1);
+ /* test wether the current paper size is the same as selected */
+ if (g_str_equal (gtk_paper_size_get_name (def),
+ gtk_paper_size_get_name (ps))) {
+
+ /* update manual paper size */
+ if (g_str_equal (gtk_paper_size_get_name (def), "manual")) {
+/* g_debug (G_STRLOC ": set paper size to %s:%.2fx%.2f mm", */
+/* gtk_paper_size_get_name (def), */
+/* gtk_paper_size_get_width (def, GTK_UNIT_MM), */
+/* gtk_paper_size_get_height (def, GTK_UNIT_MM)); */
+ gtk_list_store_set (priv->paper_names, &iter,
+ COL_PS, def,
+ -1);
+ g_boxed_free (GTK_TYPE_PAPER_SIZE, ps);
+ ps = def;
+ }
+ gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->combo), &iter);
+ gspsw_update_label (GNOME_SCAN_PAPER_SIZE_WIDGET (gspw), def);
+ break;
+ }
+ }
+}
diff --git a/trunk/lib/gnome-scan-paper-size-widget.h b/trunk/lib/gnome-scan-paper-size-widget.h
new file mode 100644
index 0000000..71caefa
--- /dev/null
+++ b/trunk/lib/gnome-scan-paper-size-widget.h
@@ -0,0 +1,54 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_PAPER_SIZE_WIDGET_H_
+#define _GNOME_SCAN_PAPER_SIZE_WIDGET_H_
+
+#include "gnome-scan-param-widget.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PAPER_SIZE_WIDGET (gnome_scan_paper_size_widget_get_type ())
+#define GNOME_SCAN_PAPER_SIZE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PAPER_SIZE_WIDGET, GnomeScanPaperSizeWidget))
+#define GNOME_SCAN_PAPER_SIZE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_PAPER_SIZE_WIDGET, GnomeScanPaperSizeWidgetClass))
+#define GNOME_IS_SCAN_PAPER_SIZE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_PAPER_SIZE_WIDGET))
+#define GNOME_IS_SCAN_PAPER_SIZE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_PAPER_SIZE_WIDGET))
+#define GNOME_SCAN_PAPER_SIZE_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_PAPER_SIZE_WIDGET, GnomeScanPaperSizeWidgetClass))
+
+typedef struct _GnomeScanPaperSizeWidget GnomeScanPaperSizeWidget;
+
+/**
+ * GnomeScanPaperSizeWidget:
+ *
+ *
+ **/
+struct _GnomeScanPaperSizeWidget
+{
+ /*< private >*/
+ GnomeScanParamWidget parent_instance;
+};
+
+GS_DEFINE_PARAM_WIDGET_HEADER (GnomeScanPaperSizeWidget, gnome_scan_paper_size_widget);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PAPER_SIZE_WIDGET_H_ */
diff --git a/trunk/lib/gnome-scan-param-specs.c b/trunk/lib/gnome-scan-param-specs.c
new file mode 100644
index 0000000..61ffb0f
--- /dev/null
+++ b/trunk/lib/gnome-scan-param-specs.c
@@ -0,0 +1,764 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-param-specs
+ * @title: Parameter Specification
+ * @short_description: Custom plugin parameter type
+ * @include: gnome-scan.h
+ *
+ * Instead of using a all-in-one option object (like in Gnome Scan
+ * 0.4), Gnome Scan now use regular #GParamSpecs. Gnome Scan
+ * #GParamSpecs (referred as #GSParamSpecs) have been designed in order
+ * to build generic widget for plugins parameters (like Gegl and other
+ * projects does). A common attribute added to each #GSParamSpec is
+ * the @group quark. The @group quark is computed from the translated
+ * group title.
+ *
+ * Also, #GSParamSpecs are much more high-level than it's parent
+ * #GParamSpec in order to build complex param widgets (range, area,
+ * paper-size, â?¦).
+ *
+ * Current implementation makes a heavy use of
+ * g_param_spec_set_qdata(), because #GParamSpec is a shallow
+ * type. Future implementation might break thing for either creating
+ * its own #GSParamSpec fundamental type or simply using a common
+ * struct right after the @parent_instance field.
+ **/
+
+#include <glib/gi18n.h>
+#include "gnome-scan-param-specs.h"
+#include "gnome-scan-range-widget.h"
+#include "gnome-scan-enum-widget.h"
+#include "gnome-scan-number-widget.h"
+#include "gnome-scan-string-widget.h"
+#include "gnome-scan-boolean-widget.h"
+#include "gnome-scan-paper-size-widget.h"
+#include "gnome-scan-page-orientation-widget.h"
+#include "gnome-scan-preview-plugin.h"
+
+/* Quarks */
+/* extended properties */
+GS_DEFINE_QUARK (gs_group, "group");
+GS_DEFINE_QUARK (gs_domain, "domain");
+GS_DEFINE_QUARK (gs_unit, "unit");
+GS_DEFINE_QUARK (gs_index, "index");
+GS_DEFINE_QUARK (gs_widget_type, "widget-type");
+GS_DEFINE_QUARK (gs_formats, "formats");
+
+/* groups */
+GS_DEFINE_QUARK (gs_scanner_front, N_("Scan options"));
+GS_DEFINE_QUARK (gs_format, N_("Format"));
+GS_DEFINE_QUARK (gs_sink_front, N_("Output options"));
+GS_DEFINE_QUARK (gs_preview, "$$PREVIEW$$");
+GS_DEFINE_QUARK (gs_hidden, "$$HIDDEN$$");
+
+/* Common */
+
+/**
+ * gnome_scan_format_new:
+ * @name: format name
+ * @domain: translation domain
+ * @description:description
+ * @mime_types: list of mime types for this format
+ * @extensions: list of suffixes for file of this format.
+ *
+ * Returns: a new #GnomeScanFormat
+ **/
+GnomeScanFormat* gnome_scan_format_new (gchar *name,
+ gchar *domain,
+ gchar *description,
+ gchar **mime_types,
+ gchar **extensions)
+{
+ GnomeScanFormat *format = g_new0 (GnomeScanFormat, 1);
+ format->name = name;
+ format->domain = domain;
+ format->description = description;
+ format->mime_types = mime_types;
+ format->extensions = extensions;
+ return format;
+}
+
+/**
+ * gs_param_spec_get_group:
+ * @spec: The #GSParamSpec
+ *
+ * Retrieve the @spec group. Since the @group is not store in a
+ * struct, but using qdata, just cast @spec to #GParamSpec.
+ *
+ * Returns: @spec group's quark
+ **/
+GQuark
+gs_param_spec_get_group (GParamSpec *spec)
+{
+ return (GQuark) g_param_spec_get_qdata (spec, GS_PARAM_GROUP_QUARK);
+}
+
+/**
+ * gs_param_spec_get_group_string:
+ * @spec: The #GSParamSpec
+ *
+ * Retrieve the @spec group string. Since the @group is not store in a
+ * struct, but using qdata, just cast @spec to #GParamSpec. The string
+ * is not translated.
+ *
+ * See: gs_param_spec_get_group()
+ * Returns: @spec group's quark
+ **/
+const gchar*
+gs_param_spec_get_group_string (GParamSpec *spec)
+{
+ return g_quark_to_string (gs_param_spec_get_group (spec));
+}
+
+/**
+ * gs_param_spec_set_group:
+ * @spec: a #GSParamSpec
+ * @group: new @spec group's #GQuark.
+ **/
+void
+gs_param_spec_set_group (GParamSpec *spec, GQuark group)
+{
+
+ g_param_spec_set_qdata (spec, GS_PARAM_GROUP_QUARK, (gpointer) group);
+}
+
+/**
+ * gs_param_spec_set_group_from_string:
+ * @spec: a #GSParamSpec
+ * @group: new @spec group name
+ **/
+void
+gs_param_spec_set_group_from_string (GParamSpec *spec, const gchar *group)
+{
+ gs_param_spec_set_group (spec, g_quark_from_string (group));
+}
+
+
+/**
+ * gs_param_spec_set_domain:
+ * @spec: a #GSParamSpec
+ * @domain: @domain for translating @spec @nick and @blurb
+ *
+ **/
+void
+gs_param_spec_set_domain (GParamSpec *spec, const gchar *domain)
+{
+ g_param_spec_set_qdata (spec, GS_PARAM_DOMAIN_QUARK, (gpointer) domain);
+}
+
+/**
+ * gs_param_spec_get_domain:
+ * @spec: a #GSParamSpec
+ *
+ **/
+const gchar*
+gs_param_spec_get_domain (GParamSpec *spec)
+{
+ return g_param_spec_get_qdata (spec, GS_PARAM_DOMAIN_QUARK);
+}
+
+/**
+ * gs_param_spec_set_unit:
+ * @spec: a #GSParamSpec
+ * @unit: #GnomeScanUnit fo @spec
+ *
+ * Parameter unit is specified for UI, but can also be need for
+ * e.g. length of scan ROI where unit translation might occur.
+ **/
+void
+gs_param_spec_set_unit (GParamSpec *spec, GnomeScanUnit unit)
+{
+ g_param_spec_set_qdata (spec, GS_PARAM_UNIT_QUARK, (gpointer) unit);
+}
+
+/**
+ * gs_param_spec_get_unit:
+ * @spec: a #GSParamSpec
+ *
+ * Returns: a #GnomeScanUnit
+ **/
+GnomeScanUnit
+gs_param_spec_get_unit (GParamSpec *spec)
+{
+ return (GnomeScanUnit) g_param_spec_get_qdata (spec, GS_PARAM_UNIT_QUARK);
+}
+
+/**
+ * gs_param_spec_set_index:
+ * @spec: a #GSParamSpec
+ * @index: new @spec'index
+ **/
+void
+gs_param_spec_set_index (GParamSpec *spec, guint index)
+{
+ g_param_spec_set_qdata (spec, GS_PARAM_INDEX_QUARK, (gpointer) index);
+}
+
+/**
+ * gs_param_spec_get_index:
+ * @spec: a #GSParamSpec
+ *
+ * Returns: an integer.
+ **/
+guint
+gs_param_spec_get_index (GParamSpec *spec)
+{
+ return (guint) g_param_spec_get_qdata (spec, GS_PARAM_INDEX_QUARK);
+}
+
+
+
+/**
+ * gs_param_spec_set_widget_type:
+ * @spec: a #GSParamSpec
+ * @type: a widget #GType
+ *
+ * This part is the only bound from backend to frontend. It might be
+ * removed later. The idea is to have widget per param, not per type.
+ **/
+void
+gs_param_spec_set_widget_type (GParamSpec *spec, GType type)
+{
+ g_param_spec_set_qdata (spec, GS_PARAM_WIDGET_TYPE_QUARK, (gpointer) type);
+}
+
+/**
+ * gs_param_spec_get_widget_type:
+ * @spec: a #GSParamSpec
+ *
+ * Returns: a #GType
+ **/
+GType
+gs_param_spec_get_widget_type (GParamSpec *spec)
+{
+ return (GType) g_param_spec_get_qdata (spec, GS_PARAM_WIDGET_TYPE_QUARK);
+}
+
+/**
+ * gs_param_spec_cmp_index:
+ * @a: a #GSParamSpec
+ * @b: another #GSParamSpec
+ *
+ * Compare two #GSParamSpec by index.
+ *
+ * Returns: an integer nagtive if a is previous to b else positive.
+ **/
+gint
+gs_param_spec_cmp_index (GParamSpec*a, GParamSpec *b)
+{
+ return gs_param_spec_get_index (a) - gs_param_spec_get_index (b);
+}
+
+/**
+ * gs_param_spec_cmp_name:
+ * @a: a #GSParamSpec
+ * @b: another #GSParamSpec
+ *
+ * Compare two #GSParamSpec by name.
+ *
+ * Returns: a nagtive integer if a is previous to b else a positive integer.
+ **/
+gint
+gs_param_spec_cmp_name (GParamSpec*a, GParamSpec *b)
+{
+ return g_ascii_strcasecmp (g_param_spec_get_name (a), g_param_spec_get_name (b));
+}
+
+/**
+ * gs_param_values_cmp:
+ * @pspec: a #GSParamSpec
+ * @a: a #GSParamSpec
+ * @b: another #GSParamSpec
+ *
+ * Compare two value of type determined by @pspec.
+ *
+ * Returns: a negative integer if a < b, else a positive integer.
+ **/
+gint
+gs_param_values_cmp (GParamSpec *pspec, GValue *a, GValue *b)
+{
+ GParamSpecClass *klass = G_PARAM_SPEC_GET_CLASS (pspec);
+
+ return klass->values_cmp (pspec, a, b);
+}
+
+
+/**
+ * gs_param_spec_boolean:
+ * @name: param name
+ * @nick: param nickname
+ * @blurb: description of the parameter
+ * @group: param group quark
+ * @default_value: default value
+ * @flags: Flags
+ *
+ * Create a new #GSParamSpec of for boolean value. @name is for use
+ * internally (e.g. gconf key) while nick and @blurb should be marked
+ * for translation.
+ *
+ * Returns: a new #GSParamSpec
+ **/
+GParamSpec*
+gs_param_spec_boolean (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ gboolean default_value,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_boolean (name, nick, blurb,
+ default_value, flags);
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_widget_type (spec, GNOME_TYPE_SCAN_BOOLEAN_WIDGET);
+ return spec;
+}
+
+/**
+ * gs_param_spec_int:
+ * @name: param name
+ * @nick: param nickname
+ * @blurb: description of the parameter
+ * @group: param group quark
+ * @minimum: minimum value
+ * @maximum: maximum value
+ * @default_value: default value
+ * @flags: Flags
+ *
+ * Create a new #GSParamSpec of for integer value. @name is for use
+ * internally (e.g. gconf key) while nick and @blurb should be marked
+ * for translation.
+ *
+ * Returns: a new #GSParamSpec
+ **/
+GParamSpec*
+gs_param_spec_int (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ gint minimum,
+ gint maximum,
+ gint default_value,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_int (name, nick, blurb,
+ minimum, maximum, default_value,
+ flags);
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_widget_type (spec, GNOME_TYPE_SCAN_NUMBER_WIDGET);
+ return spec;
+}
+
+/**
+ * gs_param_spec_double:
+ * @name: param name
+ * @nick: param nickname
+ * @blurb: description of the parameter
+ * @group: param group quark
+ * @minimum: minimum value
+ * @maximum: maximum value
+ * @default_value: default value
+ * @flags: Flags
+ *
+ * Create a new #GSParamSpec of for double value. @name is for use
+ * internally (e.g. gconf key) while nick and @blurb should be marked
+ * for translation.
+ *
+ * Returns: a new #GSParamSpec
+ **/
+GParamSpec*
+gs_param_spec_double (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ gdouble minimum,
+ gdouble maximum,
+ gdouble default_value,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_double (name, nick, blurb,
+ minimum, maximum, default_value,
+ flags);
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_widget_type (spec, GNOME_TYPE_SCAN_NUMBER_WIDGET);
+ return spec;
+}
+
+/**
+ * gs_param_spec_string:
+ * @name: param name
+ * @nick: param nickname
+ * @blurb: description of the parameter
+ * @group: param group quark
+ * @default_value: default value
+ * @flags: Flags
+ *
+ * Create a new #GSParamSpec of for string value. @name is for use
+ * internally (e.g. gconf key) while nick and @blurb should be marked
+ * for translation.
+ *
+ * Returns: a new #GSParamSpec
+ **/
+GParamSpec*
+gs_param_spec_string (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ const gchar* default_value,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_string (name, nick, blurb,
+ default_value, flags);
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_widget_type (spec, GNOME_TYPE_SCAN_STRING_WIDGET);
+ return spec;
+}
+
+/**
+ * gs_param_spec_pointer:
+ * @name: param name
+ * @nick: param nickname
+ * @blurb: description of the parameter
+ * @group: param group quark
+ * @widget: widget type
+ * @flags: Flags
+ *
+ * Create a new #GSParamSpec of for boolean value. @name is for use
+ * internally (e.g. gconf key) while nick and @blurb should be marked
+ * for translation.
+ *
+ * Other #GSParamSpec have predefined widget type. Pointer spec allow
+ * to store alsmost everything and thus needs specific widget type.
+ *
+ * Returns: a new #GSParamSpec
+ **/
+GParamSpec*
+gs_param_spec_pointer (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GType widget,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_pointer (name, nick, blurb, flags);
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_widget_type (spec, widget);
+
+ return spec;
+}
+
+/* RANGE */
+GS_DEFINE_PARAM (gs, GS, range, Range, G_TYPE_INT);
+
+/**
+ * gs_param_spec_range:
+ * @name: spec name
+ * @nick: spec nick
+ * @blurb: spec blurb
+ * @group: The quark of the group the param belong to
+ * @minimum: value of the lowest allowed value
+ * @maximum: value of the highed allowed value
+ * @step: lenght between two values
+ * @flags: Param flags.
+ *
+ * Create a new #GSParamSpecRange. This spec has been designed to
+ * store both integer and float value. Ensure all #GValue have the
+ * same type.
+ *
+ * Returns: the new #GSParamSpecRange
+ **/
+GParamSpec*
+gs_param_spec_range (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GValue *minimum,
+ GValue *maximum,
+ GValue *step,
+ GValue *default_value,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_internal (GS_TYPE_PARAM_RANGE,
+ name, nick, blurb, flags);
+ GSParamSpecRange *range = GS_PARAM_SPEC_RANGE(spec);
+ range->minimum = g_boxed_copy (G_TYPE_VALUE, minimum);
+ range->maximum = g_boxed_copy (G_TYPE_VALUE, maximum);
+ range->step = g_boxed_copy (G_TYPE_VALUE, step);
+ range->default_value = g_boxed_copy (G_TYPE_VALUE, default_value);
+
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_widget_type (spec, GNOME_TYPE_SCAN_RANGE_WIDGET);
+
+ return G_PARAM_SPEC (spec);
+}
+
+
+static void
+gs_param_range_value_set_default (GParamSpec *pspec, GValue *value)
+{
+ GValue *default_value = GS_PARAM_SPEC_RANGE (pspec)->default_value;
+ g_value_unset (value);
+ g_value_init (value, G_VALUE_TYPE (default_value));
+
+ if (G_VALUE_HOLDS_INT(value)) {
+ g_value_set_int (value,
+ g_value_get_int (default_value));
+ }
+ else if (G_VALUE_HOLDS_DOUBLE(value)) {
+ g_value_set_double (value,
+ g_value_get_double (default_value));
+ }
+ else {
+ g_warning ("%s: does not support %s value type.",
+ G_PARAM_SPEC_TYPE_NAME (pspec),
+ G_VALUE_TYPE_NAME (value));
+ }
+}
+
+static gint
+gs_param_range_values_cmp (GParamSpec *pspec, const GValue *a, const GValue *b)
+{
+ switch (G_VALUE_TYPE (a)) {
+ case G_TYPE_INT:
+ return g_value_get_int (a) - g_value_get_int (b);
+ break;
+ case G_TYPE_DOUBLE:
+ return (gint) g_value_get_double (a) - g_value_get_double (b);
+ break;
+ case G_TYPE_STRING:
+ return g_ascii_strcasecmp (g_value_get_string (a),
+ g_value_get_string (b));
+ break;
+ default:
+ g_warning ("%s does not support %s value type.",
+ G_PARAM_SPEC_TYPE_NAME (pspec),
+ g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)));
+ return 0;
+ break;
+ }
+
+ return 0;
+}
+
+
+/* ENUM */
+GS_DEFINE_PARAM (gs, GS, enum, Enum, G_TYPE_INT);
+
+/**
+ * gs_param_spec_enum:
+ * @name: spec name
+ * @nick: spec nick
+ * @blurb: spec blurb
+ * @group: The quark of the group the param belong to
+ * @values: Allowed values
+ * @default_value: default value;
+ * @flags: Param flags.
+ *
+ * Create a new #GSParamSpecEnum . This parameter spec has been
+ * designed to handle integer, float and string value.
+ *
+ * Returns: the new #GSParamSpecEnum
+ **/
+GParamSpec*
+gs_param_spec_enum (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GValueArray *values,
+ GValue *default_value,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_internal (GS_TYPE_PARAM_ENUM,
+ name, nick, blurb, flags);
+ GSParamSpecEnum *enumeration = GS_PARAM_SPEC_ENUM(spec);
+ enumeration->values = values;
+ enumeration->default_value = default_value;
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_widget_type (spec, GNOME_TYPE_SCAN_ENUM_WIDGET);
+
+ return G_PARAM_SPEC (spec);
+}
+
+static void
+gs_param_enum_value_set_default (GParamSpec *pspec, GValue *value)
+{
+ GValue *default_value = GS_PARAM_SPEC_ENUM(pspec)->default_value;
+ g_value_unset (value);
+ g_value_init (value, G_VALUE_TYPE (default_value));
+
+ if (G_VALUE_HOLDS_INT(value)) {
+ g_value_set_int (value, g_value_get_int (default_value));
+ }
+ else if (G_VALUE_HOLDS_DOUBLE(value)) {
+ g_value_set_double (value,
+ g_value_get_double (default_value));
+ }
+ else if (G_VALUE_HOLDS_STRING (value)) {
+ g_value_set_string (value,
+ g_value_dup_string (default_value));
+ }
+ else {
+ g_warning ("%s: does not support %s value type.",
+ G_PARAM_SPEC_TYPE_NAME (pspec),
+ G_VALUE_TYPE_NAME (value));
+ }
+}
+
+static gint
+gs_param_enum_values_cmp (GParamSpec *pspec, const GValue *a, const GValue *b)
+{
+ return gs_param_range_values_cmp (pspec, a, b);
+}
+
+
+/* PAPER_SIZE */
+GS_DEFINE_PARAM (gs, GS, paper_size, PaperSize, GTK_TYPE_PAPER_SIZE);
+
+/**
+ * gs_param_spec_paper_size:
+ * @name: param name
+ * @nick: param nickname
+ * @blurb: description of the parameter
+ * @group: param group quark
+ * @default_ps: default paper size
+ * @enumeration: available paper size
+ * @flags: Flags
+ *
+ * Create a new #GSParamSpec of for #GtkPaperSize value. @name is for use
+ * internally (e.g. gconf key) while nick and @blurb should be marked
+ * for translation.
+ *
+ * Returns: a new #GSParamSpec
+ **/
+GParamSpec*
+gs_param_spec_paper_size (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GtkPaperSize* default_ps,
+ GSList* enumeration,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_internal (GS_TYPE_PARAM_PAPER_SIZE,
+ name, nick, blurb, flags);
+ GSParamSpecPaperSize *psspec = GS_PARAM_SPEC_PAPER_SIZE (spec);
+ psspec->default_ps = default_ps;
+ psspec->enumeration = enumeration;
+
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_widget_type (spec, GNOME_TYPE_SCAN_PAPER_SIZE_WIDGET);
+ return spec;
+}
+
+static void
+gs_param_paper_size_value_set_default (GParamSpec *spec,
+ GValue *value)
+{
+ g_value_set_boxed (value,
+ GS_PARAM_SPEC_PAPER_SIZE (spec)->default_ps);
+}
+
+static gint
+gs_param_paper_size_values_cmp (GParamSpec *spec,
+ const GValue *a,
+ const GValue *b)
+{
+ GtkPaperSize *pa = g_value_get_boxed (a);
+ GtkPaperSize *pb = g_value_get_boxed (b);
+ /* compare surfaces */
+ return (gtk_paper_size_get_width (pa, GTK_UNIT_MM) * gtk_paper_size_get_height (pa, GTK_UNIT_MM))
+ - (gtk_paper_size_get_width (pb, GTK_UNIT_MM) * gtk_paper_size_get_height (pb, GTK_UNIT_MM));
+}
+
+void
+gs_param_paper_size_get_extent (GSParamSpecPaperSize *ps,
+ GnomeScanUnit unit,
+ gdouble *width,
+ gdouble *height)
+{
+ GtkPaperSize *gps;
+ GSList *node = ps->enumeration;
+
+ for (; node; node = node->next) {
+ if (g_str_equal (gtk_paper_size_get_name (node->data),
+ "maximal")) {
+ gps = node->data;
+ *width = gtk_paper_size_get_width (gps, unit);
+ *height = gtk_paper_size_get_height (gps, unit);
+ break;
+ }
+ }
+
+ return;
+}
+
+/* PAGE_ORIENTATION */
+GS_DEFINE_PARAM (gs, GS, page_orientation, PageOrientation, GTK_TYPE_PAGE_ORIENTATION);
+
+/**
+ * gs_param_spec_page_orientation:
+ * @name: param name
+ * @nick: param nickname
+ * @blurb: description of the parameter
+ * @group: param group quark
+ * @default_value: default value
+ * @flags: Flags
+ *
+ * Create a new #GSParamSpec of for #GtkPageOrientation value. @name is for use
+ * internally (e.g. gconf key) while nick and @blurb should be marked
+ * for translation.
+ *
+ * Returns: a new #GSParamSpec
+ **/
+GParamSpec*
+gs_param_spec_page_orientation (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ guint default_value,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_internal (GS_TYPE_PARAM_PAGE_ORIENTATION,
+ name, nick, blurb, flags);
+ GSParamSpecPageOrientation *psspec = GS_PARAM_SPEC_PAGE_ORIENTATION (spec);
+ psspec->default_value = default_value;
+
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_widget_type (spec, GNOME_TYPE_SCAN_PAGE_ORIENTATION_WIDGET);
+ return spec;
+}
+
+static void
+gs_param_page_orientation_value_set_default (GParamSpec *spec,
+ GValue *value)
+{
+ g_value_set_enum (value,
+ GS_PARAM_SPEC_PAGE_ORIENTATION (spec)->default_value);
+}
+
+static gint
+gs_param_page_orientation_values_cmp (GParamSpec *spec,
+ const GValue *a,
+ const GValue *b)
+{
+ return 0;
+}
diff --git a/trunk/lib/gnome-scan-param-specs.h b/trunk/lib/gnome-scan-param-specs.h
new file mode 100644
index 0000000..43d47a1
--- /dev/null
+++ b/trunk/lib/gnome-scan-param-specs.h
@@ -0,0 +1,360 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_PARAM_SPECS_H
+#define _GNOME_SCAN_PARAM_SPECS_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include <gegl.h>
+#include "gnome-scan-utils.h"
+
+G_BEGIN_DECLS
+
+/* COMMON */
+
+/**
+ * GS_DEFINE_PARAM:
+ * @param_name: param prefix
+ * @ParamName: Capitalized param name
+ * @VALUE_TYPE: The macro returning the value GType
+ *
+ * Convenient function that avoid duplicated bug writing GLib boiler
+ * plate for #GType registration for a custom #GParamSpec.
+ *
+ * For example:
+ * <programlisting>
+ GS_DEFINE_PARAM (foo, Foo,bar, Bar, G_TYPE_INT);
+ * </programlisting>
+ *
+ * expands to:
+ *
+ * <programlisting>
+ GType
+ foo_param_bar_get_type () {
+ static GType type = 0;
+ if (!type) {
+ const GParamSpecTypeInfo info = {
+ sizeof (FooParamBarSpec),
+ 0, NULL, G_TYPE_INT,
+ NULL, NULL, NULL, NULL };
+ type = g_param_type_register_static ("FooParamBarSpec", &info);
+ }
+ return type;
+ }
+ * </programlisting>
+ *
+ * You'll then have to declare a #FooParamSpecBar structure as
+ * well as declaring foo_param_bar_get_type() and writing some macros.
+ **/
+#define GS_DEFINE_PARAM(prefix, Prefix, param_name, ParamName, VALUE_TYPE) \
+ static void prefix##_param_##param_name##_value_set_default (GParamSpec *pspec, GValue *value); \
+ static gint prefix##_param_##param_name##_values_cmp (GParamSpec *pspec, const GValue *a, const GValue *b); \
+ GType \
+ prefix##_param_##param_name##_get_type () { \
+ static GType type = 0; \
+ if (!type) { \
+ const GParamSpecTypeInfo info = { \
+ sizeof (Prefix##ParamSpec##ParamName), \
+ 0, NULL, VALUE_TYPE, \
+ NULL, \
+ prefix##_param_##param_name##_value_set_default, \
+ NULL, \
+ prefix##_param_##param_name##_values_cmp }; \
+ type = g_param_type_register_static (#Prefix "Param" #ParamName "Spec", &info); \
+ } \
+ return type; \
+ }
+
+/* GQuarks */
+#define GS_PARAM_GROUP_QUARK (gs_group_quark ())
+#define GS_PARAM_DOMAIN_QUARK (gs_domain_quark ())
+#define GS_PARAM_UNIT_QUARK (gs_unit_quark ())
+#define GS_PARAM_INDEX_QUARK (gs_index_quark ())
+#define GS_PARAM_WIDGET_TYPE_QUARK (gs_widget_type_quark ())
+#define GS_PARAM_FORMATS_QUARK (gs_formats_quark ())
+
+
+GQuark gs_group_quark (void) G_GNUC_CONST;
+GQuark gs_domain_quark (void) G_GNUC_CONST;
+GQuark gs_unit_quark (void) G_GNUC_CONST;
+GQuark gs_index_quark (void) G_GNUC_CONST;
+GQuark gs_widget_type_quark (void) G_GNUC_CONST;
+GQuark gs_formats_quark (void) G_GNUC_CONST;
+
+/**
+ * GS_PARAM_GROUP_SCANNER_FRONT:
+ *
+ * Scanner option group for not every user
+ **/
+#define GS_PARAM_GROUP_SCANNER_FRONT (gs_scanner_front_quark ())
+
+/**
+ * GS_PARAM_GROUP_SCANNER_FORMAT:
+ *
+ * Scanner option group for selecting paper format (paper size,
+ * orientation, etc.)
+ **/
+#define GS_PARAM_GROUP_FORMAT (gs_format_quark ())
+
+/**
+ * GS_PARAM_GROUP_SCANNER_FRONT:
+ *
+ * Scanner option group for not every user
+ **/
+#define GS_PARAM_GROUP_SINK_FRONT (gs_sink_front_quark ())
+
+/**
+ * GS_PARAM_GROUP_PREVIEW:
+ *
+ * Scanner option group for preview page. Option that's needs instant
+ * view of the effect of selecting them
+ **/
+#define GS_PARAM_GROUP_PREVIEW (gs_preview_quark())
+
+/**
+ * GS_PARAM_GROUP_HIDDEN:
+ *
+ * Scanner option group not shown to user
+ **/
+#define GS_PARAM_GROUP_HIDDEN (gs_hidden_quark())
+
+GQuark gs_scanner_front_quark (void) G_GNUC_CONST;
+GQuark gs_format_quark (void) G_GNUC_CONST;
+GQuark gs_sink_front_quark (void) G_GNUC_CONST;
+GQuark gs_preview_quark (void) G_GNUC_CONST;
+GQuark gs_hidden_quark (void) G_GNUC_CONST;
+
+GnomeScanFormat*
+gnome_scan_format_new (gchar *name,
+ gchar *domain,
+ gchar *description,
+ gchar **mime_types,
+ gchar **extensions);
+GQuark gs_param_spec_get_group (GParamSpec *spec);
+const gchar* gs_param_spec_get_group_string (GParamSpec *spec);
+void gs_param_spec_set_group (GParamSpec *spec, GQuark group);
+void gs_param_spec_set_group_from_string (GParamSpec *spec,
+ const gchar *group);
+
+void gs_param_spec_set_domain (GParamSpec *spec,
+ const gchar *domain);
+const gchar* gs_param_spec_get_domain (GParamSpec *spec);
+
+void gs_param_spec_set_unit (GParamSpec *spec,
+ GnomeScanUnit unit);
+GnomeScanUnit gs_param_spec_get_unit (GParamSpec *spec);
+
+void gs_param_spec_set_index (GParamSpec *spec,
+ guint index);
+guint gs_param_spec_get_index (GParamSpec *spec);
+
+void gs_param_spec_set_widget_type (GParamSpec *spec,
+ GType type);
+GType gs_param_spec_get_widget_type (GParamSpec *spec);
+
+gint gs_param_spec_cmp_index (GParamSpec*a,
+ GParamSpec *b);
+gint gs_param_spec_cmp_name (GParamSpec*a,
+ GParamSpec *b);
+
+gint gs_param_values_cmp (GParamSpec *pspec,
+ GValue *a,
+ GValue *b);
+
+
+GParamSpec* gs_param_spec_boolean (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ gboolean default_value,
+ GParamFlags flags);
+
+GParamSpec* gs_param_spec_int (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ gint minimum,
+ gint maximum,
+ gint default_value,
+ GParamFlags flags);
+
+GParamSpec* gs_param_spec_double (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ gdouble minimum,
+ gdouble maximum,
+ gdouble default_value,
+ GParamFlags flags);
+
+GParamSpec* gs_param_spec_string (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ const gchar* default_value,
+ GParamFlags flags);
+
+GParamSpec* gs_param_spec_pointer (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GType widget,
+ GParamFlags flags);
+
+/* RANGE */
+#define GS_TYPE_PARAM_RANGE (gs_param_range_get_type ())
+#define GS_PARAM_SPEC_RANGE(p) (G_TYPE_CHECK_INSTANCE_CAST ((p), GS_TYPE_PARAM_RANGE, GSParamSpecRange))
+#define GS_IS_PARAM_SPEC_RANGE(p) (G_TYPE_CHECK_INSTANCE_TYPE ((p), GS_TYPE_PARAM_RANGE))
+
+
+typedef struct _GSParamSpecRange GSParamSpecRange;
+/**
+ * GSParamSpecRange:
+ *
+ * This spec is used to select existing files.
+ */
+struct _GSParamSpecRange
+{
+ /*< private >*/
+ GParamSpec parent_instance;
+ /*< public >*/
+ GValue *minimum;
+ GValue *maximum;
+ GValue *step;
+ GValue *default_value;
+};
+
+GType gs_param_range_get_type (void) G_GNUC_CONST;
+GParamSpec* gs_param_spec_range (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GValue *minimum,
+ GValue *maximum,
+ GValue *step,
+ GValue *default_value,
+ GParamFlags flags);
+
+
+/* ENUM */
+#define GS_TYPE_PARAM_ENUM (gs_param_enum_get_type ())
+#define GS_PARAM_SPEC_ENUM(p) (G_TYPE_CHECK_INSTANCE_CAST ((p), GS_TYPE_PARAM_ENUM, GSParamSpecEnum))
+#define GS_IS_PARAM_SPEC_ENUM(p) (G_TYPE_CHECK_INSTANCE_TYPE ((p), GS_TYPE_PARAM_ENUM))
+
+
+typedef struct _GSParamSpecEnum GSParamSpecEnum;
+/**
+ * GSParamSpecEnum:
+ *
+ * This spec is used to select existing files.
+ */
+struct _GSParamSpecEnum
+{
+ /*< private >*/
+ GParamSpec parent_instance;
+
+ /*< public >*/
+ GValueArray *values;
+ GValue *default_value;
+};
+
+GType gs_param_enum_get_type (void) G_GNUC_CONST;
+GParamSpec* gs_param_spec_enum (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GValueArray *values,
+ GValue *default_value,
+ GParamFlags flags);
+
+
+
+/* PAPER SIZE */
+#define GS_TYPE_PARAM_PAPER_SIZE (gs_param_paper_size_get_type ())
+#define GS_PARAM_SPEC_PAPER_SIZE(p) (G_TYPE_CHECK_INSTANCE_CAST ((p), GS_TYPE_PARAM_PAPER_SIZE, GSParamSpecPaperSize))
+#define GS_IS_PARAM_SPEC_PAPER_SIZE(p) (G_TYPE_CHECK_INSTANCE_TYPE ((p), GS_TYPE_PARAM_PAPER_SIZE))
+
+
+typedef struct _GSParamSpecPaperSize GSParamSpecPaperSize;
+/**
+ * GSParamSpecPaperSize:
+ *
+ */
+struct _GSParamSpecPaperSize
+{
+ /*< private >*/
+ GParamSpec parent_instance;
+
+ /*< public >*/
+ GtkPaperSize* default_ps;
+ GSList* enumeration;
+};
+
+GType gs_param_paper_size_get_type (void) G_GNUC_CONST;
+GParamSpec* gs_param_spec_paper_size (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GtkPaperSize* default_ps,
+ GSList* enumeration,
+ GParamFlags flags);
+
+void gs_param_paper_size_get_extent (GSParamSpecPaperSize *ps,
+ GnomeScanUnit unit,
+ gdouble *width,
+ gdouble *height);
+
+/* PAGE ORIENTATION */
+#define GS_TYPE_PARAM_PAGE_ORIENTATION (gs_param_page_orientation_get_type ())
+#define GS_PARAM_SPEC_PAGE_ORIENTATION(p) (G_TYPE_CHECK_INSTANCE_CAST ((p), GS_TYPE_PARAM_PAGE_ORIENTATION, GSParamSpecPageOrientation))
+#define GS_IS_PARAM_SPEC_PAGE_ORIENTATION(p) (G_TYPE_CHECK_INSTANCE_TYPE ((p), GS_TYPE_PARAM_PAGE_ORIENTATION))
+
+
+typedef struct _GSParamSpecPageOrientation GSParamSpecPageOrientation;
+/**
+ * GSParamSpecPageOrientation:
+ *
+ */
+struct _GSParamSpecPageOrientation
+{
+ /*< private >*/
+ GParamSpec parent_instance;
+
+ /*< public >*/
+ guint default_value;
+};
+
+GType gs_param_page_orientation_get_type (void) G_GNUC_CONST;
+GParamSpec* gs_param_spec_page_orientation (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ guint default_value,
+ GParamFlags flags);
+
+
+
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PARAM_SPECS_H */
diff --git a/trunk/lib/gnome-scan-param-widget.c b/trunk/lib/gnome-scan-param-widget.c
new file mode 100644
index 0000000..47d9c1d
--- /dev/null
+++ b/trunk/lib/gnome-scan-param-widget.c
@@ -0,0 +1,422 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-param-widget
+ * @title: GnomeScanParamWidget
+ * @short_description: A generic parameter widget
+ *
+ * This widget build it self automatically considering the #GParamSpec
+ * passed to the constructor.
+ **/
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <glib/gi18n.h>
+#include "gnome-scan-param-widget.h"
+#include "gnome-scan-param-specs.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_PARAM_WIDGET, GnomeScanParamWidgetPrivate))
+#define I18N(gspw,text) dgettext (gs_param_spec_get_domain (GET_PRIVATE ((gspw))->pspec), text)
+
+typedef struct _GnomeScanParamWidgetPrivate GnomeScanParamWidgetPrivate;
+struct _GnomeScanParamWidgetPrivate
+{
+ GtkWidget *unit;
+ gboolean propagate;
+
+ gulong settings_changed_handler;
+};
+
+enum
+{
+ PROP_0,
+ PROP_SETTINGS,
+ PROP_PLUGIN,
+ PROP_PARAM_SPEC,
+ PROP_VALUE
+};
+
+static GtkHBoxClass* parent_class = NULL;
+
+void gspw_settings_changed (GnomeScanSettings *settings, gchar *key, GnomeScanParamWidget *gspw);
+
+G_DEFINE_TYPE (GnomeScanParamWidget, gnome_scan_param_widget, GTK_TYPE_HBOX);
+
+static void
+gnome_scan_param_widget_init (GnomeScanParamWidget *object)
+{
+ object->value = g_new0 (GValue, 1);
+}
+
+GObject*
+gnome_scan_param_widget_constructor (GType type, guint n_params, GObjectConstructParam *params)
+{
+ GValue *value;
+ gchar* unit;
+ GObject *object =
+ G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (object);
+ GnomeScanParamWidgetPrivate *priv = GET_PRIVATE (gspw);
+ GnomeScanParamWidgetClass *klass = GNOME_SCAN_PARAM_WIDGET_GET_CLASS (gspw);
+
+ gtk_box_set_spacing (GTK_BOX (gspw), 6);
+
+ /* default value */
+ value = gnome_scan_settings_get (gspw->settings,
+ g_param_spec_get_name (gspw->pspec));
+ g_value_init (gspw->value, G_PARAM_SPEC_VALUE_TYPE (gspw->pspec));
+ g_param_value_set_default (gspw->pspec, gspw->value);
+
+ if (value) {
+ g_value_transform (value, gspw->value);
+ }
+ else {
+ gnome_scan_settings_set (gspw->settings,
+ g_param_spec_get_name (gspw->pspec),
+ g_boxed_copy (G_TYPE_VALUE,
+ gspw->value));
+ }
+
+ klass->build (GNOME_SCAN_PARAM_WIDGET (object));
+ if (!gspw->shows_unit) {
+ priv->unit = gtk_label_new(NULL);
+ switch (gs_param_spec_get_unit (gspw->pspec)) {
+ case GS_UNIT_PIXEL:
+ /* translator: unit pixel */
+ unit = _("px");
+ break;
+ case GS_UNIT_BIT:
+ /* translator: unit bit */
+ unit = _("bit");
+ break;
+ case GS_UNIT_MM:
+ /* translator: unit millimeter */
+ unit = _("mm");
+ break;
+ case GS_UNIT_DPI:
+ /* translator: unit dot per inch */
+ unit = _("dpi");
+ break;
+ case GS_UNIT_PERCENT:
+ /* translator: unit percent */
+ unit = _("%");
+ break;
+ case GS_UNIT_MICROSECOND:
+ /* translator: unit microsecond */
+ unit = _("ms");
+ break;
+ case GS_UNIT_NONE:
+ default:
+ unit = NULL;
+ break;
+ };
+
+ if (unit) {
+ priv->unit = gtk_label_new (unit);
+ gtk_box_pack_start (GTK_BOX (object), priv->unit, FALSE, FALSE, 0);
+ }
+ }
+
+ klass->set (gspw, gspw->value);
+ /*klass->show (gspw);*/
+
+ priv->propagate = TRUE;
+ priv->settings_changed_handler =
+ g_signal_connect (gspw->settings, "changed",
+ (GCallback) gspw_settings_changed,
+ gspw);
+
+ return object;
+}
+
+static void
+gnome_scan_param_widget_finalize (GObject *object)
+{
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET(object);
+ GnomeScanParamWidgetPrivate *priv = GET_PRIVATE (gspw);
+ g_signal_handler_disconnect (gspw->settings,
+ priv->settings_changed_handler);
+ g_value_unset (gspw->value);
+ g_free (gspw->value);
+ g_object_unref(gspw->settings);
+ g_object_unref(gspw->plugin);
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_param_widget_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PARAM_WIDGET (object));
+
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (object);
+ switch (prop_id)
+ {
+ case PROP_SETTINGS:
+ gspw->settings = GNOME_SCAN_SETTINGS (g_value_dup_object (value));
+ break;
+ case PROP_PLUGIN:
+ gspw->plugin = GNOME_SCAN_PLUGIN (g_value_dup_object (value));
+ break;
+ case PROP_PARAM_SPEC:
+ gspw->pspec = g_value_get_pointer (value);
+ break;
+ case PROP_VALUE:
+ gnome_scan_param_widget_set_value (GNOME_SCAN_PARAM_WIDGET (object),
+ g_value_get_boxed (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_param_widget_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PARAM_WIDGET (object));
+
+ switch (prop_id)
+ {
+ case PROP_PARAM_SPEC:
+ /* TODO: Add getter for "param-spec" property here */
+ break;
+ case PROP_VALUE:
+ g_value_set_boxed (value,
+ gnome_scan_param_widget_get_value (GNOME_SCAN_PARAM_WIDGET (object)));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_param_widget_class_init (GnomeScanParamWidgetClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = GTK_HBOX_CLASS (g_type_class_peek_parent (klass));
+
+ g_type_class_add_private (klass, sizeof (GnomeScanParamWidgetPrivate));
+ object_class->constructor = gnome_scan_param_widget_constructor;
+ object_class->finalize = gnome_scan_param_widget_finalize;
+ object_class->set_property = gnome_scan_param_widget_set_property;
+ object_class->get_property = gnome_scan_param_widget_get_property;
+
+ /**
+ * GnomeScanParamWidget:settings:
+ *
+ **/
+ g_object_class_install_property (object_class,
+ PROP_SETTINGS,
+ g_param_spec_object ("settings",
+ "Settings",
+ "The #GnomeScanSettings where to store value",
+ GNOME_TYPE_SCAN_SETTINGS,
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+
+ /**
+ * GnomeScanParamWidget:plugin:
+ *
+ **/
+ g_object_class_install_property (object_class,
+ PROP_PLUGIN,
+ g_param_spec_object ("plugin",
+ "Plugin",
+ "The #GnomeScanPlugin the widget is configuring",
+ GNOME_TYPE_SCAN_PLUGIN,
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+
+ /**
+ * GnomeScanParamWidget:param-spec:
+ *
+ * The param spec the widget is representing. A widget can handle
+ * only one #GParamSpec per instance, the widget being builded
+ * upon construction depending on the #GParamSpec.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_PARAM_SPEC,
+ g_param_spec_pointer ("param-spec",
+ "Param Spec",
+ "The parameter specification the widget is handling",
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+
+ /**
+ * GnomeScanParamWidget:value:
+ *
+ * The current value associated with the param-spec.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_VALUE,
+ g_param_spec_boxed ("value",
+ "Value",
+ "The parameter value.",
+ G_TYPE_VALUE,
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+/**
+ * gnome_scan_param_widget_new:
+ * @settings: The #GnomeScanSettings where to store values
+ * @plugin: The #GnomeScanPlugin to configure
+ * @pspec: The #GParamSpec to be managed
+ *
+ * Build a new #GnomeScanParamWidget from @pspec
+ * widget_type. Initialize settings with @pspec default value if
+ * needed.
+ *
+ * Returns: The new #GnomeScanParamWidget
+ **/
+GtkWidget*
+gnome_scan_param_widget_new (GnomeScanSettings *settings,
+ GnomeScanPlugin *plugin,
+ GParamSpec *pspec)
+{
+ GType type = gs_param_spec_get_widget_type (pspec);
+
+ if (type == G_TYPE_INVALID) {
+ g_warning ("%s: No widget type for param %s (%s)", __FUNCTION__,
+ G_PARAM_SPEC_TYPE_NAME (pspec),
+ G_PARAM_SPEC_TYPE_NAME (pspec));
+ return NULL;
+ }
+
+ GObject *object =
+ g_object_new (type,
+ "settings", settings,
+ "plugin", plugin,
+ "param-spec", pspec,
+ NULL);
+
+ return GTK_WIDGET (object);
+}
+
+/**
+ * gnome_scan_param_widget_get_param_spec:
+ * @widget: a #GnomeScanParamWidget
+ *
+ * Retrieve the spec the widget is representing.
+ *
+ * Returns: a pointer to the widget param spec
+ **/
+GParamSpec*
+gnome_scan_param_widget_get_param_spec (GnomeScanParamWidget *widget)
+{
+ return widget->pspec;
+}
+
+/**
+ * gnome_scan_param_widget_set_value:
+ * @widget: a #GnomeScanParamWidget
+ * @value: a #GValue
+ *
+ * Set the value of the widget. It's up to you to ensure the value
+ * correspond to the param spec.
+ **/
+void
+gnome_scan_param_widget_set_value (GnomeScanParamWidget *widget, GValue *value)
+{
+ g_value_copy (value, widget->value);
+ GNOME_SCAN_PARAM_WIDGET_GET_CLASS (widget)->set (widget, value);
+}
+
+/**
+ * gnome_scan_param_widget_get_value:
+ * @widget: a #GnomeScanParamWidget
+ *
+ * Retrieve the current value the user setted.
+ *
+ * Returns: a #GValue
+ **/
+GValue*
+gnome_scan_param_widget_get_value (GnomeScanParamWidget *widget)
+{
+ return widget->value;
+}
+
+/**
+ * gnome_scan_param_widget_shows_label:
+ * @widget: a #GnomeScanParamWidget
+ *
+ * A #GnomeScanParamWidget can show itself the param nick or other
+ * label. If not, the parent container can show the @pspec nickname in
+ * e.g. a #GtkTable. This function allow the parent to know wether the
+ * label is already shown or not.
+ *
+ * Returns: TRUE if the @widget shows the label.
+ **/
+gboolean
+gnome_scan_param_widget_shows_label (GnomeScanParamWidget *widget)
+{
+ return widget->shows_label;
+}
+
+/**
+ * gnome_scan_param_widget_expands:
+ * @widget: a #GnomeScanParamWidget
+ *
+ * This function helps parent to know how to pack/attach the @widget
+ * in a container. If the widget is huge (e.g. it contains a preview),
+ * then it make sense to expands this widget. This function returns
+ * wether this widget should expands or not.
+ *
+ * Returns: TRUE if the @widget should expand.
+ **/
+gboolean
+gnome_scan_param_widget_expands (GnomeScanParamWidget *widget)
+{
+ return widget->expands;
+}
+
+
+/**
+ * gnome_scan_param_widget_changed:
+ * @widget: a #GnomeScanParamWidget
+ *
+ * Trigger changed signal, as if user have touched the GUI.
+ **/
+void
+gnome_scan_param_widget_changed (GnomeScanParamWidget *widget)
+{
+ GnomeScanParamWidgetPrivate *priv = GET_PRIVATE (widget);
+ if (priv->propagate) {
+ gnome_scan_settings_set (widget->settings,
+ g_param_spec_get_name (widget->pspec),
+ widget->value);
+ gnome_scan_plugin_configure (widget->plugin, widget->settings);
+ }
+}
+
+/* INTERNAL */
+void
+gspw_settings_changed (GnomeScanSettings *settings,
+ gchar *key,
+ GnomeScanParamWidget *gspw)
+{
+ GnomeScanParamWidgetClass *klass = GNOME_SCAN_PARAM_WIDGET_GET_CLASS (gspw);
+ GnomeScanParamWidgetPrivate *priv = GET_PRIVATE (gspw);
+
+ if (priv->propagate && g_str_equal (key, g_param_spec_get_name (gspw->pspec))) {
+ priv->propagate = FALSE;
+ klass->set (gspw, gnome_scan_settings_get (settings, key));
+ priv->propagate = TRUE;
+ }
+}
diff --git a/trunk/lib/gnome-scan-param-widget.h b/trunk/lib/gnome-scan-param-widget.h
new file mode 100644
index 0000000..611c0c1
--- /dev/null
+++ b/trunk/lib/gnome-scan-param-widget.h
@@ -0,0 +1,123 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_PARAM_WIDGET_H_
+#define _GNOME_SCAN_PARAM_WIDGET_H_
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+#include "gnome-scan-settings.h"
+#include "gnome-scan-plugin.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PARAM_WIDGET (gnome_scan_param_widget_get_type ())
+#define GNOME_SCAN_PARAM_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PARAM_WIDGET, GnomeScanParamWidget))
+#define GNOME_SCAN_PARAM_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_PARAM_WIDGET, GnomeScanParamWidgetClass))
+#define GNOME_IS_SCAN_PARAM_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_PARAM_WIDGET))
+#define GNOME_IS_SCAN_PARAM_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_PARAM_WIDGET))
+#define GNOME_SCAN_PARAM_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_PARAM_WIDGET, GnomeScanParamWidgetClass))
+
+/**
+ * GS_DEFINE_PARAM_WIDGET:
+ * @TypeName: class name
+ * @type_name: function prefix
+ *
+ * Generate all boiler plate code for creating a new #GnomeScanParamWidget
+ * derived class.
+ **/
+#define GS_DEFINE_PARAM_WIDGET(TypeName, type_name) \
+ G_DEFINE_TYPE(TypeName, type_name, GNOME_TYPE_SCAN_PARAM_WIDGET) \
+ \
+ static void type_name##_finalize (GObject *object); \
+ static void type_name##_build (GnomeScanParamWidget *widget); \
+ static void type_name##_set (GnomeScanParamWidget *widget, GValue *value); \
+ static void \
+ type_name##_class_init (TypeName##Class *klass) { \
+ GObjectClass* object_class = G_OBJECT_CLASS (klass); \
+ g_type_class_add_private(object_class, sizeof (TypeName##Private)); \
+ GnomeScanParamWidgetClass *parent_class = GNOME_SCAN_PARAM_WIDGET_CLASS (klass); \
+ parent_class->build = type_name##_build; \
+ parent_class->set = type_name##_set; \
+ object_class->finalize = type_name##_finalize; \
+ }
+
+/**
+ * GS_DEFINE_PARAM_WIDGET_HEADER:
+ * @TypeName: class name
+ * @type_name: function prefix
+ *
+ * Generate all boiler plate header declaration for creating a new
+ * #GnomeScanParamWidget derived class.
+ **/
+#define GS_DEFINE_PARAM_WIDGET_HEADER(TypeName, type_name) \
+ typedef struct _##TypeName##Class TypeName##Class; \
+ \
+ struct _##TypeName##Class \
+ { \
+ GnomeScanParamWidgetClass parent_class; \
+ }; \
+ GType type_name##_get_type (void) G_GNUC_CONST;
+
+
+typedef struct _GnomeScanParamWidgetClass GnomeScanParamWidgetClass;
+typedef struct _GnomeScanParamWidget GnomeScanParamWidget;
+
+struct _GnomeScanParamWidgetClass
+{
+ GtkHBoxClass parent_class;
+
+ /* Interface */
+ void (* build) (GnomeScanParamWidget *widget);
+ void (* show) (GnomeScanParamWidget *widget);
+ void (* set) (GnomeScanParamWidget *gspw, GValue *value);
+};
+
+struct _GnomeScanParamWidget
+{
+ /*< private >*/
+ GtkHBox parent_instance;
+
+ /*< public >*/
+ GnomeScanSettings* settings;
+ GnomeScanPlugin* plugin;
+ GParamSpec *pspec;
+ GValue *value;
+
+ gboolean shows_label;
+ gboolean expands;
+ gboolean shows_unit;
+};
+
+GType gnome_scan_param_widget_get_type (void) G_GNUC_CONST;
+GtkWidget* gnome_scan_param_widget_new (GnomeScanSettings *settings,
+ GnomeScanPlugin *plugin,
+ GParamSpec *pspec);
+GParamSpec* gnome_scan_param_widget_get_param_spec (GnomeScanParamWidget *widget);
+void gnome_scan_param_widget_set_value (GnomeScanParamWidget *widget, GValue *value);
+GValue* gnome_scan_param_widget_get_value (GnomeScanParamWidget *widget);
+void gnome_scan_param_widget_changed (GnomeScanParamWidget *widget);
+gboolean gnome_scan_param_widget_shows_label (GnomeScanParamWidget *widget);
+gboolean gnome_scan_param_widget_expands (GnomeScanParamWidget *widget);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PARAM_WIDGET_H_ */
diff --git a/trunk/lib/gnome-scan-plugin.c b/trunk/lib/gnome-scan-plugin.c
new file mode 100644
index 0000000..f21360d
--- /dev/null
+++ b/trunk/lib/gnome-scan-plugin.c
@@ -0,0 +1,570 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-plugin
+ * @short_description: Scan operation plugin
+ * @include: gnome-scan.h
+ *
+ * A #GnomeScanPlugin extends the processing pipeline. Only processing
+ * plugin derive directly #GnomeScanPlugin. Source and Sink must
+ * derive from #GnomeScanner and #GnomeScanSink. Basically, a plugin
+ * handle common properties such as @name, @blurb and @params. Each
+ * plugins as a per instance list of params. Those params are exposed
+ * to the UI and save in #GnomeScanSettings.
+ **/
+
+#include "gnome-scan-plugin.h"
+#include "gnome-scan-param-specs.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_PLUGIN, GnomeScanPluginPrivate))
+
+typedef struct _GnomeScanPluginPrivate GnomeScanPluginPrivate;
+
+struct _GnomeScanPluginPrivate
+{
+ gchar* name;
+ gchar* blurb;
+};
+
+enum
+{
+ PROP_0,
+ PROP_NAME,
+ PROP_BLURB,
+ PROP_PARAMS
+};
+
+enum
+{
+ PARAMS_CHANGED,
+ LAST_SIGNAL
+};
+
+static GObjectClass* parent_class = NULL;
+static guint signals[LAST_SIGNAL] = { 0 };
+
+G_DEFINE_TYPE (GnomeScanPlugin, gnome_scan_plugin, G_TYPE_OBJECT);
+
+static void
+gnome_scan_plugin_init (GnomeScanPlugin *object)
+{
+ object->params = g_param_spec_pool_new (FALSE);
+}
+
+static void
+gnome_scan_plugin_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_plugin_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PLUGIN (object));
+
+ switch (prop_id)
+ {
+ case PROP_NAME:
+ GET_PRIVATE (object)->name = g_value_dup_string (value);
+ break;
+ case PROP_BLURB:
+ GET_PRIVATE (object)->blurb = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_plugin_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PLUGIN (object));
+
+ switch (prop_id)
+ {
+ case PROP_NAME:
+ g_value_set_string (value, gnome_scan_plugin_get_name (GNOME_SCAN_PLUGIN (object)));
+ break;
+ case PROP_BLURB:
+ g_value_set_string (value, GET_PRIVATE (object)->blurb);
+ break;
+ case PROP_PARAMS:
+ g_value_set_pointer (value, GNOME_SCAN_PLUGIN (object)->params);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_plugin_class_init (GnomeScanPluginClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
+
+ g_type_class_add_private (klass, sizeof (GnomeScanPluginPrivate));
+ object_class->finalize = gnome_scan_plugin_finalize;
+ object_class->set_property = gnome_scan_plugin_set_property;
+ object_class->get_property = gnome_scan_plugin_get_property;
+
+ /**
+ * GnomeScanPlugin:name:
+ *
+ * The plugin public name.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_NAME,
+ g_param_spec_string ("name",
+ "Name",
+ "Plugin public name",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+
+ /**
+ * GnomeScanPlugin:blurb:
+ *
+ * The plugin public blurb.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_BLURB,
+ g_param_spec_string ("blurb",
+ "Blurb",
+ "Plugin public description.",
+ NULL,
+ G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+
+ /**
+ * GnomeScanPlugin:params:
+ *
+ * The list of per instance #GSParamSpec.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_PARAMS,
+ g_param_spec_pointer ("params",
+ "Parameters",
+ "Pool of plugin parameters specification.",
+ G_PARAM_READABLE));
+
+ /**
+ * GnomeScanPlugin::params-changed:
+ * @plugin: the emitting #GnomeScanPlugin
+ * @spec: the spec of the changed parameter
+ *
+ * Triggered when one param of plugin has been added, changed,
+ * removed. Needs to be renamed to param-changed.
+ **/
+ signals[PARAMS_CHANGED] =
+ g_signal_new ("params-changed",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GnomeScanPluginClass, changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+}
+
+
+/**
+ * gnome_scan_plugin_get_name:
+ * @plugin: a #GnomeScanPlugin
+ *
+ * Returns: the @plugin name
+ **/
+gchar*
+gnome_scan_plugin_get_name (GnomeScanPlugin *plugin)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_PLUGIN (plugin), NULL);
+ return g_strdup (GET_PRIVATE (plugin)->name);
+}
+
+/**
+ * gnome_scan_plugin_params_add:
+ * @plugin: a #GnomeScanPlugin
+ * @param: a #GSParamSpec
+ *
+ * See: %gnome-scan-param-specs
+ **/
+void
+gnome_scan_plugin_params_add (GnomeScanPlugin *plugin, GParamSpec *param)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PLUGIN (plugin));
+ g_param_spec_pool_insert (plugin->params, param, G_OBJECT_TYPE (plugin));
+ gnome_scan_plugin_params_changed (plugin, param);
+}
+
+/**
+ * gnome_scan_plugin_params_remove:
+ * @plugin: a #GnomeScanPlugin
+ * @param: a #GSParamSpec
+ *
+ * Remove a param spec from the param list.
+ **/
+void
+gnome_scan_plugin_params_remove (GnomeScanPlugin *plugin, GParamSpec *param)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PLUGIN (plugin));
+ g_param_spec_pool_remove (plugin->params, param);
+ gnome_scan_plugin_params_changed (plugin, NULL);
+}
+
+/**
+ * gnome_scan_plugin_params_clear:
+ * @plugin: a #GnomeScanPlugin
+ *
+ * Remove all instance parameters from a plugin.
+ **/
+void
+gnome_scan_plugin_params_clear (GnomeScanPlugin *plugin)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PLUGIN (plugin));
+ GList *node;
+
+ node = g_param_spec_pool_list_owned (plugin->params, G_OBJECT_TYPE (plugin));
+
+ for (; node; node = node->next)
+ g_param_spec_pool_remove (plugin->params, node->data);
+
+ gnome_scan_plugin_params_changed (plugin, NULL);
+}
+
+/**
+ * gnome_scan_plugin_get_params:
+ * @plugin: a #GnomeScanPlugin
+ *
+ * Retrieve all instance paramters from @plugin.
+ *
+ * Returns: a GList of #GSParamSpec.
+ **/
+GList*
+gnome_scan_plugin_get_params (GnomeScanPlugin *plugin)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_PLUGIN (plugin), NULL);
+ GList *params = NULL;
+
+ params = g_param_spec_pool_list_owned (plugin->params,
+ G_OBJECT_TYPE (plugin));
+ params = g_list_sort (params, (GCompareFunc) gs_param_spec_cmp_index);
+ return params;
+}
+
+/**
+ * gnome_scan_plugin_params_get_groups:
+ * @plugin: a #GnomeScanPlugin
+ *
+ * The options must be ordered by groups in order this function not to
+ * duplicate groups. When writing a #GnomeScanPlugin, ensure that
+ * sorting option by index keep groups's options sibling.
+ *
+ * Returns: a #GSList of groups #GQuark.
+ **/
+GSList*
+gnome_scan_plugin_params_get_groups (GnomeScanPlugin *plugin)
+{
+ GSList* groups = NULL;
+ GList* node = gnome_scan_plugin_get_params(plugin);
+ GQuark cur_group = 0, last_group = 0;
+
+ for (; node ; node = node->next) {
+ cur_group = gs_param_spec_get_group (node->data);
+ if (!last_group || last_group != cur_group) {
+ groups = g_slist_append (groups, (gpointer) cur_group);
+ last_group = cur_group;
+ }
+ }
+
+ return groups;
+}
+
+/**
+ * gnome_scan_plugin_params_get_other_groups:
+ * @plugin: a #GnomeScanPlugin
+ * @known_group0: the first known group #GQuark
+ * @...: A 0 terminated list of group #GQuark
+ *
+ * Return all group #GQuark except the one listed as parameter. This
+ * is useful if you want e.g. all param group except preview params
+ * group.
+ *
+ * Returns: a #GSList of #GQuark.
+ **/
+GSList*
+gnome_scan_plugin_params_get_other_groups (GnomeScanPlugin *plugin,
+ GQuark known_group0, ...)
+{
+ va_list args;
+ va_start (args, known_group0);
+ GSList *groups = gnome_scan_plugin_params_get_groups (plugin);
+ GQuark known_group;
+
+ /* list known group not to list */
+ known_group = known_group0;
+ while (known_group) {
+ groups = g_slist_remove_all (groups, (gpointer) known_group);
+ known_group = va_arg (args, GQuark);
+ }
+
+ return groups;
+}
+
+/**
+ * gnome_scan_plugin_get_param_group:
+ * @plugin: a #GnomeScanPlugin
+ * @group: a group #GQuark
+ *
+ * Return all instance parameters which have @group as group.
+ *
+ * Returns: a GList of #GSParamSpec.
+ **/
+GSList*
+gnome_scan_plugin_get_param_group (GnomeScanPlugin *plugin, GQuark group)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_PLUGIN (plugin), NULL);
+ GSList *list = NULL;
+ gint i;
+ guint n;
+ GQuark pgroup;
+ GParamSpec **specs =
+ g_param_spec_pool_list (plugin->params,
+ G_OBJECT_TYPE (plugin), &n);
+
+ for (i = 0; i < n; i++) {
+ pgroup = gs_param_spec_get_group (specs[i]);
+ if (pgroup == group)
+ list = g_slist_append (list, specs[i]);
+ }
+
+ list = g_slist_sort (list, (GCompareFunc) gs_param_spec_cmp_index);
+
+ return list;
+}
+
+/**
+ * gnome_scan_plugin_get_param_groups:
+ * @plugin: a #GnomeScanPlugin
+ * @group0: The first group #GQuark
+ * @...: A 0 terminated list of group @GQuark
+ *
+ * List all params which belong to groups.
+ *
+ * Returns: a #GSList of #GParamSpec
+ **/
+GSList*
+gnome_scan_plugin_get_param_groups (GnomeScanPlugin *plugin,
+ GQuark group0, ...)
+{
+ GSList *groups = NULL;
+ GQuark group;
+ va_list args;
+ va_start(args, group0);
+
+ group = group0;
+ while (group) {
+ groups = g_slist_concat (groups,
+ gnome_scan_plugin_get_param_group (plugin, group));
+ group = va_arg(args, GQuark);
+ }
+
+ return groups;
+}
+
+/**
+ * gnome_scan_plugin_params_lookup:
+ * @plugin: a #GnomeScanPlugin
+ * @name: The name of the searched parameter
+ *
+ * Search the param spec pool for parameter @name.
+ *
+ * Returns: a #GParamSpec or NULL.
+ **/
+GParamSpec*
+gnome_scan_plugin_params_lookup (GnomeScanPlugin *plugin,
+ const gchar *name)
+{
+ return g_param_spec_pool_lookup (plugin->params,
+ name,
+ G_OBJECT_TYPE (plugin),
+ FALSE);
+}
+
+/**
+ * gnome_scan_plugin_params_foreach:
+ * @plugin: #GnomeScanPlugin
+ * @func: user callback
+ * @user_data: pointer to data passed as argument to @func.
+ *
+ * Execute @func for each @plugin's params.
+ **/
+void
+gnome_scan_plugin_params_foreach (GnomeScanPlugin *plugin,
+ GFunc func,
+ gpointer user_data)
+{
+ GList *list = g_param_spec_pool_list_owned (plugin->params, G_OBJECT_TYPE (plugin));
+ g_list_foreach (list, func, user_data);
+}
+
+#define gs_exec_class_func_ret(k,f,d,a...) if(k->f){return klass->f(a);}else{return d;}
+#define gs_exec_class_func(k,f,a...) if(k->f){klass->f(a);}
+
+/**
+ * gnome_scan_plugin_configure:
+ * @plugin: a #GnomeScanPlugin
+ * @settings: a #GnomeScanPlugin
+ *
+ * Note: Implemented by derived class, called by #GnomeScanJob.
+ *
+ * Search in @settings value for its instance parameters.
+ **/
+void
+gnome_scan_plugin_configure (GnomeScanPlugin *plugin, GnomeScanSettings *settings)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PLUGIN (plugin) && GNOME_IS_SCAN_SETTINGS (settings));
+ GnomeScanPluginClass *klass = GNOME_SCAN_PLUGIN_GET_CLASS (plugin);
+ gs_exec_class_func(klass, configure, plugin, settings);
+}
+
+/**
+ * gnome_scan_plugin_get_child_nodes:
+ * @plugin: a #GnomeScanPlugin:
+ * @root: a root #GeglNode
+ *
+ * Note: Implemented by derived class, called by #GnomeScanJob.
+ *
+ * Return the list of #GeglNode to append to the
+ * pipeline. #GnomeScanJob link "input" and "output" pads of sibling
+ * nodes, not auxiliary pad.
+ *
+ * Returns: a #GList of #GeglNode
+ **/
+GList*
+gnome_scan_plugin_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_PLUGIN (plugin), NULL);
+ GnomeScanPluginClass *klass = GNOME_SCAN_PLUGIN_GET_CLASS (plugin);
+ gs_exec_class_func_ret(klass, get_child_nodes, NULL, plugin, root);
+}
+
+/**
+ * gnome_scan_plugin_configure_frame:
+ * @plugin: a #GnomeScanPlugin
+ *
+ * Note: Implemented by derived class, called by #GnomeScanJob.
+ *
+ * This is used especially for per frame GEGL pipeline configuration.
+ **/
+void
+gnome_scan_plugin_configure_frame (GnomeScanPlugin *plugin)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PLUGIN (plugin));
+ GnomeScanPluginClass *klass = GNOME_SCAN_PLUGIN_GET_CLASS (plugin);
+ gs_exec_class_func(klass, configure_frame, plugin);
+}
+
+/**
+ * gnome_scan_plugin_start_frame:
+ * @plugin: a #GnomeScanPlugin
+ *
+ * Note: Implemented by derived class, called by #GnomeScanJob.
+ *
+ * Returns: wether the frame is to be processed or aborted.
+ **/
+gboolean
+gnome_scan_plugin_start_frame (GnomeScanPlugin *plugin)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_PLUGIN (plugin), FALSE);
+ GnomeScanPluginClass *klass = GNOME_SCAN_PLUGIN_GET_CLASS (plugin);
+ gs_exec_class_func_ret(klass, start_frame, TRUE, plugin);
+}
+
+/**
+ * gnome_scan_plugin_work:
+ * @plugin: a #GnomeScanPlugin
+ * @progress: a pointer to a place where to store progress
+ *
+ * Note: Implemented by derived class, called by #GnomeScanJob.
+ *
+ * Do an iteration of plugin work. Store the amount of work done in
+ * progress as a fraction, from 0 to 1. progress set to 1 means work
+ * completed.
+ *
+ * Returns: Wether more work iteration needs to be done.
+ **/
+gboolean
+gnome_scan_plugin_work (GnomeScanPlugin *plugin,
+ gdouble *progress)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_PLUGIN (plugin), FALSE);
+ GnomeScanPluginClass *klass = GNOME_SCAN_PLUGIN_GET_CLASS (plugin);
+ *progress = 1.;
+ gs_exec_class_func_ret(klass, work, FALSE, plugin, progress);
+}
+
+
+/**
+ * gnome_scan_plugin_end_frame:
+ * @plugin: a #GnomeScanPlugin
+ *
+ * Note: Implemented by derived class, called by #GnomeScanJob.
+ **/
+void
+gnome_scan_plugin_end_frame (GnomeScanPlugin *plugin)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PLUGIN (plugin));
+ GnomeScanPluginClass *klass = GNOME_SCAN_PLUGIN_GET_CLASS (plugin);
+ gs_exec_class_func(klass, end_frame, plugin);
+}
+
+
+/**
+ * gnome_scan_plugin_end_scan:
+ * @plugin: a #GnomeScanPlugin
+ *
+ * Note: Implemented by derived class, called by #GnomeScanJob.
+ **/
+void
+gnome_scan_plugin_end_scan (GnomeScanPlugin *plugin)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PLUGIN (plugin));
+ GnomeScanPluginClass *klass = GNOME_SCAN_PLUGIN_GET_CLASS (plugin);
+ gs_exec_class_func(klass, end_scan, plugin);
+}
+
+/**
+ * gnome_scan_plugin_params_changed:
+ * @plugin: a #GnomeScanPlugin
+ * @spec: a #GParamSpec from @plugin
+ *
+ * Emit #GnomeScanPlugin::changed for @spec param. For use in derived
+ * class.
+ */
+void
+gnome_scan_plugin_params_changed (GnomeScanPlugin *plugin,
+ GParamSpec *spec)
+{
+ g_signal_emit (plugin, signals[PARAMS_CHANGED], 0, spec);
+}
+
diff --git a/trunk/lib/gnome-scan-plugin.h b/trunk/lib/gnome-scan-plugin.h
new file mode 100644
index 0000000..3afdc7f
--- /dev/null
+++ b/trunk/lib/gnome-scan-plugin.h
@@ -0,0 +1,132 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#ifndef _GNOME_SCAN_PLUGIN_H_
+#define _GNOME_SCAN_PLUGIN_H_
+
+#include <glib-object.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gegl.h>
+#include <gegl-buffer.h>
+#include "gnome-scan-plugin.h"
+#include "gnome-scan-settings.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PLUGIN (gnome_scan_plugin_get_type ())
+#define GNOME_SCAN_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PLUGIN, GnomeScanPlugin))
+#define GNOME_SCAN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_PLUGIN, GnomeScanPluginClass))
+#define GNOME_IS_SCAN_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_PLUGIN))
+#define GNOME_IS_SCAN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_PLUGIN))
+#define GNOME_SCAN_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_PLUGIN, GnomeScanPluginClass))
+
+typedef struct _GnomeScanPluginClass GnomeScanPluginClass;
+typedef struct _GnomeScanPlugin GnomeScanPlugin;
+
+struct _GnomeScanPluginClass
+{
+ GObjectClass parent_class;
+
+
+
+ /* Plugin API */
+ void (* configure) (GnomeScanPlugin *plugin,
+ GnomeScanSettings *settings);
+ GList* (* get_child_nodes) (GnomeScanPlugin *plugin,
+ GeglNode *root);
+ void (* configure_frame) (GnomeScanPlugin *plugin);
+ gboolean (* start_frame) (GnomeScanPlugin *plugin);
+ gboolean (* work) (GnomeScanPlugin *plugin,
+ gdouble *progress);
+ void (* end_frame) (GnomeScanPlugin *plugin);
+ void (* end_scan) (GnomeScanPlugin *plugin);
+
+
+ /* Signals */
+ void (* changed) (GnomeScanPlugin *plugin,
+ GParamSpec *spec,
+ gpointer data);
+};
+
+/**
+ * GnomeScanPlugin:
+ * @params: the pool of params
+ *
+ * #GnomeScanPlugin is the base class for #GnomeScanner and
+ * #GnomeScanSink. The @buffer property is considered as the output of
+ * #a #GnomeScanner, and the input of a #GnomeScanSink.
+ **/
+struct _GnomeScanPlugin
+{
+ /*< private >*/
+ GObject parent_instance;
+
+ GList *nodes;
+ /*< public >*/
+ GParamSpecPool *params;
+};
+
+GType gnome_scan_plugin_get_type (void) G_GNUC_CONST;
+gchar* gnome_scan_plugin_get_name (GnomeScanPlugin *plugin);
+GList* gnome_scan_plugin_get_params (GnomeScanPlugin *plugin);
+GSList* gnome_scan_plugin_params_get_groups (GnomeScanPlugin *plugin);
+GSList* gnome_scan_plugin_params_get_other_groups (GnomeScanPlugin *plugin,
+ GQuark known_group0,
+ ...);
+GSList* gnome_scan_plugin_get_param_group (GnomeScanPlugin *plugin,
+ GQuark group);
+GSList* gnome_scan_plugin_get_param_groups (GnomeScanPlugin *plugin,
+ GQuark group0,
+ ...);
+void gnome_scan_plugin_params_add (GnomeScanPlugin *plugin,
+ GParamSpec *param);
+void gnome_scan_plugin_params_remove (GnomeScanPlugin *plugin,
+ GParamSpec *param);
+void gnome_scan_plugin_params_clear (GnomeScanPlugin *plugin);
+GParamSpec* gnome_scan_plugin_params_lookup (GnomeScanPlugin *plugin,
+ const gchar *name);
+void gnome_scan_plugin_params_foreach (GnomeScanPlugin *plugin,
+ GFunc func,
+ gpointer user_data);
+void gnome_scan_plugin_params_changed (GnomeScanPlugin *plugin,
+ GParamSpec *spec);
+
+
+
+void gnome_scan_plugin_configure (GnomeScanPlugin *plugin,
+ GnomeScanSettings *settings);
+
+void gnome_scan_plugin_configure_frame (GnomeScanPlugin *plugin);
+gboolean gnome_scan_plugin_start_frame (GnomeScanPlugin *plugin);
+gboolean gnome_scan_plugin_work (GnomeScanPlugin *plugin,
+ gdouble *progress);
+
+void gnome_scan_plugin_end_frame (GnomeScanPlugin *plugin);
+
+void gnome_scan_plugin_end_scan (GnomeScanPlugin *plugin);
+
+GList* gnome_scan_plugin_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PLUGIN_H_ */
diff --git a/trunk/lib/gnome-scan-preview-area.c b/trunk/lib/gnome-scan-preview-area.c
new file mode 100644
index 0000000..b4561d3
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-area.c
@@ -0,0 +1,343 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-preview-area
+ * @short_description: Preview processing and select ROI
+ *
+ * Not yet implemented ;).
+ **/
+
+#include "gnome-scan-preview-area.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_PREVIEW_AREA, GnomeScanPreviewAreaPrivate))
+
+typedef struct _GnomeScanPreviewAreaPrivate GnomeScanPreviewAreaPrivate;
+struct _GnomeScanPreviewAreaPrivate
+{
+ GSList *plugins;
+ GnomeScanPreviewPlugin *plugin;
+
+ gdouble resolution;
+ GdkPixbuf *image;
+ cairo_t *cairo_context;
+ cairo_surface_t *buffer;
+ gboolean buffer_deprecated;
+};
+
+enum
+{
+ PROP_0,
+ PROP_PIXBUF,
+ PROP_RESOLUTION
+};
+
+enum
+{
+ PREVIEW_RECEIVED,
+ LAST_SIGNAL
+};
+
+
+static GtkDrawingAreaClass* parent_class = NULL;
+static guint scan_preview_area_signals[LAST_SIGNAL] = { 0 };
+
+/* INTERNALS */
+static gboolean gspa_expose (GnomeScanPreviewArea *gspa,
+ GdkEventExpose *event);
+static void gspa_draw (GnomeScanPreviewArea *gspa,
+ GdkRegion *region);
+
+
+
+
+G_DEFINE_TYPE (GnomeScanPreviewArea, gnome_scan_preview_area, GTK_TYPE_DRAWING_AREA);
+
+static GObject*
+gnome_scan_preview_area_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties)
+{
+ GObject *object =
+ G_OBJECT_CLASS (gnome_scan_preview_area_parent_class)->constructor (type,
+ n_construct_properties,
+ construct_properties);
+ GtkWidget *widget = GTK_WIDGET (object);
+ GnomeScanPreviewArea *gspa = GNOME_SCAN_PREVIEW_AREA (widget);
+ gtk_widget_set_size_request (widget, 100, 100);
+ gtk_widget_set_sensitive (widget, FALSE);
+
+ g_signal_connect (object, "expose-event",
+ G_CALLBACK (gspa_expose), gspa);
+
+ return object;
+}
+
+static void
+gnome_scan_preview_area_init (GnomeScanPreviewArea *object)
+{
+}
+
+static void
+gnome_scan_preview_area_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_preview_area_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PREVIEW_AREA (object));
+
+ switch (prop_id)
+ {
+ case PROP_PIXBUF:
+ /* TODO: Add setter for "pixbuf" property here */
+ break;
+ case PROP_RESOLUTION:
+ /* TODO: Add setter for "resolution" property here */
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_preview_area_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PREVIEW_AREA (object));
+
+ switch (prop_id)
+ {
+ case PROP_PIXBUF:
+ /* TODO: Add getter for "pixbuf" property here */
+ break;
+ case PROP_RESOLUTION:
+ /* TODO: Add getter for "resolution" property here */
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scan_preview_area_area_selected (GnomeScanPreviewArea *preview_area, GdkRectangle *area)
+{
+ /* TODO: Add default signal handler implementation here */
+}
+
+static void
+gnome_scan_preview_area_class_init (GnomeScanPreviewAreaClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = GTK_DRAWING_AREA_CLASS (g_type_class_peek_parent (klass));
+
+ g_type_class_add_private (klass, sizeof (GnomeScanPreviewAreaPrivate));
+
+ object_class->finalize = gnome_scan_preview_area_finalize;
+ object_class->constructor = gnome_scan_preview_area_constructor;
+ object_class->set_property = gnome_scan_preview_area_set_property;
+ object_class->get_property = gnome_scan_preview_area_get_property;
+
+
+ g_object_class_install_property (object_class,
+ PROP_PIXBUF,
+ g_param_spec_object ("pixbuf",
+ "Pixbuf",
+ "The image buffer where to select an area",
+ GDK_TYPE_PIXBUF,
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
+
+ g_object_class_install_property (object_class,
+ PROP_RESOLUTION,
+ g_param_spec_double ("resolution",
+ "Resolution",
+ "Image resolution for translation of pixel area into GtkUnit.",
+ 1.0,
+ 4800.0,
+ 50.0,
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
+
+ /* SIGNALS */
+ scan_preview_area_signals[PREVIEW_RECEIVED] =
+ g_signal_new ("preview-received",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GnomeScanPreviewAreaClass, preview_received),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, GDK_TYPE_PIXBUF);
+}
+
+
+GtkWidget*
+gnome_scan_preview_area_new (void)
+{
+ return GTK_WIDGET (g_object_new (GNOME_TYPE_SCAN_PREVIEW_AREA,
+ NULL));
+}
+
+void
+gnome_scan_preview_area_set_pixbuf (GnomeScanPreviewArea *gspa, GdkPixbuf *pixbuf, gdouble resolution)
+{
+ GnomeScanPreviewAreaPrivate *priv = GET_PRIVATE (gspa);
+ gint width, height;
+
+ if (priv->image)
+ g_object_unref (priv->image);
+
+ priv->image = g_object_ref (pixbuf);
+
+ priv->resolution = resolution;
+ width = gdk_pixbuf_get_width (pixbuf);
+ height = gdk_pixbuf_get_height (pixbuf);
+ gtk_widget_set_size_request (GTK_WIDGET (gspa),
+ width, height);
+
+ gtk_widget_set_sensitive (GTK_WIDGET (gspa), TRUE);
+
+ gtk_widget_realize (GTK_WIDGET (gspa));
+ while (gtk_events_pending ()) gtk_main_iteration();
+
+ /* create buffer */
+ cairo_t *cr;
+
+ if (priv->buffer) {
+ cairo_surface_destroy (priv->buffer);
+ priv->buffer = NULL;
+ }
+
+ GdkPixmap *pixmap = gdk_pixmap_new (NULL, width, height, 24);
+ cr = gdk_cairo_create (GDK_DRAWABLE (pixmap));
+ priv->buffer = cairo_surface_create_similar (cairo_get_target (cr),
+ CAIRO_CONTENT_COLOR,
+ width, height);
+ cairo_destroy (cr);
+ g_object_unref (pixmap);
+
+ gnome_scan_preview_plugin_changed (priv->plugin);
+ gnome_scan_preview_area_update (gspa, NULL);
+}
+
+
+gdouble
+gnome_scan_preview_area_get_resolution (GnomeScanPreviewArea *preview_area)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_PREVIEW_AREA (preview_area), 72.);
+ return GET_PRIVATE (preview_area)->resolution;
+}
+
+void
+gnome_scan_preview_area_get_size (GnomeScanPreviewArea *preview_area,
+ gint *width,
+ gint*height)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PREVIEW_AREA (preview_area));
+ GnomeScanPreviewAreaPrivate *priv = GET_PRIVATE (preview_area);
+ *width = gdk_pixbuf_get_width (priv->image);
+ *height = gdk_pixbuf_get_height (priv->image);
+}
+
+
+void
+gnome_scan_preview_area_update (GnomeScanPreviewArea *preview_area,
+ GdkRectangle *r)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PREVIEW_AREA (preview_area));
+ GET_PRIVATE (preview_area)->buffer_deprecated = TRUE;
+
+ if (r) {
+ gtk_widget_queue_draw_area (GTK_WIDGET (preview_area),
+ r->x, r->y,
+ r->width, r->height);
+ }
+ else {
+ gtk_widget_queue_draw (GTK_WIDGET (preview_area));
+ }
+
+ return;
+}
+
+
+void
+gnome_scan_preview_area_select_plugin (GnomeScanPreviewArea *pa,
+ GnomeScanPreviewPlugin *plugin)
+{
+ GnomeScanPreviewAreaPrivate *priv = GET_PRIVATE(pa);
+ priv->plugin = plugin;
+}
+
+/* INTERNALS */
+static void
+gspa_draw (GnomeScanPreviewArea *gspa,
+ GdkRegion *region)
+{
+ GnomeScanPreviewAreaPrivate *priv = GET_PRIVATE (gspa);
+ GtkWidget *widget = GTK_WIDGET (gspa);
+ cairo_t *cr;
+
+ /* draw to buffer */
+ cr = cairo_create (priv->buffer);
+
+ /* clip to region */
+ gdk_cairo_region (cr, region);
+ cairo_clip (cr);
+
+ /* draw image */
+ gdk_cairo_set_source_pixbuf (cr, priv->image, 0, 0);
+ cairo_paint (cr);
+
+ /* delegate to current plugin */
+ gnome_scan_preview_plugin_draw_buffer (priv->plugin, GTK_WIDGET (gspa), cr);
+
+ cairo_destroy (cr);
+
+ priv->buffer_deprecated = FALSE;
+}
+
+static gboolean
+gspa_expose (GnomeScanPreviewArea *gspa,
+ GdkEventExpose *event)
+{
+ GnomeScanPreviewAreaPrivate *priv = GET_PRIVATE (gspa);
+ GtkWidget *widget = GTK_WIDGET (gspa);
+
+ /* update buffer */
+ /* TODO: draw optionnaly */
+ gspa_draw (gspa, event->region);
+
+ cairo_t *cr = gdk_cairo_create (GDK_DRAWABLE (widget->window));
+ gdk_cairo_region (cr, event->region);
+ cairo_clip (cr);
+ cairo_set_source_surface (cr, priv->buffer, 0, 0);
+ cairo_paint (cr);
+
+ if (!GTK_WIDGET_IS_SENSITIVE (widget)) {
+ gdk_cairo_set_source_color (cr, &widget->style->bg[GTK_WIDGET_STATE (widget)]);
+ cairo_paint_with_alpha (cr, .5);
+ }
+
+ cairo_destroy (cr);
+
+ return FALSE;
+}
diff --git a/trunk/lib/gnome-scan-preview-area.h b/trunk/lib/gnome-scan-preview-area.h
new file mode 100644
index 0000000..9e72a2d
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-area.h
@@ -0,0 +1,73 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#ifndef _GNOME_SCAN_PREVIEW_AREA_H_
+#define _GNOME_SCAN_PREVIEW_AREA_H_
+
+#include <gtk/gtk.h>
+#include <cairo.h>
+#include "gnome-scan-utils.h"
+#include "gnome-scan-preview-plugin.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PREVIEW_AREA (gnome_scan_preview_area_get_type ())
+#define GNOME_SCAN_PREVIEW_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PREVIEW_AREA, GnomeScanPreviewArea))
+#define GNOME_SCAN_PREVIEW_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_PREVIEW_AREA, GnomeScanPreviewAreaClass))
+#define GNOME_IS_SCAN_PREVIEW_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_PREVIEW_AREA))
+#define GNOME_IS_SCAN_PREVIEW_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_PREVIEW_AREA))
+#define GNOME_SCAN_PREVIEW_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_PREVIEW_AREA, GnomeScanPreviewAreaClass))
+
+typedef struct _GnomeScanPreviewAreaClass GnomeScanPreviewAreaClass;
+typedef struct _GnomeScanPreviewArea GnomeScanPreviewArea;
+
+struct _GnomeScanPreviewAreaClass
+{
+ GtkDrawingAreaClass parent_class;
+
+ /* Signals */
+/* void (*draw_buffer) (GnomeScanPreviewArea *gspa, cairo_t*cr, gpointer data); */
+ void (*preview_received) (GnomeScanPreviewArea *gspa, GdkPixbuf *pixbuf, gpointer data);
+};
+
+struct _GnomeScanPreviewArea
+{
+ GtkDrawingArea parent_instance;
+};
+
+GType gnome_scan_preview_area_get_type (void) G_GNUC_CONST;
+GtkWidget* gnome_scan_preview_area_new (void);
+void gnome_scan_preview_area_set_pixbuf (GnomeScanPreviewArea *preview_area,
+ GdkPixbuf *pixbuf,
+ gdouble resolution);
+gdouble gnome_scan_preview_area_get_resolution (GnomeScanPreviewArea *preview_area);
+void gnome_scan_preview_area_get_size (GnomeScanPreviewArea *preview_area,
+ gint *width, gint*height);
+void gnome_scan_preview_area_update (GnomeScanPreviewArea *preview_area,
+ GdkRectangle *invalid_rect);
+
+void gnome_scan_preview_area_select_plugin (GnomeScanPreviewArea *pa,
+ GnomeScanPreviewPlugin *plugin);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PREVIEW_AREA_H_ */
diff --git a/trunk/lib/gnome-scan-preview-plugin-area.c b/trunk/lib/gnome-scan-preview-plugin-area.c
new file mode 100644
index 0000000..fb99268
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-plugin-area.c
@@ -0,0 +1,631 @@
+/*
+* Gnome-Scan
+* Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+*
+* gnome-scan is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or (at your option) any later version.
+*
+* gnome-scan is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with gnome-scan. If not, write to:
+* The Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor
+* Boston, MA 02110-1301, USA.
+*/
+
+#include <glib/gi18n.h>
+#include "gnome-scan-private.h"
+#include "gnome-scan-preview-plugin-area.h"
+#include "gnome-scan-preview-area.h"
+
+
+/* AREA */
+/* draw, move and resize area */
+GS_DEFINE_PREVIEW_PLUGIN (GnomeScanPreviewPluginArea, gnome_scan_preview_plugin_area,
+ "origin,page-orientation");
+
+#define GS_ANCHOR_NONE -1
+#define GS_ANCHOR_OUTSIDE -2
+
+typedef enum {
+ GSPPA_MOVE = 1 << 0,
+ GSPPA_RESIZE = 1 << 1, /* implies GSPPA_MOVE */
+ GSPPA_CREATE = 1 << 2
+} CursorFlag;
+
+
+static void gsppa_send_area (GnomeScanPreviewPluginArea *gsppa);
+
+/* CURSOR / ANCHOR handling */
+/* This part include function related to position detection, cursor
+selection, etc. */
+
+static inline gboolean
+gsppa_point_is_in_rect(GdkPoint *point,
+ GdkRectangle *rect)
+{
+ return rect->x <= point->x && point->x <= rect->x+rect->width
+ && rect->y <= point->y && point->y <= rect->y+rect->height;
+}
+
+static GdkRectangle*
+gsppa_get_rect_for_anchor (GdkRectangle* r,
+ GtkAnchorType anchor)
+{
+#define l 12
+ GdkRectangle *a = g_new0 (GdkRectangle, 1);
+ a->width = l;
+ a->height = l;
+
+ switch (anchor) {
+ case GTK_ANCHOR_CENTER:
+ a->width = r->width - l;
+ a->height = r->height - l;
+ a->x = r->x + l;
+ a->y = r->y + l;
+ break;
+ case GTK_ANCHOR_NORTH:
+ a->x = r->x + l;
+ a->y = r->y;
+ a->width = r->width - l;
+ break;
+ case GTK_ANCHOR_NORTH_WEST:
+ a->x = r->x;
+ a->y = r->y;
+ break;
+ case GTK_ANCHOR_NORTH_EAST:
+ a->x = r->x + r->width;
+ a->y = r->y;
+ break;
+ case GTK_ANCHOR_SOUTH:
+ a->x = r->x + l;
+ a->y = r->y + r->height;
+ a->width = r->width - l;
+ break;
+ case GTK_ANCHOR_SOUTH_WEST:
+ a->x = r->x;
+ a->y = r->y + r->height;
+ break;
+ case GTK_ANCHOR_SOUTH_EAST:
+ a->x = r->x + r->width;
+ a->y = r->y + r->height;
+ break;
+ case GTK_ANCHOR_WEST:
+ a->x = r->x;
+ a->y = r->y;
+ a->height = r->height - l;
+ break;
+ case GTK_ANCHOR_EAST:
+ a->x = r->x + r->width;
+ a->y = r->y;
+ a->height = r->height - l;
+ break;
+ }
+ a->x-=l/2;
+ a->y-=l/2;
+#undef l
+ return a;
+}
+
+static GtkAnchorType
+gsppa_get_anchor_type (GdkPoint *point,
+ GdkRectangle *roi,
+ GdkRectangle *window)
+{
+ GtkAnchorType at, res = GS_ANCHOR_NONE;
+ GdkRectangle *ar;
+
+ if (gsppa_point_is_in_rect (point, window)) {
+ for (at = GTK_ANCHOR_CENTER; at <= GTK_ANCHOR_EAST; at++) {
+ ar = gsppa_get_rect_for_anchor (roi, at);
+ if (gsppa_point_is_in_rect (point, ar)) {
+ res = at;
+ g_free (ar);
+ break;
+ }
+ g_free (ar);
+ }
+ }
+ else {
+ res = GS_ANCHOR_OUTSIDE;
+ }
+ return res;
+}
+
+static GdkCursorType
+gsppa_get_cursor_for_anchor (GtkAnchorType at)
+{
+ GdkCursorType ct = GDK_LAST_CURSOR;
+ switch (at) {
+ case GTK_ANCHOR_NORTH:
+ ct = GDK_TOP_SIDE;
+ break;
+ case GTK_ANCHOR_NORTH_EAST:
+ ct = GDK_TOP_RIGHT_CORNER;
+ break;
+ case GTK_ANCHOR_NORTH_WEST:
+ ct = GDK_TOP_LEFT_CORNER;
+ break;
+ case GTK_ANCHOR_SOUTH:
+ ct = GDK_BOTTOM_SIDE;
+ break;
+ case GTK_ANCHOR_SOUTH_EAST:
+ ct = GDK_BOTTOM_RIGHT_CORNER;
+ break;
+ case GTK_ANCHOR_SOUTH_WEST:
+ ct = GDK_BOTTOM_LEFT_CORNER;
+ break;
+ case GTK_ANCHOR_EAST:
+ ct = GDK_RIGHT_SIDE;
+ break;
+ case GTK_ANCHOR_WEST:
+ ct = GDK_LEFT_SIDE;
+ break;
+ case GTK_ANCHOR_CENTER:
+ ct = GDK_FLEUR;
+ break;
+ case GS_ANCHOR_NONE:
+ ct = GDK_CROSSHAIR;
+ break;
+ default:
+ ct = GDK_LEFT_PTR;
+ break;
+ }
+
+ return ct;
+}
+
+/* update cursor if needed */
+static void
+gsppa_set_cursor (GnomeScanPreviewPluginArea *gsppa,
+ GdkPoint *point,
+ CursorFlag flag)
+{
+ GnomeScanPreviewPlugin *gspp = GNOME_SCAN_PREVIEW_PLUGIN (gsppa);
+#define ct gsppa->ct
+#define r gsppa->selection
+#define cursor gsppa->cursor
+#define at gsppa->anchor_type
+ at = gsppa_get_anchor_type(point, &r, &gsppa->window);
+
+ switch (at) {
+ case GTK_ANCHOR_CENTER:
+ at = flag & GSPPA_MOVE ? at : GS_ANCHOR_OUTSIDE;
+ break;
+ case GS_ANCHOR_NONE:
+ at = flag & GSPPA_CREATE ? at : GS_ANCHOR_OUTSIDE;
+ break;
+ default:
+ at = flag & GSPPA_RESIZE ? at : GTK_ANCHOR_CENTER;
+ break;
+ }
+
+ ct = gsppa_get_cursor_for_anchor (at);
+
+ if (!cursor || cursor->type != ct) {
+ if (cursor) {
+ gdk_cursor_unref (cursor);
+ }
+ cursor = gdk_cursor_new (ct);
+ gdk_window_set_cursor (gspp->preview_area->window,
+ cursor);
+ }
+#undef cursor
+#undef r
+#undef ct
+}
+
+static inline CursorFlag
+gsppa_get_cursor_flag_for_paper_size (GtkPaperSize *ps)
+{
+ return (g_str_equal (gtk_paper_size_get_name (ps), "maximal") ? 0 : GSPPA_MOVE)
+ | (g_str_equal (gtk_paper_size_get_name (ps), "manual") ? GSPPA_CREATE | GSPPA_RESIZE : 0);
+}
+
+
+/* ACTION (moving, resizeing, creating) */
+/* This part handle user events and drawing (here are optimization) */
+
+/* draw the selected area */
+static void
+gnome_scan_preview_plugin_area_draw_buffer (GnomeScanPreviewPlugin *gspp,
+ GtkWidget *gspa,
+ cairo_t *cr)
+{
+ GnomeScanPreviewPluginArea *gsppa = GNOME_SCAN_PREVIEW_PLUGIN_AREA (gspp);
+ GtkStateType state = GTK_WIDGET_STATE (gspa);
+ GtkStyle *style = gspa->style;
+ gdouble dashes[] = {
+ style->ythickness * 4.,
+ style->ythickness * 4.
+ };
+
+#define m gsppa->window
+#define r gsppa->selection
+
+ /* fade unselected area */
+ cairo_move_to (cr, 0, 0);
+ cairo_line_to (cr, m.width, 0);
+ cairo_line_to (cr, m.width, m.height);
+ cairo_line_to (cr, 0, m.height);
+ cairo_line_to (cr, 0, r.y + 1);
+ cairo_line_to (cr, r.x + 1, r.y + 1);
+ cairo_move_to (cr, r.x + 1, r.y + 1);
+ cairo_rel_line_to (cr, 0, r.height - 2);
+ cairo_rel_line_to (cr, r.width - 2, 0);
+ cairo_rel_line_to (cr, 0, -(r.height - 2));
+ cairo_line_to (cr, 0, r.y + 1);
+ cairo_line_to (cr, 0, 0);
+ cairo_close_path (cr);
+ cairo_clip (cr);
+
+ gdk_cairo_set_source_color (cr, &style->base[state]);
+ cairo_paint_with_alpha (cr, .5);
+
+ /* dashed rectangle */
+ gdk_cairo_rectangle (cr, &r);
+ gdk_cairo_set_source_color (cr, &style->text[state]);
+ cairo_set_line_width (cr, style->xthickness);
+ cairo_set_dash (cr, dashes, G_N_ELEMENTS (dashes), 0.);
+ cairo_stroke (cr);
+
+#undef m
+#undef r
+}
+
+static gboolean
+gsppa_motion_notify_event (GtkWidget *wid, GdkEventMotion *event, GnomeScanPreviewPluginArea *gsppa)
+{
+#define r gsppa->selection
+#define o gsppa->opposite_point
+#define w gsppa->window
+#define gspp GNOME_SCAN_PREVIEW_PLUGIN (gsppa)
+ gint x, y, t;
+ GdkRectangle ir, or = r; /* store ol roi */
+
+ if (event->is_hint) {
+ gdk_window_get_pointer(wid->window, &x, &y, NULL);
+ }
+ else {
+ x = event->x;
+ y = event->y;
+ }
+
+ /* if button 1 is clicked */
+ if (event->state & GDK_BUTTON1_MASK) {
+
+ /* compute new roi depending on cursor position and action (defined by cursor type) */
+ switch (gsppa->ct) {
+ case GDK_CROSSHAIR: /* create a new ROI */
+
+ r.x = MIN (o.x, x);
+ r.y = MIN (o.y, y);
+ r.width = MAX (o.x, x) - r.x;
+ r.height = MAX (o.y, y) - r.y;
+ break;
+ case GDK_FLEUR: /* move roi (denying moving outside) */
+ t = r.x + x - o.x;
+ r.x = 0 <= t && t <= w.width - r.width ? t : r.x;
+ t = r.y + y - o.y;
+ r.y = 0 <= t && t <= w.height - r.height ? t : r.y;
+ o.x = x;
+ o.y = y;
+ break;
+
+ case GDK_TOP_LEFT_CORNER:
+ r.x = MIN (o.x, x);
+ r.width = ABS (o.x - x);
+ /* continue */
+ case GDK_TOP_SIDE:
+ r.y = MIN (o.y, y);
+ r.height = ABS (o.y - y);
+ break;
+ case GDK_TOP_RIGHT_CORNER:
+ r.x = MIN (o.x, x);
+ r.y = MIN (o.y, y);
+ r.width = ABS (o.x - x);
+ r.height = ABS (o.y - y);
+ break;
+
+ case GDK_BOTTOM_RIGHT_CORNER:
+ r.x = MIN (o.x, x);
+ r.width = ABS (x - o.x);
+ /* continue */
+ case GDK_BOTTOM_SIDE:
+ r.y = MIN (o.y, y);
+ r.height = ABS (y - o.y);
+ break;
+ case GDK_BOTTOM_LEFT_CORNER:
+ r.x = MIN (o.x, x);
+ r.y = MIN (o.y, y);
+ r.width = ABS (o.x - x);
+ r.height = ABS (o.y - y);
+ break;
+
+ case GDK_RIGHT_SIDE:
+ r.x = MIN (o.x, x);
+ r.width = ABS (x - o.x);
+ break;
+ case GDK_LEFT_SIDE:
+ r.x = MIN (o.x, x);
+ r.width = ABS (o.x - x);
+ break;
+ default:
+ break;
+ }
+
+ r.width = MIN (r.width, w.width - r.x);
+ r.height = MIN (r.height, w.height - r.y);
+
+ /* TODO : optimize even more ir per operation */
+ gdk_rectangle_union (&r, &or, &ir);
+ ir.x--;
+ ir.y--;
+ ir.width+=2;
+ ir.height+=2;
+ gnome_scan_preview_area_update (GNOME_SCAN_PREVIEW_AREA (gspp->preview_area),
+ &ir);
+
+ }
+ else {
+ GdkPoint point = {x, y};
+ gsppa_set_cursor (gsppa, &point, gsppa->cf);
+ }
+
+ gdk_event_request_motions(event);
+
+ return TRUE;
+#undef gspp
+#undef r
+#undef o
+#undef e
+#undef w
+}
+
+static gboolean
+gsppa_button_press_event (GtkWidget *widget, GdkEventButton *event, GnomeScanPreviewPluginArea *gsppa)
+{
+#define r gsppa->selection
+#define o gsppa->opposite_point
+
+ /* set the "opposite_point". opposite_point is the opposite point relative
+ to the cursor for depending on the movement */
+ switch (gsppa->ct) {
+ case GDK_CROSSHAIR:
+ case GDK_FLEUR:
+ o.x = event->x;
+ o.y = event->y;
+ break;
+
+ case GDK_TOP_SIDE:
+ case GDK_TOP_LEFT_CORNER:
+ case GDK_LEFT_SIDE:
+ o.x = r.x + r.width;
+ o.y = r.y + r.height;
+ break;
+ case GDK_TOP_RIGHT_CORNER:
+ o.x = r.x;
+ o.y = r.y + r.height;
+ break;
+
+ case GDK_BOTTOM_SIDE:
+ case GDK_BOTTOM_RIGHT_CORNER:
+ case GDK_RIGHT_SIDE:
+ o.x = r.x;
+ o.y = r.y;
+ break;
+ case GDK_BOTTOM_LEFT_CORNER:
+ o.x = r.x + r.width;
+ o.y = r.y;
+ break;
+ default:
+ break;
+ }
+
+ gdk_pointer_grab(widget->window, TRUE,
+ GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
+ GDK_BUTTON_RELEASE_MASK,
+ widget->window, NULL,
+ event->time);
+#undef o
+#undef r
+ return FALSE;
+}
+
+static gboolean
+gsppa_button_release_event (GtkWidget *widget, GdkEventButton *event, GnomeScanPreviewPluginArea *gsppa)
+{
+#define r gsppa->selection
+#define o gsppa->opposite_point
+#define e gsppa->end_point
+ gdk_pointer_ungrab (event->time);
+
+ GdkPoint point = {event->x, event->y};
+ gsppa_set_cursor (gsppa, &point, gsppa->cf);
+
+ gsppa_send_area (gsppa);
+
+ return FALSE;
+#undef r
+#undef o
+#undef e
+}
+
+
+/* AREA HANDLING */
+
+/* store the internal area in the settings at the correct unit */
+static void
+gsppa_send_area (GnomeScanPreviewPluginArea *gsppa)
+{
+#define r gsppa->selection
+#define s gspp->settings
+ GnomeScanPreviewPlugin *gspp = GNOME_SCAN_PREVIEW_PLUGIN (gsppa);
+ gdouble res = gnome_scan_preview_area_get_resolution (GNOME_SCAN_PREVIEW_AREA (gspp->preview_area));
+
+ /* origin */
+ GSPoint *o = gnome_scan_settings_get_pointer (s, "origin");
+ o->x = gs_convert_to_mm (r.x, GS_UNIT_PIXEL, res);
+ o->y = gs_convert_to_mm(r.y, GS_UNIT_PIXEL, res);
+
+ /* paper-size (if manual) */
+ GtkPaperSize *p = gnome_scan_settings_get_boxed (s, "paper-size",
+ GTK_TYPE_PAPER_SIZE);
+ if (g_str_equal (gtk_paper_size_get_name(p), "manual")) {
+ g_debug (G_STRLOC ": new manual paper-size : %.2fx%.2f mm",
+ gs_convert (r.width, GS_UNIT_PIXEL, GS_UNIT_MM, res),
+ gs_convert (r.height, GS_UNIT_PIXEL, GS_UNIT_MM, res));
+ g_boxed_free (GTK_TYPE_PAPER_SIZE, p);
+ /* translator: Manual is the name of user defined paper size. */
+ p = gtk_paper_size_new_custom ("manual", _("Manual"),
+ 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.;
+ }
+
+ gnome_scan_settings_set_pointer (s, "origin", o);
+ gnome_scan_settings_set_boxed (s, "paper-size", GTK_TYPE_PAPER_SIZE, p);
+ gnome_scan_preview_plugin_area_changed (gspp);
+ g_boxed_free (GTK_TYPE_PAPER_SIZE, p);
+
+#undef s
+#undef r
+}
+
+
+#define connect(s) gsppa->s##_handler = g_signal_connect (gspp->preview_area, #s, G_CALLBACK (gsppa_##s), gsppa)
+
+static void
+gsppa_set_roi (GnomeScanPreviewPlugin *gspp)
+{
+ GSPoint *p;
+ GtkPaperSize *ps;
+ GtkPageOrientation o;
+ gint tmp;
+
+ GnomeScanPreviewPluginArea *gsppa = GNOME_SCAN_PREVIEW_PLUGIN_AREA (gspp);
+ gdouble res = gnome_scan_preview_area_get_resolution (GNOME_SCAN_PREVIEW_AREA (gspp->preview_area));
+#define m gsppa->window
+#define r gsppa->selection
+
+ p = gnome_scan_settings_get_pointer (gspp->settings, "origin");
+ o = gnome_scan_settings_get_enum(gspp->settings, "page-orientation",
+ GTK_TYPE_PAGE_ORIENTATION);
+ if (!p) {
+ p = g_new0 (GSPoint, 1);
+ gnome_scan_settings_set_pointer (gspp->settings, "origin", p);
+ }
+
+ r.x = gs_convert_from_mm (p->x, GS_UNIT_PIXEL, res);
+ r.y = gs_convert_from_mm (p->y, GS_UNIT_PIXEL, res);
+
+ ps = gnome_scan_settings_get_boxed (gspp->settings, "paper-size",
+ GTK_TYPE_PAPER_SIZE);
+
+ r.width = (gint) gs_convert_from_mm (gtk_paper_size_get_width (ps, GTK_UNIT_MM), GS_UNIT_PIXEL, res);
+ r.height = (gint) gs_convert_from_mm (gtk_paper_size_get_height (ps, GTK_UNIT_MM), GS_UNIT_PIXEL, res);
+
+ switch(o) {
+ case GTK_PAGE_ORIENTATION_LANDSCAPE:
+ case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
+ tmp = r.width;
+ r.width = MAX(r.width, r.height);
+ r.height = MIN(tmp, r.height);
+ break;
+ case GTK_PAGE_ORIENTATION_PORTRAIT:
+ case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
+ tmp = r.width;
+ r.width = MIN(r.width, r.height);
+ r.height = MAX(tmp, r.height);
+ break;
+ }
+
+ gsppa->cf = gsppa_get_cursor_flag_for_paper_size (ps);
+
+ gnome_scan_preview_area_get_size (GNOME_SCAN_PREVIEW_AREA (gspp->preview_area),
+ &m.width,
+ &m.height);
+
+#undef m
+#undef r
+}
+
+static void
+gnome_scan_preview_plugin_area_init (GnomeScanPreviewPlugin *gspp)
+{
+ GnomeScanPreviewPluginArea *gsppa = GNOME_SCAN_PREVIEW_PLUGIN_AREA (gspp);
+ gtk_widget_add_events (GTK_WIDGET (gspp->preview_area),
+ GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
+ GDK_BUTTON_PRESS_MASK);
+ connect(button_press_event);
+ connect(button_release_event);
+ connect(motion_notify_event);
+}
+
+#undef connect
+#define disconnect(s) g_signal_handler_disconnect (gspp->preview_area, gsppa->s##_handler)
+
+static void
+gnome_scan_preview_plugin_area_finalize (GnomeScanPreviewPlugin *gspp)
+{
+ GnomeScanPreviewPluginArea *gsppa = GNOME_SCAN_PREVIEW_PLUGIN_AREA (gspp);
+ gtk_widget_destroy (gsppa->button);
+ disconnect(button_press_event);
+ disconnect(button_release_event);
+ disconnect(motion_notify_event);
+}
+
+#undef disconnect
+
+
+#ifndef NO_BUTTON
+static void
+gsppa_select_all_clicked (GtkButton *button, GnomeScanPreviewPluginArea *gsppa)
+{
+#define m gsppa->window
+#define r gsppa->selection
+ GnomeScanPreviewPlugin *gspp = GNOME_SCAN_PREVIEW_PLUGIN (gsppa);
+ r.x = 0;
+ r.y = 0;
+ r.width = m.width;
+ r.height = m.height;
+ gnome_scan_preview_area_update (GNOME_SCAN_PREVIEW_AREA (gspp->preview_area), NULL);
+ gsppa_send_area (gsppa);
+#undef m
+#undef r
+}
+#endif
+
+static void
+gnome_scan_preview_plugin_area_build_ui (GnomeScanPreviewPlugin *gspp, GtkBox *box)
+{
+ GnomeScanPreviewPluginArea *gsppa = GNOME_SCAN_PREVIEW_PLUGIN_AREA (gspp);
+ gsppa->button = gtk_button_new_with_mnemonic (_("Select _All"));
+ g_signal_connect (gsppa->button, "clicked",
+ G_CALLBACK (gsppa_select_all_clicked),
+ gsppa);
+ gtk_container_add (GTK_CONTAINER (box), gsppa->button);
+}
+
+static void
+gnome_scan_preview_plugin_area_changed (GnomeScanPreviewPlugin *gspp)
+{
+ gsppa_set_roi (gspp);
+}
+
diff --git a/trunk/lib/gnome-scan-preview-plugin-area.h b/trunk/lib/gnome-scan-preview-plugin-area.h
new file mode 100644
index 0000000..f83cc1a
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-plugin-area.h
@@ -0,0 +1,63 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_PREVIEW_PLUGIN_AREA_H_
+#define _GNOME_SCAN_PREVIEW_PLUGIN_AREA_H_
+
+#include "gnome-scan-preview-plugin.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PREVIEW_PLUGIN_AREA (gnome_scan_preview_plugin_area_get_type())
+#define GNOME_SCAN_PREVIEW_PLUGIN_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PREVIEW_PLUGIN_AREA, GnomeScanPreviewPluginArea))
+
+typedef struct _GnomeScanPreviewPluginArea GnomeScanPreviewPluginArea;
+
+struct _GnomeScanPreviewPluginArea
+{
+ GnomeScanPreviewPlugin parent;
+
+ gulong draw_buffer_handler;
+ gulong button_press_event_handler;
+ gulong motion_notify_event_handler;
+ gulong button_release_event_handler;
+
+#ifndef NO_BUTTON
+ GtkWidget *button;
+#endif
+
+ gboolean manual;
+ GdkCursorType ct;
+ GdkCursor *cursor;
+ guint cf; /* cursor flag */
+ GdkPoint opposite_point;
+ GtkAnchorType anchor_type;
+ GdkRectangle window;
+ GdkRectangle saved_roi;
+ GdkRectangle selection;
+};
+
+GType gnome_scan_preview_plugin_area_get_type (void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PREVIEW_PLUGIN_AREA_H_ */
diff --git a/trunk/lib/gnome-scan-preview-plugin-rotation.c b/trunk/lib/gnome-scan-preview-plugin-rotation.c
new file mode 100644
index 0000000..1d49490
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-plugin-rotation.c
@@ -0,0 +1,91 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+#include "gnome-scan-preview-plugin-rotation.h"
+
+GS_DEFINE_PREVIEW_PLUGIN (GnomeScanPreviewPluginRotation, gnome_scan_preview_plugin_rotation, "");
+
+static void
+gnome_scan_preview_plugin_rotation_init (GnomeScanPreviewPlugin *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gnome_scan_preview_plugin_rotation_finalize (GnomeScanPreviewPlugin *object)
+{
+ /* TODO: Add deinitalization code here */
+
+}
+
+static void
+gsppr_button_clicked(GtkWidget *button, GnomeScanPreviewPluginRotation *gsppr)
+{
+ GnomeScanPreviewPlugin *gspp = GNOME_SCAN_PREVIEW_PLUGIN(gsppr);
+ gdouble degrees;
+ degrees = gnome_scan_settings_get_double(gspp->settings, "rotation");
+ degrees += button == gsppr->rotate_left ? 90. : -90.;
+ degrees = (gdouble) ((360 + (gint) degrees) % 360);
+ g_debug("Rotation = %f", degrees);
+ gnome_scan_preview_plugin_freeze(gspp);
+ gnome_scan_settings_set_double(gspp->settings, "rotation", degrees);
+ gnome_scan_preview_plugin_thaw(gspp);
+}
+
+static void
+gnome_scan_preview_plugin_rotation_build_ui (GnomeScanPreviewPlugin *gspp, GtkBox *box)
+{
+ GnomeScanPreviewPluginRotation *gsppr = GNOME_SCAN_PREVIEW_PLUGIN_ROTATION(gspp);
+ GtkWidget *image;
+
+ gsppr->rotate_left = gtk_button_new();
+ image = gtk_image_new_from_icon_name ("object-rotate-left", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image(GTK_BUTTON(gsppr->rotate_left), image);
+ gtk_button_set_label(GTK_BUTTON(gsppr->rotate_left), _("Rotate left"));
+ gtk_container_add (GTK_CONTAINER (box), gsppr->rotate_left);
+ g_signal_connect(gsppr->rotate_left, "clicked",
+ G_CALLBACK(gsppr_button_clicked),
+ gsppr);
+
+ gsppr->rotate_right = gtk_button_new();
+ image = gtk_image_new_from_icon_name ("object-rotate-right", GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image(GTK_BUTTON(gsppr->rotate_right), image);
+ gtk_button_set_label(GTK_BUTTON(gsppr->rotate_right), _("Rotate right"));
+ gtk_container_add (GTK_CONTAINER (box), gsppr->rotate_right);
+ g_signal_connect(gsppr->rotate_right, "clicked",
+ G_CALLBACK(gsppr_button_clicked),
+ gsppr);
+}
+
+static void
+gnome_scan_preview_plugin_rotation_draw_buffer (GnomeScanPreviewPlugin *gspp,
+ GtkWidget *gspa,
+ cairo_t *cr)
+{
+}
+
+static void
+gnome_scan_preview_plugin_rotation_changed (GnomeScanPreviewPlugin *gspp)
+{
+}
diff --git a/trunk/lib/gnome-scan-preview-plugin-rotation.h b/trunk/lib/gnome-scan-preview-plugin-rotation.h
new file mode 100644
index 0000000..fabc506
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-plugin-rotation.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_PREVIEW_PLUGIN_ROTATION_H_
+#define _GNOME_SCAN_PREVIEW_PLUGIN_ROTATION_H_
+
+#include <glib-object.h>
+#include "gnome-scan-preview-plugin.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PREVIEW_PLUGIN_ROTATION (gnome_scan_preview_plugin_rotation_get_type ())
+#define GNOME_SCAN_PREVIEW_PLUGIN_ROTATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PREVIEW_PLUGIN_ROTATION, GnomeScanPreviewPluginRotation))
+#define GNOME_SCAN_PREVIEW_PLUGIN_ROTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_PREVIEW_PLUGIN_ROTATION, GnomeScanPreviewPluginRotationClass))
+#define GNOME_IS_SCAN_PREVIEW_PLUGIN_ROTATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_PREVIEW_PLUGIN_ROTATION))
+#define GNOME_IS_SCAN_PREVIEW_PLUGIN_ROTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_PREVIEW_PLUGIN_ROTATION))
+#define GNOME_SCAN_PREVIEW_PLUGIN_ROTATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_PREVIEW_PLUGIN_ROTATION, GnomeScanPreviewPluginRotationClass))
+
+typedef struct _GnomeScanPreviewPluginRotationClass GnomeScanPreviewPluginRotationClass;
+typedef struct _GnomeScanPreviewPluginRotation GnomeScanPreviewPluginRotation;
+
+struct _GnomeScanPreviewPluginRotationClass
+{
+ GnomeScanPreviewPluginClass parent_class;
+};
+
+struct _GnomeScanPreviewPluginRotation
+{
+ GnomeScanPreviewPlugin parent_instance;
+ GtkWidget *rotate_left;
+ GtkWidget *rotate_right;
+};
+
+GType gnome_scan_preview_plugin_rotation_get_type (void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PREVIEW_PLUGIN_ROTATION_H_ */
diff --git a/trunk/lib/gnome-scan-preview-plugin.c b/trunk/lib/gnome-scan-preview-plugin.c
new file mode 100644
index 0000000..1adde55
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-plugin.c
@@ -0,0 +1,244 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:
+ * @stability: Unstable
+ *
+ * Base class for writing plugin to #GnomeScanPreviewArea. It's the
+ * #GnomeScanParamWidget for #GnomeScanPreviewArea. It allow to define a list
+ * of buttons added to the preview area, and changing a parameter value.
+ *
+ * This part is really supposed to change in the future, maybe by simply
+ * subclassing GtkBin or something similar.
+ **/
+
+#include <glib/gi18n.h>
+#include <string.h>
+#include "gnome-scan-param-specs.h"
+#include "gnome-scan-preview-plugin.h"
+#include "gnome-scan-preview-area.h"
+#include "gnome-scan-utils.h"
+
+static void gnome_scan_preview_plugin_class_init (GnomeScanPreviewPluginClass *klass);
+static void gnome_scan_preview_plugin_init (GnomeScanPreviewPlugin *plugin);
+
+GType
+gnome_scan_preview_plugin_get_type ()
+{
+ static GType type = 0;
+ static GTypeInfo tinfo = {
+ sizeof (GnomeScanPreviewPluginClass),
+ NULL, NULL, /* base */
+ (GClassInitFunc) gnome_scan_preview_plugin_class_init, NULL, NULL, /* class */
+ sizeof (GnomeScanPreviewPlugin), 0,
+ (GInstanceInitFunc) gnome_scan_preview_plugin_init, NULL
+ };
+ static GTypeFundamentalInfo finfo = {
+ G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE
+ };
+
+ if (type == 0) {
+ type = g_type_fundamental_next();
+ g_type_register_fundamental (type,
+ "GnomeScanPreviewPlugin",
+ &tinfo,
+ &finfo,
+ G_TYPE_FLAG_ABSTRACT);
+ }
+ return type;
+}
+
+static void
+gnome_scan_preview_plugin_class_init (GnomeScanPreviewPluginClass *klass)
+{
+}
+
+static void
+gnome_scan_preview_plugin_init (GnomeScanPreviewPlugin *plugin)
+{
+}
+
+GType
+gnome_scan_preview_plugin_type_register_static (const gchar *name,
+ const GnomeScanPreviewPluginTypeInfo *pinfo)
+{
+ GTypeInfo info = {
+ sizeof (GnomeScanPreviewPluginClass),
+ NULL, NULL, /* base */
+ (GClassInitFunc) pinfo->class_init, NULL, pinfo,
+ pinfo->instance_size, 0,
+ NULL, NULL,
+ };
+
+ return g_type_register_static (GNOME_TYPE_SCAN_PREVIEW_PLUGIN,
+ name, &info, 0);
+}
+
+static void
+gspp_settings_changed (GnomeScanSettings *settings,
+ const gchar*name,
+ GnomeScanPreviewPlugin *gspp)
+{
+ GnomeScanPreviewPluginClass *klass = GNOME_SCAN_PREVIEW_PLUGIN_GET_CLASS (gspp);
+ gboolean watched;
+ gint i, n;
+
+ watched = g_str_equal (name, g_param_spec_get_name (gspp->pspec));
+ if (!watched) {
+ n = g_strv_length (klass->watch);
+ for (i = 0; i < n; i++) {
+ watched = g_str_equal(name, klass->watch[i]);
+ if (watched)
+ continue;
+ }
+ }
+
+ if (watched) {
+ klass->changed (gspp);
+ gnome_scan_preview_area_update (GNOME_SCAN_PREVIEW_AREA (gspp->preview_area), NULL);
+ }
+}
+
+/**
+ * gnome_scan_preview_plugin:
+ * @type: subtype of #GnomeScanPreviewPlugin to instanciate
+ * @scan_plugin: a #GnomeScanPlugin
+ * @pspec: the #GSParamSpec to manage
+ * @gspa: the #GnomeScanPreviewArea to extend
+ * @settings: the #GnomeScanSettings where to store value
+ * @box: the box where to put buttons
+ *
+ * Returns: a #GnomeScanPreviewPlugin
+ **/
+GnomeScanPreviewPlugin*
+gnome_scan_preview_plugin (GType type,
+ GnomeScanPlugin *scan_plugin,
+ GParamSpec *pspec,
+ GtkWidget *gspa,
+ GnomeScanSettings *settings,
+ GtkBox *box)
+{
+ g_return_val_if_fail (g_type_is_a (type, GNOME_TYPE_SCAN_PREVIEW_PLUGIN), NULL);
+ GnomeScanPreviewPlugin* plugin = GNOME_SCAN_PREVIEW_PLUGIN (g_type_create_instance (type));
+ GnomeScanPreviewPluginClass *klass = GNOME_SCAN_PREVIEW_PLUGIN_GET_CLASS (plugin);
+
+ plugin->plugin = scan_plugin;
+ plugin->preview_area = gspa;
+ plugin->settings = g_object_ref (settings);
+ plugin->pspec = pspec;
+
+ if (!gnome_scan_settings_get (settings, g_param_spec_get_name (pspec))) {
+ gnome_scan_settings_init_value (plugin->settings,
+ plugin->pspec);
+ }
+
+ klass->init (plugin);
+
+ plugin->settings_changed =
+ g_signal_connect (settings, "changed",
+ G_CALLBACK (gspp_settings_changed),
+ plugin);
+
+ plugin->preview_changed =
+ g_signal_connect_swapped (plugin->preview_area, "preview-received",
+ G_CALLBACK (klass->changed),
+ plugin);
+ klass->build_ui (plugin, box);
+
+ return plugin;
+}
+
+/**
+ * gnome_scan_preview_plugin_freeze:
+ * @gspp: a #GnomeScanPreviewPlugin
+ *
+ * Freeze the plugin so that it doesn't react on value changes.
+ **/
+void
+gnome_scan_preview_plugin_freeze(GnomeScanPreviewPlugin *gspp)
+{
+ gspp->frozen = TRUE;
+}
+
+/**
+ * gnome_scan_preview_plugin_thaw:
+ * @gspp: a #GnomeScanPreviewPlugin
+ *
+ * Thaw the plugin so that it react on value changes.
+ **/
+void
+gnome_scan_preview_plugin_thaw(GnomeScanPreviewPlugin *gspp)
+{
+ gspp->frozen = FALSE;
+}
+
+/**
+ * gnome_scan_preview_plugin_changed:
+ * @gspp: a #GnomeScanPreviewPlugin
+ *
+ * To be called when the preview has been changed.
+ **/
+void
+gnome_scan_preview_plugin_changed (GnomeScanPreviewPlugin *gspp)
+{
+ if (!gspp->frozen) {
+ GnomeScanPreviewPluginClass *klass = GNOME_SCAN_PREVIEW_PLUGIN_GET_CLASS (gspp);
+ klass->changed(gspp);
+ }
+}
+
+/**
+ * gnome_scan_preview_plugin_draw_buffer:
+ * @gspp: a #GnomeScanPreviewPlugin
+ * @gspa: a #GnomeScaPreviewArea
+ * @cr: a cairo context
+ *
+ * For use by #GnomeScanPreviewArea
+ *
+ * Stability: Private
+ **/
+void
+gnome_scan_preview_plugin_draw_buffer (GnomeScanPreviewPlugin *gspp,
+ GtkWidget *gspa,
+ cairo_t *cr)
+{
+ GnomeScanPreviewPluginClass *klass = GNOME_SCAN_PREVIEW_PLUGIN_GET_CLASS (gspp);
+ klass->draw_buffer(gspp, gspa, cr);
+}
+
+/**
+ * gnome_scan_preview_plugin_destroy:
+ * @gspp: the dying #GnomeScanPreviewPlugin
+ **/
+void
+gnome_scan_preview_plugin_destroy (GnomeScanPreviewPlugin *gspp)
+{
+ g_return_if_fail (GNOME_IS_SCAN_PREVIEW_PLUGIN (gspp));
+ GnomeScanPreviewPluginClass *klass = GNOME_SCAN_PREVIEW_PLUGIN_GET_CLASS (gspp);
+ g_signal_handler_disconnect (gspp->settings, gspp->settings_changed);
+ g_signal_handler_disconnect (gspp->preview_area, gspp->preview_changed);
+ g_object_unref (gspp->settings);
+ klass->finalize (gspp);
+ g_type_free_instance (&gspp->instance);
+}
+
diff --git a/trunk/lib/gnome-scan-preview-plugin.h b/trunk/lib/gnome-scan-preview-plugin.h
new file mode 100644
index 0000000..88f617c
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-plugin.h
@@ -0,0 +1,152 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_PREVIEW_PLUGIN_H_
+#define _GNOME_SCAN_PREVIEW_PLUGIN_H_
+
+#include <gtk/gtk.h>
+#include <cairo.h>
+#include "gnome-scan-plugin.h"
+#include "gnome-scan-job.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PREVIEW_PLUGIN (gnome_scan_preview_plugin_get_type ())
+#define GNOME_SCAN_PREVIEW_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PREVIEW_PLUGIN, GnomeScanPreviewPlugin))
+#define GNOME_SCAN_PREVIEW_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_PREVIEW_PLUGIN, GnomeScanPreviewPluginClass))
+#define GNOME_IS_SCAN_PREVIEW_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_PREVIEW_PLUGIN))
+#define GNOME_IS_SCAN_PREVIEW_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_PREVIEW_PLUGIN))
+#define GNOME_SCAN_PREVIEW_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_PREVIEW_PLUGIN, GnomeScanPreviewPluginClass))
+
+/* max param to watch per plugin */
+#define GSPP_MAX_WATCH 4
+
+/**
+ * GS_DEFINE_PREVIEW_PLUGIN:
+ * @Name: Class name
+ * @name: function prefix
+ * @options: options to watch.
+ *
+ * Generate glib boiler plate code for creatin a new preview plugin.
+ **/
+#define GS_DEFINE_PREVIEW_PLUGIN(Name, name, options) \
+ static void name##_class_init (GnomeScanPreviewPluginClass *klass); \
+ static void name##_init (GnomeScanPreviewPlugin *gspp); \
+ static void name##_finalize (GnomeScanPreviewPlugin *gspp); \
+ static void name##_build_ui (GnomeScanPreviewPlugin *gspp, GtkBox *box); \
+ static void name##_draw_buffer (GnomeScanPreviewPlugin *gspp, GtkWidget *gspa, cairo_t *cr); \
+ static void name##_changed (GnomeScanPreviewPlugin *gspp); \
+ GType name##_get_type () { \
+ static GType type; \
+ if (type == 0) { \
+ static GnomeScanPreviewPluginTypeInfo info = { \
+ sizeof (Name), \
+ .class_init = (GClassInitFunc) name##_class_init, \
+ .init = (GInstanceInitFunc) name##_init, \
+ }; \
+ type = gnome_scan_preview_plugin_type_register_static (#Name, &info); \
+ } \
+ return type; \
+ } \
+ static void name##_class_init (GnomeScanPreviewPluginClass *klass) { \
+ GnomeScanPreviewPluginClass *parent_class = GNOME_SCAN_PREVIEW_PLUGIN_CLASS (klass); \
+ parent_class->init = name##_init; \
+ parent_class->build_ui = name##_build_ui; \
+ parent_class->draw_buffer = name##_draw_buffer; \
+ parent_class->changed = name##_changed; \
+ parent_class->finalize = name##_finalize; \
+ parent_class->watch = g_strsplit(options, ",", GSPP_MAX_WATCH); \
+ }
+
+
+
+typedef struct _GnomeScanPreviewPluginTypeInfo GnomeScanPreviewPluginTypeInfo;
+struct _GnomeScanPreviewPluginTypeInfo
+{
+ guint instance_size;
+ GClassInitFunc class_init;
+ GInstanceInitFunc init;
+};
+
+
+typedef struct _GnomeScanPreviewPluginClass GnomeScanPreviewPluginClass;
+typedef struct _GnomeScanPreviewPlugin GnomeScanPreviewPlugin;
+
+struct _GnomeScanPreviewPluginClass
+{
+ GTypeClass parent_class;
+
+ void (*init) (GnomeScanPreviewPlugin *gspp);
+ void (*build_ui) (GnomeScanPreviewPlugin *gspp,
+ GtkBox *box);
+ void (*draw_buffer) (GnomeScanPreviewPlugin *gspp,
+ GtkWidget *gspa,
+ cairo_t *cr);
+ void (*changed) (GnomeScanPreviewPlugin *gspp);
+ void (*finalize) (GnomeScanPreviewPlugin *gspp);
+
+ gchar** watch;
+};
+
+/**
+ * GnomeScanPreviewPlugin:
+ *
+ *
+ **/
+struct _GnomeScanPreviewPlugin
+{
+ /*< private >*/
+ GTypeInstance instance;
+
+ /*< public >*/
+ GnomeScanPlugin* plugin;
+ GtkWidget* preview_area;
+ GnomeScanSettings* settings;
+ GParamSpec* pspec;
+ gulong settings_changed;
+ gulong preview_changed;
+ gboolean frozen;
+};
+
+GType gnome_scan_preview_plugin_get_type (void) G_GNUC_CONST;
+
+GnomeScanPreviewPlugin*
+gnome_scan_preview_plugin (GType type,
+ GnomeScanPlugin *plugin,
+ GParamSpec *pspec,
+ GtkWidget *gspa,
+ GnomeScanSettings *settings,
+ GtkBox *bbox);
+void gnome_scan_preview_plugin_freeze (GnomeScanPreviewPlugin *gspp);
+void gnome_scan_preview_plugin_thaw (GnomeScanPreviewPlugin *gspp);
+void gnome_scan_preview_plugin_changed (GnomeScanPreviewPlugin *gspp);
+void gnome_scan_preview_plugin_draw_buffer (GnomeScanPreviewPlugin *gspp,
+ GtkWidget *gspa,
+ cairo_t *cr);
+void gnome_scan_preview_plugin_destroy (GnomeScanPreviewPlugin *gspp);
+GType gnome_scan_preview_plugin_type_register_static (const gchar *name,
+ const GnomeScanPreviewPluginTypeInfo *pinfo);
+
+
+ G_END_DECLS
+
+#endif /* _GNOME_SCAN_PREVIEW_PLUGIN_H_ */
diff --git a/trunk/lib/gnome-scan-preview-sink.c b/trunk/lib/gnome-scan-preview-sink.c
new file mode 100644
index 0000000..eb1cf5c
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-sink.c
@@ -0,0 +1,130 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION: gnome-scan-preview-sink
+ * @short_description: #GnomeScanPreviewSink class
+ *
+ **/
+#include <gegl.h>
+#include "gnome-scan-preview-sink.h"
+
+typedef struct _GnomeScanPreviewSinkPrivate GnomeScanPreviewSinkPrivate;
+struct _GnomeScanPreviewSinkPrivate
+{
+ GdkPixbuf* pixbuf;
+ GeglNode* save;
+};
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_PREVIEW_SINK, GnomeScanPreviewSinkPrivate))
+
+
+
+G_DEFINE_TYPE (GnomeScanPreviewSink, gnome_scan_preview_sink, GNOME_TYPE_SCAN_SINK);
+
+static void
+gnome_scan_preview_sink_init (GnomeScanPreviewSink *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gnome_scan_preview_sink_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gnome_scan_preview_sink_parent_class)->finalize (object);
+}
+
+GnomeScanSink*
+gnome_scan_preview_sink_new (void)
+{
+ GObject* object = g_object_new (GNOME_TYPE_SCAN_PREVIEW_SINK,
+ NULL);
+ return GNOME_SCAN_SINK (object);
+}
+
+GdkPixbuf*
+gnome_scan_preview_sink_get_pixbuf (GnomeScanPreviewSink *sink)
+{
+ return GET_PRIVATE (sink)->pixbuf;
+}
+
+static void
+gnome_scan_preview_sink_configure (GnomeScanPlugin *plugin,
+ GnomeScanSettings *settings)
+{
+}
+
+static GList*
+gnome_scan_preview_sink_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root)
+{
+ GnomeScanPreviewSinkPrivate *priv = GET_PRIVATE (plugin);
+ GList *list = NULL;
+
+ priv->save = gegl_node_new_child (root,
+ "operation", "save-pixbuf",
+ "pixbuf", &priv->pixbuf,
+ NULL);
+ list = g_list_append (list,
+ priv->save);
+ return list;
+}
+
+static gboolean
+gnome_scan_preview_sink_start_frame (GnomeScanPlugin *plugin)
+{
+ return TRUE;
+}
+
+static gboolean
+gnome_scan_preview_sink_work (GnomeScanPlugin *plugin, gdouble *progress)
+{
+ GnomeScanPreviewSinkPrivate *priv = GET_PRIVATE (plugin);
+ *progress = 1.;
+ return FALSE;
+}
+
+static void
+gnome_scan_preview_sink_end_frame (GnomeScanPlugin *plugin)
+{
+ GnomeScanPreviewSinkPrivate *priv = GET_PRIVATE (plugin);
+ g_object_unref (priv->save);
+}
+
+static void
+gnome_scan_preview_sink_class_init (GnomeScanPreviewSinkClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ GnomeScanPluginClass* parent_class = GNOME_SCAN_PLUGIN_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GnomeScanPreviewSinkPrivate));
+
+ parent_class->configure = gnome_scan_preview_sink_configure;
+ parent_class->get_child_nodes = gnome_scan_preview_sink_get_child_nodes;
+ parent_class->start_frame = gnome_scan_preview_sink_start_frame;
+ parent_class->work = gnome_scan_preview_sink_work;
+ parent_class->end_frame = gnome_scan_preview_sink_end_frame;
+
+ object_class->finalize = gnome_scan_preview_sink_finalize;
+}
diff --git a/trunk/lib/gnome-scan-preview-sink.h b/trunk/lib/gnome-scan-preview-sink.h
new file mode 100644
index 0000000..623c8ba
--- /dev/null
+++ b/trunk/lib/gnome-scan-preview-sink.h
@@ -0,0 +1,63 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_PREVIEW_SINK_H_
+#define _GNOME_SCAN_PREVIEW_SINK_H_
+
+#include <glib-object.h>
+#include "gnome-scan-sink.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PREVIEW_SINK (gnome_scan_preview_sink_get_type ())
+#define GNOME_SCAN_PREVIEW_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PREVIEW_SINK, GnomeScanPreviewSink))
+#define GNOME_SCAN_PREVIEW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_PREVIEW_SINK, GnomeScanPreviewSinkClass))
+#define GNOME_IS_SCAN_PREVIEW_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_PREVIEW_SINK))
+#define GNOME_IS_SCAN_PREVIEW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_PREVIEW_SINK))
+#define GNOME_SCAN_PREVIEW_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_PREVIEW_SINK, GnomeScanPreviewSinkClass))
+
+typedef struct _GnomeScanPreviewSinkClass GnomeScanPreviewSinkClass;
+typedef struct _GnomeScanPreviewSink GnomeScanPreviewSink;
+
+struct _GnomeScanPreviewSinkClass
+{
+ GnomeScanSinkClass parent_class;
+};
+
+/**
+ * GnomeScanPreviewSink:
+ *
+ *
+ **/
+struct _GnomeScanPreviewSink
+{
+ /*< private >*/
+ GnomeScanSink parent_instance;
+};
+
+GType gnome_scan_preview_sink_get_type (void) G_GNUC_CONST;
+GnomeScanSink* gnome_scan_preview_sink_new (void);
+GdkPixbuf* gnome_scan_preview_sink_get_pixbuf (GnomeScanPreviewSink *sink);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PREVIEW_SINK_H_ */
diff --git a/trunk/lib/gnome-scan-private.h b/trunk/lib/gnome-scan-private.h
new file mode 100644
index 0000000..b180b99
--- /dev/null
+++ b/trunk/lib/gnome-scan-private.h
@@ -0,0 +1,31 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_PRIVATE___H
+#define _GNOME_SCAN_PRIVATE___H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+
+#undef _
+#define _(string) dgettext(GETTEXT_PACKAGE, string)
+
+
+#endif /* GNOME_SCAN_PRIVATE___H */
+
diff --git a/trunk/lib/gnome-scan-processor-common.c b/trunk/lib/gnome-scan-processor-common.c
new file mode 100644
index 0000000..5bf3f9e
--- /dev/null
+++ b/trunk/lib/gnome-scan-processor-common.c
@@ -0,0 +1,147 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+#include "gnome-scan-param-specs.h"
+#include "gnome-scan-utils.h"
+#include "gnome-scan-processor-common.h"
+#include "gnome-scan-preview-plugin-rotation.h"
+
+typedef struct _GnomeScanProcessorCommonPrivate GnomeScanProcessorCommonPrivate;
+struct _GnomeScanProcessorCommonPrivate
+{
+ gdouble degrees;
+ gboolean enhance;
+};
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_PROCESSOR_COMMON, GnomeScanProcessorCommonPrivate))
+
+G_DEFINE_TYPE (GnomeScanProcessorCommon, gnome_scan_processor_common, GNOME_TYPE_SCAN_PLUGIN);
+
+GS_DEFINE_QUARK(gs_param_group_processing_common, N_("Common Processing"));
+#define GS_PARAM_GROUP_PROCESSING_COMMON (gs_param_group_processing_common_quark ())
+
+static void
+gnome_scan_processor_common_init (GnomeScanProcessorCommon *object)
+{
+ GParamSpec *pspec;
+ GValue *min, *max, *step, *val;
+#define gs_g_value_new_double(var, val) \
+ var = g_new0(GValue,1); \
+ g_value_init (var, G_TYPE_DOUBLE); \
+ g_value_set_double (var, val);
+
+ gs_g_value_new_double(min, 0.);
+ gs_g_value_new_double(step, 1.);
+ gs_g_value_new_double(max, 359.);
+ gs_g_value_new_double(val, 0.);
+#undef gs_g_value_new_int
+
+ pspec = gs_param_spec_range("rotation", N_("Rotation"), N_("Rotation"),
+ GS_PARAM_GROUP_PREVIEW,
+ min, max, step, val,
+ G_PARAM_WRITABLE);
+ gs_param_spec_set_widget_type(pspec, GNOME_TYPE_SCAN_PREVIEW_PLUGIN_ROTATION);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (object), pspec);
+
+ pspec = gs_param_spec_boolean ("enhance", N_("Automatic color enhancement"),
+ N_("Color enhancement produces better "
+ "photos, but takes more time to process "
+ "and can be useless for text."),
+ GS_PARAM_GROUP_PROCESSING_COMMON,
+ TRUE,
+ G_PARAM_WRITABLE);
+ gs_param_spec_set_domain (pspec, GETTEXT_PACKAGE);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (object), pspec);
+}
+
+static void
+gnome_scan_processor_common_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gnome_scan_processor_common_parent_class)->finalize (object);
+}
+
+GnomeScanPlugin*
+gnome_scan_processor_common_new(void)
+{
+ return g_object_new (GNOME_TYPE_SCAN_PROCESSOR_COMMON, NULL);
+}
+
+void
+gnome_scan_processor_common_configure (GnomeScanPlugin *plugin, GnomeScanSettings *settings)
+{
+ GnomeScanProcessorCommonPrivate *priv = GET_PRIVATE (plugin);
+ priv->degrees = gnome_scan_settings_get_double (settings, "rotation");
+ priv->enhance = gnome_scan_settings_get_boolean (settings, "enhance");
+}
+
+GList*
+gnome_scan_processor_common_get_child_nodes (GnomeScanPlugin *plugin, GeglNode *root)
+{
+ GnomeScanProcessorCommonPrivate *priv = GET_PRIVATE (plugin);
+ GList* node = NULL;
+ GeglNode *op;
+
+ op = gegl_node_new_child(root,
+ "operation", "rotate",
+ "degrees", priv->degrees,
+ NULL);
+ node = g_list_append (node, op);
+
+ if (priv->enhance) {
+ op = gegl_node_new_child(root,
+ "operation", "stress",
+ /* those value are arbitraty, might
+ be nice to expose this through
+ profile : photo, text, quick,
+ manual, â?¦ */
+ "radius", 300,
+ "iterations", 15,
+ "gamma", 2.2,
+ "samples", 10,
+ NULL);
+ node = g_list_append (node, op);
+ }
+
+ return node;
+}
+
+static void
+gnome_scan_processor_common_class_init (GnomeScanProcessorCommonClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ GnomeScanPluginClass* parent_class = GNOME_SCAN_PLUGIN_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (GnomeScanProcessorCommonPrivate));
+
+ parent_class->configure = gnome_scan_processor_common_configure;
+ parent_class->get_child_nodes = gnome_scan_processor_common_get_child_nodes;
+
+ object_class->finalize = gnome_scan_processor_common_finalize;
+}
+
diff --git a/trunk/lib/gnome-scan-processor-common.h b/trunk/lib/gnome-scan-processor-common.h
new file mode 100644
index 0000000..4bf1bfb
--- /dev/null
+++ b/trunk/lib/gnome-scan-processor-common.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_PROCESSOR_COMMON_H_
+#define _GNOME_SCAN_PROCESSOR_COMMON_H_
+
+#include "gnome-scan-plugin.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_PROCESSOR_COMMON (gnome_scan_processor_common_get_type ())
+#define GNOME_SCAN_PROCESSOR_COMMON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_PROCESSOR_COMMON, GnomeScanProcessorCommon))
+#define GNOME_SCAN_PROCESSOR_COMMON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_PROCESSOR_COMMON, GnomeScanProcessorCommonClass))
+#define GNOME_IS_SCAN_PROCESSOR_COMMON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_PROCESSOR_COMMON))
+#define GNOME_IS_SCAN_PROCESSOR_COMMON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_PROCESSOR_COMMON))
+#define GNOME_SCAN_PROCESSOR_COMMON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_PROCESSOR_COMMON, GnomeScanProcessorCommonClass))
+
+typedef struct _GnomeScanProcessorCommonClass GnomeScanProcessorCommonClass;
+typedef struct _GnomeScanProcessorCommon GnomeScanProcessorCommon;
+
+struct _GnomeScanProcessorCommonClass
+{
+ GnomeScanPluginClass parent_class;
+};
+
+struct _GnomeScanProcessorCommon
+{
+ GnomeScanPlugin parent_instance;
+};
+
+GType gnome_scan_processor_common_get_type (void) G_GNUC_CONST;
+
+GnomeScanPlugin*
+gnome_scan_processor_common_new(void);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_PROCESSOR_COMMON_H_ */
diff --git a/trunk/lib/gnome-scan-range-widget.c b/trunk/lib/gnome-scan-range-widget.c
new file mode 100644
index 0000000..93263df
--- /dev/null
+++ b/trunk/lib/gnome-scan-range-widget.c
@@ -0,0 +1,116 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "gnome-scan-range-widget.h"
+#include "gnome-scan-param-specs.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_RANGE_WIDGET, GnomeScanRangeWidgetPrivate))
+
+typedef struct _GnomeScanRangeWidgetPrivate GnomeScanRangeWidgetPrivate;
+struct _GnomeScanRangeWidgetPrivate
+{
+ GtkWidget *scale;
+ GtkWidget *spin;
+ GtkObject *adj;
+};
+
+static void gsrw_range_value_changed (GtkAdjustment *adjustment,
+ GnomeScanRangeWidget *gsrw);
+
+GS_DEFINE_PARAM_WIDGET (GnomeScanRangeWidget, gnome_scan_range_widget);
+
+static void
+gnome_scan_range_widget_init (GnomeScanRangeWidget *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gnome_scan_range_widget_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gnome_scan_range_widget_parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_range_widget_build (GnomeScanParamWidget *gspw)
+{
+ GnomeScanRangeWidgetPrivate *priv = GET_PRIVATE (gspw);
+ GValue *vdouble;
+ GSParamSpecRange *spec;
+ gdouble value, lower, upper, step;
+
+
+ spec = GS_PARAM_SPEC_RANGE (gspw->pspec);
+ vdouble = g_new0 (GValue, 1);
+ g_value_init (vdouble, G_TYPE_DOUBLE);
+
+#define GET_DOUBLE(var,val) g_value_transform ((val),vdouble); var = g_value_get_double (vdouble);
+ GET_DOUBLE (value, spec->default_value);
+ GET_DOUBLE (lower, spec->minimum);
+ GET_DOUBLE (upper, spec->maximum);
+ GET_DOUBLE (step, spec->step);
+#undef GET_DOUBLE
+
+ priv->adj = gtk_adjustment_new (value, lower, upper,
+ step, step, 0);
+ priv->scale = gtk_hscale_new (GTK_ADJUSTMENT (priv->adj));
+ gtk_scale_set_draw_value (GTK_SCALE (priv->scale), FALSE);
+ gtk_box_pack_start (GTK_BOX (gspw), priv->scale, TRUE, TRUE, 0);
+
+ priv->spin = gtk_spin_button_new (GTK_ADJUSTMENT (priv->adj), step,
+ G_VALUE_HOLDS_INT (spec->default_value) ? 0 : 2);
+ gtk_box_pack_start (GTK_BOX (gspw), priv->spin, FALSE, TRUE, 0);
+
+ g_signal_connect (GTK_ADJUSTMENT (priv->adj), "value-changed",
+ (GCallback) gsrw_range_value_changed,
+ GNOME_SCAN_RANGE_WIDGET (gspw));
+
+}
+
+static void
+gnome_scan_range_widget_set (GnomeScanParamWidget *gspw, GValue *value)
+{
+ GValue *vdouble = g_new0 (GValue, 1);
+ g_value_init (vdouble, G_TYPE_DOUBLE);
+ g_value_transform (value, vdouble);
+ gtk_adjustment_set_value (GTK_ADJUSTMENT (GET_PRIVATE (gspw)->adj),
+ g_value_get_double (vdouble));
+ g_value_unset (vdouble);
+ g_free (vdouble);
+}
+
+/* INTERNALS */
+
+static void
+gsrw_range_value_changed (GtkAdjustment *adjustment, GnomeScanRangeWidget *gsrw)
+{
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (gsrw);
+ GValue *vdouble = g_new0 (GValue, 1);
+ g_value_init (vdouble, G_TYPE_DOUBLE);
+ g_value_set_double (vdouble, gtk_adjustment_get_value (adjustment));
+ g_value_transform (vdouble, gspw->value);
+ g_value_unset (vdouble);
+ g_free (vdouble);
+ gnome_scan_param_widget_changed (gspw);
+}
diff --git a/trunk/lib/gnome-scan-range-widget.h b/trunk/lib/gnome-scan-range-widget.h
new file mode 100644
index 0000000..aea17cc
--- /dev/null
+++ b/trunk/lib/gnome-scan-range-widget.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_RANGE_WIDGET_H_
+#define _GNOME_SCAN_RANGE_WIDGET_H_
+
+#include <glib-object.h>
+#include "gnome-scan-param-widget.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_RANGE_WIDGET (gnome_scan_range_widget_get_type ())
+#define GNOME_SCAN_RANGE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_RANGE_WIDGET, GnomeScanRangeWidget))
+#define GNOME_SCAN_RANGE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_RANGE_WIDGET, GnomeScanRangeWidgetClass))
+#define GNOME_IS_SCAN_RANGE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_RANGE_WIDGET))
+#define GNOME_IS_SCAN_RANGE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_RANGE_WIDGET))
+#define GNOME_SCAN_RANGE_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_RANGE_WIDGET, GnomeScanRangeWidgetClass))
+
+typedef struct _GnomeScanRangeWidget GnomeScanRangeWidget;
+struct _GnomeScanRangeWidget
+{
+ GnomeScanParamWidget parent_instance;
+};
+
+GS_DEFINE_PARAM_WIDGET_HEADER (GnomeScanRangeWidget, gnome_scan_range_widget);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_RANGE_WIDGET_H_ */
diff --git a/trunk/lib/gnome-scan-settings.c b/trunk/lib/gnome-scan-settings.c
new file mode 100644
index 0000000..be124ee
--- /dev/null
+++ b/trunk/lib/gnome-scan-settings.c
@@ -0,0 +1,815 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-settings
+ * @short_description: Store settings for plugins
+ *
+ * When user switch from a scanner to another, he expects the settings
+ * to keep almost the same. e.g. resolution should not be resetted on
+ * device selection. The settings are remember in a #GnomeScanSettings
+ * which maintains a table of #GValue using @GParamSpec:name as
+ * key. This allow to apply the same #GnomeScanSettings on various
+ * #GnomeScanPlugin through gnome_scan_plugin_configure().
+ *
+ * Since 0.5.92, #GnomeScanSettings load and store automatically
+ * settings in #GConf in /apps/gnome-scan/%prgname%/%key%. Ensure you
+ * have a call to g_set_prgname() before gnome_scan_init(). Loading is
+ * done upon construction. However, storing is done at dispose
+ * stage. Ensure to correctly ref/unref your #GnomeScanSettings
+ * instance in order to actually use this feature.
+ **/
+
+#include <glib/gi18n.h>
+#include <gconf/gconf-client.h>
+#include "gnome-scan-settings.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_SETTINGS, GnomeScanSettingsPrivate))
+
+typedef struct _GnomeScanSettingsPrivate GnomeScanSettingsPrivate;
+
+struct _GnomeScanSettingsPrivate
+{
+ /* using GParamSpec name as key, and GValue as value */
+ GHashTable *values;
+ GConfClient *gconf;
+ gboolean disposed;
+};
+
+enum
+ {
+ CHANGED,
+ N_SIGNALS
+ };
+
+static GObjectClass* parent_class = NULL;
+static guint signals[N_SIGNALS] = {0};
+
+G_DEFINE_TYPE (GnomeScanSettings, gnome_scan_settings, G_TYPE_OBJECT);
+
+static void
+gnome_scan_settings_init (GnomeScanSettings *object)
+{
+ GnomeScanSettingsPrivate *priv = GET_PRIVATE (object);
+
+ priv->values = g_hash_table_new (g_str_hash, g_str_equal);
+ priv->gconf = gconf_client_get_default();
+}
+
+static gchar*
+gss_gconf_key(gchar *name)
+{
+ gchar *key;
+ gchar *tmp = g_strdup_printf ("/apps/gnome-scan/%s", g_get_prgname ());
+
+ if (name)
+ key = g_strdup_printf("%s/%s", tmp, name);
+ else
+ key = g_strdup(tmp);
+
+ g_free(tmp);
+
+ return key;
+}
+
+static GValue*
+gss_gconf_value_to_gvalue(GConfValue *value)
+{
+ GType gtype = G_TYPE_NONE;
+ GValue *gvalue = g_new0(GValue, 1);
+
+ switch(value->type) {
+ case GCONF_VALUE_STRING:
+ gtype = G_TYPE_STRING;
+ break;
+ case GCONF_VALUE_INT:
+ gtype = G_TYPE_INT;
+ break;
+ case GCONF_VALUE_FLOAT:
+ gtype = G_TYPE_DOUBLE;
+ break;
+ case GCONF_VALUE_BOOL:
+ gtype = G_TYPE_BOOLEAN;
+ break;
+ }
+
+ g_value_init(gvalue, gtype);
+
+ switch(value->type) {
+ case GCONF_VALUE_STRING:
+ g_value_set_static_string(gvalue,
+ gconf_value_get_string(value));
+ break;
+ case GCONF_VALUE_INT:
+ g_value_set_int(gvalue,
+ gconf_value_get_int(value));
+ break;
+ case GCONF_VALUE_FLOAT:
+ g_value_set_double(gvalue,
+ gconf_value_get_float(value));
+ break;
+ case GCONF_VALUE_BOOL:
+ g_value_set_boolean(gvalue,
+ gconf_value_get_bool(value));
+ break;
+ }
+
+ if (gtype == G_TYPE_NONE) {
+ g_free(gvalue);
+ gvalue = NULL;
+ }
+
+ return gvalue;
+}
+
+static GConfValue*
+gss_gvalue_to_gconf_value(GValue *gvalue)
+{
+ GConfValueType type = GCONF_VALUE_INVALID;
+ GConfValue *value;
+ GValue *trans = g_new0(GValue, 1);
+ GType gtype = G_VALUE_TYPE(gvalue);
+ switch(gtype) {
+ case G_TYPE_STRING:
+ type = GCONF_VALUE_STRING;
+ break;
+ case G_TYPE_INT:
+ type = GCONF_VALUE_INT;
+ break;
+ case G_TYPE_FLOAT:
+ case G_TYPE_DOUBLE:
+ type = GCONF_VALUE_FLOAT;
+ break;
+ case G_TYPE_BOOLEAN:
+ type = GCONF_VALUE_BOOL;
+ break;
+ default:
+ if (g_type_is_a (gtype, G_TYPE_ENUM)) {
+ type = GCONF_VALUE_INT;
+ gtype = G_TYPE_INT;
+ }
+ else
+ return NULL;
+ }
+
+ value = gconf_value_new(type);
+
+ switch(gtype) {
+ case G_TYPE_STRING:
+ gconf_value_set_string(value,
+ g_value_get_string(gvalue));
+ break;
+ case G_TYPE_INT:
+ g_value_init(trans, G_TYPE_INT);
+ g_value_transform (gvalue, trans);
+ gconf_value_set_int(value,
+ g_value_get_int(trans));
+ break;
+ case G_TYPE_FLOAT:
+ case G_TYPE_DOUBLE:
+ g_value_init(trans, G_TYPE_FLOAT);
+ g_value_transform (gvalue, trans);
+ gconf_value_set_float(value,
+ g_value_get_float(trans));
+ break;
+ case G_TYPE_BOOLEAN:
+ gconf_value_set_bool(value,
+ g_value_get_boolean (gvalue));
+ break;
+ }
+
+ if (!GCONF_VALUE_TYPE_VALID(type)) {
+ g_free(value);
+ value = NULL;
+ }
+
+ g_free(trans);
+
+ return value;
+}
+
+static GObject*
+gnome_scan_settings_constructor (GType type,
+ guint n_params,
+ GObjectConstructParam *params)
+{
+ GObject *object;
+ GnomeScanSettingsPrivate *priv;
+ GSList *entries;
+ gchar *dir = gss_gconf_key(NULL);
+ gchar *name;
+ GError *error = NULL;
+ GConfEntry *entry;
+ GValue *gvalue;
+
+ object =
+ G_OBJECT_CLASS(parent_class)->constructor(type,
+ n_params,
+ params);
+ priv = GET_PRIVATE(object);
+ entries = gconf_client_all_entries(priv->gconf, dir, &error);
+ for (; entries; entries = entries->next) {
+ entry = entries->data;
+ name = g_path_get_basename(entry->key);
+ if (gvalue = gss_gconf_value_to_gvalue(entry->value))
+ gnome_scan_settings_set(GNOME_SCAN_SETTINGS(object),
+ name, gvalue);
+ g_free(name);
+ }
+
+ g_free(dir);
+
+ return object;
+}
+
+static void
+gnome_scan_settings_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+void
+gss_store_key(gchar *name, GValue *gvalue, GnomeScanSettings *settings)
+{
+ GnomeScanSettingsPrivate *priv = GET_PRIVATE(settings);
+ GConfValue *value;
+ gchar *key = gss_gconf_key(name);
+ GError *error = NULL;
+
+ if (value = gss_gvalue_to_gconf_value(gvalue)) {
+ gconf_client_set(priv->gconf,
+ key, value,
+ &error);
+
+ if (error) {
+ g_warning("Failed saving %s option : %s",
+ name, dgettext(g_quark_to_string (error->domain),
+ error->message));
+ }
+ }
+
+ g_free(key);
+}
+
+static void
+gnome_scan_settings_dispose (GObject *object)
+{
+ GnomeScanSettingsPrivate *priv = GET_PRIVATE(object);
+
+ if (priv->disposed == FALSE) {
+ g_hash_table_foreach (priv->values,
+ (GHFunc) gss_store_key,
+ object);
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+gnome_scan_settings_class_init (GnomeScanSettingsClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
+
+ g_type_class_add_private (klass, sizeof (GnomeScanSettingsPrivate));
+ object_class->constructor = gnome_scan_settings_constructor;
+ object_class->finalize = gnome_scan_settings_finalize;
+ object_class->dispose = gnome_scan_settings_dispose;
+
+ /**
+ * GnomeScanSettings::changed:
+ * @widget: The emitting widget
+ * @key: The changed key
+ * @value: The new value
+ *
+ * This signal is emitted when the value is changed by the user.
+ **/
+ signals[CHANGED] =
+ g_signal_new ("changed",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GnomeScanSettingsClass, changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
+}
+
+
+
+
+/**
+ * gnome_scan_settings_new:
+ *
+ * Create a new empty #GnomeScanSettings.
+ *
+ * Returns: a new #GnomeScanSettings
+ **/
+GnomeScanSettings*
+gnome_scan_settings_new (void)
+{
+ GObject *object = g_object_new (GNOME_TYPE_SCAN_SETTINGS, NULL);
+ return GNOME_SCAN_SETTINGS (object);
+}
+
+/**
+ * gnome_scan_settings_init_value:
+ * @settings: a #GnomeScanSettings
+ * @pspec: a #GSParamSpec
+ *
+ * Store a new value in @settings using default value and key from
+ * @pspec.
+ **/
+void
+gnome_scan_settings_init_value (GnomeScanSettings *settings,
+ GParamSpec *pspec)
+{
+ /* TODO: store schemas in gconf */
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings));
+ GValue *value = g_new0 (GValue, 1);
+ g_value_init (value, G_PARAM_SPEC_VALUE_TYPE (pspec));
+ g_param_value_set_default (pspec, value);
+ gnome_scan_settings_set (settings,
+ g_param_spec_get_name (pspec),
+ value);
+ g_value_reset (value);
+ g_free (value);
+}
+
+/**
+ * gnome_scan_settings_set:
+ * @settings: a #GnomeScanSettings
+ * @name: #GParamSpec name
+ * @value: #GParamSpec user value
+ *
+ * Store @value for @name key.
+ * See: gnome_scan_settings_get()
+ **/
+void
+gnome_scan_settings_set (GnomeScanSettings *settings,
+ const gchar *name,
+ const GValue *value)
+{
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings) && G_IS_VALUE (value));
+ g_hash_table_insert (GET_PRIVATE (settings)->values, g_strdup (name),
+ g_boxed_copy (G_TYPE_VALUE, value));
+ g_signal_emit (settings, signals[CHANGED], 0, name);
+}
+
+/**
+ * gnome_scan_settings_set_transform:
+ * @settings: a #GnomeScanSettings
+ * @name: #GParamSpec name
+ * @value: #GParamSpec user value
+ *
+ * Store @value for @name key, keeping existing value type by
+ * transforming @value. @value type is used if the @name setting has
+ * never been set.
+ *
+ * See: gnome_scan_settings_get_transformed()
+ **/
+void
+gnome_scan_settings_set_transform (GnomeScanSettings *settings,
+ const gchar *name,
+ const GValue *value)
+{
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings) && G_IS_VALUE (value));
+ GValue *v = gnome_scan_settings_get (settings, name);
+ if (v) {
+ g_value_transform (value, v);
+ }
+ else {
+ v = g_boxed_copy (G_TYPE_VALUE, value);
+ }
+
+ g_hash_table_insert (GET_PRIVATE (settings)->values, g_strdup (name),
+ v);
+ g_signal_emit (settings, signals[CHANGED], 0, name);
+}
+
+/**
+ * gnome_scan_settings_set_double:
+ * @settings: a #GnomeScanSettings
+ * @name: #GParamSpec name
+ * @value: gdouble value
+ *
+ *
+ * See: gnome_scan_settings_set_transform()
+ **/
+void
+gnome_scan_settings_set_double (GnomeScanSettings *settings,
+ const gchar *name,
+ gdouble value)
+{
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings));
+ GValue *v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_DOUBLE);
+ g_value_set_double (v, value);
+ gnome_scan_settings_set_transform (settings, name, v);
+}
+
+/**
+ * gnome_scan_settings_set_int:
+ * @settings: a #GnomeScanSettings
+ * @name: #GParamSpec name
+ * @value: gint value
+ *
+ *
+ * See: gnome_scan_settings_set_transform()
+ **/
+void
+gnome_scan_settings_set_int (GnomeScanSettings *settings,
+ const gchar *name,
+ gint value)
+{
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings));
+ GValue *v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_INT);
+ g_value_set_int (v, value);
+ gnome_scan_settings_set_transform (settings, name, v);
+}
+
+/**
+ * gnome_scan_settings_set_boolean:
+ * @settings: a #GnomeScanSettings
+ * @name: #GParamSpec name
+ * @value: gboolean value
+ *
+ *
+ * See: gnome_scan_settings_set_transform()
+ **/
+void
+gnome_scan_settings_set_boolean (GnomeScanSettings *settings,
+ const gchar *name,
+ gboolean value)
+{
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings));
+ GValue *v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_BOOLEAN);
+ g_value_set_boolean (v, value);
+ gnome_scan_settings_set_transform (settings, name, v);
+}
+
+/**
+ * gnome_scan_settings_set_enum:
+ * @settings: a #GnomeScanSettings
+ * @name: #GParamSpec name
+ * @type: enum GType
+ * @value: enum value
+ *
+ * See: gnome_scan_settings_set_transform()
+ **/
+void
+gnome_scan_settings_set_enum (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type,
+ gint value)
+{
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings));
+ GValue *v = g_new0 (GValue, 1);
+ g_value_init (v, type);
+ g_value_set_enum (v, value);
+ gnome_scan_settings_set_transform (settings, name, v);
+}
+
+/**
+ * gnome_scan_settings_set_boxed:
+ * @settings: a #GnomeScanSettings
+ * @name: #GParamSpec name
+ * @value: a #GBoxed
+ *
+ *
+ * See: gnome_scan_settings_set_transform()
+ **/
+void
+gnome_scan_settings_set_boxed (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type,
+ gpointer value)
+{
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings));
+ GValue *v = g_new0 (GValue, 1);
+ g_value_init (v, type);
+ g_value_set_boxed (v, g_boxed_copy (type, value));
+ gnome_scan_settings_set_transform (settings, name, v);
+}
+
+/**
+ * gnome_scan_settings_set_object:
+ * @settings: a #GnomeScanSettings
+ * @name: #GParamSpec name
+ * @value: a #GObject
+ *
+ *
+ * See: gnome_scan_settings_set_transform()
+ **/
+void
+gnome_scan_settings_set_object (GnomeScanSettings *settings,
+ const gchar *name,
+ GObject* value)
+{
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings));
+ GValue *v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_OBJECT);
+ g_value_set_object (v, value);
+ gnome_scan_settings_set_transform (settings, name, v);
+}
+
+/**
+ * gnome_scan_settings_set_pointer:
+ * @settings: a #GnomeScanSettings
+ * @name: #GParamSpec name
+ * @value: a gpointer
+ *
+ *
+ * See: gnome_scan_settings_set_transform()
+ **/
+void
+gnome_scan_settings_set_pointer (GnomeScanSettings *settings,
+ const gchar *name,
+ gpointer value)
+{
+ g_return_if_fail (GNOME_IS_SCAN_SETTINGS (settings));
+ GValue *v = g_new0 (GValue, 1);
+ g_value_init (v, G_TYPE_POINTER);
+ g_value_set_pointer (v, value);
+ gnome_scan_settings_set_transform (settings, name, v);
+}
+
+/**
+ * gnome_scan_settings_get:
+ * @settings: a #GnomeScanSettings
+ * @name: a key
+ *
+ * Look for a value stored in the table for @name key.
+ *
+ * Returns: the value corresponding to @key or NULL.
+ * See: gnome_scan_settings_set()
+ **/
+GValue*
+gnome_scan_settings_get (GnomeScanSettings *settings,
+ const gchar *name)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), NULL);
+ GValue *v = g_hash_table_lookup (GET_PRIVATE (settings)->values, name);
+ if (v)
+ v = g_boxed_copy (G_TYPE_VALUE, v);
+
+ return v;
+}
+
+/**
+ * gnome_scan_settings_get_transformed:
+ * @settings: a #GnomeScanSettings
+ * @name: a key
+ * @type: Transformation destination type.
+ *
+ * Look for a value stored in the table for @name key.
+ *
+ * Returns: the value corresponding to @key or NULL.
+ * See: gnome_scan_settings_set()
+ **/
+GValue*
+gnome_scan_settings_get_transformed (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), NULL);
+ GValue *v = gnome_scan_settings_get (settings, name);
+ GValue *t = g_new0 (GValue, 1);
+ g_value_init (t, type);
+ if (v) {
+ g_value_transform (v, t);
+ g_value_unset (v);
+ g_free (v);
+ }
+ else {
+ g_warning ("Option %s not set", name);
+ }
+ return t;
+}
+
+
+/**
+ * gnome_scan_settings_get_string:
+ * @settings: a #GnomeScanSettings
+ * @name: a key
+ *
+ * Look for a value stored in the table for @name key.
+ *
+ * Returns: the string corresponding to @key.
+ * See: gnome_scan_settings_get()
+ **/
+gchar*
+gnome_scan_settings_get_string (GnomeScanSettings *settings,
+ const gchar *name)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), NULL);
+ GValue *v = gnome_scan_settings_get_transformed (settings,
+ name,
+ G_TYPE_STRING);
+ gchar* val = g_value_dup_string (v);
+ g_value_unset(v);
+ g_free (v);
+ return val;
+}
+
+/**
+ * gnome_scan_settings_get_double:
+ * @settings: a #GnomeScanSettings
+ * @name: a key
+ *
+ * Look for a value stored in the table for @name key.
+ *
+ * Returns: the string corresponding to @key or NULL.
+ * See: gnome_scan_settings_get()
+ **/
+gdouble
+gnome_scan_settings_get_double (GnomeScanSettings *settings,
+ const gchar *name)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), 0.);
+ GValue *v = gnome_scan_settings_get_transformed (settings,
+ name,
+ G_TYPE_DOUBLE);
+ gdouble val = g_value_get_double (v);
+ g_free (v);
+ return val;
+}
+
+/**
+ * gnome_scan_settings_get_int:
+ * @settings: a #GnomeScanSettings
+ * @name: a key
+ *
+ * Look for a value stored in the table for @name key.
+ *
+ * Returns: the string corresponding to @key or NULL.
+ * See: gnome_scan_settings_get()
+ **/
+gint
+gnome_scan_settings_get_int (GnomeScanSettings *settings,
+ const gchar *name)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), 0);
+ GValue *v = gnome_scan_settings_get_transformed (settings,
+ name,
+ G_TYPE_INT);
+ gint val = g_value_get_int (v);
+ g_value_unset (v);
+ g_free (v);
+ return val;
+}
+
+/**
+ * gnome_scan_settings_get_boolean:
+ * @settings: a #GnomeScanSettings
+ * @name: value name
+ *
+ * Returns: a gboolean
+ **/
+gboolean
+gnome_scan_settings_get_boolean (GnomeScanSettings *settings,
+ const gchar *name)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), 0);
+ GValue *v = gnome_scan_settings_get_transformed (settings,
+ name, G_TYPE_BOOLEAN);
+ gboolean val = g_value_get_boolean (v);
+ g_value_unset (v);
+ g_free (v);
+ return val;
+}
+
+/**
+ * gnome_scan_settings_get_enum:
+ * @settings: a #GnomeScanSettings
+ * @name: a key
+ * @type: #GEnum subtype
+ *
+ * Look for a value stored in the table for @name key.
+ *
+ * Returns: the enum value corresponding to @key or 0.
+ * See: gnome_scan_settings_get()
+ **/
+gint
+gnome_scan_settings_get_enum (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), 0);
+ GValue *v = gnome_scan_settings_get_transformed (settings,
+ name,
+ type);
+ gint val = g_value_get_enum (v);
+ g_value_unset (v);
+ g_free (v);
+ return val;
+}
+
+/**
+ * gnome_scan_settings_get_boxed:
+ * @settings: a #GnomeScanSettings
+ * @type: #GBoxed derived #GType
+ * @name: a key
+ *
+ * Look for a value stored in the table for @name key.
+ *
+ * Returns: the boxed-type value corresponding to @key or NULL.
+ * See: gnome_scan_settings_get()
+ **/
+gpointer
+gnome_scan_settings_get_boxed (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), NULL);
+ GValue *v = gnome_scan_settings_get_transformed (settings,
+ name,
+ type);
+ gpointer val = g_value_dup_boxed (v);
+ g_value_unset (v);
+ g_free (v);
+ return val;
+}
+
+/**
+ * gnome_scan_settings_get_object:
+ * @settings: a #GnomeScanSettings
+ * @name: a key
+ *
+ * Look for a value stored in the table for @name key.
+ *
+ * Returns: the object corresponding to @key or NULL.
+ * See: gnome_scan_settings_get()
+ **/
+GObject*
+gnome_scan_settings_get_object (GnomeScanSettings *settings,
+ const gchar *name)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), NULL);
+ GValue *v = gnome_scan_settings_get_transformed (settings,
+ name,
+ G_TYPE_OBJECT);
+ GObject* val = g_value_dup_object (v);
+ g_value_unset (v);
+ g_free (v);
+ return val;
+}
+
+/**
+ * gnome_scan_settings_get_pointer:
+ * @settings: a #GnomeScanSettings
+ * @name: a key
+ *
+ * Look for a value stored in the table for @name key.
+ *
+ * Returns: the pointer corresponding to @key or NULL.
+ * See: gnome_scan_settings_get()
+ **/
+gpointer
+gnome_scan_settings_get_pointer (GnomeScanSettings *settings,
+ const gchar *name)
+{
+ g_return_val_if_fail (GNOME_IS_SCAN_SETTINGS (settings), NULL);
+ GValue *v = gnome_scan_settings_get_transformed (settings,
+ name,
+ G_TYPE_POINTER);
+ gpointer val = g_value_get_pointer (v);
+ g_value_unset (v);
+ g_free (v);
+ return val;
+}
+
+/**
+ * gnome_scan_settings_get_all:
+ * @settings: a #GnomeScanSettings
+ *
+ * Retrun all stored values in a #GHashTable. Use g_hash_table_ref() if
+ * you want to keep the #GHashTable in memory after @settings destruction.
+ *
+ * Returns: a GHashTable containings #GValues
+ */
+GHashTable*
+gnome_scan_settings_get_all (GnomeScanSettings *settings)
+{
+ return GET_PRIVATE (settings)->values;
+}
diff --git a/trunk/lib/gnome-scan-settings.h b/trunk/lib/gnome-scan-settings.h
new file mode 100644
index 0000000..20befec
--- /dev/null
+++ b/trunk/lib/gnome-scan-settings.h
@@ -0,0 +1,141 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#ifndef _GNOME_SCAN_SETTINGS_H_
+#define _GNOME_SCAN_SETTINGS_H_
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_SETTINGS (gnome_scan_settings_get_type ())
+#define GNOME_SCAN_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_SETTINGS, GnomeScanSettings))
+#define GNOME_SCAN_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_SETTINGS, GnomeScanSettingsClass))
+#define GNOME_IS_SCAN_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_SETTINGS))
+#define GNOME_IS_SCAN_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_SETTINGS))
+#define GNOME_SCAN_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_SETTINGS, GnomeScanSettingsClass))
+
+typedef struct _GnomeScanSettingsClass GnomeScanSettingsClass;
+typedef struct _GnomeScanSettings GnomeScanSettings;
+
+struct _GnomeScanSettingsClass
+{
+ GObjectClass parent_class;
+
+ void (* changed) (GnomeScanSettings *settings, gchar *key, gpointer data);
+};
+
+/**
+ * GnomeScanSettings:
+ *
+ * A #GnomeScanSettings manage a table of #GValue indexed by the name
+ * of the param spec they where associated to.
+ **/
+struct _GnomeScanSettings
+{
+ /*< private >*/
+ GObject parent_instance;
+};
+
+GType gnome_scan_settings_get_type (void) G_GNUC_CONST;
+
+GnomeScanSettings*
+gnome_scan_settings_new (void);
+void gnome_scan_settings_init_value (GnomeScanSettings *settings,
+ GParamSpec *pspec);
+void gnome_scan_settings_set (GnomeScanSettings *settings,
+ const gchar *name,
+ const GValue *value);
+
+void gnome_scan_settings_set_transform (GnomeScanSettings *settings,
+ const gchar *name,
+ const GValue *value);
+
+void gnome_scan_settings_set_double (GnomeScanSettings *settings,
+ const gchar *name,
+ gdouble value);
+
+void gnome_scan_settings_set_int (GnomeScanSettings *settings,
+ const gchar *name,
+ gint value);
+
+void gnome_scan_settings_set_boolean (GnomeScanSettings *settings,
+ const gchar *name,
+ gboolean value);
+
+void gnome_scan_settings_set_enum (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type,
+ gint value);
+
+void gnome_scan_settings_set_boxed (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type,
+ gpointer value);
+
+void gnome_scan_settings_set_object (GnomeScanSettings *settings,
+ const gchar *name,
+ GObject *value);
+
+void gnome_scan_settings_set_pointer (GnomeScanSettings *settings,
+ const gchar *name,
+ gpointer value);
+
+GValue* gnome_scan_settings_get (GnomeScanSettings *settings,
+ const gchar *name);
+
+GValue* gnome_scan_settings_get_transformed (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type);
+
+gchar* gnome_scan_settings_get_string (GnomeScanSettings *settings,
+ const gchar *name);
+
+gdouble gnome_scan_settings_get_double (GnomeScanSettings *settings,
+ const gchar *name);
+
+gint gnome_scan_settings_get_int (GnomeScanSettings *settings,
+ const gchar *name);
+
+gboolean gnome_scan_settings_get_boolean (GnomeScanSettings *settings,
+ const gchar *name);
+
+gint gnome_scan_settings_get_enum (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type);
+
+gpointer gnome_scan_settings_get_boxed (GnomeScanSettings *settings,
+ const gchar *name,
+ GType type);
+
+GObject* gnome_scan_settings_get_object (GnomeScanSettings *settings,
+ const gchar *name);
+
+gpointer gnome_scan_settings_get_pointer (GnomeScanSettings *settings,
+ const gchar *name);
+
+GHashTable*
+gnome_scan_settings_get_all (GnomeScanSettings *settings);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_SETTINGS_H_ */
diff --git a/trunk/lib/gnome-scan-sink.c b/trunk/lib/gnome-scan-sink.c
new file mode 100644
index 0000000..8b51188
--- /dev/null
+++ b/trunk/lib/gnome-scan-sink.c
@@ -0,0 +1,64 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scan-sink
+ * @short_description: Plug scan output to application
+ * @include: gnome-scan.h
+ *
+ * Sink is the last stage of the acquisition process. It handle the
+ * scan output and plug it into the application. e.g. do OCR and put
+ * into document, add image as layer, etc.
+ *
+ * In the future, #GnomeScanSink should be replace or just herit from
+ * #GeglOperation.
+ **/
+
+#include "gnome-scan-sink.h"
+
+
+static GObjectClass* parent_class = NULL;
+
+G_DEFINE_TYPE (GnomeScanSink, gnome_scan_sink, GNOME_TYPE_SCAN_PLUGIN);
+
+static void
+gnome_scan_sink_init (GnomeScanSink *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gnome_scan_sink_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_sink_class_init (GnomeScanSinkClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
+
+ object_class->finalize = gnome_scan_sink_finalize;
+}
+
diff --git a/trunk/lib/gnome-scan-sink.h b/trunk/lib/gnome-scan-sink.h
new file mode 100644
index 0000000..f42c13b
--- /dev/null
+++ b/trunk/lib/gnome-scan-sink.h
@@ -0,0 +1,60 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_SINK_H_
+#define _GNOME_SCAN_SINK_H_
+
+#include <glib-object.h>
+#include "gnome-scan-plugin.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_SINK (gnome_scan_sink_get_type ())
+#define GNOME_SCAN_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_SINK, GnomeScanSink))
+#define GNOME_SCAN_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_SINK, GnomeScanSinkClass))
+#define GNOME_IS_SCAN_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_SINK))
+#define GNOME_IS_SCAN_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_SINK))
+#define GNOME_SCAN_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_SINK, GnomeScanSinkClass))
+
+typedef struct _GnomeScanSinkClass GnomeScanSinkClass;
+typedef struct _GnomeScanSink GnomeScanSink;
+
+struct _GnomeScanSinkClass
+{
+ GnomeScanPluginClass parent_class;
+};
+
+/**
+ * GnomeScanSink:
+ *
+ * #GnomeScanSink is the base class for all sink. A #GnomeScanSink is
+ * basically a #GnomeScanPlugin.
+ **/
+struct _GnomeScanSink
+{
+ GnomeScanPlugin parent_instance;
+};
+
+GType gnome_scan_sink_get_type (void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_SINK_H_ */
diff --git a/trunk/lib/gnome-scan-string-widget.c b/trunk/lib/gnome-scan-string-widget.c
new file mode 100644
index 0000000..4a5771f
--- /dev/null
+++ b/trunk/lib/gnome-scan-string-widget.c
@@ -0,0 +1,77 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "gnome-scan-string-widget.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCAN_STRING_WIDGET, GnomeScanStringWidgetPrivate))
+
+typedef struct _GnomeScanStringWidgetPrivate GnomeScanStringWidgetPrivate;
+struct _GnomeScanStringWidgetPrivate
+{
+ GtkWidget *entry;
+};
+
+/* entry*/
+static void gssw_activate (GtkEntry *entry, GnomeScanParamWidget *gspw);
+
+GS_DEFINE_PARAM_WIDGET (GnomeScanStringWidget, gnome_scan_string_widget);
+
+static void
+gnome_scan_string_widget_init (GnomeScanStringWidget *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gnome_scan_string_widget_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gnome_scan_string_widget_parent_class)->finalize (object);
+}
+
+static void
+gnome_scan_string_widget_build (GnomeScanParamWidget *gspw)
+{
+ GnomeScanStringWidgetPrivate *priv = GET_PRIVATE (gspw);
+ priv->entry = gtk_entry_new ();
+ gtk_box_pack_start (GTK_BOX (gspw), priv->entry, TRUE, TRUE, 0);
+ g_signal_connect (priv->entry, "activate",
+ (GCallback) gssw_activate,
+ gspw);
+}
+
+static void
+gnome_scan_string_widget_set (GnomeScanParamWidget *gspw, GValue *value)
+{
+ gtk_entry_set_text (GTK_ENTRY (GET_PRIVATE (gspw)->entry),
+ g_value_get_string (value));
+}
+
+
+static void
+gssw_activate (GtkEntry *entry, GnomeScanParamWidget *gspw)
+{
+ g_value_set_string (gspw->value,
+ g_strdup(gtk_entry_get_text (entry)));
+ gnome_scan_param_widget_changed (gspw);
+}
diff --git a/trunk/lib/gnome-scan-string-widget.h b/trunk/lib/gnome-scan-string-widget.h
new file mode 100644
index 0000000..589b3bf
--- /dev/null
+++ b/trunk/lib/gnome-scan-string-widget.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_STRING_WIDGET_H_
+#define _GNOME_SCAN_STRING_WIDGET_H_
+
+#include <glib-object.h>
+#include "gnome-scan-param-widget.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCAN_STRING_WIDGET (gnome_scan_string_widget_get_type ())
+#define GNOME_SCAN_STRING_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_STRING_WIDGET, GnomeScanStringWidget))
+#define GNOME_SCAN_STRING_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_STRING_WIDGET, GnomeScanStringWidgetClass))
+#define GNOME_IS_SCAN_STRING_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_STRING_WIDGET))
+#define GNOME_IS_SCAN_STRING_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_STRING_WIDGET))
+#define GNOME_SCAN_STRING_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_STRING_WIDGET, GnomeScanStringWidgetClass))
+
+typedef struct _GnomeScanStringWidget GnomeScanStringWidget;
+struct _GnomeScanStringWidget
+{
+ GnomeScanParamWidget parent_instance;
+};
+
+GS_DEFINE_PARAM_WIDGET_HEADER (GnomeScanStringWidget, gnome_scan_string_widget);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_STRING_WIDGET_H_ */
diff --git a/trunk/lib/gnome-scan-types.c b/trunk/lib/gnome-scan-types.c
new file mode 100644
index 0000000..8fdb973
--- /dev/null
+++ b/trunk/lib/gnome-scan-types.c
@@ -0,0 +1,82 @@
+
+/* Generated data (by glib-mkenums) */
+
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#include "gnome-scan-types.h"
+
+/**
+ * SECTION: gnome-scan-types
+ * @title: Enums and Flags
+ * @short_description: Declared enumeration and flags
+ */
+
+/* Enumerations from "gnome-scanner.h" */
+#include "gnome-scanner.h"
+
+GType
+gnome_scanner_status_get_type (void)
+{
+ static GType type = 0;
+ static const GEnumValue _gnome_scanner_status_values[] = {
+ { GNOME_SCANNER_UNKNOWN, "GNOME_SCANNER_UNKNOWN", "unknown" },
+ { GNOME_SCANNER_READY, "GNOME_SCANNER_READY", "ready" },
+ { GNOME_SCANNER_BUSY, "GNOME_SCANNER_BUSY", "busy" },
+ { 0, NULL, NULL }
+};
+
+ if (type == 0) {
+ type = g_enum_register_static ("GnomeScannerStatus", _gnome_scanner_status_values);
+ }
+
+ return type;
+}
+
+/* Enumerations from "gnome-scan-utils.h" */
+#include "gnome-scan-utils.h"
+
+GType
+gs_param_unit_get_type (void)
+{
+ static GType type = 0;
+ static const GEnumValue _gs_param_unit_values[] = {
+ { GS_UNIT_NONE, "GS_UNIT_NONE", "none" },
+ { GS_UNIT_PIXEL, "GS_UNIT_PIXEL", "pixel" },
+ { GS_UNIT_POINT, "GS_UNIT_POINT", "point" },
+ { GS_UNIT_MM, "GS_UNIT_MM", "mm" },
+ { GS_UNIT_BIT, "GS_UNIT_BIT", "bit" },
+ { GS_UNIT_DPI, "GS_UNIT_DPI", "dpi" },
+ { GS_UNIT_PERCENT, "GS_UNIT_PERCENT", "percent" },
+ { GS_UNIT_MICROSECOND, "GS_UNIT_MICROSECOND", "microsecond" },
+ { 0, NULL, NULL }
+};
+
+ if (type == 0) {
+ type = g_enum_register_static ("GnomeScanUnit", _gs_param_unit_values);
+ }
+
+ return type;
+}
+
+
+/* Generated data ends here */
+
diff --git a/trunk/lib/gnome-scan-types.c.tpl b/trunk/lib/gnome-scan-types.c.tpl
new file mode 100644
index 0000000..a35cc4d
--- /dev/null
+++ b/trunk/lib/gnome-scan-types.c.tpl
@@ -0,0 +1,63 @@
+/*-*- c -*-*/
+/*** BEGIN file-header ***/
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#include "gnome-scan-types.h"
+
+/**
+ * SECTION: gnome-scan-types
+ * @title: Enums and Flags
+ * @short_description: Declared enumeration and flags
+ */
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* Enumerations from "@filename@" */
+#include "@filename@"
+
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType
+ enum_name@_get_type (void)
+{
+ static GType type = 0;
+ static const G Type@Value _ enum_name@_values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+};
+
+ if (type == 0) {
+ type = g_ type@_register_static ("@EnumName@", _ enum_name@_values);
+ }
+
+ return type;
+}
+
+/*** END value-tail ***/
diff --git a/trunk/lib/gnome-scan-types.h b/trunk/lib/gnome-scan-types.h
new file mode 100644
index 0000000..61ed912
--- /dev/null
+++ b/trunk/lib/gnome-scan-types.h
@@ -0,0 +1,44 @@
+
+/* Generated data (by glib-mkenums) */
+
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef GNOME_SCAN_TYPES_H
+#define GNOME_SCAN_TYPES_H
+
+#include <glib-object.h>
+
+/* Enumerations from "gnome-scanner.h" */
+#define GNOME_TYPE_SCANNER_STATUS (gnome_scanner_status_get_type ())
+GType gnome_scanner_status_get_type (void) G_GNUC_CONST;
+
+/* Enumerations from "gnome-scan-utils.h" */
+#define GNOME_TYPE_SCAN_UNIT (gs_param_unit_get_type ())
+GType gs_param_unit_get_type (void) G_GNUC_CONST;
+
+
+G_END_DECLS
+
+#endif
+
+/* Generated data ends here */
+
diff --git a/trunk/lib/gnome-scan-types.h.tpl b/trunk/lib/gnome-scan-types.h.tpl
new file mode 100644
index 0000000..189df15
--- /dev/null
+++ b/trunk/lib/gnome-scan-types.h.tpl
@@ -0,0 +1,50 @@
+/*-*- c -*-*/
+/*** BEGIN file-header ***/
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef GNOME_SCAN_TYPES_H
+#define GNOME_SCAN_TYPES_H
+
+#include <glib-object.h>
+
+/*** END file-header ***/
+
+G_BEGIN_DECLS
+
+
+/*** BEGIN file-production ***/
+/* Enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN enumeration-production ***/
+#define GNOME_TYPE_ ENUMSHORT@ (@enum_name _get_type ())
+GType @enum_name _get_type (void) G_GNUC_CONST;
+
+/*** END enumeration-production ***/
+
+/*** BEGIN file-tail ***/
+
+G_END_DECLS
+
+#endif
+/*** END file-tail ***/
+
diff --git a/trunk/lib/gnome-scan-utils.c b/trunk/lib/gnome-scan-utils.c
new file mode 100644
index 0000000..c3df751
--- /dev/null
+++ b/trunk/lib/gnome-scan-utils.c
@@ -0,0 +1,204 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION: gnome-scan-utils
+ * @title: Miscellaneous utils
+ *
+ **/
+#include "gnome-scan-utils.h"
+#include "gnome-scan-types.h"
+
+#define GS_WARN_UNSUPPORTED_UNIT(unit) g_warning("%s: Unsupported unit %s.", __FUNCTION__, gs_enum_get_nick_from_value (GNOME_TYPE_SCAN_UNIT, unit))
+
+const gchar*
+gs_enum_get_nick_from_value (GType type, guint value)
+{
+ GEnumClass *klass;
+ GEnumValue *val;
+
+ klass = g_type_class_ref (type);
+ val = g_enum_get_value (klass, value);
+ g_type_class_unref (klass);
+
+ return g_strdup (val->value_nick);
+}
+
+/**
+ * gs_convert:
+ * @val: the value to convert
+ * @from: the current @val unit
+ * @to: the target unit fro @val
+ * @res: the resolution in dpi
+ *
+ * Convert @val from @from unit to @to at @res resolution. Useful for
+ * preview area, #GnomeScanner, etc.
+ **/
+gdouble
+gs_convert (gdouble val,
+ GnomeScanUnit from,
+ GnomeScanUnit to,
+ gdouble res)
+{
+ if (from == to)
+ return val;
+
+ switch (from) {
+ case GS_UNIT_NONE:
+ case GS_UNIT_BIT:
+ case GS_UNIT_PERCENT:
+ case GS_UNIT_MICROSECOND:
+ case GS_UNIT_DPI:
+ GS_WARN_UNSUPPORTED_UNIT(from);
+ return val;
+ default:
+ switch (to) {
+ case GS_UNIT_NONE:
+ case GS_UNIT_BIT:
+ case GS_UNIT_PERCENT:
+ case GS_UNIT_MICROSECOND:
+ case GS_UNIT_DPI:
+ GS_WARN_UNSUPPORTED_UNIT(from);
+ return val;
+ default:
+ return gs_convert_from_mm (gs_convert_to_mm (val, from, res),
+ to, res);
+ }
+ }
+}
+
+
+gdouble
+gs_convert_to_mm (gdouble val,
+ GnomeScanUnit unit,
+ gdouble res)
+{
+ switch (unit) {
+ case GS_UNIT_NONE:
+ case GS_UNIT_BIT:
+ case GS_UNIT_PERCENT:
+ case GS_UNIT_MICROSECOND:
+ case GS_UNIT_DPI:
+ GS_WARN_UNSUPPORTED_UNIT(unit);
+ return val;
+ case GS_UNIT_MM:
+ return val;
+ case GS_UNIT_PIXEL:
+ return val * (MM_PER_INCH / res);
+ }
+}
+
+gdouble
+gs_convert_from_mm (gdouble val,
+ GnomeScanUnit unit,
+ gdouble res)
+{
+ switch (unit) {
+ case GS_UNIT_NONE:
+ case GS_UNIT_BIT:
+ case GS_UNIT_PERCENT:
+ case GS_UNIT_MICROSECOND:
+ case GS_UNIT_DPI:
+ GS_WARN_UNSUPPORTED_UNIT(unit);
+ return val;
+ case GS_UNIT_MM:
+ return val;
+ case GS_UNIT_PIXEL:
+ return val / (MM_PER_INCH / res);
+ }
+}
+
+GSRectangle*
+gs_rectangle_convert (GSRectangle *r,
+ GnomeScanUnit from,
+ GnomeScanUnit to,
+ gdouble res)
+{
+ return gs_rectangle_convert_from_mm (gs_rectangle_convert_to_mm (r, from, res),
+ to, res);
+}
+
+GSRectangle*
+gs_rectangle_convert_to_mm (GSRectangle *r,
+ GnomeScanUnit unit,
+ gdouble res)
+{
+ GSRectangle*rect = g_new0 (GSRectangle, 1);
+#define conv(var) rect->var = gs_convert_to_mm (r->var, unit, res)
+ conv(x);
+ conv(y);
+ conv(width);
+ conv(height);
+#undef conv
+ return rect;
+}
+
+GSRectangle*
+gs_rectangle_convert_from_mm (GSRectangle *r,
+ GnomeScanUnit unit,
+ gdouble res)
+{
+ GSRectangle*rect = g_new0 (GSRectangle, 1);
+#define conv(var) rect->var = gs_convert_from_mm (r->var, unit, res)
+ conv(x);
+ conv(y);
+ conv(width);
+ conv(height);
+#undef conv
+ return rect;
+}
+
+GSRectangle*
+gs_rectangle_rotate(GSRectangle *r,
+ GSRectangle *a,
+ guint angle)
+{
+ GSRectangle *res = g_memdup(r, sizeof(GSRectangle));
+ angle%= 360;
+
+ switch (angle)
+ {
+ case 0:
+ break;
+ case 270:
+ res->width = r->height;
+ res->height = r->width;
+ res->x = r->y;
+ res->y = MAX(a->width - r->x - r->width, a->x);
+ break;
+ case 180:
+ res->x = MAX(a->width - r->x - r->width, a->x);
+ res->y = MAX(a->height - r->y - r->height, a->y);
+ break;
+ case 90:
+ res->width = r->height;
+ res->height = r->width;
+ res->y = r->x;
+ res->x = MAX(a->height - r->y - r->height, a->y);
+ break;
+ default:
+ g_warning("%s: %i degree rotation is not supported",
+ __FUNCTION__, angle);
+ break;
+ }
+ return res;
+}
diff --git a/trunk/lib/gnome-scan-utils.h b/trunk/lib/gnome-scan-utils.h
new file mode 100644
index 0000000..83e4ccc
--- /dev/null
+++ b/trunk/lib/gnome-scan-utils.h
@@ -0,0 +1,150 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GNOME_SCAN_UTILS_H_
+#define _GNOME_SCAN_UTILS_H_
+
+#include <glib.h>
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define MM_PER_INCH 25.4
+
+/**
+ * GS_DEFINE_QUARK:
+ * @quark_name: function prefix
+ * @String: The string passed to g_quark_from_string()
+ *
+ * Generate a function that generate a static quark from @String.
+ *
+ * For example:
+ * <programlisting>
+GS_DEFINE_QUARK (foo_bar, FooBar);
+ * </programlisting>
+ *
+ * expands to:
+ *
+ * <programlisting>
+GQuark
+gs_foo_bar_quark () {
+ static GQuark quark = 0;
+ if (!quark) {
+ quark = g_quark_from_static_string ("FooBar");
+ }
+ return quark;
+}
+ * </programlisting>
+ **/
+#define GS_DEFINE_QUARK(quark_name, String) GQuark \
+quark_name##_quark () { \
+ static GQuark quark = 0; \
+ if (!quark) { \
+ quark = g_quark_from_static_string (String); } \
+ return quark; \
+}
+
+
+/**
+ * GnomeScanFormat:
+ *
+ **/
+typedef struct _GnomeScanFormat GnomeScanFormat;
+struct _GnomeScanFormat
+{
+ gchar *name;
+ gchar *domain;
+ gchar *description;
+ gchar **mime_types;
+ gchar **extensions;
+};
+
+typedef struct _GSPoint GSPoint;
+struct _GSPoint
+{
+ gdouble x;
+ gdouble y;
+};
+
+typedef struct _GSRectangle GSRectangle;
+struct _GSRectangle
+{
+ gdouble x;
+ gdouble y;
+ gdouble width;
+ gdouble height;
+};
+
+/**
+ * GnomeScanUnit:
+ **/
+typedef enum /*< lowercase_name=gs_param_unit,prefix=GS_UNIT >*/
+{
+ GS_UNIT_NONE=-1,
+ GS_UNIT_PIXEL=GTK_UNIT_PIXEL,
+ GS_UNIT_POINT=GTK_UNIT_POINTS,
+ GS_UNIT_MM=GTK_UNIT_MM,
+ GS_UNIT_BIT,
+ GS_UNIT_DPI,
+ GS_UNIT_PERCENT,
+ GS_UNIT_MICROSECOND
+} GnomeScanUnit;
+
+const gchar*
+gs_enum_get_nick_from_value (GType type, guint value);
+
+gdouble gs_convert (gdouble val,
+ GnomeScanUnit from,
+ GnomeScanUnit to,
+ gdouble res);
+
+gdouble gs_convert_to_mm (gdouble val,
+ GnomeScanUnit unit,
+ gdouble res);
+
+gdouble gs_convert_from_mm (gdouble val,
+ GnomeScanUnit unit,
+ gdouble res);
+
+GSRectangle* gs_rectangle_convert (GSRectangle *r,
+ GnomeScanUnit from,
+ GnomeScanUnit to,
+ gdouble res);
+GSRectangle* gs_rectangle_convert_to_mm (GSRectangle *r,
+ GnomeScanUnit unit,
+ gdouble res);
+
+GSRectangle* gs_rectangle_convert_from_mm (GSRectangle *r,
+ GnomeScanUnit unit,
+ gdouble res);
+
+GSRectangle* gs_rectangle_rotate (GSRectangle *r,
+ GSRectangle *a,
+ guint angle);
+
+#define gs_debug_rect(r) g_debug(G_STRLOC ": " #r " = %ix%i+%i+%i", (r)->width, (r)->height, (r)->x, (r)->y)
+#define gs_debug_gsrect(r) g_debug(G_STRLOC ": " #r " = %.2fx%.2f+%.2f+%.2f", (r)->width, (r)->height, (r)->x, (r)->y)
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN_UTILS_H_ */
diff --git a/trunk/lib/gnome-scan.h b/trunk/lib/gnome-scan.h
new file mode 100644
index 0000000..de5a9f9
--- /dev/null
+++ b/trunk/lib/gnome-scan.h
@@ -0,0 +1,33 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCAN_H_
+#define _GNOME_SCAN_H_
+
+#include <gnome-scan-init.h>
+#include <gnome-scan-param-specs.h>
+#include <gnome-scan-job.h>
+#include <gnome-scan-plugin.h>
+#include <gnome-scan-sink.h>
+#include <gnome-scan-dialog.h>
+#include <gnome-scan-acquisition-dialog.h>
+
+#endif
diff --git a/trunk/lib/gnome-scanner.c b/trunk/lib/gnome-scanner.c
new file mode 100644
index 0000000..c723083
--- /dev/null
+++ b/trunk/lib/gnome-scanner.c
@@ -0,0 +1,301 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+/**
+ * SECTION: gnome-scanner
+ * @short_description: Acquisition plugin
+ * @include: gnome-scanner.h
+ *
+ * #GnomeScanner is the base class for backend specific scanner (like
+ * e.g SANE). Following SANE design, Gnome Scan scanner has an
+ * undefined set of option. But unlike SANE, the scanner itself handle
+ * acquisition.
+ *
+ * Each #GnomeScanner should monitor its sensor (e.g. paper-in) and
+ * trigger an event on sensor state changes.
+ **/
+
+#include <glib/gi18n.h>
+#include "gnome-scan-private.h"
+#include "gnome-scanner.h"
+#include "gnome-scan-types.h"
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_SCANNER, GnomeScannerPrivate))
+
+typedef struct _GnomeScannerPrivate GnomeScannerPrivate;
+
+struct _GnomeScannerPrivate
+{
+ const gchar* icon_name;
+};
+
+enum
+ {
+ PROP_0,
+ PROP_SENSORS,
+ PROP_ICON_NAME,
+ PROP_STATUS
+ };
+
+enum
+ {
+ EVENT,
+ SETTINGS_CHANGED,
+ STATUS_CHANGED,
+ LAST_SIGNAL
+ };
+
+
+static GnomeScanPluginClass* parent_class = NULL;
+static guint signals[LAST_SIGNAL] = { 0 };
+
+G_DEFINE_TYPE (GnomeScanner, gnome_scanner, GNOME_TYPE_SCAN_PLUGIN);
+
+static void
+gnome_scanner_init (GnomeScanner *object)
+{
+}
+
+static void
+gnome_scanner_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnome_scanner_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCANNER (object));
+
+ switch (prop_id)
+ {
+ case PROP_SENSORS:
+ /* TODO: Add setter for "sensors" property here */
+ break;
+ case PROP_ICON_NAME:
+ GET_PRIVATE (object)->icon_name = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scanner_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCANNER (object));
+
+ switch (prop_id)
+ {
+ case PROP_SENSORS:
+ /* TODO: Add getter for "sensors" property here */
+ break;
+ case PROP_ICON_NAME:
+ g_value_set_string (value, gnome_scanner_get_icon_name (GNOME_SCANNER (object)));
+ break;
+ case PROP_STATUS:
+ g_value_set_enum (value, GNOME_SCANNER (object)->status);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gnome_scanner_event (GnomeScanner *scanner, GnomeScanEvent *event, gpointer data)
+{
+ /* TODO: Add default signal handler implementation here */
+}
+
+static void
+gnome_scanner_class_init (GnomeScannerClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = GNOME_SCAN_PLUGIN_CLASS (g_type_class_peek_parent (klass));
+
+ g_type_class_add_private (klass, sizeof (GnomeScannerPrivate));
+ object_class->finalize = gnome_scanner_finalize;
+ object_class->set_property = gnome_scanner_set_property;
+ object_class->get_property = gnome_scanner_get_property;
+
+ klass->event = gnome_scanner_event;
+
+ /**
+ * GnomeScanner:sensors:
+ *
+ * A list of sensor specification.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_SENSORS,
+ g_param_spec_pointer ("sensors",
+ "Sensors",
+ "Device sensors specification.",
+ G_PARAM_READABLE));
+
+ /**
+ * GnomeScanner:icon-name:
+ *
+ * The icon name representing the device.
+ **/
+ g_object_class_install_property (object_class,
+ PROP_ICON_NAME,
+ g_param_spec_string ("icon-name",
+ "Icon Name",
+ "Icon name representing device type.",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ /**
+ * GnomeScanner:status:
+ *
+ * Device status
+ **/
+ g_object_class_install_property (object_class,
+ PROP_STATUS,
+ g_param_spec_enum ("status",
+ "Status",
+ "Current device status",
+ GNOME_TYPE_SCANNER_STATUS,
+ GNOME_SCANNER_UNKNOWN,
+ G_PARAM_READABLE));
+
+ /**
+ * GnomeScanner::event:
+ * @scanner: the emitting #GnomeScanner
+ * @event: the emitted even.
+ *
+ * Emitted when an hardware event is triggered. (button, wheel, paper-in, etc.)
+ **/
+ signals[EVENT] =
+ g_signal_new ("event",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GnomeScannerClass, event),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
+ /**
+ * GnomeScanner::settings-changed:
+ * @scanner: the emitting #GnomeScanner
+ *
+ * Emitted when the scanner has settings are hard setted.
+ **/
+ signals[SETTINGS_CHANGED] =
+ g_signal_new ("settings-changed",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GnomeScannerClass, settings_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+ /**
+ * GnomeScanner::status-changed:
+ * @scanner: the emitting #GnomeScanner
+ *
+ * Emitted when the scanner status as changed.
+ **/
+ signals[STATUS_CHANGED] =
+ g_signal_new ("status-changed",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GnomeScannerClass, status_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
+
+
+/**
+ * gnome_scanner_get_icon_name:
+ * @scanner: a #GnomeScanner
+ *
+ * Return the icon-name representing the type of the device.
+ *
+ * Returns: a icon-name string
+ **/
+const gchar*
+gnome_scanner_get_icon_name (GnomeScanner *scanner)
+{
+ return GET_PRIVATE (scanner)->icon_name;
+}
+
+/**
+ * gnome_scanner_settings_changed:
+ * @scanner: a #GnomeScanner
+ *
+ * Emit #GnomeScanner::settings-changed signal.
+ *
+ */
+void
+gnome_scanner_settings_changed (GnomeScanner *scanner)
+{
+ g_signal_emit (scanner, signals[SETTINGS_CHANGED], 0);
+}
+
+
+GnomeScannerStatus
+gnome_scanner_get_status (GnomeScanner *scanner)
+{
+ return GNOME_SCANNER (scanner)->status;
+}
+
+/**
+ * gnome_scanner_get_status_string:
+ * @scanner: a #GnomeScanner
+ *
+ * Returns the translated string for the current @scanner status.
+ *
+ * Returns: a translated string.
+ **/
+const gchar*
+gnome_scanner_get_status_string (GnomeScanner *scanner)
+{
+ static const gchar* status_strings[] = {
+ N_("Unknown"),
+ N_("Ready"),
+ N_("Busy"),
+ NULL
+ };
+ return _(status_strings[scanner->status]);
+}
+
+
+void
+gnome_scanner_set_status (GnomeScanner *scanner, GnomeScannerStatus status)
+{
+ if (scanner->status != status) {
+ scanner->status = status;
+ g_signal_emit (scanner, signals[STATUS_CHANGED], 0);
+ }
+}
+
+const gchar*
+gnome_scanner_get_output_format (GnomeScanner *scanner)
+{
+ GnomeScannerClass *klass = GNOME_SCANNER_GET_CLASS (scanner);
+ if (klass->get_output_format) {
+ return klass->get_output_format(scanner);
+ }
+ else {
+ return "RGB u8";
+ }
+}
diff --git a/trunk/lib/gnome-scanner.h b/trunk/lib/gnome-scanner.h
new file mode 100644
index 0000000..50df870
--- /dev/null
+++ b/trunk/lib/gnome-scanner.h
@@ -0,0 +1,94 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GNOME_SCANNER_H_
+#define _GNOME_SCANNER_H_
+
+#include <glib-object.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include "gnome-scan-plugin.h"
+
+G_BEGIN_DECLS
+
+#define GNOME_TYPE_SCANNER (gnome_scanner_get_type ())
+#define GNOME_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCANNER, GnomeScanner))
+#define GNOME_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCANNER, GnomeScannerClass))
+#define GNOME_IS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCANNER))
+#define GNOME_IS_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCANNER))
+#define GNOME_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCANNER, GnomeScannerClass))
+
+
+typedef enum
+{
+ GNOME_SCANNER_UNKNOWN,
+ GNOME_SCANNER_READY,
+ GNOME_SCANNER_BUSY
+} GnomeScannerStatus;
+
+
+typedef struct _GnomeScannerClass GnomeScannerClass;
+typedef struct _GnomeScanner GnomeScanner;
+typedef gpointer GnomeScanEvent;
+
+struct _GnomeScannerClass
+{
+ GnomeScanPluginClass parent_class;
+
+ /* API */
+ gchar* (* get_output_format) (GnomeScanner *Scanner);
+
+ /* Signals */
+ void (* event) (GnomeScanner *scanner,
+ GnomeScanEvent *event,
+ gpointer data);
+ void (* settings_changed) (GnomeScanner *scanner,
+ gpointer data);
+ void (* status_changed) (GnomeScanner *scanner);
+};
+
+/**
+ * GnomeScanner:
+ *
+ * A #GnomeScanner publish all instance specific plugins parameters
+ * and handle the real acquisition work (e.g. throug SANE, TWAIN,
+ * etc.)
+ **/
+struct _GnomeScanner
+{
+ /*< private >*/
+ GnomeScanPlugin parent_instance;
+
+ /*< public >*/
+ GnomeScannerStatus status;
+};
+
+GType gnome_scanner_get_type (void) G_GNUC_CONST;
+const gchar* gnome_scanner_get_icon_name (GnomeScanner *scanner);
+void gnome_scanner_settings_changed (GnomeScanner *scanner);
+void gnome_scanner_set_status (GnomeScanner *scanner,
+ GnomeScannerStatus status);
+GnomeScannerStatus gnome_scanner_get_status (GnomeScanner *scanner);
+const gchar* gnome_scanner_get_status_string (GnomeScanner *scanner);
+const gchar* gnome_scanner_get_output_format (GnomeScanner *scanner);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCANNER_H_ */
diff --git a/trunk/modules/Makefile.am b/trunk/modules/Makefile.am
new file mode 100644
index 0000000..f7d0a10
--- /dev/null
+++ b/trunk/modules/Makefile.am
@@ -0,0 +1,45 @@
+INCLUDES = \
+ $(GNOME_SCAN_CFLAGS) \
+ -I$(top_srcdir)/lib
+
+AM_CFLAGS = -Wall -g
+
+
+modulesdir = @MODULE_DIR@
+modules_LTLIBRARIES = \
+ libgsfiles.la \
+ libgsane.la
+
+libgsfiles_la_SOURCES = \
+ gsfile-scanner.h\
+ gsfile-scanner.c \
+ gsfile-module.c \
+ gsfile-module.h \
+ gsfile-backend.h \
+ gsfile-backend.c \
+ gsfile-filenames-widget.h \
+ gsfile-filenames-widget.c \
+ gsfile-pspec.h \
+ gsfile-pspec.c
+
+libgsfiles_la_LDFLAGS = -avoid-version
+
+libgsane_la_SOURCES = \
+ gsane-backend.h \
+ gsane-backend.c \
+ gsane-scanner.h \
+ gsane-scanner.c \
+ gsane-module.c \
+ gsane-meta-param.h \
+ gsane-meta-param.c \
+ gsane-common.h \
+ gsane-common.c
+
+libgsane_la_LDFLAGS = -avoid-version
+
+libgsane_la_LIBADD = \
+ -L$(top_builddir)/lib -l SONAME@ \
+ -lsane
+
+#
+## File created by the gnome-build tools
diff --git a/trunk/modules/gsane-backend.c b/trunk/modules/gsane-backend.c
new file mode 100644
index 0000000..c464cac
--- /dev/null
+++ b/trunk/modules/gsane-backend.c
@@ -0,0 +1,80 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#include <sane/sane.h>
+#include <gnome-scan-module.h>
+#include "gsane-backend.h"
+#include "gsane-scanner.h"
+
+void gsb_probe_scanners (GnomeScanBackend *backend);
+
+static GnomeScanBackendClass* parent_class = NULL;
+
+GS_DEFINE_MODULE_TYPE (GSaneBackend, gsane_backend, GNOME_TYPE_SCAN_BACKEND);
+
+static void
+gsane_backend_init (GSaneBackend *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gsane_backend_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gsane_backend_class_init (GSaneBackendClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ GnomeScanBackendClass *backend_class = GNOME_SCAN_BACKEND_CLASS (klass);
+ parent_class = GNOME_SCAN_BACKEND_CLASS (g_type_class_peek_parent (klass));
+
+ backend_class->probe_scanners = gsb_probe_scanners;
+
+ object_class->finalize = gsane_backend_finalize;
+}
+
+void gsb_probe_scanners(GnomeScanBackend *backend)
+{
+ const SANE_Device **devices;
+ SANE_Status status;
+ GnomeScanner *scanner;
+ gint i;
+
+ status = sane_get_devices(&devices, SANE_FALSE);
+
+ for (i = 0; devices[i]; i++) {
+ scanner = gsane_scanner_new(devices[i]);
+ if (scanner) {
+ gnome_scan_backend_add_scanner(backend, scanner);
+ g_object_unref (scanner);
+ }
+ else {
+ g_debug("SANE device %s failed or ignored",
+ devices[i]->name);
+ }
+ }
+}
+
diff --git a/trunk/modules/gsane-backend.h b/trunk/modules/gsane-backend.h
new file mode 100644
index 0000000..aab46b9
--- /dev/null
+++ b/trunk/modules/gsane-backend.h
@@ -0,0 +1,56 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#ifndef _GSANE_BACKEND_H_
+#define _GSANE_BACKEND_H_
+
+#include <glib-object.h>
+#include <gnome-scan-backend.h>
+
+G_BEGIN_DECLS
+
+#define GSANE_TYPE_BACKEND (gsane_backend_get_type ())
+#define GSANE_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SCAN_BACKEND_SANE, GSaneBackend))
+#define GSANE_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_SCAN_BACKEND_SANE, GSaneBackendClass))
+#define GNOME_IS_SCAN_BACKEND_SANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_SCAN_BACKEND_SANE))
+#define GNOME_IS_SCAN_BACKEND_SANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_SCAN_BACKEND_SANE))
+#define GSANE_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_SCAN_BACKEND_SANE, GSaneBackendClass))
+
+typedef struct _GSaneBackendClass GSaneBackendClass;
+typedef struct _GSaneBackend GSaneBackend;
+
+struct _GSaneBackendClass
+{
+ GnomeScanBackendClass parent_class;
+};
+
+struct _GSaneBackend
+{
+ GnomeScanBackend parent_instance;
+};
+
+GType gsane_backend_get_type (void) G_GNUC_CONST;
+void gsane_backend_register_type(GTypeModule *module);
+
+G_END_DECLS
+
+#endif /* _GSANE_BACKEND_H_ */
diff --git a/trunk/modules/gsane-common.c b/trunk/modules/gsane-common.c
new file mode 100644
index 0000000..a07d8bb
--- /dev/null
+++ b/trunk/modules/gsane-common.c
@@ -0,0 +1,37 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "gsane-common.h"
+#include <gnome-scan-param-specs.h>
+
+GS_DEFINE_QUARK(gsane_meta_param, "meta-param");
+
+gboolean
+gsane_str_matches_strv (const gchar *name, const gchar **names)
+{
+ gint i;
+ for (i = 0; names[i] ; i++) {
+ if (g_ascii_strcasecmp (name, names[i]) == 0)
+ return TRUE;
+ }
+ return FALSE;
+}
diff --git a/trunk/modules/gsane-common.h b/trunk/modules/gsane-common.h
new file mode 100644
index 0000000..ee4d82c
--- /dev/null
+++ b/trunk/modules/gsane-common.h
@@ -0,0 +1,52 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GSANE_COMMON_H_
+#define _GSANE_COMMON_H_
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#undef _
+#define _(string) dgettext(GETTEXT_PACKAGE, string)
+
+G_BEGIN_DECLS
+
+#if DEBUG
+#define gs_debug(...) g_debug (__VA_ARGS__)
+#else
+#define gs_debug(...)
+#endif
+
+#define GSANE_META_PARAM_QUARK (gsane_meta_param_quark ())
+
+GQuark gsane_meta_param_quark () G_GNUC_CONST;
+
+gboolean gsane_str_matches_strv (const gchar *name, const gchar **names);
+
+G_END_DECLS
+
+#endif /* _GSANE_COMMON_H_ */
diff --git a/trunk/modules/gsane-meta-param.c b/trunk/modules/gsane-meta-param.c
new file mode 100644
index 0000000..dac4f43
--- /dev/null
+++ b/trunk/modules/gsane-meta-param.c
@@ -0,0 +1,833 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <gnome-scan-plugin.h>
+#include <gnome-scan-preview-plugin-area.h>
+#include <gnome-scan-types.h>
+#include <gnome-scan-utils.h>
+#include "gsane-meta-param.h"
+
+/**
+ * GSANE_DEFINE_META_PARAM:
+ * @opts: the swallowed sane options
+ * @params: the generated params ?
+ *
+ **/
+#define GSANE_DEFINE_META_PARAM(Name, name, opts, params) \
+ static void meta_param_##name##_class_init (MetaParamClass *klass); \
+ static void meta_param_##name##_init (MetaParam *mp); \
+ static void meta_param_##name##_finalize (MetaParam *param); \
+ static void meta_param_##name##_add_param (MetaParam *param, GParamSpec *spec); \
+ static gboolean meta_param_##name##_get_params (MetaParam *param); \
+ static GValue* meta_param_##name##_get_value (MetaParam *param, GParamSpec *spec); \
+ static SANE_Int meta_param_##name##_set_value (MetaParam *param, GParamSpec *spec, GValue *value); \
+ GType meta_param_##name##_get_type () { \
+ static GType type; \
+ if (type == 0) { \
+ static MetaParamTypeInfo info = { \
+ sizeof (MetaParam##Name), \
+ (GClassInitFunc) meta_param_##name##_class_init, \
+ (GInstanceInitFunc) meta_param_##name##_init \
+ }; \
+ type = meta_param_type_register_static ("MetaParam" #Name, &info); \
+ } \
+ return type; \
+ } \
+ static void meta_param_##name##_class_init (MetaParamClass *klass) { \
+ MetaParamClass *parent_class = GSANE_META_PARAM_CLASS (klass); \
+ parent_class->finalize = meta_param_##name##_finalize; \
+ parent_class->add_param = meta_param_##name##_add_param; \
+ parent_class->get_params = meta_param_##name##_get_params; \
+ parent_class->set_value = meta_param_##name##_set_value; \
+ parent_class->get_value = meta_param_##name##_get_value; \
+ parent_class->options_names = g_strsplit (opts, ",", 8); \
+ parent_class->params_names = g_strsplit (params, ",", 8); \
+ } \
+ MetaParam* meta_param_##name (GSaneScanner *gss) { \
+ return meta_param_internal (meta_param_##name##_get_type(), #name, gss); }
+
+typedef struct _MetaParamTypeInfo MetaParamTypeInfo;
+struct _MetaParamTypeInfo
+{
+ guint instance_size;
+ GClassInitFunc class_init;
+ GInstanceInitFunc init;
+};
+
+/* META PARAMS */
+static void meta_param_class_init (MetaParamClass *klass);
+static void meta_param_init (MetaParam *param);
+
+GType
+meta_param_get_type ()
+{
+ static GType type = 0;
+ static GTypeInfo tinfo = {
+ sizeof (MetaParamClass),
+ NULL, NULL, /* base */
+ (GClassInitFunc) meta_param_class_init, NULL, NULL, /* class */
+ sizeof (MetaParam), 0,
+ (GInstanceInitFunc) meta_param_init, NULL
+ };
+ static GTypeFundamentalInfo finfo = {
+ G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE
+ };
+
+ if (type == 0) {
+ type = g_type_fundamental_next();
+ g_type_register_fundamental (type,
+ "MetaParam",
+ &tinfo,
+ &finfo,
+ G_TYPE_FLAG_ABSTRACT);
+ }
+ return type;
+}
+
+static void
+meta_param_class_init (MetaParamClass *klass)
+{
+
+}
+
+static void
+meta_param_init (MetaParam *param)
+{
+}
+
+static GType
+meta_param_type_register_static (const gchar *name, const MetaParamTypeInfo *mp_info)
+{
+ GTypeInfo info = {
+ sizeof (MetaParamClass),
+ NULL, NULL, /* base */
+ (GClassInitFunc) mp_info->class_init, NULL, mp_info,
+ mp_info->instance_size, 0,
+ mp_info->init, NULL,
+ };
+
+ return g_type_register_static (GSANE_TYPE_META_PARAM,
+ name, &info, 0);
+}
+
+MetaParam*
+meta_param_internal (GType type, gchar *name, GSaneScanner *gss)
+{
+ MetaParam* param = GSANE_META_PARAM (g_type_create_instance (type));
+ param->name = name;
+ param->gss = gss;
+ return param;
+}
+
+gchar*
+meta_param_get_name (MetaParam *mp)
+{
+ return g_strdup (mp->name);
+}
+
+void
+meta_param_add_params (MetaParam *mp, GParamSpec *spec)
+{
+ GSANE_META_PARAM_GET_CLASS (mp)->add_param (mp, spec);
+}
+
+gboolean
+meta_param_get_params (MetaParam *mp)
+{
+ return GSANE_META_PARAM_GET_CLASS (mp)->get_params (mp);
+}
+
+SANE_Int
+meta_param_set_value (MetaParam *mp, GParamSpec *spec, GnomeScanSettings *settings)
+{
+ mp->settings = g_object_ref (settings);
+ GValue *value = gnome_scan_settings_get (settings, g_param_spec_get_name (spec));
+ SANE_Int ret = GSANE_META_PARAM_GET_CLASS (mp)->set_value (mp, spec, value);
+ g_object_unref (mp->settings);
+ mp->settings = NULL;
+ return ret;
+}
+
+GValue*
+meta_param_get_value (MetaParam *mp, GParamSpec *spec)
+{
+ return GSANE_META_PARAM_GET_CLASS (mp)->get_value (mp, spec);
+}
+
+void meta_param_destroy (MetaParam* mp)
+{
+ MetaParamClass *klass = GSANE_META_PARAM_GET_CLASS (mp);
+ klass->finalize (mp);
+ g_type_free_instance (&mp->instance);
+}
+
+
+
+
+
+/* AREA */
+/* TODO : handle paper-width,paper-height */
+GSANE_DEFINE_META_PARAM(PaperSize, paper_size,
+ "tl-x,tl-y,br-x,br-y,"
+ /* the following options are just swallowed */
+ "page-format,paper-size,"
+ "paper-width,paper-height,quick-format",
+ "paper-size,orig,page-orientation");
+
+static void
+meta_param_paper_size_init (MetaParam *mp)
+{
+}
+
+static void
+meta_param_paper_size_finalize (MetaParam *param)
+{
+}
+
+static void
+meta_param_paper_size_add_param (MetaParam *mp, GParamSpec *spec)
+{
+ MetaParamPaperSize *mpps = GSANE_META_PARAM_PAPER_SIZE (mp);
+ const gchar *name = g_param_spec_get_name (spec);
+
+ /*g_debug ("%s:%i %s, %s", __FUNCTION__, __LINE__, mp->name, name);*/
+
+ if (g_str_equal (name, "tl-x")) {
+ mpps->tl_x = spec;
+ }
+ else if (g_str_equal (name, "tl-y")) {
+ mpps->tl_y = spec;
+ }
+ else if (g_str_equal (name, "br-x")) {
+ mpps->br_x = spec;
+ }
+ else if (g_str_equal (name, "br-y")) {
+ mpps->br_y = spec;
+ }
+ else if (g_str_equal (name, "paper-size") ||
+ g_str_equal (name, "paper-format")) {
+ g_debug (G_STRLOC ": Warning : ignoring %s option",
+ name);
+ }
+}
+
+static gboolean
+meta_param_paper_size_get_params (MetaParam *mp)
+{
+ GParamSpec *pspec;
+ GValue *integer = g_new0 (GValue, 1);
+ GSParamSpecRange* spec;
+ MetaParamPaperSize *mpps;
+ GeglRectangle rect, deft;
+ gint i;
+ mpps = GSANE_META_PARAM_PAPER_SIZE (mp);
+
+ g_value_init (integer, G_TYPE_INT);
+#define set_int(val,var) g_value_transform (val, integer); var = g_value_get_int (integer)
+ spec = GS_PARAM_SPEC_RANGE (mpps->tl_x);
+ /* set_int (spec->minimum, rect.x); /\* usualy 0 *\/ */
+ set_int (spec->maximum, rect.width);
+ set_int (spec->default_value, deft.x);
+
+ spec = GS_PARAM_SPEC_RANGE (mpps->tl_y);
+ /* set_int (spec->minimum, rect.y); /\* usualy 0 *\/ */
+ set_int (spec->maximum, rect.height);
+ set_int (spec->default_value, deft.y);
+
+ spec = GS_PARAM_SPEC_RANGE (mpps->br_x);
+ set_int (spec->default_value, deft.width);
+ deft.width-= deft.x;
+
+ spec = GS_PARAM_SPEC_RANGE (mpps->br_y);
+ set_int (spec->default_value, deft.height);
+ deft.height-= deft.y;
+
+ mpps->area.width = rect.width;
+ mpps->area.height = rect.height;
+
+#undef set_int
+
+ /* note: decomposing area in three options orientation, origin and paper-size
+ except these optoin to appear in this order. */
+
+ /* ORIENTATION */
+ pspec = gs_param_spec_page_orientation ("page-orientation", N_("Page Orientation"), N_("Page orientation"),
+ GS_PARAM_GROUP_FORMAT,
+ GTK_PAGE_ORIENTATION_PORTRAIT,
+ G_PARAM_SPEC (mpps->tl_x)->flags);
+ gs_param_spec_set_index (pspec,
+ gs_param_spec_get_index (G_PARAM_SPEC (mpps->tl_x))+2);
+ g_param_spec_set_qdata (pspec, GSANE_META_PARAM_QUARK, mp);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (mp->gss), pspec);
+
+ /* ORIG */
+ pspec = gs_param_spec_pointer ("origin", N_("Origin"), N_("Origin of scan window"),
+ GS_PARAM_GROUP_PREVIEW,
+ GNOME_TYPE_SCAN_PREVIEW_PLUGIN_AREA,
+ G_PARAM_SPEC (mpps->tl_x)->flags);
+ gs_param_spec_set_index (pspec,
+ gs_param_spec_get_index (G_PARAM_SPEC (mpps->tl_x))+1);
+ g_param_spec_set_qdata (pspec, GSANE_META_PARAM_QUARK, mp);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (mp->gss), pspec);
+
+ /* PAPER SIZE */
+ static const gchar*names[] = {
+ GTK_PAPER_NAME_A5,
+ GTK_PAPER_NAME_A4,
+ GTK_PAPER_NAME_B5,
+ GTK_PAPER_NAME_LETTER,
+ GTK_PAPER_NAME_EXECUTIVE,
+ GTK_PAPER_NAME_LEGAL,
+ "iso_dl",
+ "om_small-photo",
+ NULL /* what else ? */
+ };
+ GSList *enumeration = NULL;
+
+ GValue *v;
+#define get_opt(opt,var) v=gsane_scanner_option_get_value (mp->gss, mpps->opt); \
+ g_value_transform(v,integer); \
+ g_free(v); \
+ var = g_value_get_int(integer);
+
+ gint x,y,w,h;
+ get_opt(tl_x, x);
+ get_opt(tl_y, y);
+ get_opt(br_x, w);
+ get_opt(br_y, h);
+ w-=x;
+ h-=y;
+
+ mpps->roi.x = x;
+ mpps->roi.y = y;
+ mpps->roi.width = w;
+ mpps->roi.height = h;
+
+#undef get_opt
+
+ g_value_unset (integer);
+ g_free (integer);
+
+ enumeration = g_slist_append (enumeration,
+ gtk_paper_size_new_custom ("manual",
+ /* translator: Manual is the name of user defined paper size. */
+ _("Manual"),
+ w, h,
+ GTK_UNIT_MM)); /* what if w and h are not mm, but e.g. pixel ? */
+ enumeration = g_slist_append (enumeration,
+ gtk_paper_size_new_custom ("maximal",
+ _("Maximal"),
+ (gdouble) rect.width,
+ (gdouble) rect.height,
+ gs_param_spec_get_unit (mpps->tl_x)));
+ for (i = 0 ; names[i] ; i++) {
+ enumeration = g_slist_append (enumeration,
+ gtk_paper_size_new (names[i]));
+ }
+
+ pspec = gs_param_spec_paper_size ("paper-size", N_("Paper Size"),
+ N_("Document paper size."),
+ GS_PARAM_GROUP_FORMAT,
+ enumeration->data,
+ enumeration,
+ G_PARAM_SPEC (mpps->tl_x)->flags);
+ gs_param_spec_set_index (pspec,
+ gs_param_spec_get_index (G_PARAM_SPEC (mpps->tl_x)));
+
+ g_param_spec_set_qdata (pspec, GSANE_META_PARAM_QUARK, mp);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (mp->gss), pspec);
+
+ return TRUE;
+}
+
+GdkRectangle*
+gs_rectange_rotate(GdkRectangle *r,
+ GdkRectangle *a,
+ guint angle)
+{
+ GdkRectangle *res = g_memdup(r, sizeof(GdkRectangle));
+ angle%= 360;
+
+ switch (angle)
+ {
+ case 0:
+ break;
+ case 270:
+ res->width = r->height;
+ res->height = r->width;
+ res->x = r->y;
+ res->y = a->width - r->x - r->width;
+ break;
+ case 180:
+ res->x = a->width - r->x - r->width;
+ res->y = a->height - r->y - r->height;
+ break;
+ case 90:
+ res->width = r->height;
+ res->height = r->width;
+ res->y = r->x;
+ res->x = a->height - r->y - r->height;
+ break;
+ default:
+ g_warning("%s: %i degree rotation is not supported",
+ __FUNCTION__, angle);
+ break;
+ }
+ return res;
+}
+static SANE_Int
+mpps_set_roi(MetaParam *mp)
+{
+ MetaParamPaperSize *mpps = GSANE_META_PARAM_PAPER_SIZE(mp);
+ SANE_Int i = 0;
+ /* setup translator for integer/double handling */
+ GValue *real = g_new0 (GValue, 1);
+ GValue *trans = g_new0 (GValue, 1);
+ g_value_init (real, G_TYPE_DOUBLE);
+ g_value_init (trans, G_PARAM_SPEC_VALUE_TYPE (mpps->tl_x));
+ g_param_value_set_default (mpps->tl_x, trans);
+ GSRectangle *r, *u; /* rotation, unit */
+ guint unit = gs_param_spec_get_unit (mpps->tl_x);
+
+
+#define set_opt(opt,val) g_value_set_double(real,(val)); \
+ g_value_transform(real, trans); \
+ i=i|gsane_scanner_option_set_value (mp->gss, mpps->opt, trans)
+
+#define get_opt(opt,var) v=gsane_scanner_option_get_value (mp->gss, mpps->opt); \
+ g_value_transform(v,real); \
+ g_free(v); \
+ var = g_value_get_double(real);
+
+ r = gs_rectangle_rotate (&mpps->roi, &mpps->area, mpps->rotation);
+ u = gs_rectangle_convert_from_mm (r, unit, mpps->resolution);
+ g_free(r);
+
+ set_opt(tl_x, u->x);
+ set_opt(tl_y, u->y);
+ set_opt(br_x, u->x + u->width);
+ set_opt(br_y, u->y + u->height);
+
+ g_free(u);
+
+ g_value_unset (trans);
+ g_free (trans);
+
+#undef set_opt
+#undef get_opt
+ return i;
+}
+
+static SANE_Int
+meta_param_paper_size_set_value (MetaParam *mp,
+ GParamSpec *spec,
+ GValue *value)
+{
+ MetaParamPaperSize *mpps = GSANE_META_PARAM_PAPER_SIZE (mp);
+ gint w, h;
+ guint unit;
+
+ if (gnome_scan_settings_get_boolean(mp->settings, "preview"))
+ return 0;
+
+ const gchar*name = g_param_spec_get_name (spec);
+ mpps->rotation = gnome_scan_settings_get_int (mp->settings,
+ "rotation");
+ mpps->resolution = gnome_scan_settings_get_double (mp->settings,
+ "resolution");
+
+ /* paper-size */
+ if (g_str_equal (name, "paper-size")) {
+ mpps->ps = g_value_get_boxed (value);
+
+ switch (gs_param_spec_get_unit (mpps->tl_x)) {
+ case GS_UNIT_MM:
+ unit = GTK_UNIT_MM;
+ break;
+ case GS_UNIT_PIXEL:
+ default:
+ /* warning: gtk uses hardcoded 72dpi resolution */
+ unit = GTK_UNIT_PIXEL;
+ break;
+ }
+
+ switch (mpps->po) {
+ case GTK_PAGE_ORIENTATION_LANDSCAPE:
+ case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
+ h = gtk_paper_size_get_width (mpps->ps, unit);
+ w = gtk_paper_size_get_height (mpps->ps, unit);
+ break;
+ case GTK_PAGE_ORIENTATION_PORTRAIT:
+ case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
+ default:
+ w = gtk_paper_size_get_width (mpps->ps, unit);
+ h = gtk_paper_size_get_height (mpps->ps, unit);
+ break;
+ }
+
+ mpps->roi.width = w;
+ mpps->roi.height = h;
+ }
+ else if (g_str_equal (name, "origin")) {
+ mpps->origin = g_value_get_pointer (value);
+ mpps->roi.x = mpps->origin->x;
+ mpps->roi.y = mpps->origin->y;
+ }
+ else if (g_str_equal (name, "page-orientation")) {
+ mpps->po = g_value_get_enum (value);
+ gint t;
+ w = mpps->roi.width;
+ h = mpps->roi.height;
+ switch (mpps->po) {
+ case GTK_PAGE_ORIENTATION_PORTRAIT:
+ case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
+ if (w > h) {
+ t = h;
+ h = w;
+ w = t;
+ }
+ break;
+ case GTK_PAGE_ORIENTATION_LANDSCAPE:
+ case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
+ if (w < h) {
+ t = h;
+ h = w;
+ w = t;
+ }
+ break;
+ }
+ mpps->roi.width = w;
+ mpps->roi.height= h;
+ }
+
+ return mpps_set_roi(mp);
+}
+
+static GValue*
+meta_param_paper_size_get_value (MetaParam *mp, GParamSpec *spec)
+{
+ /* TODO: implement get value : convert SANE value to origin, papersize,
+ and orientation */
+ return NULL;
+}
+
+
+
+/* SOURCE */
+/* TODO: handle duplex/simplex as boolean */
+GSANE_DEFINE_META_PARAM(Source, source,
+ "doc-source,source,adf,duplex",
+ "source");
+
+/* SANE 2 well known source option value */
+#define GSANE_SOURCE_FLATBED N_("Flatbed")
+#define GSANE_SOURCE_ADF N_("Automatic Document Feeder")
+/* device source option allowing to scan film and transparency */
+#define GSANE_SOURCE_TRANS N_("Transparency Adapter")
+
+static void
+meta_param_source_init (MetaParam *mp)
+{
+ MetaParamSource *mps = GSANE_META_PARAM_SOURCE (mp);
+ mps->dic = g_hash_table_new (g_str_hash, g_str_equal);
+}
+
+static void
+meta_param_source_finalize (MetaParam *mp)
+{
+ MetaParamSource *mps = GSANE_META_PARAM_SOURCE (mp);
+ g_hash_table_destroy (mps->dic);
+}
+
+/* workaround to make all backend source option consistent */
+static const gchar*
+meta_param_source_get_src (const gchar *sane_val)
+{
+ static const gchar* flatbed_src[] = {
+ "FB",
+ "Normal",
+ NULL
+ };
+ static const gchar* adf_src[] = {
+ "ADF",
+ "ADF Front",
+ NULL
+ };
+ static const gchar* trans_src[] = {
+ "Transparency",
+ "Film",
+ NULL
+ };
+
+ if (gsane_str_matches_strv (sane_val, flatbed_src)) {
+ return GSANE_SOURCE_FLATBED;
+ }
+ else if (gsane_str_matches_strv (sane_val, adf_src)) {
+ return GSANE_SOURCE_ADF;
+ }
+ else if (gsane_str_matches_strv (sane_val, trans_src)) {
+ return GSANE_SOURCE_TRANS;
+ }
+ return sane_val;
+}
+
+static void
+meta_param_source_add_param (MetaParam *mp, GParamSpec *spec)
+{
+ MetaParamSource *mps = GSANE_META_PARAM_SOURCE (mp);
+ static const gchar* src_names[] = {
+ "source",
+ "doc-source", /* samsung backend use doc-source x( */
+ NULL
+ };
+
+ if (gsane_str_matches_strv (g_param_spec_get_name (spec), src_names)) {
+ mps->source = spec;
+ return;
+ }
+
+#define set_opt_if_matches(param, oname, opt) if (g_str_equal (#oname, g_param_spec_get_name (opt))) { \
+ param->oname = opt; return; }
+
+ set_opt_if_matches(mps, duplex, spec);
+ set_opt_if_matches(mps, adf, spec);
+
+#undef set_opt_if_matches
+}
+
+static gboolean
+meta_param_source_get_params (MetaParam *mp)
+{
+ MetaParamSource *mps = GSANE_META_PARAM_SOURCE (mp);
+ GSParamSpecEnum *psenum;
+ GParamSpec *spec;
+ GValueArray* sources;
+ GValue *value, *default_value;
+ const gchar *sane_val, *src;
+ guint i;
+
+ sources = g_value_array_new (3);
+ if (G_IS_PARAM_SPEC (mps->source)) {
+ psenum = GS_PARAM_SPEC_ENUM (mps->source);
+
+ for (i = 0; i < psenum->values->n_values; i++) {
+ value = g_value_array_get_nth (psenum->values, i);
+ sane_val = g_value_get_string (value);
+ src = meta_param_source_get_src (sane_val);
+ if (src) {
+ g_hash_table_insert (mps->dic,
+ g_strdup (src),
+ g_strdup (sane_val));
+ value = g_new0 (GValue, 1);
+ g_value_init (value, G_TYPE_STRING);
+ g_value_set_string (value, src);
+ g_value_array_append (sources, value);
+ }
+ }
+
+ /* get default value and convert it */
+ default_value = g_new0 (GValue, 1);
+ g_value_init (default_value,
+ G_PARAM_SPEC_VALUE_TYPE (mps->source));
+ g_param_value_set_default (mps->source, default_value);
+ value = g_new0 (GValue, 1);
+ g_value_init (value, G_TYPE_STRING);
+ g_value_copy (default_value, value);
+ g_value_unset (default_value);
+ g_free (default_value);
+
+ spec = gs_param_spec_enum ("source",
+ g_param_spec_get_nick (mps->source),
+ g_param_spec_get_blurb (mps->source),
+ gs_param_spec_get_group (mps->source),
+ sources, value,
+ mps->source->flags);
+ gs_param_spec_set_group (spec, GS_PARAM_GROUP_SCANNER_FRONT);
+ gs_param_spec_set_domain (spec, gs_param_spec_get_domain (mps->source));
+ gs_param_spec_set_index (spec, gs_param_spec_get_index (mps->source));
+ gs_param_spec_set_unit (spec, GS_UNIT_NONE);
+ g_param_spec_set_qdata (spec, GSANE_META_PARAM_QUARK, mp);
+
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (mp->gss), spec);
+ }
+
+ /* duplex, not tested too */
+ if (G_IS_PARAM_SPEC_BOOLEAN (mps->duplex)) {
+ gs_param_spec_set_group (mps->duplex,
+ GS_PARAM_GROUP_FORMAT);
+ g_param_spec_set_qdata (mps->duplex, GSANE_META_PARAM_QUARK, mp);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (mp->gss),
+ mps->duplex);
+ }
+ return TRUE;
+}
+
+static SANE_Int
+meta_param_source_set_value (MetaParam *mp, GParamSpec *spec, GValue *value)
+{
+ MetaParamSource *mps = GSANE_META_PARAM_SOURCE (mp);
+ GValue *val;
+ gchar *src_val, *sane_val;
+ SANE_Int i = 0;
+
+ if (g_str_equal (g_param_spec_get_name (spec), "duplex")) {
+ gsane_scanner_option_set_value (mp->gss, spec, value);
+ }
+ else if (g_str_equal (g_param_spec_get_name (spec), "source")) {
+ val = g_new0 (GValue, 1);
+ src_val = g_value_dup_string (value);
+
+ /* Handle device using a boolean ADF option
+ * i'm not able to test this â?¦ */
+ if (mps->adf) {
+ g_value_init (val, G_TYPE_BOOLEAN);
+ g_value_set_boolean (val, g_str_equal (src_val, GSANE_SOURCE_ADF));
+ i = gsane_scanner_option_set_value (mp->gss, mps->adf, val);
+ g_value_unset (val);
+ }
+
+ /* set backend value */
+ sane_val = g_hash_table_lookup (mps->dic, src_val);
+ if (sane_val) {
+ g_value_init (val, G_TYPE_STRING);
+ g_value_set_string (val, sane_val);
+ i = i|gsane_scanner_option_set_value (mp->gss, mps->source, val);
+ g_value_unset (val);
+ }
+
+ mp->gss->adf = g_str_equal (src_val, GSANE_SOURCE_ADF);
+
+ g_free (val);
+ g_free (src_val);
+ }
+
+ return i;
+}
+
+static GValue*
+meta_param_source_get_value (MetaParam *mp, GParamSpec *spec)
+{
+ return NULL;
+}
+
+
+/* PREVIEW */
+/* TODO: handle speed */
+GSANE_DEFINE_META_PARAM(Preview, preview, "preview", "preview");
+
+static void
+meta_param_preview_init (MetaParam *mp)
+{
+ MetaParamPreview *mpp = GSANE_META_PARAM_PREVIEW (mp);
+ mpp->emulate = TRUE;
+}
+
+static void
+meta_param_preview_finalize (MetaParam *mp)
+{
+ /*MetaParamPreview *mpp = GSANE_META_PARAM_PREVIEW (mp);*/
+}
+
+static void
+meta_param_preview_add_param (MetaParam *mp, GParamSpec *spec)
+{
+ MetaParamPreview *mpp = GSANE_META_PARAM_PREVIEW (mp);
+ mpp->preview = spec;
+ mpp->emulate = FALSE;
+}
+
+static gboolean
+meta_param_preview_get_params (MetaParam *mp)
+{
+ MetaParamPreview *mpp = GSANE_META_PARAM_PREVIEW (mp);
+ g_debug(__FUNCTION__);
+ if (!mpp->preview) {
+ g_debug(G_STRLOC ": Emulate preview");
+ mpp->preview = gs_param_spec_boolean ("preview",
+ "Preview",
+ "Preview mode",
+ GS_PARAM_GROUP_HIDDEN,
+ FALSE,
+ G_PARAM_READABLE
+ | G_PARAM_WRITABLE);
+ gs_param_spec_set_index (mpp->preview, 64); /* always last ? */
+
+ }
+ gs_param_spec_set_unit (mpp->preview, GS_UNIT_NONE);
+ g_param_spec_set_qdata (mpp->preview, GSANE_META_PARAM_QUARK, mp);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (mp->gss),
+ mpp->preview);
+ return TRUE;
+}
+
+static SANE_Int
+meta_param_preview_set_value (MetaParam *mp, GParamSpec *spec, GValue *value)
+{
+ MetaParamPreview *mpp = GSANE_META_PARAM_PREVIEW (mp);
+ MetaParamPaperSize *mpps = GSANE_META_PARAM_PAPER_SIZE (gsane_scanner_get_meta_param(mp->gss,
+ "paper_size"));
+ SANE_Int i = 0;
+ mpp->preview_mode = g_value_get_boolean (value);
+
+ if (mpp->preview_mode) {
+ if (mpp->emulate) {
+ g_debug("emulating preview");
+ /* area */
+#define set_opt(opt, borne) i=i|gsane_scanner_option_set_value (mp->gss, opt,GS_PARAM_SPEC_RANGE(opt)->borne)
+
+ set_opt(mpps->tl_x, minimum);
+ set_opt(mpps->tl_y, minimum);
+ set_opt(mpps->br_x, maximum);
+ set_opt(mpps->br_y, maximum);
+
+#undef set_opt
+
+ /* TODO: speed */
+ }
+ else {
+ g_debug("passing preview");
+ gsane_scanner_option_set_value (mp->gss, spec, value);
+ }
+ }
+
+ return i;
+}
+
+static GValue*
+meta_param_preview_get_value (MetaParam *mp, GParamSpec *spec)
+{
+ MetaParamPreview *mpp = GSANE_META_PARAM_PREVIEW (mp);
+ GValue *value;
+
+ if (mpp->emulate) {
+ value = g_new0(GValue, 1);
+ g_value_init(value, G_TYPE_BOOLEAN);
+ g_value_set_boolean (value, mpp->preview_mode);
+ }
+ else {
+ value = gsane_scanner_option_get_value (mp->gss, spec);
+ }
+
+ return value;
+}
diff --git a/trunk/modules/gsane-meta-param.h b/trunk/modules/gsane-meta-param.h
new file mode 100644
index 0000000..08f05df
--- /dev/null
+++ b/trunk/modules/gsane-meta-param.h
@@ -0,0 +1,179 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _META_PARAM_H_
+#define _META_PARAM_H_
+
+#include <glib-object.h>
+#include <gnome-scan-param-specs.h>
+#include <sane/sane.h>
+#include "gsane-scanner.h"
+#include "gsane-common.h"
+
+G_BEGIN_DECLS
+
+#define GSANE_TYPE_META_PARAM (meta_param_get_type ())
+#define GSANE_META_PARAM(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), GSANE_TYPE_META_PARAM, MetaParam))
+#define GSANE_META_PARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSANE_TYPE_META_PARAM, MetaParamClass))
+#define GSANE_META_PARAM_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GSANE_TYPE_META_PARAM, MetaParamClass))
+
+typedef struct _MetaParamClass MetaParamClass;
+typedef struct _MetaParam MetaParam;
+typedef void (*MetaParamFinalizeFunc) (MetaParam *mp);
+
+struct _MetaParamClass
+{
+ GTypeClass parent_class;
+
+ GStrv options_names;
+ GStrv params_names;
+
+ void (* add_param) (MetaParam *mp,
+ GParamSpec* spec);
+ gboolean (* get_params) (MetaParam *mp);
+ GValue* (* get_value) (MetaParam *mp,
+ GParamSpec *spec);
+ SANE_Int (* set_value) (MetaParam *mp,
+ GParamSpec *spec,
+ GValue *value);
+ MetaParamFinalizeFunc finalize;
+};
+
+/*
+ * MetaParam is away to handle SANE backends quirks and inconsistency.
+ * This is only a set of workarounds for various scanners, as bugs arrive.
+ */
+struct _MetaParam
+{
+ GTypeInstance instance;
+
+ GSaneScanner* gss;
+ GnomeScanSettings* settings;
+ const gchar* name;
+};
+
+GType meta_param_get_type (void) G_GNUC_CONST;
+
+MetaParam* meta_param_internal (GType type,
+ gchar *name,
+ GSaneScanner *gss);
+
+gchar* meta_param_get_name (MetaParam *mp);
+#define meta_param_get_options_names(mp) GSANE_META_PARAM_GET_CLASS (mp)->options_names
+#define meta_param_get_params_names(mp) GSANE_META_PARAM_GET_CLASS (mp)->params_names
+
+void meta_param_add_params (MetaParam *mp, GParamSpec *spec);
+gboolean meta_param_get_params (MetaParam *mp);
+SANE_Int meta_param_set_value (MetaParam *mp, GParamSpec *spec, GnomeScanSettings *settings);
+GValue* meta_param_get_value (MetaParam *mp, GParamSpec *spec);
+void meta_param_destroy (MetaParam* mp);
+
+
+
+/* PAPER_SIZE */
+/* Paper_Size meta param allow to use PWG paper name, orientation other.
+ * Samsung backend provide a page-format option.
+ * I suppose fujitsu/avision use paper-width/paper-height
+ * Most scanners provide {tl,br}-{x,y} options (except handhelds).
+ */
+#define GSANE_TYPE_META_PARAM_PAPER_SIZE (meta_param_paper_size_get_type ())
+#define GSANE_META_PARAM_PAPER_SIZE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSANE_TYPE_META_PARAM_PAPER_SIZE, MetaParamPaperSize))
+
+typedef struct _MetaParamPaperSize MetaParamPaperSize;
+struct _MetaParamPaperSize
+{
+ MetaParam parent_instance;
+
+ GParamSpec* tl_x;
+ GParamSpec* tl_y;
+ GParamSpec* br_x;
+ GParamSpec* br_y;
+
+ gboolean manual;
+
+ /* values */
+ GtkPaperSize *ps;
+ GtkPageOrientation po;
+ GSPoint *origin;
+
+ guint rotation;
+ gdouble resolution;
+ GSRectangle roi;
+ GSRectangle area;
+};
+
+GType meta_param_paper_size_get_type (void) G_GNUC_CONST;
+MetaParam* meta_param_paper_size (GSaneScanner *gss);
+
+/* SOURCE */
+/* The purpose of this meta-param is to determine wether the scan is adf or not.
+ * Also, it allow to handle properly duplex.
+ *
+ * SANE 1.x does not state about source nor duplex.
+ *
+ * Samsung uses doc-source
+ * avision/fujitsu uses source with duplex option inside.
+ * samsung and hpaio provides "Auto" source.
+ */
+#define GSANE_TYPE_META_PARAM_SOURCE (meta_param_source_get_type ())
+#define GSANE_META_PARAM_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSANE_TYPE_META_PARAM_SOURCE, MetaParamSource))
+
+typedef struct _MetaParamSource MetaParamSource;
+struct _MetaParamSource
+{
+ MetaParam parent_instance;
+
+ GHashTable* dic;
+
+ /* saved option */
+ GParamSpec* source;
+ GParamSpec* adf;
+ GParamSpec* duplex;
+};
+
+GType meta_param_source_get_type (void) G_GNUC_CONST;
+MetaParam* meta_param_source (GSaneScanner *gss);
+
+/* PREVIEW */
+/* emulate preview option for backend not having it.
+ */
+#define GSANE_TYPE_META_PARAM_PREVIEW (meta_param_preview_get_type ())
+#define GSANE_META_PARAM_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSANE_TYPE_META_PARAM_PREVIEW, MetaParamPreview))
+
+typedef struct _MetaParamPreview MetaParamPreview;
+struct _MetaParamPreview
+{
+ MetaParam parent_instance;
+ gboolean emulate;
+ gboolean preview_mode;
+
+ /* saved option */
+ GParamSpec* preview;
+};
+
+GType meta_param_preview_get_type (void) G_GNUC_CONST;
+MetaParam* meta_param_preview (GSaneScanner *gss);
+
+
+G_END_DECLS
+
+#endif /* _META_PARAM_H_ */
diff --git a/trunk/modules/gsane-module.c b/trunk/modules/gsane-module.c
new file mode 100644
index 0000000..2212257
--- /dev/null
+++ b/trunk/modules/gsane-module.c
@@ -0,0 +1,56 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#include <sane/sane.h>
+#include <gnome-scan-module.h>
+#include "gsane-backend.h"
+#include "gsane-scanner.h"
+#include "gsane-common.h"
+
+G_MODULE_EXPORT void
+gnome_scan_module_init (GnomeScanModule *module)
+{
+ SANE_Status status;
+ SANE_Int version;
+ /* TODO: version checking */
+ status = sane_init(&version, NULL);
+ gs_debug (G_STRLOC ": SANE version is %i.%i.%i",
+ SANE_VERSION_MAJOR(version),
+ SANE_VERSION_MINOR(version),
+ SANE_VERSION_BUILD(version));
+
+ if (SANE_VERSION_MAJOR(version) != SANE_CURRENT_MAJOR) {
+ g_warning (G_STRLOC ": SANE major version must be %i.",
+ SANE_CURRENT_MAJOR);
+ return;
+ }
+
+ gsane_scanner_register_type (G_TYPE_MODULE (module));
+ gsane_backend_register_type (G_TYPE_MODULE (module));
+}
+
+G_MODULE_EXPORT void
+gnome_scan_module_finalize (GnomeScanModule *module)
+{
+ sane_exit();
+}
+
diff --git a/trunk/modules/gsane-scanner.c b/trunk/modules/gsane-scanner.c
new file mode 100644
index 0000000..38c1a62
--- /dev/null
+++ b/trunk/modules/gsane-scanner.c
@@ -0,0 +1,1236 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#include <glib/gi18n.h>
+#include <gegl.h>
+#include <string.h>
+#include <gnome-scan-module.h>
+#include <gnome-scan-param-specs.h>
+#include <gnome-scan-types.h>
+#include "gsane-common.h"
+#include "gsane-scanner.h"
+#include "gsane-meta-param.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSANE_TYPE_SCANNER, GSaneScannerPrivate))
+
+
+typedef struct _GSaneScannerPrivate GSaneScannerPrivate;
+typedef void (* GSSDataFunc) (GSaneScanner *sane,
+ GeglRectangle *rect,
+ Babl *format,
+ guchar *buf,
+ gint len);
+struct _GSaneScannerPrivate
+{
+ /* INTERNALS */
+ GThread* init_thread;
+
+ /* SANE */
+ gchar* sane_id;
+ gchar* sane_type;
+ SANE_Handle handle;
+
+ /* Aquisition */
+ SANE_Parameters params;
+ SANE_Int data_len;
+ SANE_Int chunk_len;
+ guint bytes_read;
+ gchar* format;
+ GeglBuffer *buffer;
+ GeglNode *load;
+ guint n_frames;
+ guint frame_no;
+
+ /* NULL terminated list of MetaParams */
+ GHashTable* meta_params;
+
+ /* temp */
+ gboolean reload;
+ gboolean changed;
+ gboolean first;
+ GnomeScanSettings *settings;
+};
+
+enum
+ {
+ PROP_0,
+ PROP_SANE_ID,
+ PROP_SANE_TYPE
+ };
+
+static GnomeScannerClass* parent_class = NULL;
+
+/* PLUGIN API */
+static void gss_configure (GnomeScanPlugin *plugin,
+ GnomeScanSettings *settings);
+static GList* gss_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root);
+static gboolean gss_start_frame (GnomeScanPlugin *plugin);
+static gboolean gss_work (GnomeScanPlugin *plugin,
+ gdouble *progress);
+static void gss_end_frame (GnomeScanPlugin *plugin);
+
+/* SCANNER API */
+gchar* gss_get_output_format (GnomeScanner *scanner);
+
+
+/* INTERNALS */
+static void gss_init (GSaneScanner *sane);
+
+/* OPTIONS */
+static void gss_probe_options (GSaneScanner *sane);
+static void gss_mp_foreach_option_matches (const gchar *key,
+ MetaParam *mp,
+ GPtrArray* arg);
+static void gss_mp_foreach_add_param (const gchar* key,
+ MetaParam *mp,
+ GSaneScanner *sane);
+
+static void gss_params_foreach_set_param (GParamSpec *spec,
+ GSaneScanner *gss);
+static GParamSpec* gss_option_get_param_spec (GSaneScanner *sane,
+ SANE_Int n);
+static void gss_params_foreach_update_param (GParamSpec *pspec,
+ GSaneScanner *gss);
+static void gss_option_set_default_value_by_index (GSaneScanner *gss,
+ SANE_Int n,
+ GType type);
+static GValue* gss_option_get_value_by_index (GSaneScanner *sane,
+ SANE_Int n,
+ GType type);
+
+/* utils */
+#define gss_option_name_matches_array(spec,names) gsane_str_matches_strv(g_param_spec_get_name(spec),names)
+
+GS_DEFINE_MODULE_TYPE (GSaneScanner, gsane_scanner, GNOME_TYPE_SCANNER);
+
+#define GSANE_OPTION_DESC_QUARK (gsane_option_desc_quark ())
+GS_DEFINE_QUARK(gsane_option_desc, "sane-option-desc");
+
+
+static GObject*
+gsane_scanner_constructor(GType type, guint n, GObjectConstructParam *params)
+{
+ GObject *object =
+ G_OBJECT_CLASS(parent_class)->constructor(type, n, params);
+ GError *error = NULL;
+
+ GSaneScannerPrivate *priv = GET_PRIVATE(object);
+ SANE_Status status;
+
+ /* v4l set type as "virtual device". Welcome to the bazar of
+ SANE backends :( */
+ if (g_str_equal(priv->sane_type, "video camera")
+ || g_str_equal(priv->sane_type, "webcam")
+ || g_strstr_len(priv->sane_id, 4, "v4l")) {
+ g_debug("Ignoring %s %s", priv->sane_type, priv->sane_id);
+ return NULL;
+ }
+
+ status = sane_open (priv->sane_id, &(priv->handle));
+
+ if (status != SANE_STATUS_GOOD) {
+ g_warning ("Unable to open device %s (%s) : %s",
+ gnome_scan_plugin_get_name (GNOME_SCAN_PLUGIN (object)),
+ priv->sane_id, sane_strstatus (status));
+ return NULL;
+ }
+
+
+
+ /* Since the use needs to select the scanner before showing
+ options, we can do the probe in a seperate thread, this
+ will quicken the probe, while the user choose the
+ device. */
+ priv->init_thread = g_thread_create((GThreadFunc) gss_init,
+ GSANE_SCANNER(object),
+ TRUE, &error);
+
+ return object;
+}
+
+static void
+gsane_scanner_init (GSaneScanner *object)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (object);
+ priv->meta_params = g_hash_table_new (g_str_hash,
+ g_str_equal);
+}
+
+static void
+gsane_scanner_finalize (GObject *object)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (object);
+
+ if (priv->init_thread) {
+ g_thread_join (priv->init_thread);
+ }
+
+ g_hash_table_destroy (priv->meta_params);
+ sane_close(priv->handle);
+ g_free(priv->sane_type);
+ g_free(priv->sane_id);
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gsane_scanner_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCANNER_SANE (object));
+
+ switch (prop_id)
+ {
+ case PROP_SANE_ID:
+ GET_PRIVATE (object)->sane_id = g_value_dup_string(value);
+ break;
+ case PROP_SANE_TYPE:
+ GET_PRIVATE (object)->sane_type = g_value_dup_string(value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+#if 0
+static void
+gsane_scanner_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+{
+ g_return_if_fail (GNOME_IS_SCANNER_SANE (object));
+
+ switch (prop_id)
+ {
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+#endif
+
+static void
+gsane_scanner_class_init (GSaneScannerClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = GNOME_SCANNER_CLASS (g_type_class_peek_parent (klass));
+ GnomeScanPluginClass* plugin_class = GNOME_SCAN_PLUGIN_CLASS (klass);
+ GnomeScannerClass* scanner_class = GNOME_SCANNER_CLASS (klass);
+
+ g_type_class_add_private(object_class, sizeof(GSaneScannerPrivate));
+
+ object_class->constructor = gsane_scanner_constructor;
+ object_class->set_property = gsane_scanner_set_property;
+
+ plugin_class->configure = gss_configure;
+ plugin_class->get_child_nodes = gss_get_child_nodes;
+ plugin_class->start_frame = gss_start_frame;
+ plugin_class->work = gss_work;
+ plugin_class->end_frame = gss_end_frame;
+
+ scanner_class->get_output_format = gss_get_output_format;
+ object_class->finalize = gsane_scanner_finalize;
+
+ g_object_class_install_property (object_class,
+ PROP_SANE_ID,
+ g_param_spec_string ("sane-id",
+ "SANE id",
+ "SANE device identifier",
+ "",
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property (object_class,
+ PROP_SANE_TYPE,
+ g_param_spec_string ("sane-type",
+ "SANE device type",
+ "SANE device type",
+ "",
+ G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+}
+
+
+GnomeScanner*
+gsane_scanner_new (const SANE_Device *device)
+{
+ GObject *object =
+ g_object_new (GSANE_TYPE_SCANNER,
+ "name", g_strconcat(device->vendor,
+ " ",
+ device->model,
+ NULL),
+ "blurb", "",
+ "icon-name", "scanner",
+ "sane-id", device->name,
+ "sane-type", device->type,
+ NULL);
+ return GNOME_SCANNER (object);
+}
+
+/* PLUGIN API */
+
+static void
+gss_configure (GnomeScanPlugin *plugin,
+ GnomeScanSettings *settings)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (plugin);
+
+ priv->settings = settings;
+ priv->first = TRUE;
+
+ gnome_scan_plugin_params_foreach (plugin,
+ (GFunc) gss_params_foreach_set_param,
+ GSANE_SCANNER (plugin));
+
+ if (priv->reload) {
+ gnome_scan_plugin_params_foreach (plugin,
+ (GFunc) gss_params_foreach_update_param,
+ GSANE_SCANNER (plugin));
+ priv->reload = FALSE;
+ }
+ priv->settings = NULL;
+}
+
+static GList*
+gss_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (plugin);
+ GList* list = NULL;
+
+ priv->load = gegl_node_new_child (root,
+ "operation", "load-buffer",
+ "buffer", priv->buffer,
+ NULL);
+ list = g_list_append (list, priv->load);
+ return list;
+}
+
+static gboolean
+gss_sane_start (GSaneScanner *gss)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ SANE_Status status;
+
+ status = sane_start (priv->handle);
+ if (status != SANE_STATUS_GOOD) {
+ g_debug (G_STRLOC ": %s", sane_strstatus (status));
+ return FALSE;
+ }
+
+ status = sane_get_parameters (priv->handle, &priv->params);
+ if (status != SANE_STATUS_GOOD) {
+ g_debug (G_STRLOC ": %s", sane_strstatus (status));
+ return FALSE;
+ }
+
+ priv->bytes_read = 0;
+ priv->frame_no++;
+
+ return TRUE;
+}
+
+static gboolean
+gss_start_frame (GnomeScanPlugin *plugin)
+{
+ GSaneScanner *gss = GSANE_SCANNER (plugin);
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ gboolean first = priv->first;
+ Babl *format;
+ gchar *fmt;
+
+ priv->bytes_read = 0;
+ priv->frame_no = 0;
+
+ if (first || gss->adf) {
+ if (!gss_sane_start (gss))
+ return FALSE;
+
+ priv->format = fmt = g_strdup_printf("%s u%i",
+ priv->params.format == SANE_FRAME_GRAY ? "Y" : "RGB",
+ MAX(8, priv->params.depth));
+ format = babl_format(fmt);
+
+ priv->chunk_len = priv->params.bytes_per_line;
+ priv->data_len = priv->params.bytes_per_line * priv->params.lines;
+ priv->n_frames = 3;
+
+ GeglRectangle extent = {0, 0, priv->params.pixels_per_line, priv->params.lines};
+ priv->buffer = gegl_buffer_new (&extent, format);
+
+ g_debug (G_STRLOC ": buffer is %p in format %s",
+ priv->buffer, fmt);
+
+ gegl_node_set (priv->load,
+ "buffer", priv->buffer,
+ NULL);
+
+ priv->first = FALSE;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+gchar*
+gss_get_output_format (GnomeScanner *scanner)
+{
+ return GET_PRIVATE (scanner)->format;
+}
+
+
+
+/* ACQUISITION */
+
+
+#if DEBUG
+/* return a string of [01] corresponding to @bt */
+gchar*
+byte_to_string (guchar bt)
+{
+ guint i;
+ gchar *s = g_new0(gchar, 9);
+ for (i = 0; i < 8; i++) {
+ sprintf(s, "%s%i", s, (bt & (1<<(7-i))) ? 1 : 0);
+ }
+ return s;
+}
+#endif
+
+
+/* process 1bit RGB data into RGB 8 */
+static void
+gss_data_color1 (GSaneScanner *gss, GeglRectangle *rect, Babl* format, guchar *buf, gint len)
+{
+ guint i, tlen;
+ guchar *tbuf, mask, val;
+
+ tlen = len * 8;
+ tbuf = g_new0 (guchar, tlen);
+ /* we loop each bit */
+ for (i = 0; i < tlen; i++) {
+ /* get the byte containing the inth bit */
+ val = buf[i/8];
+ /* first bit is the MSB */
+ mask = (0x80 >> (i%8));
+ tbuf[i] = (val & mask) ? 0xFF : 0x00;
+ }
+ gegl_buffer_set (GET_PRIVATE (gss)->buffer,
+ rect,
+ format,
+ tbuf,
+ GEGL_AUTO_ROWSTRIDE);
+ g_free (tbuf);
+}
+
+
+/* process 8/16 bit RGB in to â?¦ 8/16 bit RGB */
+static void
+gss_data_color (GSaneScanner *gss,
+ GeglRectangle *rect,
+ Babl* format,
+ guchar* buf,
+ gint len)
+{
+ gegl_buffer_set (GET_PRIVATE (gss)->buffer,
+ rect,
+ format,
+ buf,
+ GEGL_AUTO_ROWSTRIDE);
+}
+
+/* process 1 bit RGB into RGB 8bit */
+static void
+gss_data_color1_three_pass (GSaneScanner *gss,
+ GeglRectangle *rect,
+ Babl* format,
+ guchar *buf,
+ gint len)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ guchar *tbuf;
+ guint i, offset = 0, tlen = len * 8;
+ guchar mask;
+
+ switch (priv->params.format) {
+ case SANE_FRAME_RED:
+ offset = 0;
+ break;
+ case SANE_FRAME_GREEN:
+ offset = 1;;
+ break;
+ case SANE_FRAME_BLUE:
+ offset = 2;;
+ break;
+ default:
+ break;
+ }
+
+ tbuf = g_new0 (guchar, tlen * 3);
+ gegl_buffer_get (priv->buffer, 1., rect, format, tbuf, GEGL_AUTO_ROWSTRIDE);
+ for (i = 0; i < tlen; i++) {
+ mask = 0x80 >> (i%8);
+ tbuf[i*3+offset] = (buf[i/8] & mask) ? 0xFF : 0x00;
+ }
+ gegl_buffer_set (priv->buffer, rect, format, tbuf,
+ GEGL_AUTO_ROWSTRIDE);
+ g_free (tbuf);
+}
+
+/* 8/16 bit three pass RGB */
+static void
+gss_data_color_three_pass (GSaneScanner *gss,
+ GeglRectangle *rect,
+ Babl* format,
+ guchar* buf,
+ gint len)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ guchar *tbuf;
+ guint i, offset = 0, px_stride, sp_stride;
+
+
+ /* sample stride */
+ sp_stride = priv->params.depth/8;
+ px_stride = 3 * sp_stride;
+
+ switch (priv->params.format) {
+ case SANE_FRAME_RED:
+ offset = 0;
+ break;
+ case SANE_FRAME_GREEN:
+ offset = 1;
+ break;
+ case SANE_FRAME_BLUE:
+ offset = 2;
+ break;
+ default:
+ break;
+ }
+ offset*= sp_stride;
+
+ tbuf = g_new0 (guchar, len*3);
+ gegl_buffer_get (priv->buffer, 1., rect, NULL, tbuf, GEGL_AUTO_ROWSTRIDE);
+
+ for (i = 0; i < len/sp_stride; i++) {
+ /* copy 1 or 2 bytes of sample at the right place */
+ memcpy(tbuf+i*px_stride+offset, buf+i*sp_stride, sp_stride);
+ }
+
+ gegl_buffer_set (priv->buffer, rect, NULL, tbuf,
+ GEGL_AUTO_ROWSTRIDE);
+ g_free (tbuf);
+}
+
+/* Black&White */
+static void
+gss_data_gray1 (GSaneScanner *gss, GeglRectangle *rect, Babl* format, guchar* buf, gint len)
+{
+ guchar *tbuf;
+ guint i, tlen;
+ guchar mask;
+
+ tlen = 8 * len;
+ tbuf = g_new0 (guchar, tlen);
+ for (i = 0; i < tlen; i++) {
+ mask = 0x80 >> (i%8);
+ tbuf[i] = (buf[i/8] & mask) ? 0xFF : 0x00;
+ }
+ gegl_buffer_set (GET_PRIVATE (gss)->buffer, rect, format, tbuf,
+ GEGL_AUTO_ROWSTRIDE);
+ g_free (tbuf);
+}
+
+/* 8/16 bit gray */
+static void
+gss_data_gray (GSaneScanner *gss, GeglRectangle *rect, Babl* format, guchar* buf, gint len)
+{
+ gegl_buffer_set (GET_PRIVATE (gss)->buffer, rect, format, buf,
+ GEGL_AUTO_ROWSTRIDE);
+}
+
+
+static gboolean
+gss_work (GnomeScanPlugin *plugin, gdouble *progress)
+{
+ GSaneScanner *gss = GSANE_SCANNER (plugin);
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ GeglRectangle rect;
+ SANE_Status status;
+ Babl* format;
+ SANE_Byte *buf;
+ SANE_Int len;
+ GSSDataFunc processor = NULL;
+
+ buf = g_new0 (SANE_Byte, priv->chunk_len);
+ status = sane_read (priv->handle, buf, priv->chunk_len, &len);
+
+ /* start new frame for three pass acquisition */
+ if (status == SANE_STATUS_EOF && !priv->params.last_frame) {
+ g_free (buf);
+ return gss_sane_start (gss);
+ }
+
+ /* EOF, NO_DOCS, errors â?¦ */
+ if (status != SANE_STATUS_GOOD) {
+ gs_debug (G_STRLOC ": %s", sane_strstatus (status));
+ g_free (buf);
+ return FALSE;
+ }
+
+ /* determine which function to call */
+ switch (priv->params.format) {
+ case SANE_FRAME_RGB:
+ processor = priv->params.depth == 1 ? gss_data_color1 : gss_data_color;
+ priv->n_frames = 1;
+ break;
+ case SANE_FRAME_RED:
+ case SANE_FRAME_GREEN:
+ case SANE_FRAME_BLUE:
+ processor = (priv->params.depth == 1) ? gss_data_color1_three_pass : gss_data_color_three_pass;
+ break;
+ case SANE_FRAME_GRAY:
+ processor = (priv->params.depth == 1) ? gss_data_gray1 : gss_data_gray;
+ break;
+ default:
+ g_warning ("Frame format not supported");
+ return FALSE;
+ break;
+ }
+
+ rect.x = priv->bytes_read % priv->params.bytes_per_line;
+ rect.y = priv->bytes_read / priv->params.bytes_per_line;
+ rect.height = len / priv->params.bytes_per_line;
+ rect.width = priv->params.pixels_per_line;
+
+ g_object_get (priv->buffer, "format", &format, NULL);
+
+ if (processor)
+ processor(gss, &rect, format, buf, len);
+
+ g_free (buf);
+ priv->bytes_read+= len;
+
+ /* This very complex formula compute the right progress over one or three frame */
+ *progress = ((gdouble) priv->frame_no-1) * (1./(gdouble) priv->n_frames) + ((gdouble) priv->bytes_read / (gdouble) priv->data_len) / (gdouble) priv->n_frames;
+ return TRUE;
+}
+
+static void
+gss_end_frame (GnomeScanPlugin *plugin)
+{
+ GSaneScanner *gss = GSANE_SCANNER (plugin);
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ sane_cancel (priv->handle);
+ g_object_unref (priv->buffer);
+ g_free (priv->format);
+ priv->format = NULL;
+ priv->buffer = NULL;
+}
+
+
+
+
+
+/* INTERNALS */
+
+static void
+gss_init (GSaneScanner *gss)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ MetaParam *mp;
+
+ /* declare MetaParams */
+#define gss_mp_new(name, gss) mp = meta_param_##name(gss); \
+ g_hash_table_insert (priv->meta_params, meta_param_get_name (mp), mp)
+
+ gss_mp_new(paper_size, gss);
+ gss_mp_new(source, gss);
+ gss_mp_new(preview, gss);
+
+#undef gss_mp_new
+
+ /* launch options probe */
+ gss_probe_options (gss);
+}
+
+static void
+gss_probe_options(GSaneScanner *gss)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ GParamSpec *spec;
+ GPtrArray *arg = g_ptr_array_sized_new (3);
+ GValue *value;
+ MetaParam *mp = NULL;
+ gint n, i;
+ static const gchar*front_option_names[] = {
+ "resolution",
+ "source",
+ "mode",
+ NULL
+ };
+ static const gchar*hidden_options[] = {
+ NULL
+ };
+
+ gnome_scanner_set_status (GNOME_SCANNER (gss),
+ GNOME_SCANNER_BUSY);
+
+ spec = gss_option_get_param_spec (gss, 0);
+ value = gsane_scanner_option_get_value(gss, spec);
+ n = g_value_get_int(value);
+ g_free(value);
+
+ gs_debug(" === Device %s (%d options) ===",
+ gnome_scan_plugin_get_name(GNOME_SCAN_PLUGIN(gss)), n);
+
+ g_ptr_array_add (arg, gss);
+ g_ptr_array_add (arg, &mp);
+
+ /* loop each sane option */
+ for (i = 1; i < n; i++) {
+ /* get corresponding spec */
+ spec = gss_option_get_param_spec(gss, i);
+ if (spec) {
+ /* override group for front options */
+ if (gss_option_name_matches_array (spec, front_option_names)) {
+ gs_param_spec_set_group (spec, GS_PARAM_GROUP_SCANNER_FRONT);
+ }
+
+ if (gss_option_name_matches_array (spec, hidden_options)) {
+ gs_param_spec_set_group (spec, GS_PARAM_GROUP_HIDDEN);
+ }
+
+
+ /* search if this option does not belong to a MetaParam */
+ mp = NULL;
+ g_ptr_array_add (arg, spec);
+ g_hash_table_foreach (priv->meta_params,
+ (GHFunc) gss_mp_foreach_option_matches,
+ arg);
+ g_ptr_array_remove (arg, spec);
+
+ if (mp)
+ meta_param_add_params (mp, spec);
+ /* or add directly to scanner */
+ else
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (gss), spec);
+ }
+ }
+
+ /* now ask each MetaParam to add its param to the scanner */
+ g_hash_table_foreach (priv->meta_params,
+ (GHFunc) gss_mp_foreach_add_param,
+ gss);
+ gs_debug ("\n");
+
+
+
+ gnome_scanner_set_status (GNOME_SCANNER (gss), GNOME_SCANNER_READY);
+ if (priv->changed) {
+ gnome_scanner_settings_changed (GNOME_SCANNER (gss));
+ priv->changed = FALSE;
+ }
+
+ g_thread_exit (NULL);
+}
+
+
+static GParamSpec*
+gss_option_get_param_spec (GSaneScanner *gss, SANE_Int n)
+{
+ static GQuark group;
+ static gint unnamed = 0;
+
+ GSaneScannerPrivate *priv = GET_PRIVATE(gss);
+ GParamSpec *spec = NULL;
+ GValue *default_value = NULL, *value, *vmin, *vmax, *vstep;
+ GValueArray *values;
+ GType type = G_TYPE_INVALID;
+ GType spec_type = G_TYPE_INVALID;
+ gchar *constraint, *name, *sflags;
+ gint i, m;
+ guint flags = 0, unit;
+ GEnumClass *enumclass;
+ GEnumValue *enumvalue;
+ const SANE_Option_Descriptor *desc;
+
+ desc = sane_get_option_descriptor(priv->handle, n);
+
+ /* FLAG */
+ sflags = "";
+ if (SANE_OPTION_IS_ACTIVE (desc->cap)) {
+ flags = flags | G_PARAM_WRITABLE;
+ sflags = "writable";
+ }
+
+ /* UNIT */
+ switch (desc->unit) {
+ case SANE_UNIT_PIXEL:
+ unit = GS_UNIT_PIXEL;
+ break;
+ case SANE_UNIT_BIT:
+ unit = GS_UNIT_BIT;
+ break;
+ case SANE_UNIT_MM:
+ unit = GS_UNIT_MM;
+ break;
+ case SANE_UNIT_DPI:
+ unit = GS_UNIT_DPI;
+ break;
+ case SANE_UNIT_PERCENT:
+ unit = GS_UNIT_PERCENT;
+ break;
+ case SANE_UNIT_MICROSECOND:
+ unit = GS_UNIT_PERCENT;
+ break;
+ case SANE_UNIT_NONE:
+ default:
+ unit = GS_UNIT_NONE;
+ break;
+ }
+
+ enumclass = g_type_class_ref (GNOME_TYPE_SCAN_UNIT);
+ enumvalue = g_enum_get_value (enumclass, unit);
+ g_type_class_unref (enumclass);
+
+ /* VALUE TYPE*/
+ switch (desc->type) {
+ case SANE_TYPE_BOOL:
+ type = G_TYPE_BOOLEAN;
+ break;
+ case SANE_TYPE_INT:
+ type = G_TYPE_INT;
+ break;
+ case SANE_TYPE_FIXED:
+ type = G_TYPE_DOUBLE;
+ break;
+ case SANE_TYPE_STRING:
+ type = G_TYPE_STRING;
+ break;
+ case SANE_TYPE_GROUP:
+ group = g_quark_from_string(desc->title);
+ gs_debug ("\n");
+ gs_debug (" -- Group « %s » --", desc->title);
+ type = G_TYPE_NONE;
+ return NULL;
+ break;
+ case SANE_TYPE_BUTTON:
+ gs_debug("// button : %s (%s)", desc->title, desc->desc);
+ type = G_TYPE_NONE;
+ return NULL;
+ break;
+ }
+
+ /* workaround buggy epson driver */
+ if (n == 0)
+ type = G_TYPE_INT;
+
+ name = g_utf8_strlen(desc->name, 32) < 1 ?
+ g_strdup_printf("option-%i", unnamed++)
+ : g_strdup (desc->name);
+
+ if (desc->cap & SANE_CAP_HARD_SELECT) {
+ gs_debug ("/!\\ IGNORING BUTTON %s !", name);
+ return NULL;
+ }
+
+
+ /* SPEC_TYPE */
+ switch (desc->constraint_type) {
+ /* RANGE */
+ case SANE_CONSTRAINT_RANGE:
+ spec_type = GS_TYPE_PARAM_RANGE;
+ break;
+
+ /* ENUM */
+ case SANE_CONSTRAINT_WORD_LIST:
+ case SANE_CONSTRAINT_STRING_LIST:
+ spec_type = GS_TYPE_PARAM_ENUM;
+ break;
+ case SANE_CONSTRAINT_NONE:
+ constraint = NULL;
+ switch (type) {
+ case G_TYPE_BOOLEAN:
+ spec_type = G_TYPE_PARAM_BOOLEAN;
+ break;
+ case G_TYPE_INT:
+ spec_type = G_TYPE_PARAM_INT;
+ break;
+ case G_TYPE_DOUBLE:
+ spec_type = G_TYPE_PARAM_DOUBLE;
+ break;
+ case G_TYPE_STRING:
+ spec_type = G_TYPE_PARAM_STRING;
+ break;
+ default:
+ spec_type = G_TYPE_NONE;
+ break;
+ }
+ break;
+ }
+
+ if (type != G_TYPE_NONE) {
+ if (desc->cap & SANE_CAP_AUTOMATIC)
+ gss_option_set_default_value_by_index (gss, n, type);
+ default_value = gss_option_get_value_by_index (gss, n, type);
+ }
+
+ /* SPEC */
+ if (spec_type == G_TYPE_PARAM_BOOLEAN) {
+ spec = gs_param_spec_boolean (name, desc->title, desc->desc, group,
+ g_value_get_boolean (default_value), flags);
+ }
+ else if (spec_type == G_TYPE_PARAM_INT) {
+ spec = gs_param_spec_int(name, desc->title, desc->desc, group,
+ G_MININT, G_MAXINT,
+ g_value_get_int (default_value), flags);
+ }
+ else if (spec_type == G_TYPE_PARAM_DOUBLE) {
+ spec = gs_param_spec_double (name, desc->title, desc->desc, group,
+ G_MINDOUBLE, G_MAXDOUBLE,
+ MIN (G_MAXDOUBLE, MAX (G_MINDOUBLE, g_value_get_double (default_value))),
+ flags);
+ }
+ else if (spec_type == G_TYPE_PARAM_STRING) {
+ spec = gs_param_spec_string (name, desc->title, desc->desc, group,
+ dgettext ("sane-backends",
+ g_value_get_string (default_value)),
+ flags);
+ }
+ else if (spec_type == GS_TYPE_PARAM_RANGE) {
+ /* init values */
+ value = g_new0(GValue, 1);
+ g_value_init (value, type);
+ vmin = g_new0(GValue, 1);
+ g_value_init (vmin, type);
+ vmax = g_new0(GValue, 1);
+ g_value_init (vmax, type);
+ vstep = g_new0(GValue, 1);
+ g_value_init (vstep, type);
+
+ /* set values */
+ switch (type) {
+ case G_TYPE_INT:
+ g_value_set_int (vmin, desc->constraint.range->min);
+ g_value_set_int (vmax, desc->constraint.range->max);
+ g_value_set_int (vstep, desc->constraint.range->quant);
+ break;
+ case G_TYPE_DOUBLE:
+ g_value_set_double (vmin, SANE_UNFIX (desc->constraint.range->min));
+ g_value_set_double (vmax, SANE_UNFIX (desc->constraint.range->max));
+ g_value_set_double (vstep, SANE_UNFIX (desc->constraint.range->quant));
+ break;
+ }
+
+ constraint = g_strdup_printf ("[%s;%s;%s]",
+ g_strdup_value_contents (vmin),
+ g_strdup_value_contents (vstep),
+ g_strdup_value_contents (vmax));
+
+ /* create spec */
+ spec = gs_param_spec_range(name, desc->title, desc->desc, group,
+ vmin, vmax, vstep, default_value, flags);
+
+ g_free (vmin);
+ g_free (vmax);
+ g_free (vstep);
+ }
+ /* ENUM */
+ else if (spec_type == GS_TYPE_PARAM_ENUM) {
+ value = g_new0(GValue, 1);
+ g_value_init (value, type);
+ constraint = "";
+
+ if (type == G_TYPE_STRING) {
+ values = g_value_array_new (0);
+ for (i = 0; desc->constraint.string_list[i]; i++) {
+ g_value_set_static_string (value,
+ desc->constraint.string_list[i]);
+ g_value_array_append(values, value);
+ }
+ if (g_value_get_string (default_value) == NULL) {
+ g_value_unset (default_value);
+ g_free (default_value);
+ default_value = values->values;
+ }
+ constraint = g_strdup_printf ("{\"%s\"}",
+ g_strjoinv("\", \"",
+ (gchar**) desc->constraint.string_list));
+ }
+ else {
+ m = (gint) desc->constraint.word_list[0];
+ values = g_value_array_new (m);
+ for (i = 0; i < m; i++) {
+ switch (type) {
+ case G_TYPE_INT:
+ g_value_set_int (value, desc->constraint.word_list[i+1]);
+ constraint = g_strdup_printf("%s, %d", constraint,
+ g_value_get_int (value));
+ break;
+ case G_TYPE_DOUBLE:
+ g_value_set_double (value, SANE_UNFIX(desc->constraint.word_list[i+1]));
+ constraint = g_strdup_printf("%s; %.2f", constraint,
+ g_value_get_double (value));
+ break;
+ }
+ g_value_array_append (values, value);
+ }
+ constraint = g_strdup_printf("{%s}", constraint+2);
+ }
+ g_value_unset (value);
+ g_free (value);
+
+ spec = gs_param_spec_enum(name, desc->title, desc->desc, group,
+ values, default_value, flags);
+ }
+ else if (spec_type == G_TYPE_NONE) {
+ return NULL;
+ }
+
+ /* common specs datas */
+ if (spec) {
+ g_param_spec_set_qdata (spec, GSANE_OPTION_DESC_QUARK, (gpointer) desc);
+ gs_param_spec_set_group (spec, group);
+ gs_param_spec_set_domain (spec, "sane-backends");
+ gs_param_spec_set_unit (spec, unit);
+ gs_param_spec_set_index(spec, (guint) n);
+ }
+
+ gs_debug ("%s (%s):", desc->title, desc->name);
+ gs_debug (" %s %s (%s), %s",
+ g_type_name(type), enumvalue->value_nick,
+ g_type_name(spec_type), constraint);
+ gs_debug (" default = %s ; flags = {%s}",
+ g_strdup_value_contents (default_value), sflags);
+ gs_debug ("%s", "");
+
+ g_free (name);
+ g_free (constraint);
+
+ return spec;
+}
+
+
+static void
+gss_option_set_default_value_by_index (GSaneScanner *gss, SANE_Int n, GType type)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ SANE_Status status;
+ SANE_Int i;
+
+ status = sane_control_option (priv->handle, n, SANE_ACTION_SET_AUTO,
+ NULL, &i);
+}
+
+GValue*
+gsane_scanner_option_get_value (GSaneScanner *sane, GParamSpec *spec)
+{
+ /* determine true value type using gs_param_value_set_default */
+ GValue *default_value = g_new0 (GValue, 1);
+ GType type;
+ g_value_init (default_value, G_PARAM_SPEC_VALUE_TYPE (spec));
+ g_param_value_set_default (spec, default_value);
+ type = G_VALUE_TYPE (default_value);
+ g_value_unset (default_value);
+ g_free (default_value);
+
+ return gss_option_get_value_by_index (sane,
+ (SANE_Int) gs_param_spec_get_index (spec),
+ type);
+}
+
+
+static GValue*
+gss_option_get_value_by_index (GSaneScanner *gss, SANE_Int n, GType type)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ GValue *value = g_new0(GValue, 1);
+ const SANE_Option_Descriptor *desc;
+ SANE_Status status;
+ SANE_Int i;
+ void *v;
+
+ desc = sane_get_option_descriptor (priv->handle, n);
+
+ g_value_init (value, type);
+ v = g_malloc0(desc->size);
+ status = sane_control_option(priv->handle, n, SANE_ACTION_GET_VALUE, v, &i);
+
+ switch (type) {
+ case G_TYPE_BOOLEAN:
+ g_value_set_boolean(value, *((gboolean*) v));
+ break;
+ case G_TYPE_INT:
+ g_value_set_int(value, *((gint*) v));
+ break;
+ case G_TYPE_DOUBLE:
+ g_value_set_double(value, SANE_UNFIX (*((SANE_Word*) v)));
+ break;
+ case G_TYPE_FLOAT:
+ g_value_set_float(value, SANE_UNFIX (*((SANE_Word*) v)));
+ break;
+ case G_TYPE_STRING:
+ g_value_set_string (value, g_strdup(v));
+ break;
+ default:
+ g_warning ("%s: Can't retrieve value of type %s for option %s.",
+ G_STRLOC,
+ g_type_name(type),
+ desc->name);
+ break;
+ }
+
+ /*
+ if (i & SANE_INFO_RELOAD_OPTIONS) {
+ gs_debug ("Option reload needed for %s !", desc->name);
+ }
+ */
+
+ return value;
+}
+
+gpointer*
+gsane_scanner_get_meta_param(GSaneScanner *gss,
+ gchar *name)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE(gss);
+ return g_hash_table_lookup (priv->meta_params, name);
+}
+
+/* returns TRUE if we need to reload options. */
+SANE_Int
+gsane_scanner_option_set_value (GSaneScanner *gss, GParamSpec *spec, GValue *value)
+{
+ GValue *old;
+ SANE_Int i, n = (SANE_Int) gs_param_spec_get_index (spec);
+ SANE_Bool boolean;
+ SANE_Word word;
+ SANE_Status status;
+ void *v = NULL;
+
+ /* don't reset option to the same value */
+ old = gsane_scanner_option_get_value (gss, spec);
+ if (gs_param_values_cmp (spec, old, value) == 0)
+ return 0;
+
+ switch (G_VALUE_TYPE (value)) {
+ case G_TYPE_BOOLEAN:
+ boolean = g_value_get_boolean (value);
+ v = &boolean;
+ break;
+ case G_TYPE_INT:
+ word = g_value_get_int (value);
+ v = &word;
+ break;
+ case G_TYPE_DOUBLE:
+ word = SANE_FIX (g_value_get_double (value));
+ v = &word;
+ break;
+ case G_TYPE_FLOAT:
+ word = SANE_FIX (g_value_get_float (value));
+ v = &word;
+ break;
+ case G_TYPE_STRING:
+ v = g_value_dup_string (value);
+ break;
+ }
+
+ gs_debug ("setting '%s' to %s",
+ g_param_spec_get_name (spec),
+ g_strdup_value_contents(value));
+
+ status = sane_control_option (GET_PRIVATE (gss)->handle, n,
+ SANE_ACTION_SET_VALUE, v, &i);
+
+ return i;
+}
+
+
+static void
+gss_params_foreach_set_param (GParamSpec *spec, GSaneScanner *gss)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ GValue * value, *value0;
+ SANE_Int i = 0;
+ MetaParam *mp = NULL;
+
+ mp = g_param_spec_get_qdata (spec, GSANE_META_PARAM_QUARK);
+
+ value = gnome_scan_settings_get (priv->settings,
+ g_param_spec_get_name (spec));
+
+ i = mp ? meta_param_set_value (mp, spec, priv->settings) : gsane_scanner_option_set_value (gss, spec, value);
+
+ if (i & SANE_INFO_RELOAD_OPTIONS) {
+ priv->reload = TRUE;
+ }
+
+ if (i & SANE_INFO_INEXACT) {
+ value0 = mp ? meta_param_get_value (mp, spec) : gsane_scanner_option_get_value (gss, spec);
+ if (value0)
+ g_value_copy (value0, value);
+ gnome_scan_settings_set (priv->settings,
+ g_param_spec_get_name (spec),
+ value);
+ priv->changed = TRUE;
+ gs_debug (" exact value = %s", g_strdup_value_contents (value));
+ }
+}
+
+static void
+gss_params_foreach_update_param (GParamSpec *pspec, GSaneScanner *gss)
+{
+ GSaneScannerPrivate *priv = GET_PRIVATE (gss);
+ const SANE_Option_Descriptor *desc;
+ guint flags = 0;
+ guint n = gs_param_spec_get_index (pspec);
+
+ desc = sane_get_option_descriptor(priv->handle, n);
+
+ if (desc && SANE_OPTION_IS_ACTIVE (desc->cap)) {
+ flags = flags | G_PARAM_WRITABLE;
+ g_param_spec_set_qdata (pspec, GSANE_OPTION_DESC_QUARK, (gpointer) desc);
+ }
+
+ if (flags != pspec->flags) {
+ gs_debug (G_STRLOC ": %s %sabled", g_param_spec_get_name (pspec),
+ (flags & G_PARAM_WRITABLE ? "en" : "dis"));
+ pspec->flags = flags;
+ gnome_scan_plugin_params_changed (GNOME_SCAN_PLUGIN (gss), pspec);
+ }
+}
+
+static void
+gss_mp_foreach_option_matches (const gchar *key, MetaParam *mp, GPtrArray* arg)
+{
+ MetaParam **dest = g_ptr_array_index (arg, 1);
+ GParamSpec *spec = g_ptr_array_index (arg, 2);
+ if (gss_option_name_matches_array (spec,
+ (const gchar**) meta_param_get_options_names (mp))) {
+ *dest = mp;
+ }
+}
+
+static void
+gss_mp_foreach_add_param (const gchar* key, MetaParam *mp, GSaneScanner *gss)
+{
+ /* ask MetaParam to add its sub params to gss */
+ meta_param_get_params (mp);
+}
diff --git a/trunk/modules/gsane-scanner.h b/trunk/modules/gsane-scanner.h
new file mode 100644
index 0000000..a7aa22c
--- /dev/null
+++ b/trunk/modules/gsane-scanner.h
@@ -0,0 +1,69 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#ifndef _GSANE_SCANNER_H_
+#define _GSANE_SCANNER_H_
+
+#include <glib-object.h>
+#include <sane/sane.h>
+#include <gnome-scanner.h>
+
+G_BEGIN_DECLS
+
+#define GSANE_TYPE_SCANNER (gsane_scanner_get_type ())
+#define GSANE_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSANE_TYPE_SCANNER, GSaneScanner))
+#define GSANE_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSANE_TYPE_SCANNER, GSaneScannerClass))
+#define GNOME_IS_SCANNER_SANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSANE_TYPE_SCANNER))
+#define GNOME_IS_SCANNER_SANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSANE_TYPE_SCANNER))
+#define GSANE_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSANE_TYPE_SCANNER, GSaneScannerClass))
+
+typedef struct _GSaneScannerClass GSaneScannerClass;
+typedef struct _GSaneScanner GSaneScanner;
+
+struct _GSaneScannerClass
+{
+ GnomeScannerClass parent_class;
+};
+
+struct _GSaneScanner
+{
+ GnomeScanner parent_instance;
+
+ /* wether the ADF is selected */
+ gboolean adf;
+};
+
+GType gsane_scanner_get_type (void) G_GNUC_CONST;
+void gsane_scanner_register_type (GTypeModule *module);
+GnomeScanner *gsane_scanner_new (const SANE_Device *device);
+
+GValue* gsane_scanner_option_get_value (GSaneScanner *sane,
+ GParamSpec *spec);
+SANE_Int gsane_scanner_option_set_value (GSaneScanner *gss,
+ GParamSpec *spec,
+ GValue *value);
+gpointer* gsane_scanner_get_meta_param(GSaneScanner *gss,
+ gchar *name);
+
+G_END_DECLS
+
+#endif /* _GSANE_SCANNER_H_ */
diff --git a/trunk/modules/gsfile-backend.c b/trunk/modules/gsfile-backend.c
new file mode 100644
index 0000000..de6b4db
--- /dev/null
+++ b/trunk/modules/gsfile-backend.c
@@ -0,0 +1,66 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <gnome-scan-module.h>
+#include "gsfile-backend.h"
+#include "gsfile-scanner.h"
+
+static GnomeScanBackendClass* parent_class = NULL;
+
+void gsfb_probe_scanners (GnomeScanBackend *backend);
+
+GS_DEFINE_MODULE_TYPE (GSFileBackend, gsfile_backend, GNOME_TYPE_SCAN_BACKEND);
+
+static void
+gsfile_backend_init (GSFileBackend *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gsfile_backend_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gsfile_backend_class_init (GSFileBackendClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ GnomeScanBackendClass *backend_class = GNOME_SCAN_BACKEND_CLASS (klass);
+ parent_class = GNOME_SCAN_BACKEND_CLASS (g_type_class_peek_parent (klass));
+
+ backend_class->probe_scanners = gsfb_probe_scanners;
+
+ object_class->finalize = gsfile_backend_finalize;
+}
+
+void
+gsfb_probe_scanners (GnomeScanBackend *backend)
+{
+ GnomeScanner *scanner;
+ scanner = gsfile_scanner_new ();
+ gnome_scan_backend_add_scanner (backend, scanner);
+ g_object_unref (scanner);
+}
diff --git a/trunk/modules/gsfile-backend.h b/trunk/modules/gsfile-backend.h
new file mode 100644
index 0000000..6936a9e
--- /dev/null
+++ b/trunk/modules/gsfile-backend.h
@@ -0,0 +1,55 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GSFILE_BACKEND_H_
+#define _GSFILE_BACKEND_H_
+
+#include <glib-object.h>
+#include <gnome-scan-backend.h>
+
+G_BEGIN_DECLS
+
+#define GSFILE_TYPE_BACKEND (gsfile_backend_get_type ())
+#define GSFILE_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSFILE_TYPE_BACKEND, GSFileBackend))
+#define GSFILE_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSFILE_TYPE_BACKEND, GSFileBackendClass))
+#define GNOME_IS_SCAN_BACKEND_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSFILE_TYPE_BACKEND))
+#define GNOME_IS_SCAN_BACKEND_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSFILE_TYPE_BACKEND))
+#define GSFILE_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSFILE_TYPE_BACKEND, GSFileBackendClass))
+
+typedef struct _GSFileBackendClass GSFileBackendClass;
+typedef struct _GSFileBackend GSFileBackend;
+
+struct _GSFileBackendClass
+{
+ GnomeScanBackendClass parent_class;
+};
+
+struct _GSFileBackend
+{
+ GnomeScanBackend parent_instance;
+};
+
+void gsfile_backend_register_type (GTypeModule *module);
+
+G_END_DECLS
+
+#endif /* _GSFILE_BACKEND_H_ */
diff --git a/trunk/modules/gsfile-filenames-widget.c b/trunk/modules/gsfile-filenames-widget.c
new file mode 100644
index 0000000..8b561be
--- /dev/null
+++ b/trunk/modules/gsfile-filenames-widget.c
@@ -0,0 +1,332 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+#include "gsfile-pspec.h"
+#include "gsfile-filenames-widget.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSFILE_TYPE_FILENAMES_WIDGET, GSFileFilenamesWidgetPrivate))
+
+#undef _
+#define _(string) dgettext(GETTEXT_PACKAGE, string)
+
+#define PREVIEW_SIZE 96
+
+typedef struct _GSFileFilenamesWidgetPrivate GSFileFilenamesWidgetPrivate;
+
+struct _GSFileFilenamesWidgetPrivate
+{
+ GtkWidget *filechooser;
+ GtkListStore *liststore;
+ GtkTreeSelection *selection;
+};
+
+enum
+{
+ FILENAMES_PREVIEW,
+ FILENAMES_BASENAME,
+ FILENAMES_PATHNAME,
+ FILENAMES_N_COLUMNS
+};
+
+static void gsffw_filenames_add (GtkButton *button,
+ GSFileFilenamesWidget *widget);
+static void gsffw_filenames_populate (GSFileFilenamesWidget *widget);
+static gboolean gsffw_filenames_preview_foreach_func (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ GSFileFilenamesWidget *widget);
+static void gsffw_filenames_remove (GtkButton *button,
+ GSFileFilenamesWidget *widget);
+static void gsffw_filenames_clear (GtkButton *button,
+ GSFileFilenamesWidget *widget);
+static gboolean gsffw_filenames_foreach_func (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ GSList **widget);
+static void gsffw_filenames_changed (GSFileFilenamesWidget *widget);
+
+GS_DEFINE_PARAM_WIDGET (GSFileFilenamesWidget, gsfile_filenames_widget)
+
+static void
+gsfile_filenames_widget_init (GSFileFilenamesWidget *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+gsfile_filenames_widget_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (gsfile_filenames_widget_parent_class)->finalize (object);
+}
+
+
+
+static void
+gsfile_filenames_widget_build (GnomeScanParamWidget *gspw)
+{
+ GSFileFilenamesWidget *gsffw = GSFILE_FILENAMES_WIDGET (gspw);
+ GSFileFilenamesWidgetPrivate *priv = GET_PRIVATE (gsffw);
+ GtkWidget *scrolled, *tree_view, *box, *button;
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *renderer;
+
+ gtk_box_set_spacing (GTK_BOX (gspw), 6);
+ gspw->shows_label = TRUE; /* yes, that's a lie :o) */
+ gspw->expands = TRUE;
+
+ priv->liststore = gtk_list_store_new (FILENAMES_N_COLUMNS,
+ GDK_TYPE_PIXBUF,
+ G_TYPE_STRING,
+ G_TYPE_STRING);
+
+ tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (priv->liststore));
+ gtk_tree_view_set_reorderable (GTK_TREE_VIEW (tree_view), TRUE);
+ gtk_tree_view_set_headers_clickable (GTK_TREE_VIEW (tree_view), TRUE);
+ priv->selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
+
+ /* preview */
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ column = gtk_tree_view_column_new_with_attributes (_("Preview"), renderer,
+ "pixbuf", FILENAMES_PREVIEW,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
+
+ /* basename */
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes (_("Filename"), renderer,
+ "markup", FILENAMES_BASENAME,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
+
+ /* scrolled window */
+ scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
+ tree_view);
+ gtk_box_pack_start (GTK_BOX (gspw), scrolled, TRUE, TRUE, 0);
+
+ /* buttons */
+ box = gtk_vbutton_box_new ();
+ gtk_box_set_spacing (GTK_BOX (box), 4);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (box), GTK_BUTTONBOX_START);
+ gtk_box_pack_start (GTK_BOX (gspw), box, FALSE, FALSE, 0);
+
+ button = gtk_button_new_from_stock (GTK_STOCK_ADD);
+ g_signal_connect (button, "clicked",
+ (GCallback) gsffw_filenames_add, gsffw);
+ gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
+
+ button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+ g_signal_connect (button, "clicked",
+ (GCallback) gsffw_filenames_remove, gsffw);
+ gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
+
+ button = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
+ g_signal_connect (button, "clicked",
+ (GCallback) gsffw_filenames_clear, gsffw);
+ gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
+}
+
+static void
+gsfile_filenames_widget_set (GnomeScanParamWidget *gspw, GValue *value)
+{
+}
+/* INTERNALS */
+
+static void
+gsffw_filenames_add (GtkButton *button, GSFileFilenamesWidget *gsffw)
+{
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (gsffw);
+ GSFileFilenamesWidgetPrivate *priv = GET_PRIVATE (gsffw);
+ GtkFileFilter *filter, *filter1;
+ GSList *node;
+ gchar **mimes, **exts;
+ gchar *pattern;
+ gint i;
+ GError *error = NULL;
+ GnomeScanFormat *format;
+
+
+ /* filechooser */
+ if (!priv->filechooser) {
+ priv->filechooser =
+ gtk_file_chooser_dialog_new (_("Select files"),
+ GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gsffw))),
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ NULL);
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (priv->filechooser),
+ g_get_home_dir ());
+ gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (priv->filechooser),
+ TRUE);
+
+ /* add a global filter and a per format filter */
+ filter = gtk_file_filter_new ();
+ gtk_file_filter_set_name (filter, _("Supported formats"));
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (priv->filechooser), filter);
+ node = gsfile_param_spec_filenames_get_formats (gspw->pspec);
+ for (; node ; node = node->next) {
+ format = node->data;
+ filter1 = gtk_file_filter_new ();
+
+ mimes = format->mime_types;
+ for (i = 0; mimes[i]; i++) {
+ gtk_file_filter_add_mime_type (filter, mimes[i]);
+ gtk_file_filter_add_mime_type (filter1, mimes[i]);
+ }
+
+ exts = format->extensions;
+ for (i = 0; exts[i]; i++) {
+ pattern = g_strdup_printf ("*.%s", exts[i]);
+ gtk_file_filter_add_pattern (filter, pattern);
+ gtk_file_filter_add_pattern (filter1, pattern);
+ }
+
+ gtk_file_filter_set_name (filter1,
+ g_strdup_printf ("%s (*.%s)",
+ dgettext(format->domain, format->description),
+ g_strjoinv(", *.", format->extensions)));
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (priv->filechooser),
+ filter1);
+ }
+ }
+
+ /* run filechooser */
+ if (gtk_dialog_run (GTK_DIALOG (priv->filechooser)) == GTK_RESPONSE_ACCEPT) {
+ gtk_widget_hide (priv->filechooser);
+ /* delegate populate creation in a thread */
+ g_thread_create ((GThreadFunc) gsffw_filenames_populate,
+ gsffw, FALSE, &error);
+ }
+ gtk_widget_hide (priv->filechooser);
+}
+
+static void
+gsffw_filenames_populate (GSFileFilenamesWidget *gsffw)
+{
+ GSFileFilenamesWidgetPrivate *priv = GET_PRIVATE (gsffw);
+ GSList *node;
+ GtkTreeIter iter;
+
+ /* first populate list store */
+ node = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (priv->filechooser));
+ for (; node ; node = node->next) {
+ gtk_list_store_insert_with_values (priv->liststore, &iter, G_MAXINT,
+ FILENAMES_PREVIEW, NULL,
+ FILENAMES_BASENAME, g_path_get_basename (node->data),
+ FILENAMES_PATHNAME, node->data,
+ -1);
+ }
+
+ /* trigger preview update (this may take some time considering list length and image size) */
+ gtk_tree_model_foreach (GTK_TREE_MODEL (GET_PRIVATE (gsffw)->liststore),
+ (GtkTreeModelForeachFunc) gsffw_filenames_preview_foreach_func,
+ gsffw);
+ gsffw_filenames_changed (gsffw);
+}
+
+/* create a preview if not present */
+gboolean
+gsffw_filenames_preview_foreach_func (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, GSFileFilenamesWidget *gsffw)
+{
+ GSFileFilenamesWidgetPrivate *priv = GET_PRIVATE (gsffw);
+ GdkPixbuf *preview;
+ GError *error = NULL;
+ gchar *pathname;
+
+ gtk_tree_model_get (model, iter,
+ FILENAMES_PREVIEW, &preview,
+ FILENAMES_PATHNAME, &pathname,
+ -1);
+ if (!preview) {
+ preview = gdk_pixbuf_new_from_file_at_scale (pathname,
+ PREVIEW_SIZE, PREVIEW_SIZE,
+ TRUE, &error);
+ gtk_list_store_set (priv->liststore, iter,
+ FILENAMES_PREVIEW, preview,
+ -1);
+ }
+ return FALSE;
+}
+
+static void
+gsffw_filenames_remove (GtkButton *button, GSFileFilenamesWidget *gsffw)
+{
+ GSFileFilenamesWidgetPrivate *priv = GET_PRIVATE (gsffw);
+ GtkTreeModel *model = GTK_TREE_MODEL (priv->liststore);
+ GList *node, *first = gtk_tree_selection_get_selected_rows (priv->selection,
+ &model);
+ GtkTreeIter iter;
+
+ for (node = first; node ; node = node->next) {
+ gtk_tree_model_get_iter (model, &iter, node->data);
+ gtk_list_store_remove (priv->liststore, &iter);
+ gtk_tree_path_free (node->data);
+ }
+ g_list_free (first);
+ gsffw_filenames_changed (gsffw);
+}
+
+static void
+gsffw_filenames_clear (GtkButton *button, GSFileFilenamesWidget *gsffw)
+{
+ gtk_list_store_clear (GET_PRIVATE (gsffw)->liststore);
+ gsffw_filenames_changed (gsffw);
+}
+
+static void
+gsffw_filenames_changed (GSFileFilenamesWidget *gsffw)
+{
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (gsffw);
+ GSFileFilenamesWidgetPrivate *priv = GET_PRIVATE (gsffw);
+ GSList *list = NULL;
+
+ gtk_tree_model_foreach (GTK_TREE_MODEL (priv->liststore),
+ (GtkTreeModelForeachFunc) gsffw_filenames_foreach_func,
+ &list);
+ g_value_set_pointer (gspw->value, list);
+
+ gnome_scan_param_widget_changed (gspw);
+}
+
+static gboolean
+gsffw_filenames_foreach_func (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, GSList **list)
+{
+ gchar*pathname;
+ gtk_tree_model_get (model, iter,
+ FILENAMES_PATHNAME, &pathname,
+ -1);
+ *list = g_slist_append (*list, g_strdup (pathname));
+
+ return FALSE;
+}
+
+
diff --git a/trunk/modules/gsfile-filenames-widget.h b/trunk/modules/gsfile-filenames-widget.h
new file mode 100644
index 0000000..992b846
--- /dev/null
+++ b/trunk/modules/gsfile-filenames-widget.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GSFILE_FILENAMES_WIDGET_H_
+#define _GSFILE_FILENAMES_WIDGET_H_
+
+#include <glib-object.h>
+#include <gnome-scan-param-widget.h>
+
+G_BEGIN_DECLS
+
+#define GSFILE_TYPE_FILENAMES_WIDGET (gsfile_filenames_widget_get_type ())
+#define GSFILE_FILENAMES_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSFILE_TYPE_FILENAMES_WIDGET, GSFileFilenamesWidget))
+#define GSFILE_FILENAMES_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSFILE_TYPE_FILENAMES_WIDGET, GSFileFilenamesWidgetClass))
+#define GSFILE_IS_FILENAMES_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSFILE_TYPE_FILENAMES_WIDGET))
+#define GSFILE_IS_FILENAMES_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSFILE_TYPE_FILENAMES_WIDGET))
+#define GSFILE_FILENAMES_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSFILE_TYPE_FILENAMES_WIDGET, GSFileFilenamesWidgetClass))
+
+typedef struct _GSFileFilenamesWidget GSFileFilenamesWidget;
+struct _GSFileFilenamesWidget
+{
+ GnomeScanParamWidget parent_instance;
+};
+
+GS_DEFINE_PARAM_WIDGET_HEADER (GSFileFilenamesWidget, gsfile_filenames_widget)
+
+G_END_DECLS
+
+#endif /* _GSFILE_FILENAMES_WIDGET_H_ */
diff --git a/trunk/modules/gsfile-module.c b/trunk/modules/gsfile-module.c
new file mode 100644
index 0000000..71684be
--- /dev/null
+++ b/trunk/modules/gsfile-module.c
@@ -0,0 +1,37 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#include <gnome-scan-module.h>
+#include "gsfile-backend.h"
+#include "gsfile-scanner.h"
+
+G_MODULE_EXPORT void
+gnome_scan_module_init (GnomeScanModule *module)
+{
+ gsfile_scanner_register_type (G_TYPE_MODULE (module));
+ gsfile_backend_register_type (G_TYPE_MODULE (module));
+}
+
+G_MODULE_EXPORT void
+gnome_scan_module_finalize (GnomeScanModule *module)
+{
+}
diff --git a/trunk/modules/gsfile-module.h b/trunk/modules/gsfile-module.h
new file mode 100644
index 0000000..0485084
--- /dev/null
+++ b/trunk/modules/gsfile-module.h
@@ -0,0 +1,35 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#ifndef _GNOME_SCAN-MODULE-FILE_H
+#define _GNOME_SCAN-MODULE-FILE_H
+
+G_BEGIN_DECLS
+
+G_MODULE_EXPORT void gnome_scan_module_init (GnomeScanModule *module);
+G_MODULE_EXPORT void gnome_scan_module_finalize (GnomeScanModule *module);
+
+G_END_DECLS
+
+#endif /* _GNOME_SCAN-MODULE-FILE_H */
+
+
diff --git a/trunk/modules/gsfile-pspec.c b/trunk/modules/gsfile-pspec.c
new file mode 100644
index 0000000..7d31991
--- /dev/null
+++ b/trunk/modules/gsfile-pspec.c
@@ -0,0 +1,83 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#include <glib/gi18n.h>
+#include "gsfile-pspec.h"
+#include "gsfile-filenames-widget.h"
+
+/* FILENAMES */
+GS_DEFINE_PARAM (gsfile, GSFile, filenames, Filenames, G_TYPE_POINTER);
+
+/**
+ * gsfile_param_spec_filenames:
+ * @name: spec name
+ * @nick: spec nick
+ * @blurb: spec blurb
+ * @group: The quark of the group the param belong to
+ * @formats: The list of #GdkPixbufFormats
+ * @flags: Param flags.
+ *
+ * Create a new #GSParamSpecFilenames .
+ *
+ * Returns: the new #GSParamSpecFilenames
+ **/
+GParamSpec*
+gsfile_param_spec_filenames (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GSList *formats,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_internal (GSFILE_TYPE_PARAM_FILENAMES,
+ name, nick, blurb, flags);
+ g_param_spec_set_qdata (spec, GS_PARAM_GROUP_QUARK, (gpointer) group);
+ g_param_spec_set_qdata (spec, GS_PARAM_FORMATS_QUARK, (gpointer) formats);
+ gs_param_spec_set_widget_type (spec, GSFILE_TYPE_FILENAMES_WIDGET);
+
+ return G_PARAM_SPEC (spec);
+}
+
+static void
+gsfile_param_filenames_value_set_default (GParamSpec *pspec, GValue *value)
+{
+ g_value_set_pointer (value, NULL);
+}
+
+static gint
+gsfile_param_filenames_values_cmp (GParamSpec *pspec, const GValue *a, const GValue *b)
+{
+ return a - b; /* completely fool */
+}
+
+/**
+ * gsfile_param_spec_filenames_get_formats:
+ * @pspec: a #GSParamSpecFilename
+ *
+ * Retrieve the list of supported formats.
+ *
+ * Returns: a #GSList of #GdkPixbufFormats structs.
+ **/
+GSList*
+gsfile_param_spec_filenames_get_formats (GParamSpec *pspec)
+{
+ return (GSList *) g_param_spec_get_qdata (pspec, GS_PARAM_FORMATS_QUARK);
+}
diff --git a/trunk/modules/gsfile-pspec.h b/trunk/modules/gsfile-pspec.h
new file mode 100644
index 0000000..f51ddae
--- /dev/null
+++ b/trunk/modules/gsfile-pspec.h
@@ -0,0 +1,63 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _GSFILE_PSPEC_H
+#define _GSFILE_PSPEC_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gegl.h>
+#include <gnome-scan-param-specs.h>
+
+G_BEGIN_DECLS
+
+
+/* FILENAMES */
+#define GSFILE_TYPE_PARAM_FILENAMES (gsfile_param_filenames_get_type ())
+#define GSFILE_PARAM_SPEC_FILENAMES(p) (G_TYPE_CHECK_INSTANCE_CAST ((p), GSFILE_TYPE_PARAM_FILENAMES, GSFileParamSpecFilenames))
+#define GSFILE_IS_PARAM_SPEC_FILENAMES(p) (G_TYPE_CHECK_INSTANCE_TYPE ((p), GSFILE_TYPE_PARAM_FILENAMES))
+
+
+typedef struct _GSFileParamSpecFilenames GSFileParamSpecFilenames;
+/**
+ * GSFileParamSpecFilenames:
+ *
+ * This spec is used to select existing files.
+ */
+struct _GSFileParamSpecFilenames
+{
+ /*< private >*/
+ GParamSpec parent_instance;
+};
+
+GType gsfile_param_filenames_get_type (void) G_GNUC_CONST;
+GParamSpec* gsfile_param_spec_filenames (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GSList *formats,
+ GParamFlags flags);
+
+GSList* gsfile_param_spec_filenames_get_formats (GParamSpec *pspec);
+
+G_END_DECLS
+
+#endif /* _GSFILE_PSPEC_H */
diff --git a/trunk/modules/gsfile-scanner.c b/trunk/modules/gsfile-scanner.c
new file mode 100644
index 0000000..2e80d1f
--- /dev/null
+++ b/trunk/modules/gsfile-scanner.c
@@ -0,0 +1,196 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+#include <gnome-scan-module.h>
+#include <gnome-scan-param-specs.h>
+#include "gsfile-pspec.h"
+#include "gsfile-scanner.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSFILE_TYPE_SCANNER, GSFileScannerPrivate))
+
+typedef struct _GSFileScannerPrivate GSFileScannerPrivate;
+
+struct _GSFileScannerPrivate
+{
+ GeglNode *load;
+};
+
+static GnomeScannerClass* parent_class = NULL;
+
+static void gsf_configure (GnomeScanPlugin *plugin,
+ GnomeScanSettings *settings);
+static GList* gsf_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root);
+static gboolean gsf_start_frame (GnomeScanPlugin *plugin);
+static gboolean gsf_work (GnomeScanPlugin *plugin,
+ gdouble *progress);
+
+GS_DEFINE_MODULE_TYPE (GSFileScanner, gsfile_scanner, GNOME_TYPE_SCANNER);
+
+static void
+gsfile_scanner_init (GSFileScanner *object)
+{
+ GParamSpec *pspec;
+ GSList *formats = NULL;
+
+ static gchar *png_mime[] = {
+ "image/png",
+ NULL
+ };
+ static gchar *png_exts[] = {
+ "png",
+ NULL
+ };
+
+ formats = g_slist_append (formats,
+ gnome_scan_format_new ("png",
+ GETTEXT_PACKAGE,
+ N_("PNG picture"),
+ png_mime,
+ png_exts));
+
+ static gchar *jpeg_mime[] = {
+ "image/jpeg",
+ NULL
+ };
+ static gchar *jpeg_exts[] = {
+ "jpeg",
+ "jpe",
+ "jpg",
+ NULL
+ };
+
+ formats = g_slist_append (formats,
+ gnome_scan_format_new ("jpeg",
+ GETTEXT_PACKAGE,
+ N_("JPEG picture"),
+ jpeg_mime,
+ jpeg_exts));
+
+ pspec = gsfile_param_spec_filenames ("input-filenames",
+ N_("Files"),
+ N_("Files to import."),
+ GS_PARAM_GROUP_SCANNER_FRONT,
+ formats, G_PARAM_WRITABLE);
+ gs_param_spec_set_domain (pspec, GETTEXT_PACKAGE);
+ gs_param_spec_set_unit (pspec, GS_UNIT_NONE);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (object), pspec);
+ GNOME_SCANNER (object)->status = GNOME_SCANNER_READY;
+}
+
+static void
+gsfile_scanner_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gsfile_scanner_class_init (GSFileScannerClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = GNOME_SCANNER_CLASS (g_type_class_peek_parent (klass));
+ GnomeScanPluginClass* plugin_class = GNOME_SCAN_PLUGIN_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (GSFileScannerPrivate));
+
+ plugin_class->configure = gsf_configure;
+ plugin_class->start_frame = gsf_start_frame;
+ plugin_class->work = gsf_work;
+ plugin_class->get_child_nodes = gsf_get_child_nodes;
+
+ object_class->finalize = gsfile_scanner_finalize;
+}
+
+GnomeScanner*
+gsfile_scanner_new ()
+{
+ GObject *object = g_object_new (GSFILE_TYPE_SCANNER,
+ /* translator: this is the name of the file
+ loader backend which allow user to scan
+ a list a images */
+ "name", _("Files"),
+ "blurb", _("Import from files."),
+ "icon-name", "gnome-mime-image",
+ NULL);
+ return GNOME_SCANNER (object);
+}
+
+/* INTERNALS */
+
+static void
+gsf_configure (GnomeScanPlugin *plugin, GnomeScanSettings *settings)
+{
+ GSFileScanner *scanner = GSFILE_SCANNER (plugin);
+ GValue *value;
+
+ value = gnome_scan_settings_get (settings, "input-filenames");
+ scanner->filenames = g_value_get_pointer (value);
+ scanner->current = scanner->filenames;
+}
+
+static GList*
+gsf_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root)
+{
+ GSFileScanner *scanner = GSFILE_SCANNER (plugin);
+ GSFileScannerPrivate *priv = GET_PRIVATE (scanner);
+ GList *list = NULL;
+
+ priv->load = gegl_node_new_child (root,
+ "operation", "load",
+ NULL);
+
+ list = g_list_append (list, priv->load);
+ return list;
+}
+
+
+static gboolean
+gsf_start_frame (GnomeScanPlugin *plugin)
+{
+ GSFileScanner *scanner = GSFILE_SCANNER (plugin);
+ GSFileScannerPrivate *priv = GET_PRIVATE (scanner);
+
+ if (scanner->current == NULL) {
+ return FALSE;
+ }
+
+ gegl_node_set (priv->load,
+ "path", scanner->current->data,
+ NULL);
+
+ scanner->current = scanner->current->next;
+ return TRUE;
+}
+
+static gboolean
+gsf_work (GnomeScanPlugin *plugin, gdouble *progress)
+{
+ *progress = 1.;
+ return FALSE;
+}
diff --git a/trunk/modules/gsfile-scanner.h b/trunk/modules/gsfile-scanner.h
new file mode 100644
index 0000000..ee7c3a2
--- /dev/null
+++ b/trunk/modules/gsfile-scanner.h
@@ -0,0 +1,59 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#ifndef _GSFILE_SCANNER_H_
+#define _GSFILE_SCANNER_H_
+
+#include <glib-object.h>
+#include <gnome-scanner.h>
+
+G_BEGIN_DECLS
+
+#define GSFILE_TYPE_SCANNER (gsfile_scanner_get_type ())
+#define GSFILE_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSFILE_TYPE_SCANNER, GSFileScanner))
+#define GSFILE_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSFILE_TYPE_SCANNER, GSFileScannerClass))
+#define GSFILE_IS_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSFILE_TYPE_SCANNER))
+#define GSFILE_IS_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSFILE_TYPE_SCANNER))
+#define GSFILE_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSFILE_TYPE_SCANNER, GSFileScannerClass))
+
+typedef struct _GSFileScannerClass GSFileScannerClass;
+typedef struct _GSFileScanner GSFileScanner;
+
+struct _GSFileScannerClass
+{
+ GnomeScannerClass parent_class;
+};
+
+struct _GSFileScanner
+{
+ GnomeScanner parent_instance;
+ GSList* filenames;
+ GSList* current;
+};
+
+GType gsfile_scanner_get_type ();
+void gsfile_scanner_register_type (GTypeModule *module);
+GnomeScanner *gsfile_scanner_new ();
+
+G_END_DECLS
+
+#endif /* _GSFILE_SCANNER_H_ */
diff --git a/trunk/po/ChangeLog b/trunk/po/ChangeLog
new file mode 100644
index 0000000..7de21cc
--- /dev/null
+++ b/trunk/po/ChangeLog
@@ -0,0 +1,232 @@
+2008-03-09 Duarte Loreto <happyguy_pt hotmail com>
+
+ * pt.po: Added Portuguese translation by Antonio Lima
+ <amrlima gmail com>.
+ * LINGUAS: Added Portuguese (pt)
+
+2008-03-09 Ilkka Tuohela <hile iki fi>
+
+ * fi.po: Updated Finnish translation.
+
+2008-03-08 Philip Withnall <pwithnall svn gnome org>
+
+ * en_GB.po: Updated British English translation.
+
+2008-03-02 Daniel Nylander <po danielnylander se>
+
+ * sv.po: Updated Swedish translation.
+
+2008-03-01 Artur Flinta <aflinta gmail com>
+
+ * pl.po: Updated Polish translation by GNOME PL Team.
+
+2008-03-01 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2008-02-29 Ã?tienne Bersac <bersace03 laposte net>
+
+ * fr.po: Updated French translation.
+
+2008-02-29 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation, fixes bug #519626
+
+2008-02-29 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2008-02-28 Daniel Nylander <po danielnylander se>
+
+ * sv.po: Updated Swedish translation.
+
+2008-02-27 Ã?tienne Bersac <bersace03 laposte net>
+
+ * fr.po: Updated french translation.
+
+2008-02-27 Ã?tienne Bersac <bersace03 laposte net>
+
+ * fr.po: Updated French translation.
+
+2008-02-25 Gil Forcada <gforcada gnome org>
+
+ * ca.po: Updated Catalan translation by Joan Duran.
+
+2008-02-24 Ã?tienne Bersac <bersace thilivren>
+
+ * fr.po: Fixed a typo.
+
+2008-02-21 Ã?tienne Bersac <bersace thilivren>
+
+ * fr.po: Updated French translation.
+
+2008-02-19 Ilkka Tuohela <hile iki fi>
+
+ * fi.po: Updated Finnish translation.
+
+2008-02-17 Luca Ferretti <elle uca libero it>
+
+ * it.po: Added Italian translation by Milo Casagrande.
+
+2008-02-07 Artur Flinta <aflinta svn gnome org>
+
+ * pl.po: Updated Polish translation by GNOME PL Team.
+
+2008-01-17 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2008-01-15 Ã?tienne Bersac <bersace thilivren>
+
+ * POTFILES.in: Updated source files.
+ * de.po: Updated Deutsch translation by Philip Sadleder.
+
+2008-01-03 Djihed Afifi <djihed gmail com>
+
+ * LINGUAS: Add ar.
+
+2007-12-31 Yannig Marchegay <yannig marchegay org>
+
+ * oc.po: Updated Occitan translation.
+
+2007-12-26 Djihed Afifi <djihed gmail com>
+
+ * ar.po: Updated Arabic Translation by Djihed Afifi.
+
+2007-12-19 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2007-12-14 Stéphane Raimbault <stephane raimbault gmail com>
+
+ * fr.po: Updated French translation.
+
+2007-09-26 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2007-09-25 Daniel Nylander <po danielnylander se>
+
+ * sv.po: Updated Swedish translation.
+
+2007-09-23 Alexandre Prokoudine <alexandre prokoudine gmail com>
+
+ * LINGUAS: Add ru.
+ * ru.po: Added translation.
+
+2007-09-23 Kjartan Maraas <kmaraas gnome org>
+
+ * LINGUAS: Add nb.
+ * nb.po: Added translation.
+
+2007-09-22 Gil Forcada <gforcada svn gnome org>
+
+ * ca.po: Added Catalan translation by Joan Duran.
+ * LINGUAS: Added ca.
+
+2007-09-20 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2007-09-10 Daniel Nylander <po danielnylander se>
+
+ * sv.po: Updated Swedish translation.
+
+2007-09-09 Hendrik Brandt <heb gnome-de org>
+
+ * de.po: Updated German translation.
+
+2007-09-07 Ilkka Tuohela <hile iki fi>
+
+ * fi.po: Updated Finnish translation.
+
+2007-09-05 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2007-08-24 Artur Flinta <aflinta svn gnome org>
+
+ * pl.po: Updated Polish translation by GNOME PL Team.
+
+2007-08-20 Daniel Nylander <po danielnylander se>
+
+ * sv.po: Updated Swedish translation.
+
+2007-08-19 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2007-08-16 Ilkka Tuohela <hile iki fi>
+
+ * fi.po: Updated Finnish translation.
+
+2007-08-15 Stéphane Raimbault <stephane raimbault gmail com>
+
+ * fr.po: Updated French translation by Ã?lie Roux and Claude Paroz.
+
+2007-08-09 Daniel Nylander <po danielnylander se>
+
+ * sv.po: Updated Swedish translation.
+
+2007-07-29 Daniel Nylander <po danielnylander se>
+
+ * sv.po: Updated Swedish translation.
+
+2007-07-26 Raphael Higino <raphaelh svn gnome org>
+
+ * LINGUAS: Added pt_BR.
+ * pt_BR.po: Added Brazilian Portuguese translation
+
+2007-07-15 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2007-06-29 Artur Flinta <aflinta svn gnome org>
+
+ * pl.po: Updated Polish translation by GNOME PL Team.
+
+2007-06-29 Pema geyleg <pema geyleg gmail com>
+
+ * dz.po: Updated dzongkha translation
+
+2007-06-17 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2007-06-14 Pema Geyleg <pema geyleg gmail com>
+
+ * dz.po: Added dzongkha translation.
+ * LINGUAS: Added dz to the list.
+
+2007-06-07 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Updated Spanish translation
+
+2007-06-01 Daniel Nylander <po danielnylander se>
+
+ * sv.po: Added Swedish translation.
+
+2007-05-26 Claude Paroz <claude 2xlibre net>
+
+ * fr.po: Updated French translation by Robert-André Mauchin.
+
+2007-05-16 Jorge Gonzalez <jorgegonz svn gnome org>
+
+ * es.po: Added Spanish translation
+ * LINGUAS: Added es
+
+2007-05-16 David Lodge <dave cirt net>
+
+ * en_GB.po: Added British English translation
+ * LINGUAS: Added en_GB
+
+2007-05-14 Daniel Nylander <po danielnylander se>
+
+ * sv.po: Added Swedish translation.
+ * LINGUAS: Added sv
+
+2007-04-22 Stéphane Raimbault <stephane raimbault gmail com>
+
+ * LINGUAS: Added fr entry
+ * fr.po: Added French translation by Robert-André Mauchin.
+
diff --git a/trunk/po/LINGUAS b/trunk/po/LINGUAS
new file mode 100644
index 0000000..25d9557
--- /dev/null
+++ b/trunk/po/LINGUAS
@@ -0,0 +1,18 @@
+# please keep this list sorted alphabetically
+#
+ar
+ca
+de
+dz
+en_GB
+es
+fi
+fr
+it
+nb
+oc
+pl
+pt
+pt_BR
+ru
+sv
diff --git a/trunk/po/Makefile.in.in b/trunk/po/Makefile.in.in
new file mode 100644
index 0000000..6891e8f
--- /dev/null
+++ b/trunk/po/Makefile.in.in
@@ -0,0 +1,218 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper gnu ai mit edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey pwns gmail com>
+#
+# This file may be copied and used freely without restrictions. It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor redhat com> to use GETTEXT_PACKAGE
+# instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob ximian com> to install
+# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey pwns gmail com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && gencat $@ $*.msg
+
+
+all: all- USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+ $(GENPOT)
+
+install: install-data
+install-data: install-data- USE_NLS@
+install-data-no: all
+install-data-yes: all
+ $(mkdir_p) $(DESTDIR)$(itlocaledir)
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $$dir; \
+ if test -r $$lang.gmo; then \
+ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $(srcdir)/$$lang.gmo as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo"; \
+ fi; \
+ if test -r $$lang.gmo.m; then \
+ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ if test -r $(srcdir)/$$lang.gmo.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+ $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $(srcdir)/$$lang.gmo.m as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+ done
+
+check: all $(GETTEXT_PACKAGE).pot
+ rm -f missing notexist
+ srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+ if [ -r missing -o -r notexist ]; then \
+ exit 1; \
+ fi
+
+mostlyclean:
+ rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+ rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES stamp-it
+ rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ extra_dists="$(EXTRA_DISTFILES)"; \
+ for file in $$extra_dists; do \
+ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+ done; \
+ for file in $$dists; do \
+ test -f $$file || file="$(srcdir)/$$file"; \
+ ln $$file $(distdir) 2> /dev/null \
+ || cp -p $$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ tmpdir=`pwd`; \
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ echo "$$lang:"; \
+ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+ if $$result; then \
+ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.gmo failed!"; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi; \
+ done
+
+Makefile POTFILES: stamp-it
+ @if test ! -f $@; then \
+ rm -f stamp-it; \
+ $(MAKE) stamp-it; \
+ fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/trunk/po/POTFILES.in b/trunk/po/POTFILES.in
new file mode 100644
index 0000000..f975d88
--- /dev/null
+++ b/trunk/po/POTFILES.in
@@ -0,0 +1,21 @@
+lib/gnome-scan-acquisition-dialog.c
+lib/gnome-scan-dialog.c
+lib/gnome-scan-init.c
+lib/gnome-scan-job.c
+lib/gnome-scanner.c
+lib/gnome-scan-paper-size-widget.c
+lib/gnome-scan-param-specs.c
+lib/gnome-scan-param-widget.c
+lib/gnome-scan-preview-plugin-area.c
+lib/gnome-scan-preview-plugin-rotation.c
+lib/gnome-scan-processor-common.c
+modules/gsane-meta-param.c
+modules/gsfile-filenames-widget.c
+modules/gsfile-scanner.c
+src/flegita-action-selector.c
+src/flegita.c
+src/flegita-gimp.c
+src/flegita-gimp-sink.c
+src/flegita-output-filename-widget.c
+src/flegita-sink.c
+flegita.desktop.in
diff --git a/trunk/po/ar.po b/trunk/po/ar.po
new file mode 100644
index 0000000..cad07b4
--- /dev/null
+++ b/trunk/po/ar.po
@@ -0,0 +1,400 @@
+# Arabic translations for gnome package.
+# Copyright (C) 2007 THE gnome'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gnome package.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome 2-18\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-12-26 11:02+0000\n"
+"PO-Revision-Date: 2007-12-26 11:08+0100\n"
+"Last-Translator: Djihed Afifi <djihed gmail com>\n"
+"Language-Team: Arabic <doc arabeyes org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Arabic\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:89
+#: ../lib/gnome-scan-acquisition-dialog.c:119
+msgid "Acquisition"
+msgstr "اÙ?تساب"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:124
+#, fuzzy
+msgid "The software now acquires and processes images according to the settings."
+msgstr "اÙ?برÙ?اÙ?ج Ù?Ù?Ù?Ù? بÙ?Ø³Ø Ø§Ù?صÙ?ر Øسب إعدادت اÙ?Ù?سØ"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:139
+#: ../lib/gnome-scan-job.c:418
+msgid "Waiting for device"
+msgstr "Ù?Ù? Ø¥Ù?تطار اÙ?جÙ?از"
+
+#: ../lib/gnome-scan-dialog.c:227
+msgid "Scan"
+msgstr "اÙ?سØ"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:277
+msgid "_General"
+msgstr "_عاÙ?"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:285
+msgid "Pre_view"
+msgstr "Ù?_عاÙ?Ù?Ø©"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:294
+msgid "_Advanced"
+msgstr "Ù?_تÙ?دÙ?"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:302
+msgid "P_rocessing"
+msgstr ""
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:310
+msgid "_Output"
+msgstr "اÙ?Ø®_رÙ?ج"
+
+#: ../lib/gnome-scan-dialog.c:490
+#, fuzzy
+msgid "Unable to detect scanners !"
+msgstr "Ù?ا Ù?Ù?Ù?Ù? بدأ اÙ?أصÙ?ات\n"
+
+#: ../lib/gnome-scan-dialog.c:491
+msgid "No drivers has been found."
+msgstr "Ù?Ù? Ù?تÙ? اÙ?عثÙ?ر عÙ?Ù? Ø£Ù? Ù?Ù?Ù?ات تشغÙ?Ù? (drivers)."
+
+#: ../lib/gnome-scan-dialog.c:497
+#: ../lib/gnome-scan-dialog.c:875
+msgid "No device found !"
+msgstr "Ù?Ù? Ù?Ù?عثر عÙ?Ù? Ø£Ù? جÙ?از !"
+
+#: ../lib/gnome-scan-dialog.c:498
+msgid "Ensure your device is plugged, powered, supported and configured. The dialog will run until you plug a scanner or cancel."
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:637
+#, c-format
+msgid "%s:"
+msgstr "%s:"
+
+#: ../lib/gnome-scan-dialog.c:876
+#, fuzzy
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr "اÙ?رجاء اÙ?تØÙ?Ù? Ù?Ù? Ø£Ù? اÙ?برÙ?اÙ?ج Ù?Ù?صÙ?Ù? بشÙ?Ù? صØÙ?ØØ? Ù? Ø£Ù?Ù? Ù?Ù?عدÙ?."
+
+#: ../lib/gnome-scan-dialog.c:909
+msgid "Scanner"
+msgstr "اÙ?Ù?اسخ اÙ?ضÙ?ئÙ?"
+
+#: ../lib/gnome-scan-dialog.c:916
+msgid "Status"
+msgstr "اÙ?ØاÙ?Ø©"
+
+#: ../lib/gnome-scan-dialog.c:1362
+#, fuzzy
+msgid "Acquiring Preview"
+msgstr "استعراض اÙ?Ù?Ù?دÙ?Ù?"
+
+#: ../lib/gnome-scan-dialog.c:1367
+msgid "The software preview acquisition and processing."
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:1377
+msgid "Inactive"
+msgstr "غÙ?ر Ù?شط"
+
+#: ../lib/gnome-scan-init.c:41
+msgid "_Scan"
+msgstr "_اÙ?سØ"
+
+#: ../lib/gnome-scan-job.c:327
+msgid "Configuring"
+msgstr "جارÙ? تÙ?Ù?ئة"
+
+#: ../lib/gnome-scan-job.c:404
+#, fuzzy
+msgid "Job completed"
+msgstr "Ø¥Ù?تÙ?ت اÙ?Ù?Ù?اÙ?Ù?Ø©"
+
+#: ../lib/gnome-scan-job.c:427
+#, fuzzy
+msgid "Acquiring from scanner"
+msgstr "تشغÙ?Ù? برÙ?اÙ?ج اÙ?تصÙ?Ù?ر"
+
+#: ../lib/gnome-scan-job.c:441
+#, fuzzy
+msgid "Processing page"
+msgstr "اÙ?صÙ?ØØ© اÙ?رئÙ?سÙ?Ù?Ø©"
+
+#: ../lib/gnome-scan-job.c:454
+#, fuzzy
+msgid "Outputting page"
+msgstr "اÙ?صÙ?ØØ© اÙ?رئÙ?سÙ?Ù?Ø©"
+
+#: ../lib/gnome-scanner.c:271
+#, fuzzy
+msgid "Unknown"
+msgstr "Ù?جÙ?Ù?Ù?"
+
+#: ../lib/gnome-scanner.c:272
+msgid "Ready"
+msgstr "Ù?ستعد"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Busy"
+msgstr "Ù?شغÙ?Ù?"
+
+#: ../lib/gnome-scan-paper-size-widget.c:71
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f Ù?Ù?"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:61
+msgid "Scan options"
+msgstr "Ø®Ù?ارات اÙ?Ù?سØ"
+
+#: ../lib/gnome-scan-param-specs.c:62
+msgid "Format"
+msgstr "اÙ?تÙ?Ù?ئة"
+
+#: ../lib/gnome-scan-param-specs.c:63
+msgid "Output options"
+msgstr "Ø®Ù?ارات اÙ?خرج"
+
+#: ../lib/gnome-scan-param-specs.c:64
+#: ../modules/gsfile-filenames-widget.c:107
+msgid "Preview"
+msgstr "Ù?Ù?ØØ©"
+
+#: ../lib/gnome-scan-param-specs.c:65
+msgid "Hidden"
+msgstr "Ù?Ø®Ù?Ù?"
+
+#: ../lib/gnome-scan-param-widget.c:104
+msgid "px"
+msgstr "بÙ?سÙ?"
+
+#: ../lib/gnome-scan-param-widget.c:107
+msgid "bit"
+msgstr "Ø«Ù?ائÙ?Ø©"
+
+#: ../lib/gnome-scan-param-widget.c:110
+msgid "mm"
+msgstr "Ù?Ù?"
+
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "dpi"
+msgstr "اÙ?دÙ?Ø©"
+
+#: ../lib/gnome-scan-param-widget.c:116
+msgid "%"
+msgstr "%"
+
+#: ../lib/gnome-scan-param-widget.c:119
+msgid "ms"
+msgstr "Ù? Ø«"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:485
+#: ../modules/gsane-meta-param.c:289
+msgid "Manual"
+msgstr "Ù?دÙ?Ù?"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:615
+msgid "Select _All"
+msgstr "اخت_ر اÙ?Ù?Ù?"
+
+#: ../modules/gsane-meta-param.c:295
+msgid "Maximal"
+msgstr "أعÙ?Ù?"
+
+#: ../modules/gsane-meta-param.c:304
+#, fuzzy
+msgid "Paper Size"
+msgstr "ØجÙ? اÙ?Ù?رÙ?Ø©"
+
+#: ../modules/gsane-meta-param.c:305
+#, fuzzy
+msgid "Document paper size."
+msgstr "asme_f"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin"
+msgstr "Ù?بدأ"
+
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin of scan window"
+msgstr "Ù?بدأ Ù?اÙ?ذة اÙ?برÙ?اÙ?ج"
+
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:327
+msgid "Page Orientation"
+msgstr "اتجاÙ? اÙ?صÙ?ØØ©"
+
+#: ../modules/gsane-meta-param.c:327
+msgid "Page orientation"
+msgstr "اتجاÙ? اÙ?صÙ?ØØ©"
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:473
+msgid "Flatbed"
+msgstr "Ù?اسØØ© Ù?سطÙ?ØØ©"
+
+#: ../modules/gsane-meta-param.c:474
+msgid "Automatic Document Feeder"
+msgstr "Ù?اسØØ© Ø¢Ù?Ù?Ø©"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:476
+#, fuzzy
+msgid "Transparency Adapter"
+msgstr "Ù?Ù?ØÙ?Ù?Ù? اÙ?Ù?Ù?دÙ?Ù?"
+
+#: ../modules/gsfile-filenames-widget.c:114
+msgid "Filename"
+msgstr "اسÙ? اÙ?Ù?Ù?Ù?"
+
+#: ../modules/gsfile-filenames-widget.c:172
+msgid "Select files"
+msgstr "اختر اÙ?Ù?Ù?Ù?ات"
+
+#: ../modules/gsfile-filenames-widget.c:185
+#, fuzzy
+msgid "Supported formats"
+msgstr "اÙ?تÙ?سÙ?Ù?ات اÙ?Ù?تÙ?Ù?Ù?رة"
+
+#: ../modules/gsfile-scanner.c:72
+#: ../src/flegita-sink.c:116
+msgid "PNG picture"
+msgstr "صÙ?رة PNG"
+
+#: ../modules/gsfile-scanner.c:90
+msgid "JPEG picture"
+msgstr "صÙ?رة JPEG"
+
+#: ../modules/gsfile-scanner.c:95
+#: ../modules/gsfile-scanner.c:135
+msgid "Files"
+msgstr "Ù?Ù?Ù?ات"
+
+#: ../modules/gsfile-scanner.c:96
+msgid "Files to import."
+msgstr "اÙ?Ù?Ù?Ù?ات Ù?Ù?إستÙ?راد."
+
+#: ../modules/gsfile-scanner.c:135
+#, c-format
+msgid "Files (%i)"
+msgstr "Ù?Ù?Ù?ات (%i)"
+
+#: ../modules/gsfile-scanner.c:136
+msgid "Import from files."
+msgstr "استÙ?رد Ù?Ù? Ù?Ù?Ù?ات."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "اعد اÙ?طباعة"
+
+#: ../src/flegita.c:53
+#: ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "أداة Ù?سØ"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Ù?Ø³Ø ØµÙ?رة جدÙ?دة."
+
+#: ../src/flegita-gimp.c:90
+#: ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Ù?ساعدة"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "اÙ?Ø³Ø ..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "اÙ?Ø³Ø ØµÙ?رة Ù?طبÙ?Ø© جدÙ?دة"
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "اÙ?Ø³Ø Ù?طبÙ?Ø©..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "طبÙ?Ø©"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "اسÙ? اÙ?طبÙ?Ø© اÙ?جدÙ?دة"
+
+#: ../src/flegita-gimp-sink.c:80
+#: ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "اÙ?صÙ?رة اÙ?Ù?Ù?سÙ?ØØ©"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "اختر دÙ?Ù?Ù?ا"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "Ø®Ù?ارات PNG"
+
+#: ../src/flegita-sink.c:104
+msgid "Action"
+msgstr "عÙ?Ù?Ù?Ø©"
+
+#: ../src/flegita-sink.c:105
+msgid "Action over the scan output"
+msgstr ""
+
+#: ../src/flegita-sink.c:122
+msgid "File"
+msgstr "اÙ?Ù?Ù?Ù?"
+
+#: ../src/flegita-sink.c:123
+msgid "Output filename"
+msgstr "اسÙ? اÙ?Ù?Ù?Ù?"
+
+#: ../src/flegita-sink.c:145
+#, fuzzy
+msgid "PNG Compression Level"
+msgstr "عدÙ?Ù? Ù?ستÙ?Ù? اÙ?تÙ?بÙ?ر"
+
+#: ../src/flegita-sink.c:186
+msgid "Various common action on scan output not related to specific software"
+msgstr ""
+
+#: ../src/flegita-sink.c:307
+msgid "Custom"
+msgstr "Ù?خصص"
+
+#: ../src/flegita-sink.c:338
+#, fuzzy
+msgid "Scan to printer"
+msgstr "اخراج اÙ?Ù? اÙ?طابعة"
+
+#: ../flegita.desktop.in.h:2
+msgid "Simply scan image"
+msgstr "ببساطة اÙ?Ø³Ø Ø§Ù?صÙ?رة"
+
+#~ msgid "Save"
+#~ msgstr "اØÙ?ظ"
+#~ msgid "in"
+#~ msgstr "Ù?Ù?"
+#~ msgid "Save In..."
+#~ msgstr "Ø¥ØÙ?ظ Ù?Ù?..."
+#~ msgid "A Gnome scan utility"
+#~ msgstr "أداة Ù?Ø³Ø Ù?جÙ?Ù?Ù?"
+
diff --git a/trunk/po/ca.po b/trunk/po/ca.po
new file mode 100644
index 0000000..2f56b6c
--- /dev/null
+++ b/trunk/po/ca.po
@@ -0,0 +1,407 @@
+# Traducció del gnome-scan de l'equip de Softcatalà .
+# Copyright © 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-scan package.
+# Joan Duran <jodufi gmail com>, 2007, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-02-25 01:28+0100\n"
+"PO-Revision-Date: 2008-02-22 20:59+0100\n"
+"Last-Translator: Joan Duran <jodufi gmail com>\n"
+"Language-Team: Catalan <tradgnome softcatala org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:89
+#: ../lib/gnome-scan-acquisition-dialog.c:119
+msgid "Acquisition"
+msgstr "Adquisició"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:124
+msgid ""
+"The software now acquires and processes images according to the settings."
+msgstr ""
+"Els programari està adquirint i processant les imatges d'acord amb les "
+"preferències."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:139 ../lib/gnome-scan-job.c:437
+msgid "Waiting for device"
+msgstr "S'està esperant el dispositiu"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:269
+msgid "_General"
+msgstr "_General"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:277
+msgid "Pre_view"
+msgstr "Pre_visualització"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:286
+msgid "_Advanced"
+msgstr "_Avançat"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:294
+msgid "P_rocessing"
+msgstr "P_rocessat"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:302
+msgid "_Output"
+msgstr "_Sortida"
+
+#: ../lib/gnome-scan-dialog.c:477
+msgid "Scan"
+msgstr "Escaneja"
+
+#: ../lib/gnome-scan-dialog.c:515
+msgid "Unable to detect scanners !"
+msgstr "No s'ha detectat cap escà ner."
+
+#: ../lib/gnome-scan-dialog.c:516
+msgid "No drivers has been found."
+msgstr "No s'ha trobat cap controlador."
+
+#: ../lib/gnome-scan-dialog.c:522 ../lib/gnome-scan-dialog.c:905
+msgid "No device found !"
+msgstr "No s'ha trobat cap dispositiu."
+
+#: ../lib/gnome-scan-dialog.c:523
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+"Assegureu-vos que el dispositiu està connectat, encès, admès i configurat. "
+"El dià leg desapareixerà quan connecteu un escà ner o cancel·leu."
+
+#: ../lib/gnome-scan-dialog.c:662
+#, c-format
+msgid "%s:"
+msgstr "%s:"
+
+#: ../lib/gnome-scan-dialog.c:906
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr ""
+"Assegureu-vos que el dispositiu està connectat, encès, admès i configurat."
+
+#: ../lib/gnome-scan-dialog.c:946
+msgid "Scanner"
+msgstr "Escà ner"
+
+#: ../lib/gnome-scan-dialog.c:953
+msgid "Status"
+msgstr "Estat"
+
+#: ../lib/gnome-scan-dialog.c:1406
+msgid "Acquiring Preview"
+msgstr "S'està adquirint la previsualització"
+
+#: ../lib/gnome-scan-dialog.c:1411
+msgid "The software preview acquisition and processing."
+msgstr "El programari per a previsualitzar l'adquisició i processar-la."
+
+#: ../lib/gnome-scan-dialog.c:1421
+msgid "Inactive"
+msgstr "Inactiu"
+
+#: ../lib/gnome-scan-init.c:41
+msgid "_Scan"
+msgstr "_Escaneja"
+
+#: ../lib/gnome-scan-job.c:345
+msgid "Configuring"
+msgstr "S'està configurant"
+
+#: ../lib/gnome-scan-job.c:423
+msgid "Job completed"
+msgstr "Tasca completada"
+
+#: ../lib/gnome-scan-job.c:446
+msgid "Acquiring from scanner"
+msgstr "S'està adquirint des de l'escà ner"
+
+#: ../lib/gnome-scan-job.c:460
+msgid "Processing page"
+msgstr "S'està processant la pà gina"
+
+#: ../lib/gnome-scan-job.c:473
+msgid "Outputting page"
+msgstr "S'està traient la pà gina"
+
+#: ../lib/gnome-scanner.c:271
+msgid "Unknown"
+msgstr "Desconegut"
+
+#: ../lib/gnome-scanner.c:272
+msgid "Ready"
+msgstr "Preparat"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Busy"
+msgstr "Ocupat"
+
+#: ../lib/gnome-scan-paper-size-widget.c:71
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:61
+msgid "Scan options"
+msgstr "Opcions d'escaneig"
+
+#: ../lib/gnome-scan-param-specs.c:62
+msgid "Format"
+msgstr "Format"
+
+#: ../lib/gnome-scan-param-specs.c:63
+msgid "Output options"
+msgstr "Opcions de sortida"
+
+#: ../lib/gnome-scan-param-specs.c:64 ../modules/gsfile-filenames-widget.c:107
+msgid "Preview"
+msgstr "Previsualitza"
+
+#: ../lib/gnome-scan-param-specs.c:65
+msgid "Hidden"
+msgstr "Ocult"
+
+#: ../lib/gnome-scan-param-widget.c:104
+msgid "px"
+msgstr "px"
+
+#: ../lib/gnome-scan-param-widget.c:107
+msgid "bit"
+msgstr "bit"
+
+#: ../lib/gnome-scan-param-widget.c:110
+msgid "mm"
+msgstr "mm"
+
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "dpi"
+msgstr "dpi"
+
+#: ../lib/gnome-scan-param-widget.c:116
+msgid "%"
+msgstr "%"
+
+#: ../lib/gnome-scan-param-widget.c:119
+msgid "ms"
+msgstr "ms"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:485
+#: ../modules/gsane-meta-param.c:312
+msgid "Manual"
+msgstr "Manual"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:617
+msgid "Select _All"
+msgstr "Selecciona-ho t_ot"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "Gira cap a la dreta"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "Gira cap a l'esquerra"
+
+#: ../lib/gnome-scan-processor-common.c:40
+msgid "Common Processing"
+msgstr "Processat comú"
+
+#: ../lib/gnome-scan-processor-common.c:59
+msgid "Rotation"
+msgstr "Girar"
+
+#: ../lib/gnome-scan-processor-common.c:66
+msgid "Automatic color enhancement"
+msgstr "Millora de color automà tica"
+
+#: ../lib/gnome-scan-processor-common.c:67
+msgid ""
+"Color enhancement produce better photos, but take more time to process and "
+"can be useless for text."
+msgstr ""
+"La millora de color automà tica produeix millors fotos, però requereix més "
+"temps de processat i no és útil per al text."
+
+#. note: decomposing area in three options orientation, origin and paper-size
+#. except these optoin to appear in this order.
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:258
+msgid "Page Orientation"
+msgstr "Orientació del paper"
+
+#: ../modules/gsane-meta-param.c:258
+msgid "Page orientation"
+msgstr "Orientació del paper"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:268
+msgid "Origin"
+msgstr "Origen"
+
+#: ../modules/gsane-meta-param.c:268
+msgid "Origin of scan window"
+msgstr "Origen de la finestra a escanejar"
+
+#: ../modules/gsane-meta-param.c:318
+msgid "Maximal"
+msgstr "MÃ xim"
+
+#: ../modules/gsane-meta-param.c:327
+msgid "Paper Size"
+msgstr "Mida del paper"
+
+#: ../modules/gsane-meta-param.c:328
+msgid "Document paper size."
+msgstr "Dimensions del paper del document."
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:477
+msgid "Flatbed"
+msgstr "Pla"
+
+#: ../modules/gsane-meta-param.c:478
+msgid "Automatic Document Feeder"
+msgstr "Alimentador de documents automà tic"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:480
+msgid "Transparency Adapter"
+msgstr "Adaptador de transparència"
+
+#: ../modules/gsfile-filenames-widget.c:114
+msgid "Filename"
+msgstr "Nom del fitxer"
+
+#: ../modules/gsfile-filenames-widget.c:172
+msgid "Select files"
+msgstr "Selecciona fitxers"
+
+#: ../modules/gsfile-filenames-widget.c:185
+msgid "Supported formats"
+msgstr "Formats admesos"
+
+#: ../modules/gsfile-scanner.c:72 ../src/flegita-sink.c:118
+msgid "PNG picture"
+msgstr "Imatge PNG"
+
+#: ../modules/gsfile-scanner.c:90
+msgid "JPEG picture"
+msgstr "Imatge JPEG"
+
+#: ../modules/gsfile-scanner.c:95 ../modules/gsfile-scanner.c:135
+msgid "Files"
+msgstr "Fitxers"
+
+#: ../modules/gsfile-scanner.c:96
+msgid "Files to import."
+msgstr "Fitxers a importar."
+
+#: ../modules/gsfile-scanner.c:135
+#, c-format
+msgid "Files (%i)"
+msgstr "Fitxers (%i)"
+
+#: ../modules/gsfile-scanner.c:136
+msgid "Import from files."
+msgstr "Importa des de fitxers."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Configura la impressió"
+
+#: ../src/flegita.c:52 ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Utilitat d'escaneig"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Escaneja una imatge nova."
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Ajuda"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Escaneja..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Escaneja la imatge com una capa nova..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Escaneja com a capa..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Capa"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "Nom de la capa nova"
+
+#: ../src/flegita-gimp-sink.c:80 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Imatge escanejada"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Selecciona el directori"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "Opcions de PNG"
+
+#: ../src/flegita-sink.c:105
+msgid "Action"
+msgstr "Acció"
+
+#: ../src/flegita-sink.c:106
+msgid "Action over the scan output"
+msgstr "Acció sobre la sortida escanejada"
+
+#: ../src/flegita-sink.c:124
+msgid "File"
+msgstr "Fitxer"
+
+#: ../src/flegita-sink.c:125
+msgid "Output filename"
+msgstr "Nom del fitxer de sortida"
+
+#: ../src/flegita-sink.c:147
+msgid "PNG Compression Level"
+msgstr "Nivell de compressió del PNG"
+
+#: ../src/flegita-sink.c:188
+msgid "Various common action on scan output not related to specific software"
+msgstr ""
+"Diverses accions comunes a la sortida de l'escaneig sense cap relació amb un "
+"programari en concret"
+
+#: ../src/flegita-sink.c:313
+msgid "Custom"
+msgstr "Personalitzat"
+
+#: ../src/flegita-sink.c:344
+msgid "Scan to printer"
+msgstr "Escaneja i (després) imprimeix"
+
+#: ../flegita.desktop.in.h:2
+msgid "Simply scan image"
+msgstr "Escà ner d'imatges senzill"
diff --git a/trunk/po/de.po b/trunk/po/de.po
new file mode 100644
index 0000000..900183d
--- /dev/null
+++ b/trunk/po/de.po
@@ -0,0 +1,395 @@
+# Copyright (C) 2006 THE gnome-scan'S COPYRIGHT HOLDER
+# This file is distributed under the same licence as the gnome-scan package.
+# David Lodge <dave cirt net>, 2007.
+# Hendrik Brandt <heb gnome-de org>, 2007.Klaus Staedtler-Przyborski <staedtler-przyborski web de>, 2007. Philipp Sadleder <philipp sadleder de>, 2008.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan trunk\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-01-16 14:25+0100\n"
+"PO-Revision-Date: 2008-02-01 12:47+0100\n"
+"Last-Translator: Philipp Sadleder <philipp sadleder de>\n"
+"Language-Team: German <gnome-de gnome org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:89
+#: ../lib/gnome-scan-acquisition-dialog.c:119
+msgid "Acquisition"
+msgstr "Einlesen"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:124
+msgid ""
+"The software now acquires and processes images according to the settings."
+msgstr ""
+"Es wird jetzt ein Bild eingelesen und entsprechend der Einstellungen "
+"bearbeitet."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:139 ../lib/gnome-scan-job.c:419
+msgid "Waiting for device"
+msgstr "Auf das Gerät warten"
+
+#: ../lib/gnome-scan-dialog.c:227
+msgid "Scan"
+msgstr "Scannen"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:277
+msgid "_General"
+msgstr "All_gemein"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:285
+msgid "Pre_view"
+msgstr "_Vorschau"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:294
+msgid "_Advanced"
+msgstr "_Erweitert"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:302
+msgid "P_rocessing"
+msgstr "_Bearbeiten"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:310
+msgid "_Output"
+msgstr "A_usgabe"
+
+#: ../lib/gnome-scan-dialog.c:491
+msgid "Unable to detect scanners !"
+msgstr "Es wurden keine Scanner gefunden."
+
+#: ../lib/gnome-scan-dialog.c:492
+msgid "No drivers has been found."
+msgstr "Es wurden keine Treiber gefunden."
+
+#: ../lib/gnome-scan-dialog.c:498 ../lib/gnome-scan-dialog.c:876
+msgid "No device found !"
+msgstr "Es wurde kein Gerät gefunden."
+
+#: ../lib/gnome-scan-dialog.c:499
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+"Bitte stellen Sie sicher, dass Ihr Gerät verbunden. eingeschaltet, "
+"unterstützt und konfiguriert ist. Dieser Dialog bleibt solange geöffnet, bis "
+"Sie Ihren Scanner verbunden haben oder Sie den Vorgang abbrechen."
+
+#: ../lib/gnome-scan-dialog.c:638
+#, c-format
+msgid "%s:"
+msgstr "%s:"
+
+#: ../lib/gnome-scan-dialog.c:877
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr ""
+"Bitte stellen Sie sicher, dass Ihr Gerät verbunden, eingeschaltet, "
+"unterstützt und konfiguriert ist."
+
+#: ../lib/gnome-scan-dialog.c:910
+msgid "Scanner"
+msgstr "Scanner"
+
+#: ../lib/gnome-scan-dialog.c:917
+msgid "Status"
+msgstr "Status"
+
+#: ../lib/gnome-scan-dialog.c:1370
+msgid "Acquiring Preview"
+msgstr "Vorschau erstellen"
+
+#: ../lib/gnome-scan-dialog.c:1375
+msgid "The software preview acquisition and processing."
+msgstr ""
+"Es wird jetzt ein Vorschaubild eingelesen und entsprechend der Einstellungen "
+"bearbeiten."
+
+#: ../lib/gnome-scan-dialog.c:1385
+msgid "Inactive"
+msgstr "Untätig"
+
+#: ../lib/gnome-scan-init.c:41
+msgid "_Scan"
+msgstr "_Einlesen"
+
+#: ../lib/gnome-scan-job.c:327
+msgid "Configuring"
+msgstr "Einstellen"
+
+#: ../lib/gnome-scan-job.c:405
+msgid "Job completed"
+msgstr "Auftrag abgeschlossen"
+
+#: ../lib/gnome-scan-job.c:428
+msgid "Acquiring from scanner"
+msgstr "Vom Scanner einlesen"
+
+#: ../lib/gnome-scan-job.c:442
+msgid "Processing page"
+msgstr "Seite wird bearbeitet"
+
+#: ../lib/gnome-scan-job.c:455
+msgid "Outputting page"
+msgstr "Seite wird ausgegeben"
+
+#: ../lib/gnome-scanner.c:271
+msgid "Unknown"
+msgstr "Unbekannt"
+
+#: ../lib/gnome-scanner.c:272
+msgid "Ready"
+msgstr "Bereit"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Busy"
+msgstr "Beschäftigt"
+
+#: ../lib/gnome-scan-paper-size-widget.c:71
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:61
+msgid "Scan options"
+msgstr "Scanner-Optionen"
+
+#: ../lib/gnome-scan-param-specs.c:62
+msgid "Format"
+msgstr "Format"
+
+#: ../lib/gnome-scan-param-specs.c:63
+msgid "Output options"
+msgstr "Ausgabeoptionen"
+
+#: ../lib/gnome-scan-param-specs.c:64 ../modules/gsfile-filenames-widget.c:107
+msgid "Preview"
+msgstr "Vorschau"
+
+#: ../lib/gnome-scan-param-specs.c:65
+msgid "Hidden"
+msgstr "Versteckt"
+
+#: ../lib/gnome-scan-param-widget.c:104
+msgid "px"
+msgstr "px"
+
+#: ../lib/gnome-scan-param-widget.c:107
+msgid "bit"
+msgstr "Bit"
+
+#: ../lib/gnome-scan-param-widget.c:110
+msgid "mm"
+msgstr "mm"
+
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "dpi"
+msgstr "dpi"
+
+#: ../lib/gnome-scan-param-widget.c:116
+msgid "%"
+msgstr "%"
+
+#: ../lib/gnome-scan-param-widget.c:119
+msgid "ms"
+msgstr "ms"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:485
+#: ../modules/gsane-meta-param.c:289
+msgid "Manual"
+msgstr "Manuell"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:612
+msgid "Select _All"
+msgstr "_Alles auswählen"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "_Gegen den Uhrzeigersinn drehen"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "_Im Uhrzeigersinn drehen"
+
+#: ../lib/gnome-scan-processor-common.c:39
+msgid "Common Processing"
+msgstr "Allgemeine Bearbeitung"
+
+#: ../modules/gsane-meta-param.c:295
+msgid "Maximal"
+msgstr "Maximal"
+
+#: ../modules/gsane-meta-param.c:304
+msgid "Paper Size"
+msgstr "Papierformat"
+
+#: ../modules/gsane-meta-param.c:305
+msgid "Document paper size."
+msgstr "Die Papiergrö�e des Dokuments."
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin"
+msgstr "Ausgangspunkt"
+
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin of scan window"
+msgstr "Ausgangspunkt des Scan-Fensters"
+
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:327
+msgid "Page Orientation"
+msgstr "Seitenausrichtung"
+
+#: ../modules/gsane-meta-param.c:327
+msgid "Page orientation"
+msgstr "Seitenausrichtung"
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:473
+msgid "Flatbed"
+msgstr "Flachbett"
+
+#: ../modules/gsane-meta-param.c:474
+msgid "Automatic Document Feeder"
+msgstr "Automatische Dokumenteneingabe"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:476
+msgid "Transparency Adapter"
+msgstr "Dia-Aufsatz"
+
+#: ../modules/gsfile-filenames-widget.c:114
+msgid "Filename"
+msgstr "Dateiname"
+
+#: ../modules/gsfile-filenames-widget.c:172
+msgid "Select files"
+msgstr "Dateien auswählen"
+
+#: ../modules/gsfile-filenames-widget.c:185
+msgid "Supported formats"
+msgstr "Unterstützte Formate"
+
+#: ../modules/gsfile-scanner.c:72 ../src/flegita-sink.c:116
+msgid "PNG picture"
+msgstr "PNG-Bild"
+
+#: ../modules/gsfile-scanner.c:90
+msgid "JPEG picture"
+msgstr "JPEG-Bild"
+
+#: ../modules/gsfile-scanner.c:95 ../modules/gsfile-scanner.c:135
+msgid "Files"
+msgstr "Dateien"
+
+#: ../modules/gsfile-scanner.c:96
+msgid "Files to import."
+msgstr "Zu importierenden Dateien."
+
+#: ../modules/gsfile-scanner.c:135
+#, c-format
+msgid "Files (%i)"
+msgstr "Dateien (%i)"
+
+#: ../modules/gsfile-scanner.c:136
+msgid "Import from files."
+msgstr "Aus Dateien importieren."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Druckereinstellungen"
+
+#: ../src/flegita.c:53 ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Scanner-Werkzeuge"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Ein neues Bild vom Scanner einlesen."
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Hilfe"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Einlesen â?¦"
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Bild vom Scanner als neue Ebene â?¦"
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Als Ebene einlesen â?¦"
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Ebene"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "Neuer Ebenenname"
+
+#: ../src/flegita-gimp-sink.c:80 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Eingelesenes Bild"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Ordner wählen"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "PNG-Optionen"
+
+#: ../src/flegita-sink.c:104
+msgid "Action"
+msgstr "Aktion"
+
+#: ../src/flegita-sink.c:105
+msgid "Action over the scan output"
+msgstr "Aktion für die Scanner-Ausgabe"
+
+#: ../src/flegita-sink.c:122
+msgid "File"
+msgstr "Datei"
+
+#: ../src/flegita-sink.c:123
+msgid "Output filename"
+msgstr "Ausgabedateiname"
+
+#: ../src/flegita-sink.c:145
+msgid "PNG Compression Level"
+msgstr "PNG-Komprimierungsstärke"
+
+#: ../src/flegita-sink.c:186
+msgid "Various common action on scan output not related to specific software"
+msgstr ""
+"Verschiedene allgemeine Aktionen für die Scanner-Ausgabe, welche nicht auf "
+"spezielle Programme bezogen sind"
+
+#: ../src/flegita-sink.c:307
+msgid "Custom"
+msgstr "Benutzerdefiniert"
+
+#: ../src/flegita-sink.c:338
+msgid "Scan to printer"
+msgstr "Direkt zum Drucker"
+
+#: ../flegita.desktop.in.h:2
+msgid "Simply scan image"
+msgstr "Einfaches Scanner-Bild"
+
diff --git a/trunk/po/dz.po b/trunk/po/dz.po
new file mode 100644
index 0000000..d4c2f92
--- /dev/null
+++ b/trunk/po/dz.po
@@ -0,0 +1,317 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan.HEAD.dz.po\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-06-17 04:53+0100\n"
+"PO-Revision-Date: 2007-06-21 11:58+0530\n"
+"Last-Translator: yumkee lhamo <yumkeyl08 hotmail com>\n"
+"Language-Team: dzongkha <pgeyleg dit gov bt>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: n plurals=2;plural=n(!=1);\n"
+"X-Poedit-Language: dzongkha\n"
+"X-Poedit-Country: bhutan\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:87
+#: ../lib/gnome-scan-acquisition-dialog.c:117
+msgid "Acquisition"
+msgstr "�ོ�ས�ྲུ��"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "The software now acquire and process images according to the settings."
+msgstr "��འ������ེ���ས�འ�ི��ིས�ས�ྲི��ས��ས����འ�ྲིལ��ེ���ུ�ས��ར����ུ�འ�ོ�������ལས�སྦྱོར�འ���ཨི��"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:137
+#: ../lib/gnome-scan-job.c:366
+msgid "Waiting for device"
+msgstr "��ས�འ�ྲུལ��ྱི��ོ��ལུ��ས�ུ��སྡོ���ོ�"
+
+#: ../lib/gnome-scan-dialog.c:226
+msgid "Scan"
+msgstr "�ི��ལ��འ����ི�"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:275
+msgid "_General"
+msgstr "ཡོ�ས��ྱ��(_G)"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:283
+msgid "Pre_view"
+msgstr "ས�ོ��ལ��(_v)"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:292
+msgid "_Advanced"
+msgstr "��ོ�རི��(_A)"
+
+#. Processing
+#. label = gtk_label_new_with_mnemonic (_("P_rocessing"));
+#. priv->processing_box = gtk_vbox_new (FALSE, 6);
+#.
+#. scrolled = gtk_scrolled_window_new (NULL, NULL);
+#. gtk_container_set_border_width (GTK_CONTAINER (scrolled), 12);
+#. gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+#. GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+#. gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
+#. priv->processing_box);
+#.
+#. gtk_notebook_insert_page (GTK_NOTEBOOK (priv->notebook),
+#. scrolled, label,
+#. PAGE_PROCESSING);
+#. Sink
+#: ../lib/gnome-scan-dialog.c:315
+msgid "_Output"
+msgstr "ཨའུ�ི��ུ�ི�(_O)"
+
+#: ../lib/gnome-scan-dialog.c:490
+msgid "Unable to detect scanners !"
+msgstr "�ར�ལེ��འ�ྲུལ��ས��ུ�ས�ྱོ��འ�ི��འ����ི��ུ�ས�!"
+
+#: ../lib/gnome-scan-dialog.c:491
+msgid "No drivers has been found."
+msgstr "འ�ྲེ���ྱེ���ུ�འ�ོལ����ོ��"
+
+#: ../lib/gnome-scan-dialog.c:497
+#: ../lib/gnome-scan-dialog.c:877
+msgid "No device found !"
+msgstr "��ས�འ�ྲུལ�འ�ོལ����ོ��ཡ� "
+
+#: ../lib/gnome-scan-dialog.c:498
+msgid "Ensure your device is plugged, powered, supported and configured.The dialog will run until you plug a scanner or cancel."
+msgstr "�ྱོ��རའི���ས�འ�ྲུལ�འ�ི� ��ུ�ས�ཡོ��� �ུས�ཤུ�ས�ཡོ��� ར�ྱ��ས�ྱོར�ཡོ��� ��� རི��ས�ྲི��འ���ཡོ����ེས�������ོ� �ྱོ���ྱིས��ི��ལ����ི������ུ�ས��ུ�� ཡ��� ���ེ���������ུ�� �འི�ལོ��འ�ི��ཡོ����ོལ�སྡོ��འོ���"
+
+#: ../lib/gnome-scan-dialog.c:637
+#, c-format
+msgid "%s:"
+msgstr "%s:"
+
+#: ../lib/gnome-scan-dialog.c:878
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr "�ྱོ��རའི���ས�འ�ྲུལ�འ�ི� ��ུ�ས�ཡོ��� �ུས�ཤུ�ས�ཡོ��� ར�ྱ��ས�ྱོར�ཡོ��� ��� རི��ས�ྲི��འ���ཡོ����ེས�������ོ�"
+
+#: ../lib/gnome-scan-dialog.c:911
+msgid "Scanner"
+msgstr "�ར�ལེ��འ�ྲུལ��ས�"
+
+#: ../lib/gnome-scan-dialog.c:918
+msgid "Status"
+msgstr "��ས����"
+
+#: ../lib/gnome-scan-dialog.c:1338
+msgid "Acquiring Preview"
+msgstr "ས�ོ��ས�ོ��འ�ོ���ོ�"
+
+#: ../lib/gnome-scan-dialog.c:1343
+msgid "The software preview acquisition and processing."
+msgstr "��ེ���ས�འ�ི��ིས��ོ�������ལས�སྦྱོར����ུ�ས�ོ��ལ��འ����ཨི��"
+
+#: ../lib/gnome-scan-dialog.c:1353
+msgid "Inactive"
+msgstr "ཤུ�ས��ེ��"
+
+#: ../lib/gnome-scan-init.c:41
+msgid "_Scan"
+msgstr "�ི��ལ��འ����ི�"
+
+#: ../lib/gnome-scan-job.c:319
+msgid "Configuring"
+msgstr "རི��ས�ྲི��འ����ོ�"
+
+#: ../lib/gnome-scan-job.c:354
+msgid "Job completed"
+msgstr "ལས��ཡོ����ུ���སྡུ�ཡོ���"
+
+#: ../lib/gnome-scan-job.c:372
+msgid "Acquiring from scanner"
+msgstr "�ར�ལེ��འ�ྲུལ��ས�ལས�འ�ོ���ོ�"
+
+#: ../lib/gnome-scan-job.c:390
+msgid "Outputing page"
+msgstr "ཨའུ�ི��ུ��ི��ཤོ��ལེ��"
+
+#: ../lib/gnome-scanner.c:271
+msgid "Unknown"
+msgstr "��ཤེས��"
+
+#: ../lib/gnome-scanner.c:272
+msgid "Ready"
+msgstr "�ྲ�ས�ྲི��"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Busy"
+msgstr "�ོ���ེ��"
+
+#: ../lib/gnome-scan-paper-size-widget.c:74
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#: ../lib/gnome-scan-paper-size-widget.c:129
+msgid "Manual"
+msgstr "ལ���ོ��"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:62
+msgid "Scan options"
+msgstr "�ི��ལ��འ����ིའི��������ུ�"
+
+#: ../lib/gnome-scan-param-specs.c:63
+msgid "Format"
+msgstr "རྩ�ས�ྲི��"
+
+#: ../lib/gnome-scan-param-specs.c:64
+msgid "Output options"
+msgstr "ཨའུ�ི��ུ��ི��ི��������ུ�"
+
+#: ../lib/gnome-scan-param-specs.c:65
+#: ../plugins/gsfile-filenames-widget.c:107
+msgid "Preview"
+msgstr "ས�ོ��ལ��"
+
+#: ../lib/gnome-scan-param-specs.c:66
+msgid "Hidden"
+msgstr "�ས����"
+
+#: ../lib/gnome-scan-param-widget.c:104
+msgid "px"
+msgstr "�ི�ཨེ�སི�"
+
+#: ../lib/gnome-scan-param-widget.c:107
+msgid "bit"
+msgstr "�ི��ི�"
+
+#: ../lib/gnome-scan-param-widget.c:110
+msgid "mm"
+msgstr "ཨེ��ཨེ��"
+
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "dpi"
+msgstr "�ི��ི�ཨཱེ�"
+
+#: ../lib/gnome-scan-param-widget.c:116
+msgid "%"
+msgstr "%"
+
+#: ../lib/gnome-scan-param-widget.c:119
+msgid "ms"
+msgstr "�ི�ལི�ས�ར���"
+
+#: ../lib/gnome-scan-preview-plugins.c:223
+msgid "Select all"
+msgstr "������སེལ�འ�ུ�འ���"
+
+#: ../plugins/gsane-meta-param.c:262
+msgid "Scan Area"
+msgstr "�ི��ལ��འ����ི���འ��ོ�ས�"
+
+#: ../plugins/gsane-meta-param.c:263
+msgid "Region of the scan window actually acquired"
+msgstr "�ོ�ས�ཡོ���འི��ི��ལ�འི�ས�ོ�ས�ྲི���ི���འ��ོ�ས�"
+
+#. PAPER SIZE
+#: ../plugins/gsane-meta-param.c:278
+msgid "Paper Size"
+msgstr "ཤོ��ལེ���ྱི����"
+
+#: ../plugins/gsane-meta-param.c:279
+msgid "Document paper size."
+msgstr "ཡི���འི�ཤོ��ལེ���ྱི����"
+
+#. ORIENTATION
+#: ../plugins/gsane-meta-param.c:291
+msgid "Page Orientation"
+msgstr "ཤོ��ལེ���ྱི��ྱོ�ས�"
+
+#: ../plugins/gsane-meta-param.c:291
+msgid "Page orientation"
+msgstr "ཤོ��ལེ���ྱི��ྱོ�ས�"
+
+#. SANE 2 well known source option value
+#: ../plugins/gsane-meta-param.c:403
+msgid "Flatbed"
+msgstr "�ེ�ལེ�ི��ཱེ�ི�"
+
+#: ../plugins/gsane-meta-param.c:404
+msgid "Automatic Document Feeder"
+msgstr "ར����ི��ཡི���འི�ཤོ���ུ���ུ�ས��ི�"
+
+#: ../plugins/gsane-meta-param.c:405
+msgid "Transparency Adapter"
+msgstr "à½?à¾à½?སà¼?à½?སལà¼?à½?à½?à¼?à½?ྱིà¼?à½?à½?ུà½?à¼?à½?ྱེà½?à¼?"
+
+#: ../plugins/gsfile-filenames-widget.c:114
+msgid "Filename"
+msgstr "ཡི��སྣོ���ྱི��ི��"
+
+#: ../plugins/gsfile-filenames-widget.c:172
+msgid "Select files"
+msgstr "ཡི��སྣོ���ུ�སེལ�འ�ུ�འ���"
+
+#: ../plugins/gsfile-filenames-widget.c:185
+msgid "Supported formats"
+msgstr "ར�ྱ��ས�ྱོར�འ���ཡོ���འི�རྩ�ས�ྲི���ུ�"
+
+#: ../plugins/gsfile-scanner.c:73
+#: ../src/flegita-sink.c:79
+msgid "PNG picture"
+msgstr "�ི�ཨེ���ི��ར�"
+
+#: ../plugins/gsfile-scanner.c:91
+msgid "JPEG picture"
+msgstr "�ེ��ི�ཨི��ི��ར�"
+
+#: ../plugins/gsfile-scanner.c:96
+#: ../plugins/gsfile-scanner.c:136
+msgid "Files"
+msgstr "ཡི��སྣོ���ུ�"
+
+#: ../plugins/gsfile-scanner.c:97
+msgid "Files to import."
+msgstr "���འ�ྲེ��འ����ིའི�ཡི��སྣོ���ུ�"
+
+#: ../plugins/gsfile-scanner.c:136
+#, c-format
+msgid "Files (%i)"
+msgstr "ཡི��སྣོ���ུ�(%i)"
+
+#: ../plugins/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "ཡི��སྣོ���ུ�ལས����འ�ྲེ��འ���"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:79
+msgid "Select directory"
+msgstr "སྣོ���ོ�སེལ�འ�ུ�འ���"
+
+#: ../src/flegita-output-filename-widget.c:89
+msgid "Scanned image"
+msgstr "�ི��ལ��འ���ཡོ���འི���ུ�ས��ར���"
+
+#: ../src/flegita-sink.c:56
+msgid "PNG Options"
+msgstr "�ི�ཨེ���ི��ི��������ུ�"
+
+#: ../src/flegita-sink.c:84
+msgid "File"
+msgstr "ཡི��སྣོ��"
+
+#: ../src/flegita-sink.c:85
+msgid "Output filename"
+msgstr "ཨའུ�ི��ུ�ི��ི�ཡི��སྣོ���ྱི��ི���"
+
+#: ../src/flegita-sink.c:105
+msgid "PNG Compression Level"
+msgstr "�ི�ཨེ���ི� ཨེ����ུ�ས��འི���ས�རི��"
+
+#: ../src/flegita-sink.c:143
+msgid "Write scanned image to file"
+msgstr "ཡི��སྣོ��འ���ི��ལ��འ���ཡོ���འི���ུ�ས��ར����ྲིས��"
+
diff --git a/trunk/po/en_GB.po b/trunk/po/en_GB.po
new file mode 100755
index 0000000..e5de45b
--- /dev/null
+++ b/trunk/po/en_GB.po
@@ -0,0 +1,432 @@
+# Copyright (C) 2006 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same licence as the gnome-scan package.
+# David Lodge <dave cirt net>, 2007
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-03-08 11:52+0000\n"
+"PO-Revision-Date: 2008-03-08 11:52+0000\n"
+"Last-Translator: David Lodge <dave cirt net>\n"
+"Language-Team: en_GB <en li org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:92
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "Acquisition"
+msgstr "Acquisition"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:127
+msgid ""
+"The software now acquires and processes images according to the settings."
+msgstr ""
+"The software now acquires and processes images according to the settings."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:142 ../lib/gnome-scan-job.c:498
+msgid "Waiting for device"
+msgstr "Waiting for device"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:267
+msgid "_General"
+msgstr "_General"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:275
+msgid "Pre_view"
+msgstr "Pre_view"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:284
+msgid "_Advanced"
+msgstr "_Advanced"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:292
+msgid "P_rocessing"
+msgstr "P_rocessing"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:301
+msgid "_Output"
+msgstr "_Output"
+
+#. translator: this is the dialog title
+#: ../lib/gnome-scan-dialog.c:477
+msgid "Scan"
+msgstr "Scan"
+
+#: ../lib/gnome-scan-dialog.c:515
+msgid "Unable to detect scanners!"
+msgstr "Unable to detect scanners!"
+
+#: ../lib/gnome-scan-dialog.c:516
+msgid "No drivers has been found."
+msgstr "No drivers has been found."
+
+#: ../lib/gnome-scan-dialog.c:522
+msgid "No device found!"
+msgstr "No device found!"
+
+#: ../lib/gnome-scan-dialog.c:523
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+"Ensure your device is plugged, powered, supported and configured. The "
+"dialogue will run until you plug a scanner or cancel."
+
+#: ../lib/gnome-scan-dialog.c:891
+msgid "No device found !"
+msgstr "No device found !"
+
+#: ../lib/gnome-scan-dialog.c:892
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr "Ensure your device is plugged, powered, supported and configured."
+
+#: ../lib/gnome-scan-dialog.c:932
+msgid "Scanner"
+msgstr "Scanner"
+
+#: ../lib/gnome-scan-dialog.c:939
+msgid "Status"
+msgstr "Status"
+
+#: ../lib/gnome-scan-dialog.c:1378
+msgid "Acquiring Preview"
+msgstr "Acquiring Preview"
+
+#: ../lib/gnome-scan-dialog.c:1383
+msgid "The software preview acquisition and processing."
+msgstr "The software preview acquisition and processing."
+
+#. translator: initial state before preview begin.
+#: ../lib/gnome-scan-dialog.c:1394
+msgid "Inactive"
+msgstr "Inactive"
+
+#: ../lib/gnome-scan-init.c:42
+msgid "_Scan"
+msgstr "_Scan"
+
+#: ../lib/gnome-scan-job.c:380
+msgid "Configuring"
+msgstr "Configuring"
+
+#: ../lib/gnome-scan-job.c:479
+msgid "Job completed"
+msgstr "Job completed"
+
+#: ../lib/gnome-scan-job.c:511
+msgid "Acquiring from scanner"
+msgstr "Acquiring from scanner"
+
+#: ../lib/gnome-scan-job.c:525
+msgid "Processing page"
+msgstr "Processing page"
+
+#: ../lib/gnome-scan-job.c:538
+msgid "Outputting page"
+msgstr "Outputting page"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Unknown"
+msgstr "Unknown"
+
+#: ../lib/gnome-scanner.c:274
+msgid "Ready"
+msgstr "Ready"
+
+#: ../lib/gnome-scanner.c:275
+msgid "Busy"
+msgstr "Busy"
+
+#. translators: this is the paper size width and height expressed in
+#. millimeters, shown just below the selector.
+#: ../lib/gnome-scan-paper-size-widget.c:73
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:68
+msgid "Scan options"
+msgstr "Scan options"
+
+#: ../lib/gnome-scan-param-specs.c:69
+msgid "Format"
+msgstr "Format"
+
+#: ../lib/gnome-scan-param-specs.c:70
+msgid "Output options"
+msgstr "Output options"
+
+#. translator: unit pixel
+#: ../lib/gnome-scan-param-widget.c:105
+msgid "px"
+msgstr "px"
+
+#. translator: unit bit
+#: ../lib/gnome-scan-param-widget.c:109
+msgid "bit"
+msgstr "bit"
+
+#. translator: unit millimeter
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "mm"
+msgstr "mm"
+
+#. translator: unit dot per inch
+#: ../lib/gnome-scan-param-widget.c:117
+msgid "dpi"
+msgstr "dpi"
+
+#. translator: unit percent
+#: ../lib/gnome-scan-param-widget.c:121
+msgid "%"
+msgstr "%"
+
+#. translator: unit microsecond
+#: ../lib/gnome-scan-param-widget.c:125
+msgid "ms"
+msgstr "ms"
+
+#. translator: Manual is the name of user defined paper size.
+#: ../lib/gnome-scan-preview-plugin-area.c:487
+#: ../modules/gsane-meta-param.c:335
+msgid "Manual"
+msgstr "Manual"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:619
+msgid "Select _All"
+msgstr "Select _All"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "Rotate left"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "Rotate right"
+
+#: ../lib/gnome-scan-processor-common.c:44
+msgid "Common Processing"
+msgstr "Common Processing"
+
+#: ../lib/gnome-scan-processor-common.c:63
+msgid "Rotation"
+msgstr "Rotation"
+
+#: ../lib/gnome-scan-processor-common.c:70
+msgid "Automatic color enhancement"
+msgstr "Automatic colour enhancement"
+
+#: ../lib/gnome-scan-processor-common.c:71
+msgid ""
+"Color enhancement produces better photos, but takes more time to process and "
+"can be useless for text."
+msgstr ""
+"Colour enhancement produces better photos, but takes more time to process "
+"and can be useless for text."
+
+#. note: decomposing area in three options orientation, origin and paper-size
+#. except these optoin to appear in this order.
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:275
+msgid "Page Orientation"
+msgstr "Page Orientation"
+
+#: ../modules/gsane-meta-param.c:275
+msgid "Page orientation"
+msgstr "Page orientation"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:285
+msgid "Origin"
+msgstr "Origin"
+
+#: ../modules/gsane-meta-param.c:285
+msgid "Origin of scan window"
+msgstr "Origin of scan window"
+
+#: ../modules/gsane-meta-param.c:340
+msgid "Maximal"
+msgstr "Maximal"
+
+#: ../modules/gsane-meta-param.c:349
+msgid "Paper Size"
+msgstr "Paper Size"
+
+#: ../modules/gsane-meta-param.c:350
+msgid "Document paper size."
+msgstr "Document paper size."
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:544
+msgid "Flatbed"
+msgstr "Flatbed"
+
+#: ../modules/gsane-meta-param.c:545
+msgid "Automatic Document Feeder"
+msgstr "Automatic Document Feeder"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:547
+msgid "Transparency Adapter"
+msgstr "Transparency Adapter"
+
+#: ../modules/gsfile-filenames-widget.c:115
+msgid "Preview"
+msgstr "Preview"
+
+#: ../modules/gsfile-filenames-widget.c:122
+msgid "Filename"
+msgstr "Filename"
+
+#: ../modules/gsfile-filenames-widget.c:180
+msgid "Select files"
+msgstr "Select files"
+
+#: ../modules/gsfile-filenames-widget.c:193
+msgid "Supported formats"
+msgstr "Supported formats"
+
+#: ../modules/gsfile-scanner.c:71 ../src/flegita-sink.c:105
+msgid "PNG picture"
+msgstr "PNG picture"
+
+#: ../modules/gsfile-scanner.c:89
+msgid "JPEG picture"
+msgstr "JPEG picture"
+
+#. translator: this is the name of the file
+#. loader backend which allow user to scan
+#. a list a images
+#: ../modules/gsfile-scanner.c:94 ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Files"
+
+#: ../modules/gsfile-scanner.c:95
+msgid "Files to import."
+msgstr "Files to import."
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Import from files."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Configure printing"
+
+#: ../src/flegita.c:52 ../flegita.desktop.in.h:2
+msgid "Simply scan images"
+msgstr "Simply scan images"
+
+#. Translators: Add your names here with one name per
+#. line, like
+#. "John Smith <email1 example com>\n
+#. Robert Foo <email2 example com>"
+#: ../src/flegita.c:76
+msgid "translator-credit"
+msgstr "David Lodge <dave cirt net>\n"
+"Philip Withnall <pwithnall svn gnome org>"
+
+#: ../src/flegita.c:79
+msgid "Gnome Scan website"
+msgstr "GNOME Scan website"
+
+#: ../src/flegita.c:98 ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Scanner Utility"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Scan a new image."
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Help"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Scan ..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Scan picture as new layer..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Scan as Layer..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Layer"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "New layer name"
+
+#: ../src/flegita-gimp-sink.c:80 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Scanned image"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Select directory"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "PNG Options"
+
+#: ../src/flegita-sink.c:111
+msgid "File"
+msgstr "File"
+
+#: ../src/flegita-sink.c:112
+msgid "Output filename"
+msgstr "Output filename"
+
+#: ../src/flegita-sink.c:134
+msgid "PNG Compression Level"
+msgstr "PNG Compression Level"
+
+#. translator: this explain the PNG compression level
+#: ../src/flegita-sink.c:136
+msgid "Higher level means lower file size, but takes more time to save"
+msgstr "Higher level means lower file size, but takes more time to save"
+
+#: ../src/flegita-sink.c:178
+msgid "Various common action on scan output not related to specific software"
+msgstr "Various common action on scan output not related to specific software"
+
+#: ../src/flegita-sink.c:303
+msgid "Custom"
+msgstr "Custom"
+
+#: ../src/flegita-sink.c:334
+msgid "Scan to printer"
+msgstr "Scan to printer"
+
+#~ msgid "%s:"
+#~ msgstr "%s:"
+
+#, fuzzy
+#~ msgid "Scan Area"
+#~ msgstr "Scanner"
+
+#~ msgid "Files (%i)"
+#~ msgstr "Files (%i)"
+
+#~ msgid "Write scanned image to file"
+#~ msgstr "Write scanned image to file"
+
+#~ msgid "Configuring output"
+#~ msgstr "Configuring output"
diff --git a/trunk/po/es.po b/trunk/po/es.po
new file mode 100644
index 0000000..736829c
--- /dev/null
+++ b/trunk/po/es.po
@@ -0,0 +1,425 @@
+# translation of gnome-scan.HEAD.po to Español
+# translation of gnome-scan to spanish
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Jorge González <jorgegonz svn gnome org>, 2007, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan.HEAD\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-02-29 21:17+0000\n"
+"PO-Revision-Date: 2008-03-01 14:12+0100\n"
+"Last-Translator: Jorge González <jorgegonz svn gnome org>\n"
+"Language-Team: Español <gnome-es-list gnome org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:92
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "Acquisition"
+msgstr "Adquisición"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:127
+msgid "The software now acquires and processes images according to the settings."
+msgstr "El software ahora adquirirá y procesará las imágenes según los ajustes."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:142 ../lib/gnome-scan-job.c:498
+msgid "Waiting for device"
+msgstr "Esperando al dispositivo"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:267
+msgid "_General"
+msgstr "_General"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:275
+msgid "Pre_view"
+msgstr "Pre_visualizar"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:284
+msgid "_Advanced"
+msgstr "_Avanzado"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:292
+msgid "P_rocessing"
+msgstr "P_rocesando"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:301
+msgid "_Output"
+msgstr "_Salida"
+
+#. translator: this is the dialog title
+#: ../lib/gnome-scan-dialog.c:477
+msgid "Scan"
+msgstr "Escanear"
+
+#: ../lib/gnome-scan-dialog.c:515
+msgid "Unable to detect scanners!"
+msgstr "No se pudo detectar ningún escáner"
+
+#: ../lib/gnome-scan-dialog.c:516
+msgid "No drivers has been found."
+msgstr "No se encontró ningún controlador."
+
+#: ../lib/gnome-scan-dialog.c:522
+msgid "No device found!"
+msgstr "No se encontró ningún dispositivo"
+
+#: ../lib/gnome-scan-dialog.c:523
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+"Asegúrese de que su dispositivo está conectado, encendido, soportado y "
+"configurado. El diálogo se ejecutará hasta que conecte un escáner o cancele."
+
+#: ../lib/gnome-scan-dialog.c:891
+msgid "No device found !"
+msgstr "No se encontró ningún dispositivo"
+
+#: ../lib/gnome-scan-dialog.c:892
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr "Asegúrese de que su dispositivo está conectado, soportado y configurado."
+
+#: ../lib/gnome-scan-dialog.c:932
+msgid "Scanner"
+msgstr "Escáner"
+
+#: ../lib/gnome-scan-dialog.c:939
+msgid "Status"
+msgstr "Estado"
+
+#: ../lib/gnome-scan-dialog.c:1378
+msgid "Acquiring Preview"
+msgstr "Adquiriendo previsualización"
+
+#: ../lib/gnome-scan-dialog.c:1383
+msgid "The software preview acquisition and processing."
+msgstr "Es software para previsualizar la adquisición y procesarla."
+
+#. translator: initial state before preview begin.
+#: ../lib/gnome-scan-dialog.c:1394
+msgid "Inactive"
+msgstr "Inavctivo"
+
+#: ../lib/gnome-scan-init.c:42
+msgid "_Scan"
+msgstr "E_scanear"
+
+#: ../lib/gnome-scan-job.c:380
+msgid "Configuring"
+msgstr "Configurando"
+
+#: ../lib/gnome-scan-job.c:479
+msgid "Job completed"
+msgstr "Tarea completada"
+
+#: ../lib/gnome-scan-job.c:511
+msgid "Acquiring from scanner"
+msgstr "Adquiriendo del escáner"
+
+#: ../lib/gnome-scan-job.c:525
+msgid "Processing page"
+msgstr "Procesando la página"
+
+#: ../lib/gnome-scan-job.c:538
+msgid "Outputting page"
+msgstr "Página de salida"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Unknown"
+msgstr "Desconocido"
+
+#: ../lib/gnome-scanner.c:274
+msgid "Ready"
+msgstr "Listo"
+
+#: ../lib/gnome-scanner.c:275
+msgid "Busy"
+msgstr "Ocupado"
+
+#. translators: this is the paper size width and height expressed in
+#. millimeters, shown just below the selector.
+#: ../lib/gnome-scan-paper-size-widget.c:73
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:68
+msgid "Scan options"
+msgstr "Opciones de escaneado"
+
+#: ../lib/gnome-scan-param-specs.c:69
+msgid "Format"
+msgstr "Formato"
+
+#: ../lib/gnome-scan-param-specs.c:70
+msgid "Output options"
+msgstr "Opciones de salida"
+
+#: ../lib/gnome-scan-param-specs.c:71 ../modules/gsfile-filenames-widget.c:115
+msgid "Preview"
+msgstr "Previsualizar"
+
+#: ../lib/gnome-scan-param-specs.c:72
+msgid "Hidden"
+msgstr "Oculto"
+
+#. translator: unit pixel
+#: ../lib/gnome-scan-param-widget.c:105
+msgid "px"
+msgstr "px"
+
+#. translator: unit bit
+#: ../lib/gnome-scan-param-widget.c:109
+msgid "bit"
+msgstr "bit"
+
+#. translator: unit millimeter
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "mm"
+msgstr "mm"
+
+#. translator: unit dot per inch
+#: ../lib/gnome-scan-param-widget.c:117
+msgid "dpi"
+msgstr "dpi"
+
+#. translator: unit percent
+#: ../lib/gnome-scan-param-widget.c:121
+msgid "%"
+msgstr "%"
+
+#. translator: unit microsecond
+#: ../lib/gnome-scan-param-widget.c:125
+msgid "ms"
+msgstr "ms"
+
+#. translator: Manual is the name of user defined paper size.
+#: ../lib/gnome-scan-preview-plugin-area.c:487
+#: ../modules/gsane-meta-param.c:332
+msgid "Manual"
+msgstr "Manual"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:619
+msgid "Select _All"
+msgstr "Seleccionar _todo"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "Rotar a la izquierda"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "Rotar a la derecha"
+
+#: ../lib/gnome-scan-processor-common.c:44
+msgid "Common Processing"
+msgstr "Procesado común"
+
+#: ../lib/gnome-scan-processor-common.c:63
+msgid "Rotation"
+msgstr "Rotación"
+
+#: ../lib/gnome-scan-processor-common.c:70
+msgid "Automatic color enhancement"
+msgstr "Mejora de color automática"
+
+#: ../lib/gnome-scan-processor-common.c:71
+msgid ""
+"Color enhancement produces better photos, but takes more time to process and "
+"can be useless for text."
+msgstr ""
+"La mejora de color produce mejores fotos, pero lleva más tiempo procesarlas "
+"y puede no ser útil para texto."
+
+#. note: decomposing area in three options orientation, origin and paper-size
+#. except these optoin to appear in this order.
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:272
+msgid "Page Orientation"
+msgstr "Orientación de la página"
+
+#: ../modules/gsane-meta-param.c:272
+msgid "Page orientation"
+msgstr "Orientación de la página"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:282
+msgid "Origin"
+msgstr "Origen"
+
+#: ../modules/gsane-meta-param.c:282
+msgid "Origin of scan window"
+msgstr "Origen de la ventana que escanear"
+
+#: ../modules/gsane-meta-param.c:337
+msgid "Maximal"
+msgstr "Máxima"
+
+#: ../modules/gsane-meta-param.c:346
+msgid "Paper Size"
+msgstr "Tamaño del papel"
+
+#: ../modules/gsane-meta-param.c:347
+msgid "Document paper size."
+msgstr "Tamaño del papel del documento."
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:538
+msgid "Flatbed"
+msgstr "Plano"
+
+#: ../modules/gsane-meta-param.c:539
+msgid "Automatic Document Feeder"
+msgstr "Alimentador de documentos automático"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:541
+msgid "Transparency Adapter"
+msgstr "Adaptador de transparencia"
+
+#: ../modules/gsfile-filenames-widget.c:122
+msgid "Filename"
+msgstr "Nombre de archivo"
+
+#: ../modules/gsfile-filenames-widget.c:180
+msgid "Select files"
+msgstr "Seleccionar archivos"
+
+#: ../modules/gsfile-filenames-widget.c:193
+msgid "Supported formats"
+msgstr "Formatos soportados"
+
+#: ../modules/gsfile-scanner.c:71 ../src/flegita-sink.c:105
+msgid "PNG picture"
+msgstr "Imagen PNG"
+
+#: ../modules/gsfile-scanner.c:89
+msgid "JPEG picture"
+msgstr "Imagen JPEG"
+
+#. translator: this is the name of the file
+#. loader backend which allow user to scan
+#. a list a images
+#: ../modules/gsfile-scanner.c:94 ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Archivos"
+
+#: ../modules/gsfile-scanner.c:95
+msgid "Files to import."
+msgstr "Archivos a importar."
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Importar desde archivos."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Configuración de la impresión"
+
+#: ../src/flegita.c:52 ../flegita.desktop.in.h:2
+msgid "Simply scan images"
+msgstr "Escáner de imágenes sencillo"
+
+#. Translators: Add your names here with one name per
+#. line, like
+#. "John Smith <email1 example com>\n
+#. Robert Foo <email2 example com>"
+#: ../src/flegita.c:76
+msgid "translator-credit"
+msgstr "Jorge González <jorgegonz svn gnome org>, 2008"
+
+#: ../src/flegita.c:79
+msgid "Gnome Scan website"
+msgstr "Página web de GNOME Scan"
+
+#: ../src/flegita.c:98 ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Utilidad de escaneo"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Escanear una imagen nueva."
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Ayuda"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Escanear..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Escanear imagen como capa nueva..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Escanear como capa..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Capa"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "Nombre de la capa nueva"
+
+#: ../src/flegita-gimp-sink.c:80 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Imagen escaneada"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Seleccionar directorio"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "Opciones de PNG"
+
+#: ../src/flegita-sink.c:111
+msgid "File"
+msgstr "Archivo"
+
+#: ../src/flegita-sink.c:112
+msgid "Output filename"
+msgstr "Nombre de archivo de salida"
+
+#: ../src/flegita-sink.c:134
+msgid "PNG Compression Level"
+msgstr "Nivel de compresión de PNG"
+
+#. translator: this explain the PNG compression level
+#: ../src/flegita-sink.c:136
+msgid "Higher level means lower file size, but takes more time to save"
+msgstr ""
+"Un nivel más alto significa un tamaño de archivo menor, pero lleva más "
+"tiempo guardarlo"
+
+#: ../src/flegita-sink.c:178
+msgid "Various common action on scan output not related to specific software"
+msgstr ""
+"Varias acciones comunes sobre la salida del escaneo no relacionadas con "
+"software especÃfico"
+
+#: ../src/flegita-sink.c:303
+msgid "Custom"
+msgstr "Personalizado"
+
+#: ../src/flegita-sink.c:334
+msgid "Scan to printer"
+msgstr "Escanear a la impresora"
+
diff --git a/trunk/po/fi.po b/trunk/po/fi.po
new file mode 100644
index 0000000..b0739bf
--- /dev/null
+++ b/trunk/po/fi.po
@@ -0,0 +1,444 @@
+# Finnish messages for gnome-scan
+# Copyright (C) 2007-2008 Ilkka Tuohela.
+# Suomennos: http://gnome-fi.sourceforge.net/
+#
+# Ilkka Tuohela <hile iki fi>, 2007-2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-03-09 08:48+0300\n"
+"PO-Revision-Date: 2007-04-18 08:58+0300\n"
+"Last-Translator: Ilkka Tuohela <hile iki fi>\n"
+"Language-Team: Finnish <gnome-fi-laatu lists sourceforge net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:92
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "Acquisition"
+msgstr "Kuvan luku"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:127
+msgid ""
+"The software now acquires and processes images according to the settings."
+msgstr "Ohjelma lukee ja prosessoi kuvia nyt annettujen asetusten mukaisesti."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:142 ../lib/gnome-scan-job.c:498
+msgid "Waiting for device"
+msgstr "Odotetaan laitetta"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:267
+msgid "_General"
+msgstr "_Yleiset asetukset"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:275
+msgid "Pre_view"
+msgstr "Esi_katselu"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:284
+msgid "_Advanced"
+msgstr "_Lisäasetukset"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:292
+msgid "P_rocessing"
+msgstr "_Käsittely"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:301
+msgid "_Output"
+msgstr "_Tulostiedosto"
+
+#. translator: this is the dialog title
+#: ../lib/gnome-scan-dialog.c:477
+msgid "Scan"
+msgstr "Lue kuva"
+
+#: ../lib/gnome-scan-dialog.c:515
+msgid "Unable to detect scanners!"
+msgstr "Kuvanlukijoita ei havaittu!"
+
+#: ../lib/gnome-scan-dialog.c:516
+msgid "No drivers has been found."
+msgstr "Ajureita ei löytynyt."
+
+#: ../lib/gnome-scan-dialog.c:522
+msgid "No device found!"
+msgstr "Laitetta ei löytynyt!"
+
+#: ../lib/gnome-scan-dialog.c:523
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+"Varmista, että laite on kiinni tietokoneessa, päällä ja tuettu. Tätä ikkunaa "
+"näytetään, kunnes liität tuetun kuvanlukijan."
+
+#: ../lib/gnome-scan-dialog.c:891
+msgid "No device found !"
+msgstr "Laitetta ei löytynyt"
+
+#: ../lib/gnome-scan-dialog.c:892
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr "Varmista, että laite on yhdistetty, päällä, tuettu ja määritelty."
+
+#: ../lib/gnome-scan-dialog.c:932
+msgid "Scanner"
+msgstr "Kuvanlukija"
+
+#: ../lib/gnome-scan-dialog.c:939
+msgid "Status"
+msgstr "Tila"
+
+#: ../lib/gnome-scan-dialog.c:1378
+msgid "Acquiring Preview"
+msgstr "Luetaan esikatselukuvaa"
+
+#: ../lib/gnome-scan-dialog.c:1383
+msgid "The software preview acquisition and processing."
+msgstr "Kuvan esikatselun nouto ja käsittely."
+
+#. translator: initial state before preview begin.
+#: ../lib/gnome-scan-dialog.c:1394
+msgid "Inactive"
+msgstr "Ei käytössä"
+
+#: ../lib/gnome-scan-init.c:42
+msgid "_Scan"
+msgstr "_Lue kuva"
+
+#: ../lib/gnome-scan-job.c:380
+msgid "Configuring"
+msgstr "Määritellään"
+
+#: ../lib/gnome-scan-job.c:479
+msgid "Job completed"
+msgstr "Työ valmis"
+
+#: ../lib/gnome-scan-job.c:511
+msgid "Acquiring from scanner"
+msgstr "Luetaan kuvanlukijalta"
+
+#: ../lib/gnome-scan-job.c:525
+msgid "Processing page"
+msgstr "Käsitellään sivua"
+
+#: ../lib/gnome-scan-job.c:538
+msgid "Outputting page"
+msgstr "Tuotetaan sivua"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Unknown"
+msgstr "Tuntematon"
+
+#: ../lib/gnome-scanner.c:274
+msgid "Ready"
+msgstr "Valmis"
+
+#: ../lib/gnome-scanner.c:275
+msgid "Busy"
+msgstr "Käytössä"
+
+#. translators: this is the paper size width and height expressed in
+#. millimeters, shown just below the selector.
+#: ../lib/gnome-scan-paper-size-widget.c:73
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:68
+msgid "Scan options"
+msgstr "Kuvanluvun valitsimet"
+
+#: ../lib/gnome-scan-param-specs.c:69
+msgid "Format"
+msgstr "Muoto"
+
+#: ../lib/gnome-scan-param-specs.c:70
+msgid "Output options"
+msgstr "Tulosvalitsimet"
+
+#. translator: unit pixel
+#: ../lib/gnome-scan-param-widget.c:105
+msgid "px"
+msgstr "px"
+
+#. translator: unit bit
+#: ../lib/gnome-scan-param-widget.c:109
+msgid "bit"
+msgstr "bit"
+
+#. translator: unit millimeter
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "mm"
+msgstr "mm"
+
+#. translator: unit dot per inch
+#: ../lib/gnome-scan-param-widget.c:117
+msgid "dpi"
+msgstr "dpi"
+
+#. translator: unit percent
+#: ../lib/gnome-scan-param-widget.c:121
+msgid "%"
+msgstr "%"
+
+#. translator: unit microsecond
+#: ../lib/gnome-scan-param-widget.c:125
+msgid "ms"
+msgstr "ms"
+
+#. translator: Manual is the name of user defined paper size.
+#: ../lib/gnome-scan-preview-plugin-area.c:487
+#: ../modules/gsane-meta-param.c:335
+msgid "Manual"
+msgstr "Käsin"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:619
+msgid "Select _All"
+msgstr "Valitse k_aikki"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "Kierrä vasemmalle"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "Kierrä oikealle"
+
+#: ../lib/gnome-scan-processor-common.c:44
+msgid "Common Processing"
+msgstr "Yleiset muunnosasetukset"
+
+#: ../lib/gnome-scan-processor-common.c:63
+msgid "Rotation"
+msgstr "Kierto"
+
+#: ../lib/gnome-scan-processor-common.c:70
+msgid "Automatic color enhancement"
+msgstr "Automaattinen värinparannus"
+
+#: ../lib/gnome-scan-processor-common.c:71
+msgid ""
+"Color enhancement produces better photos, but takes more time to process and "
+"can be useless for text."
+msgstr ""
+"Värinparannus tuottaa parempia valokuvia, mutta kestää pidempään käsitellä "
+"ja voi olla hyödytöntä tekstin kanssa."
+
+#. note: decomposing area in three options orientation, origin and paper-size
+#. except these optoin to appear in this order.
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:275
+msgid "Page Orientation"
+msgstr "Sivun suunta"
+
+#: ../modules/gsane-meta-param.c:275
+msgid "Page orientation"
+msgstr "Sivun suunta"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:285
+msgid "Origin"
+msgstr "Nollakohta"
+
+#: ../modules/gsane-meta-param.c:285
+msgid "Origin of scan window"
+msgstr "Kuvanlukuikkunan alkukohta"
+
+#: ../modules/gsane-meta-param.c:340
+msgid "Maximal"
+msgstr "Suurin mahdollinen"
+
+#: ../modules/gsane-meta-param.c:349
+msgid "Paper Size"
+msgstr "Paperin koko"
+
+#: ../modules/gsane-meta-param.c:350
+msgid "Document paper size."
+msgstr "Asiakirjan paperikoko:"
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:544
+msgid "Flatbed"
+msgstr "Tasolukija"
+
+#: ../modules/gsane-meta-param.c:545
+msgid "Automatic Document Feeder"
+msgstr "Automaattinen asiakirjasyöttäjä"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:547
+msgid "Transparency Adapter"
+msgstr "Dia-adapteri"
+
+#: ../modules/gsfile-filenames-widget.c:115
+msgid "Preview"
+msgstr "Esikatselu"
+
+#: ../modules/gsfile-filenames-widget.c:122
+msgid "Filename"
+msgstr "Tiedostonimi"
+
+#: ../modules/gsfile-filenames-widget.c:180
+msgid "Select files"
+msgstr "Valitse tiedostot"
+
+#: ../modules/gsfile-filenames-widget.c:193
+msgid "Supported formats"
+msgstr "Tuetut muodot"
+
+#: ../modules/gsfile-scanner.c:71 ../src/flegita-sink.c:105
+msgid "PNG picture"
+msgstr "PNG-kuva"
+
+#: ../modules/gsfile-scanner.c:89
+msgid "JPEG picture"
+msgstr "JPEG-kuva"
+
+#. translator: this is the name of the file
+#. loader backend which allow user to scan
+#. a list a images
+#: ../modules/gsfile-scanner.c:94 ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Tiedostot"
+
+#: ../modules/gsfile-scanner.c:95
+msgid "Files to import."
+msgstr "Tuotavat tiedostot."
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Tuo tiedostoista."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Määritelle tulostus"
+
+#: ../src/flegita.c:52 ../flegita.desktop.in.h:2
+msgid "Simply scan images"
+msgstr "Yksinkertainen kuvanlukija"
+
+#. Translators: Add your names here with one name per
+#. line, like
+#. "John Smith <email1 example com>\n
+#. Robert Foo <email2 example com>"
+#: ../src/flegita.c:76
+msgid "translator-credit"
+msgstr ""
+"Ilkka Tuohela, 2007-2008\n"
+""
+"http://gnome.fi/"
+
+#: ../src/flegita.c:79
+msgid "Gnome Scan website"
+msgstr "Gnomen kuvanlukijan www-sivut"
+
+#: ../src/flegita.c:98 ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Kuvanlukuohjelma"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Lue uusi kuva."
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Ohje"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Lue kuva..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Lue kuva uutena tasona..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Lue kuva tasona..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Taso"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "Uuden tason nimi"
+
+#: ../src/flegita-gimp-sink.c:80 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Luettu kuva"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Valitse kansio"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "PNG-valitsimet"
+
+#: ../src/flegita-sink.c:111
+msgid "File"
+msgstr "Tiedosto"
+
+#: ../src/flegita-sink.c:112
+msgid "Output filename"
+msgstr "Tulostiedosto"
+
+#: ../src/flegita-sink.c:134
+msgid "PNG Compression Level"
+msgstr "PNG-pakkaustaso"
+
+#. translator: this explain the PNG compression level
+#: ../src/flegita-sink.c:136
+msgid "Higher level means lower file size, but takes more time to save"
+msgstr "Korkeampi taso tarkoittaa pienempää tiedostoa, mutta pidempää tallennusaikaa"
+
+#: ../src/flegita-sink.c:178
+msgid "Various common action on scan output not related to specific software"
+msgstr ""
+"Yleisiä, tietystä ohjelmasta riippumattomia toimintoja luetulle kuvalle"
+
+#: ../src/flegita-sink.c:303
+msgid "Custom"
+msgstr "Oma määrittely"
+
+#: ../src/flegita-sink.c:334
+msgid "Scan to printer"
+msgstr "Lue kuva tulostimelle"
+
+#~ msgid "%s:"
+#~ msgstr "%s:"
+
+#~ msgid "Hidden"
+#~ msgstr "Piilotettu"
+
+#~ msgid "Files (%i)"
+#~ msgstr "Tiedostot (%i)"
+
+#~ msgid "Action"
+#~ msgstr "Toiminto"
+
+#~ msgid "Action over the scan output"
+#~ msgstr "Luetulle kuvalle tehtävä toiminto"
+
+#~ msgid "Scan Area"
+#~ msgstr "Luettava kuva-alue"
+
+#~ msgid "Region of the scan window actually acquired"
+#~ msgstr "Kuvanlukijalta luettava kuva-alue"
+
+#~ msgid "Write scanned image to file"
+#~ msgstr "Tallenna luettu kuva tiedostoon"
diff --git a/trunk/po/fr.po b/trunk/po/fr.po
new file mode 100644
index 0000000..9c51c3a
--- /dev/null
+++ b/trunk/po/fr.po
@@ -0,0 +1,434 @@
+# French translation of gnome-scan
+# Copyright (C) 2007 The Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-scan package.
+#
+# Ã?tienne Bersac <bersace03 laposte net>, 2006.
+# Jonathan Ernst <jonathan ernstfamily ch>, 2007.
+# Robert-André Mauchin <zebob m gmail com>, 2007.
+# Ã?lie Roux <elie roux enst-bretagne fr>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan HEAD\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-02-29 22:17+0100\n"
+"PO-Revision-Date: 2008-02-29 22:19+0100\n"
+"Last-Translator: Ã?tienne Bersac <bersace03 laposte net>\n"
+"Language-Team: GNOME French Team <gnomefr traduc org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n>1;\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:92
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "Acquisition"
+msgstr "Acquisition"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:127
+msgid "The software now acquires and processes images according to the settings."
+msgstr "Le logiciel acquiert et traite actuellement les images selon les paramètres."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:142
+#: ../lib/gnome-scan-job.c:498
+msgid "Waiting for device"
+msgstr "En attente du périphérique"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:267
+msgid "_General"
+msgstr "_Général"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:275
+msgid "Pre_view"
+msgstr "A_perçu"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:284
+msgid "_Advanced"
+msgstr "_Avancé"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:292
+msgid "P_rocessing"
+msgstr "T_raitement"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:301
+msgid "_Output"
+msgstr "S_ortie"
+
+#. translator: this is the dialog title
+#: ../lib/gnome-scan-dialog.c:477
+msgid "Scan"
+msgstr "Numériser"
+
+#: ../lib/gnome-scan-dialog.c:515
+msgid "Unable to detect scanners!"
+msgstr "Impossible de détecter des scanners !"
+
+#: ../lib/gnome-scan-dialog.c:516
+msgid "No drivers has been found."
+msgstr "Aucun pilote n'a été trouvé."
+
+#: ../lib/gnome-scan-dialog.c:522
+msgid "No device found!"
+msgstr "Aucun périphérique trouvé !"
+
+#: ../lib/gnome-scan-dialog.c:523
+msgid "Ensure your device is plugged, powered, supported and configured. The dialog will run until you plug a scanner or cancel."
+msgstr "Assurez-vous que votre périphérique est branché, sous tension, pris en charge et configuré. La boîte de dialogue restera affichée jusqu'à ce que vous branchiez un scanner ou que vous annuliez."
+
+#: ../lib/gnome-scan-dialog.c:891
+msgid "No device found !"
+msgstr "Aucun périphérique trouvé."
+
+#: ../lib/gnome-scan-dialog.c:892
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr "Assurez-vous que votre périphérique est branché, sous tension, pris en charge et configuré."
+
+#: ../lib/gnome-scan-dialog.c:932
+msgid "Scanner"
+msgstr "Scanner"
+
+#: ../lib/gnome-scan-dialog.c:939
+msgid "Status"
+msgstr "Ã?tat"
+
+#: ../lib/gnome-scan-dialog.c:1378
+msgid "Acquiring Preview"
+msgstr "Prévisualisation"
+
+#: ../lib/gnome-scan-dialog.c:1383
+msgid "The software preview acquisition and processing."
+msgstr "Le logiciel effectue la prévisualisation et le traitement."
+
+#. translator: initial state before preview begin.
+#: ../lib/gnome-scan-dialog.c:1394
+msgid "Inactive"
+msgstr "Inactif"
+
+#: ../lib/gnome-scan-init.c:42
+msgid "_Scan"
+msgstr "_Numériser"
+
+#: ../lib/gnome-scan-job.c:380
+msgid "Configuring"
+msgstr "Configuration"
+
+#: ../lib/gnome-scan-job.c:479
+msgid "Job completed"
+msgstr "Travail effectué"
+
+#: ../lib/gnome-scan-job.c:511
+msgid "Acquiring from scanner"
+msgstr "Acquisition depuis le scanner"
+
+#: ../lib/gnome-scan-job.c:525
+msgid "Processing page"
+msgstr "Traitement de la page"
+
+#: ../lib/gnome-scan-job.c:538
+msgid "Outputting page"
+msgstr "Affichage de la page"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: ../lib/gnome-scanner.c:274
+msgid "Ready"
+msgstr "Prêt"
+
+#: ../lib/gnome-scanner.c:275
+msgid "Busy"
+msgstr "Occupé"
+
+#. translators: this is the paper size width and height expressed in
+#. millimeters, shown just below the selector.
+#: ../lib/gnome-scan-paper-size-widget.c:73
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:68
+msgid "Scan options"
+msgstr "Options de numérisation"
+
+#: ../lib/gnome-scan-param-specs.c:69
+msgid "Format"
+msgstr "Format"
+
+#: ../lib/gnome-scan-param-specs.c:70
+msgid "Output options"
+msgstr "Options de la sortie"
+
+#: ../lib/gnome-scan-param-specs.c:71
+#: ../modules/gsfile-filenames-widget.c:115
+msgid "Preview"
+msgstr "Aperçu"
+
+#: ../lib/gnome-scan-param-specs.c:72
+msgid "Hidden"
+msgstr "Masqué"
+
+#. translator: unit pixel
+#: ../lib/gnome-scan-param-widget.c:105
+msgid "px"
+msgstr "px"
+
+#. translator: unit bit
+#: ../lib/gnome-scan-param-widget.c:109
+msgid "bit"
+msgstr "bit"
+
+#. translator: unit millimeter
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "mm"
+msgstr "mm"
+
+#. translator: unit dot per inch
+#: ../lib/gnome-scan-param-widget.c:117
+msgid "dpi"
+msgstr "ppp"
+
+#. translator: unit percent
+#: ../lib/gnome-scan-param-widget.c:121
+msgid "%"
+msgstr "%"
+
+#. translator: unit microsecond
+#: ../lib/gnome-scan-param-widget.c:125
+msgid "ms"
+msgstr "ms"
+
+#. translator: Manual is the name of user defined paper size.
+#: ../lib/gnome-scan-preview-plugin-area.c:487
+#: ../modules/gsane-meta-param.c:332
+msgid "Manual"
+msgstr "Personnalisé"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:619
+msgid "Select _All"
+msgstr "_Tout sélectionner"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "Gauche"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "Droite"
+
+#: ../lib/gnome-scan-processor-common.c:44
+msgid "Common Processing"
+msgstr "Traitement"
+
+#: ../lib/gnome-scan-processor-common.c:63
+msgid "Rotation"
+msgstr "Rotation"
+
+#: ../lib/gnome-scan-processor-common.c:70
+msgid "Automatic color enhancement"
+msgstr "Amélioration automatique des couleurs"
+
+#: ../lib/gnome-scan-processor-common.c:71
+msgid "Color enhancement produces better photos, but takes more time to process and can be useless for text."
+msgstr "L'amélioration des couleur produit de meilleures photos, mais prend du temps de traitement supplémentaire et peut s'avérer inutile pour du texte."
+
+#. note: decomposing area in three options orientation, origin and paper-size
+#. except these optoin to appear in this order.
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:272
+msgid "Page Orientation"
+msgstr "Orientation de la page"
+
+#: ../modules/gsane-meta-param.c:272
+msgid "Page orientation"
+msgstr "Orientation de la page"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:282
+msgid "Origin"
+msgstr "Origine"
+
+#: ../modules/gsane-meta-param.c:282
+msgid "Origin of scan window"
+msgstr "Origine de la fenêtre de numérisation"
+
+#: ../modules/gsane-meta-param.c:337
+msgid "Maximal"
+msgstr "Maximum"
+
+#: ../modules/gsane-meta-param.c:346
+msgid "Paper Size"
+msgstr "Taille de papier"
+
+#: ../modules/gsane-meta-param.c:347
+msgid "Document paper size."
+msgstr "Taille de papier du document."
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:538
+msgid "Flatbed"
+msgstr "Scanner à plat"
+
+#: ../modules/gsane-meta-param.c:539
+msgid "Automatic Document Feeder"
+msgstr "Chargeur automatique de document"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:541
+msgid "Transparency Adapter"
+msgstr "Adaptateur de transparence"
+
+#: ../modules/gsfile-filenames-widget.c:122
+msgid "Filename"
+msgstr "Nom de fichier"
+
+#: ../modules/gsfile-filenames-widget.c:180
+msgid "Select files"
+msgstr "Sélectionnez des fichiers"
+
+#: ../modules/gsfile-filenames-widget.c:193
+msgid "Supported formats"
+msgstr "Formats pris en charge"
+
+#: ../modules/gsfile-scanner.c:71
+#: ../src/flegita-sink.c:105
+msgid "PNG picture"
+msgstr "Image PNG"
+
+#: ../modules/gsfile-scanner.c:89
+msgid "JPEG picture"
+msgstr "Image JPEG"
+
+#. translator: this is the name of the file
+#. loader backend which allow user to scan
+#. a list a images
+#: ../modules/gsfile-scanner.c:94
+#: ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Fichiers"
+
+#: ../modules/gsfile-scanner.c:95
+msgid "Files to import."
+msgstr "Fichiers à importer."
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Importer depuis des fichiers."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Configurer l'impression"
+
+#: ../src/flegita.c:52
+#: ../flegita.desktop.in.h:2
+msgid "Simply scan images"
+msgstr "Numériser simplement des images"
+
+#. Translators: Add your names here with one name per
+#. line, like
+#. "John Smith <email1 example com>\n
+#. Robert Foo <email2 example com>"
+#: ../src/flegita.c:76
+msgid "translator-credit"
+msgstr "Ã?tienne Bersac <bersace03 laposte net>"
+
+#: ../src/flegita.c:79
+msgid "Gnome Scan website"
+msgstr "Site web du projet Gnome Scan"
+
+#: ../src/flegita.c:98
+#: ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Outil de numérisation"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Numériser une nouvelle image."
+
+#: ../src/flegita-gimp.c:90
+#: ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Aide"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Numérisation..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Numériser dans un nouveau calque..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Numériser dans un calque..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Calque"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "Nom du nouveau calque"
+
+#: ../src/flegita-gimp-sink.c:80
+#: ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Image numérisée"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Sélectionnez un répertoire"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "Options PNG"
+
+#: ../src/flegita-sink.c:111
+msgid "File"
+msgstr "Fichier"
+
+#: ../src/flegita-sink.c:112
+msgid "Output filename"
+msgstr "Nom du fichier de sortie"
+
+#: ../src/flegita-sink.c:134
+msgid "PNG Compression Level"
+msgstr "Niveau de compression PNG"
+
+#. translator: this explain the PNG compression level
+#: ../src/flegita-sink.c:136
+msgid "Higher level means lower file size, but takes more time to save"
+msgstr "Un niveau plus élevé produira un fichier plus réduit, mais prendre plus de temps à compresser."
+
+#: ../src/flegita-sink.c:178
+msgid "Various common action on scan output not related to specific software"
+msgstr "Différentes actions communes sur la sortie numérisée non liées à un logiciel particulier"
+
+#: ../src/flegita-sink.c:303
+msgid "Custom"
+msgstr "Personnalisé"
+
+#: ../src/flegita-sink.c:334
+msgid "Scan to printer"
+msgstr "Numériser vers l'imprimante"
+
+#~ msgid "%s:"
+#~ msgstr "%s :"
+#~ msgid "Files (%i)"
+#~ msgstr "Fichiers (%i)"
+#~ msgid "Action"
+#~ msgstr "Action"
+#~ msgid "Action over the scan output"
+#~ msgstr "Action effectuée sur le résultat"
+#~ msgid "Simply scan image"
+#~ msgstr "Numériser simplement des images"
+
diff --git a/trunk/po/it.po b/trunk/po/it.po
new file mode 100644
index 0000000..a0e047c
--- /dev/null
+++ b/trunk/po/it.po
@@ -0,0 +1,401 @@
+# Italian translation of gnome-scan
+# Copyright (C) 2007 gnome-scan's COPYRIGHT HOLDER
+# This file is distributed under the same license as the gnome-scan package.
+# Milo Casagrande <milo_casagrandeATyahoo.it>, 2007
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-02-17 16:12+0100\n"
+"PO-Revision-Date: 2008-02-05 23:03+0100\n"
+"Last-Translator: Milo Casagrande <milo_casagrande yahoo it>\n"
+"Language-Team: Italian <tp lists linux it>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:89
+#: ../lib/gnome-scan-acquisition-dialog.c:119
+msgid "Acquisition"
+msgstr "Acquisizione"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:124
+msgid ""
+"The software now acquires and processes images according to the settings."
+msgstr "Acquisizione ed elaborazione delle immagini secondo le impostazioni."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:139 ../lib/gnome-scan-job.c:419
+msgid "Waiting for device"
+msgstr "In attesa del dispositivo"
+
+#: ../lib/gnome-scan-dialog.c:227
+msgid "Scan"
+msgstr "Acquisizione"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:277
+msgid "_General"
+msgstr "_Generale"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:285
+msgid "Pre_view"
+msgstr "Ante_prima"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:294
+msgid "_Advanced"
+msgstr "Avan_zato"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:302
+msgid "P_rocessing"
+msgstr "E_laborazione"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:310
+msgid "_Output"
+msgstr "_Output"
+
+#: ../lib/gnome-scan-dialog.c:491
+msgid "Unable to detect scanners !"
+msgstr "Impossibile rilevare gli scanner."
+
+#: ../lib/gnome-scan-dialog.c:492
+msgid "No drivers has been found."
+msgstr "Nessun driver trovato."
+
+#: ../lib/gnome-scan-dialog.c:498 ../lib/gnome-scan-dialog.c:876
+msgid "No device found !"
+msgstr "Nessun dispositivo trovato."
+
+#: ../lib/gnome-scan-dialog.c:499
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+"Assicurarsi che il dispositivo sia collegato, acceso, supportato e "
+"configurato. Questa finestra di dialogo resterà aperta fino al collegamento "
+"di uno scanner o all'annullamento dell'operazione."
+
+#: ../lib/gnome-scan-dialog.c:638
+#, c-format
+msgid "%s:"
+msgstr "%s:"
+
+#: ../lib/gnome-scan-dialog.c:877
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr ""
+"Assicurarsi che il dispositivo sia collegato, acceso, supportato e "
+"configurato."
+
+#: ../lib/gnome-scan-dialog.c:910
+msgid "Scanner"
+msgstr "Scanner"
+
+#: ../lib/gnome-scan-dialog.c:917
+msgid "Status"
+msgstr "Stato"
+
+#: ../lib/gnome-scan-dialog.c:1370
+msgid "Acquiring Preview"
+msgstr "Acquisizione anteprima"
+
+# (ndt) forse è il software mostra l'anteprima di acquisizione...
+# in ogni caso non mi è molto chiara... è un gtk_label_new
+#: ../lib/gnome-scan-dialog.c:1375
+msgid "The software preview acquisition and processing."
+msgstr "Il software di acquisizione anteprima ed elaborazione."
+
+#: ../lib/gnome-scan-dialog.c:1385
+msgid "Inactive"
+msgstr "Inattivo"
+
+# (ndt) pulsante
+#: ../lib/gnome-scan-init.c:41
+msgid "_Scan"
+msgstr "_Acquisisci"
+
+#: ../lib/gnome-scan-job.c:327
+msgid "Configuring"
+msgstr "Configurazione"
+
+#: ../lib/gnome-scan-job.c:405
+msgid "Job completed"
+msgstr "Lavoro completato"
+
+#: ../lib/gnome-scan-job.c:428
+msgid "Acquiring from scanner"
+msgstr "Acquisizione dallo scanner"
+
+#: ../lib/gnome-scan-job.c:442
+msgid "Processing page"
+msgstr "Elaborazione pagina"
+
+#: ../lib/gnome-scan-job.c:455
+msgid "Outputting page"
+msgstr "Visualizzazione pagina"
+
+#: ../lib/gnome-scanner.c:271
+msgid "Unknown"
+msgstr "Sconosciuto"
+
+#: ../lib/gnome-scanner.c:272
+msgid "Ready"
+msgstr "Pronto"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Busy"
+msgstr "Occupato"
+
+#: ../lib/gnome-scan-paper-size-widget.c:71
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:61
+msgid "Scan options"
+msgstr "Opzioni di acquisizione"
+
+#: ../lib/gnome-scan-param-specs.c:62
+msgid "Format"
+msgstr "Formato"
+
+#: ../lib/gnome-scan-param-specs.c:63
+msgid "Output options"
+msgstr "Opzioni di output"
+
+#: ../lib/gnome-scan-param-specs.c:64 ../modules/gsfile-filenames-widget.c:107
+msgid "Preview"
+msgstr "Anteprima"
+
+#: ../lib/gnome-scan-param-specs.c:65
+msgid "Hidden"
+msgstr "Nascosto"
+
+#: ../lib/gnome-scan-param-widget.c:104
+msgid "px"
+msgstr "px"
+
+#: ../lib/gnome-scan-param-widget.c:107
+msgid "bit"
+msgstr "bit"
+
+#: ../lib/gnome-scan-param-widget.c:110
+msgid "mm"
+msgstr "mm"
+
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "dpi"
+msgstr "dpi"
+
+#: ../lib/gnome-scan-param-widget.c:116
+msgid "%"
+msgstr "%"
+
+#: ../lib/gnome-scan-param-widget.c:119
+msgid "ms"
+msgstr "ms"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:485
+#: ../modules/gsane-meta-param.c:289
+msgid "Manual"
+msgstr "Manuale"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:612
+msgid "Select _All"
+msgstr "Seleziona _tutto"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "Ruota a sinistra"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "Ruota a destra"
+
+#: ../lib/gnome-scan-processor-common.c:39
+msgid "Common Processing"
+msgstr "Elaborazione comune"
+
+#: ../modules/gsane-meta-param.c:295
+msgid "Maximal"
+msgstr "Massimale"
+
+#: ../modules/gsane-meta-param.c:304
+msgid "Paper Size"
+msgstr "Dimensione carta"
+
+#: ../modules/gsane-meta-param.c:305
+msgid "Document paper size."
+msgstr "Dimensione del documento."
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin"
+msgstr "Origine"
+
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin of scan window"
+msgstr "Origine della finestra di scansione"
+
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:327
+msgid "Page Orientation"
+msgstr "Orientamento pagina"
+
+#: ../modules/gsane-meta-param.c:327
+msgid "Page orientation"
+msgstr "Orientamento della pagina"
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:473
+msgid "Flatbed"
+msgstr "Flatbed"
+
+#: ../modules/gsane-meta-param.c:474
+msgid "Automatic Document Feeder"
+msgstr "Automatic Document Feeder"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:476
+msgid "Transparency Adapter"
+msgstr "Adattatore diapositive"
+
+#: ../modules/gsfile-filenames-widget.c:114
+msgid "Filename"
+msgstr "Nome file"
+
+#: ../modules/gsfile-filenames-widget.c:172
+msgid "Select files"
+msgstr "Seleziona file"
+
+#: ../modules/gsfile-filenames-widget.c:185
+msgid "Supported formats"
+msgstr "Formati supportati"
+
+#: ../modules/gsfile-scanner.c:72 ../src/flegita-sink.c:116
+msgid "PNG picture"
+msgstr "Immangine PNG"
+
+#: ../modules/gsfile-scanner.c:90
+msgid "JPEG picture"
+msgstr "Immagine JPEG"
+
+#: ../modules/gsfile-scanner.c:95 ../modules/gsfile-scanner.c:135
+msgid "Files"
+msgstr "File"
+
+#: ../modules/gsfile-scanner.c:96
+msgid "Files to import."
+msgstr "File da importate."
+
+#: ../modules/gsfile-scanner.c:135
+#, c-format
+msgid "Files (%i)"
+msgstr "File (%i)"
+
+#: ../modules/gsfile-scanner.c:136
+msgid "Import from files."
+msgstr "Importa da file."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Configurazione stampante"
+
+#: ../src/flegita.c:53 ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Programma di utilità per scanner"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Acquisisci una nuova immagine."
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Aiuto"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Acquisizione..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Acquisisci immagine come nuovo livello..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Acquisisci come livello..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Livello"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "Nome nuovo livello"
+
+#: ../src/flegita-gimp-sink.c:80 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Immagine acquisita"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Selezione directory"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "Opzioni PNG"
+
+#: ../src/flegita-sink.c:104
+msgid "Action"
+msgstr "Azione"
+
+#: ../src/flegita-sink.c:105
+msgid "Action over the scan output"
+msgstr "Azione sul risultato della scansione"
+
+#: ../src/flegita-sink.c:122
+msgid "File"
+msgstr "File"
+
+#: ../src/flegita-sink.c:123
+msgid "Output filename"
+msgstr "Nome file di output"
+
+#: ../src/flegita-sink.c:145
+msgid "PNG Compression Level"
+msgstr "Livello compressione PNG"
+
+#: ../src/flegita-sink.c:186
+msgid "Various common action on scan output not related to specific software"
+msgstr ""
+"Diverse azioni comuni sul risultato della scansione non relative a un "
+"particolare software"
+
+#: ../src/flegita-sink.c:307
+msgid "Custom"
+msgstr "Personalizzato"
+
+# (ndt) ?
+#: ../src/flegita-sink.c:338
+msgid "Scan to printer"
+msgstr "Da scanner a stampante"
+
+#: ../flegita.desktop.in.h:2
+msgid "Simply scan image"
+msgstr "Acquisisce semplicemente le immagini"
+
+#~ msgid "Scan Area"
+#~ msgstr "Area di scansione"
+
+#~ msgid "Region of the scan window actually acquired"
+#~ msgstr "Dimensione della finestra di scansione realmente acquisita"
+
+#~ msgid "Write scanned image to file"
+#~ msgstr "Scrivere immagini su file"
diff --git a/trunk/po/nb.po b/trunk/po/nb.po
new file mode 100644
index 0000000..b71edda
--- /dev/null
+++ b/trunk/po/nb.po
@@ -0,0 +1,374 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan 0.4\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-09-23 12:23+0200\n"
+"PO-Revision-Date: 2007-09-23 12:26+0200\n"
+"Last-Translator: Kjartan Maraas <kmaraas gnome org>\n"
+"Language-Team: Norwegian bokmål <i18n-nb lister ping uio no>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:89
+#: ../lib/gnome-scan-acquisition-dialog.c:119
+msgid "Acquisition"
+msgstr ""
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:124
+msgid ""
+"The software now acquires and processes images according to the settings."
+msgstr ""
+
+#: ../lib/gnome-scan-acquisition-dialog.c:139 ../lib/gnome-scan-job.c:367
+msgid "Waiting for device"
+msgstr "Venter på enhet"
+
+#: ../lib/gnome-scan-dialog.c:221
+msgid "Scan"
+msgstr ""
+
+#. General
+#: ../lib/gnome-scan-dialog.c:270
+msgid "_General"
+msgstr "_Generelt"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:278
+msgid "Pre_view"
+msgstr ""
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:287
+msgid "_Advanced"
+msgstr "_Avansert"
+
+#. Processing
+#. label = gtk_label_new_with_mnemonic (_("P_rocessing"));
+#. priv->processing_box = gtk_vbox_new (FALSE, 6);
+#.
+#. scrolled = gtk_scrolled_window_new (NULL, NULL);
+#. gtk_container_set_border_width (GTK_CONTAINER (scrolled), 12);
+#. gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+#. GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+#. gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
+#. priv->processing_box);
+#.
+#. gtk_notebook_insert_page (GTK_NOTEBOOK (priv->notebook),
+#. scrolled, label,
+#. PAGE_PROCESSING);
+#. Sink
+#: ../lib/gnome-scan-dialog.c:310
+msgid "_Output"
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:486
+msgid "Unable to detect scanners !"
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:487
+msgid "No drivers has been found."
+msgstr "Ingen drivere ble funnet."
+
+#: ../lib/gnome-scan-dialog.c:493 ../lib/gnome-scan-dialog.c:871
+msgid "No device found !"
+msgstr "Ingen enhet funnet!"
+
+#: ../lib/gnome-scan-dialog.c:494
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:633
+#, c-format
+msgid "%s:"
+msgstr "%s:"
+
+#: ../lib/gnome-scan-dialog.c:872
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:905
+msgid "Scanner"
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:912
+msgid "Status"
+msgstr "Status"
+
+#: ../lib/gnome-scan-dialog.c:1315
+msgid "Acquiring Preview"
+msgstr "Henter forhåndsvisning"
+
+#: ../lib/gnome-scan-dialog.c:1320
+msgid "The software preview acquisition and processing."
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:1330
+msgid "Inactive"
+msgstr ""
+
+#: ../lib/gnome-scan-init.c:41
+msgid "_Scan"
+msgstr ""
+
+#: ../lib/gnome-scan-job.c:319
+msgid "Configuring"
+msgstr "Konfigurerer"
+
+#: ../lib/gnome-scan-job.c:355
+msgid "Job completed"
+msgstr ""
+
+#: ../lib/gnome-scan-job.c:373
+msgid "Acquiring from scanner"
+msgstr ""
+
+#: ../lib/gnome-scan-job.c:391
+msgid "Outputting page"
+msgstr ""
+
+#: ../lib/gnome-scanner.c:271
+msgid "Unknown"
+msgstr "Ukjent"
+
+#: ../lib/gnome-scanner.c:272
+msgid "Ready"
+msgstr "Klar"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Busy"
+msgstr "Opptatt"
+
+#: ../lib/gnome-scan-paper-size-widget.c:71
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr ""
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:61
+msgid "Scan options"
+msgstr ""
+
+#: ../lib/gnome-scan-param-specs.c:62
+msgid "Format"
+msgstr "Format"
+
+#: ../lib/gnome-scan-param-specs.c:63
+msgid "Output options"
+msgstr ""
+
+#: ../lib/gnome-scan-param-specs.c:64 ../modules/gsfile-filenames-widget.c:107
+msgid "Preview"
+msgstr "Forhåndsvis"
+
+#: ../lib/gnome-scan-param-specs.c:65
+msgid "Hidden"
+msgstr "Skjult"
+
+#: ../lib/gnome-scan-param-widget.c:104
+msgid "px"
+msgstr ""
+
+#: ../lib/gnome-scan-param-widget.c:107
+msgid "bit"
+msgstr ""
+
+#: ../lib/gnome-scan-param-widget.c:110
+msgid "mm"
+msgstr ""
+
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "dpi"
+msgstr ""
+
+#: ../lib/gnome-scan-param-widget.c:116
+msgid "%"
+msgstr ""
+
+#: ../lib/gnome-scan-param-widget.c:119
+msgid "ms"
+msgstr ""
+
+#: ../lib/gnome-scan-preview-plugin-area.c:459
+#: ../modules/gsane-meta-param.c:289
+msgid "Manual"
+msgstr ""
+
+#: ../lib/gnome-scan-preview-plugin-area.c:565
+msgid "Select _All"
+msgstr ""
+
+#: ../modules/gsane-meta-param.c:295
+msgid "Maximal"
+msgstr ""
+
+#: ../modules/gsane-meta-param.c:304
+msgid "Paper Size"
+msgstr "Papirstørrelse"
+
+#: ../modules/gsane-meta-param.c:305
+msgid "Document paper size."
+msgstr ""
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin"
+msgstr ""
+
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin of scan window"
+msgstr ""
+
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:327
+msgid "Page Orientation"
+msgstr ""
+
+#: ../modules/gsane-meta-param.c:327
+msgid "Page orientation"
+msgstr ""
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:473
+msgid "Flatbed"
+msgstr ""
+
+#: ../modules/gsane-meta-param.c:474
+msgid "Automatic Document Feeder"
+msgstr ""
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:476
+msgid "Transparency Adapter"
+msgstr ""
+
+#: ../modules/gsfile-filenames-widget.c:114
+msgid "Filename"
+msgstr "Filnavn"
+
+#: ../modules/gsfile-filenames-widget.c:172
+msgid "Select files"
+msgstr "Velg filer"
+
+#: ../modules/gsfile-filenames-widget.c:185
+msgid "Supported formats"
+msgstr ""
+
+#: ../modules/gsfile-scanner.c:73 ../src/flegita-sink.c:115
+msgid "PNG picture"
+msgstr "PNG-bilde"
+
+#: ../modules/gsfile-scanner.c:91
+msgid "JPEG picture"
+msgstr "JPEG-bilde"
+
+#: ../modules/gsfile-scanner.c:96 ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Filer"
+
+#: ../modules/gsfile-scanner.c:97
+msgid "Files to import."
+msgstr ""
+
+#: ../modules/gsfile-scanner.c:136
+#, c-format
+msgid "Files (%i)"
+msgstr "Filer (%i)"
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Importer fra filer."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:143
+msgid "Configure printing"
+msgstr ""
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr ""
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Hjelp"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr ""
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr ""
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr ""
+
+#: ../src/flegita-gimp-sink.c:70
+msgid "Layer"
+msgstr ""
+
+#: ../src/flegita-gimp-sink.c:71
+msgid "New layer name"
+msgstr ""
+
+#: ../src/flegita-gimp-sink.c:73 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr ""
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Velg katalog"
+
+#: ../src/flegita-sink.c:80
+msgid "PNG Options"
+msgstr ""
+
+#: ../src/flegita-sink.c:103
+msgid "Action"
+msgstr "Handling"
+
+#: ../src/flegita-sink.c:104
+msgid "Action over the scan output"
+msgstr ""
+
+#: ../src/flegita-sink.c:121
+msgid "File"
+msgstr "Fil"
+
+#: ../src/flegita-sink.c:122
+msgid "Output filename"
+msgstr ""
+
+#: ../src/flegita-sink.c:144
+msgid "PNG Compression Level"
+msgstr ""
+
+#: ../src/flegita-sink.c:184
+msgid "Various common action on scan output not related to specific software"
+msgstr ""
+
+#: ../src/flegita-sink.c:304
+msgid "Custom"
+msgstr "Egendefinert"
+
+#: ../src/flegita-sink.c:335
+msgid "Scan to printer"
+msgstr ""
+
+#: ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr ""
+
+#: ../flegita.desktop.in.h:2
+msgid "Simply scan image"
+msgstr ""
diff --git a/trunk/po/oc.po b/trunk/po/oc.po
new file mode 100644
index 0000000..a596430
--- /dev/null
+++ b/trunk/po/oc.po
@@ -0,0 +1,424 @@
+# Translation of oc.po to Occitan
+# Occitan translation of gnome-scan
+# Copyright (C) 2007 The Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-scan package.
+#
+# Yannig Marchegay (Kokoyaya) <yannig marchegay org>, 2006-2008
+msgid ""
+msgstr ""
+"Project-Id-Version: oc\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-03-07 10:21+0100\n"
+"PO-Revision-Date: 2008-02-26 23:06+0100\n"
+"Last-Translator: Yannig Marchegay (Kokoyaya) <yannig marchegay org>\n"
+"Language-Team: Occitan <ubuntu-l10n-oci lists ubuntu com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:92
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "Acquisition"
+msgstr ""
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:127
+msgid ""
+"The software now acquires and processes images according to the settings."
+msgstr ""
+
+#: ../lib/gnome-scan-acquisition-dialog.c:142 ../lib/gnome-scan-job.c:498
+msgid "Waiting for device"
+msgstr ""
+
+#. General
+#: ../lib/gnome-scan-dialog.c:267
+msgid "_General"
+msgstr "_General"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:275
+msgid "Pre_view"
+msgstr "Pre_visionalizacion"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:284
+msgid "_Advanced"
+msgstr "_Avançat"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:292
+msgid "P_rocessing"
+msgstr ""
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:301
+msgid "_Output"
+msgstr ""
+
+#. translator: this is the dialog title
+#: ../lib/gnome-scan-dialog.c:477
+msgid "Scan"
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:515
+msgid "Unable to detect scanners!"
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:516
+msgid "No drivers has been found."
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:522
+msgid "No device found!"
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:523
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:891
+msgid "No device found !"
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:892
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:932
+msgid "Scanner"
+msgstr "Escanèr"
+
+#: ../lib/gnome-scan-dialog.c:939
+msgid "Status"
+msgstr "Estatut"
+
+#: ../lib/gnome-scan-dialog.c:1378
+msgid "Acquiring Preview"
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:1383
+msgid "The software preview acquisition and processing."
+msgstr ""
+
+#. translator: initial state before preview begin.
+#: ../lib/gnome-scan-dialog.c:1394
+msgid "Inactive"
+msgstr "Inactiu"
+
+#: ../lib/gnome-scan-init.c:42
+msgid "_Scan"
+msgstr ""
+
+#: ../lib/gnome-scan-job.c:380
+msgid "Configuring"
+msgstr ""
+
+#: ../lib/gnome-scan-job.c:479
+msgid "Job completed"
+msgstr ""
+
+#: ../lib/gnome-scan-job.c:511
+msgid "Acquiring from scanner"
+msgstr ""
+
+#: ../lib/gnome-scan-job.c:525
+msgid "Processing page"
+msgstr ""
+
+#: ../lib/gnome-scan-job.c:538
+msgid "Outputting page"
+msgstr ""
+
+#: ../lib/gnome-scanner.c:273
+msgid "Unknown"
+msgstr "Desconegut"
+
+#: ../lib/gnome-scanner.c:274
+msgid "Ready"
+msgstr "Prèst"
+
+#: ../lib/gnome-scanner.c:275
+msgid "Busy"
+msgstr "Ocupat"
+
+#. translators: this is the paper size width and height expressed in
+#. millimeters, shown just below the selector.
+#: ../lib/gnome-scan-paper-size-widget.c:73
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:68
+msgid "Scan options"
+msgstr ""
+
+#: ../lib/gnome-scan-param-specs.c:69
+msgid "Format"
+msgstr "Format"
+
+#: ../lib/gnome-scan-param-specs.c:70
+msgid "Output options"
+msgstr ""
+
+#. translator: unit pixel
+#: ../lib/gnome-scan-param-widget.c:105
+msgid "px"
+msgstr "px"
+
+#. translator: unit bit
+#: ../lib/gnome-scan-param-widget.c:109
+msgid "bit"
+msgstr ""
+
+#. translator: unit millimeter
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "mm"
+msgstr "mm"
+
+#. translator: unit dot per inch
+#: ../lib/gnome-scan-param-widget.c:117
+msgid "dpi"
+msgstr ""
+
+#. translator: unit percent
+#: ../lib/gnome-scan-param-widget.c:121
+msgid "%"
+msgstr "%"
+
+#. translator: unit microsecond
+#: ../lib/gnome-scan-param-widget.c:125
+msgid "ms"
+msgstr "ms"
+
+#. translator: Manual is the name of user defined paper size.
+#: ../lib/gnome-scan-preview-plugin-area.c:487
+#: ../modules/gsane-meta-param.c:335
+msgid "Manual"
+msgstr "Manual"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:619
+msgid "Select _All"
+msgstr "Seleccionar un fichièr"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr ""
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr ""
+
+#: ../lib/gnome-scan-processor-common.c:44
+msgid "Common Processing"
+msgstr ""
+
+#: ../lib/gnome-scan-processor-common.c:63
+msgid "Rotation"
+msgstr ""
+
+#: ../lib/gnome-scan-processor-common.c:70
+msgid "Automatic color enhancement"
+msgstr ""
+
+#: ../lib/gnome-scan-processor-common.c:71
+msgid ""
+"Color enhancement produces better photos, but takes more time to process and "
+"can be useless for text."
+msgstr ""
+
+#. note: decomposing area in three options orientation, origin and paper-size
+#. except these optoin to appear in this order.
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:275
+msgid "Page Orientation"
+msgstr ""
+
+#: ../modules/gsane-meta-param.c:275
+msgid "Page orientation"
+msgstr ""
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:285
+msgid "Origin"
+msgstr "Original"
+
+#: ../modules/gsane-meta-param.c:285
+msgid "Origin of scan window"
+msgstr ""
+
+#: ../modules/gsane-meta-param.c:340
+msgid "Maximal"
+msgstr ""
+
+#: ../modules/gsane-meta-param.c:349
+msgid "Paper Size"
+msgstr "Talha del papièr"
+
+#: ../modules/gsane-meta-param.c:350
+msgid "Document paper size."
+msgstr ""
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:544
+msgid "Flatbed"
+msgstr ""
+
+#: ../modules/gsane-meta-param.c:545
+msgid "Automatic Document Feeder"
+msgstr ""
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:547
+msgid "Transparency Adapter"
+msgstr ""
+
+#: ../modules/gsfile-filenames-widget.c:115
+msgid "Preview"
+msgstr "Ulhada"
+
+#: ../modules/gsfile-filenames-widget.c:122
+msgid "Filename"
+msgstr "Nom de fichièr"
+
+#: ../modules/gsfile-filenames-widget.c:180
+msgid "Select files"
+msgstr ""
+
+#: ../modules/gsfile-filenames-widget.c:193
+msgid "Supported formats"
+msgstr "Formats gerits"
+
+#: ../modules/gsfile-scanner.c:71 ../src/flegita-sink.c:105
+msgid "PNG picture"
+msgstr "Imatge PNG"
+
+#: ../modules/gsfile-scanner.c:89
+msgid "JPEG picture"
+msgstr ""
+
+#. translator: this is the name of the file
+#. loader backend which allow user to scan
+#. a list a images
+#: ../modules/gsfile-scanner.c:94 ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Fichièrs"
+
+#: ../modules/gsfile-scanner.c:95
+msgid "Files to import."
+msgstr "Fichièrs d'importar."
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr ""
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr ""
+
+#: ../src/flegita.c:52 ../flegita.desktop.in.h:2
+msgid "Simply scan images"
+msgstr ""
+
+#. Translators: Add your names here with one name per
+#. line, like
+#. "John Smith <email1 example com>\n
+#. Robert Foo <email2 example com>"
+#: ../src/flegita.c:76
+msgid "translator-credit"
+msgstr ""
+
+#: ../src/flegita.c:79
+msgid "Gnome Scan website"
+msgstr ""
+
+#: ../src/flegita.c:98 ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr ""
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr ""
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Ajuda"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr ""
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr ""
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr ""
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr ""
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr ""
+
+#: ../src/flegita-gimp-sink.c:80 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr ""
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Seleccionatz un repertòri"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "Opcions PNG"
+
+#: ../src/flegita-sink.c:111
+msgid "File"
+msgstr "Fichièr"
+
+#: ../src/flegita-sink.c:112
+msgid "Output filename"
+msgstr ""
+
+#: ../src/flegita-sink.c:134
+msgid "PNG Compression Level"
+msgstr ""
+
+#. translator: this explain the PNG compression level
+#: ../src/flegita-sink.c:136
+msgid "Higher level means lower file size, but takes more time to save"
+msgstr ""
+
+#: ../src/flegita-sink.c:178
+msgid "Various common action on scan output not related to specific software"
+msgstr ""
+
+#: ../src/flegita-sink.c:303
+msgid "Custom"
+msgstr "Personalisat"
+
+#: ../src/flegita-sink.c:334
+msgid "Scan to printer"
+msgstr ""
+
+#~ msgid "%s:"
+#~ msgstr "%s :"
+
+#~ msgid "Hidden"
+#~ msgstr "Amagat"
+
+#~ msgid "Files (%i)"
+#~ msgstr "Fichièrs (%i)"
+
+#~ msgid "Action"
+#~ msgstr "Accion"
diff --git a/trunk/po/pl.po b/trunk/po/pl.po
new file mode 100644
index 0000000..005c692
--- /dev/null
+++ b/trunk/po/pl.po
@@ -0,0 +1,448 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-03-01 18:03+0100\n"
+"PO-Revision-Date: 2008-03-01 17:21+0100\n"
+"Last-Translator: Tomasz Dominikowski <dominikowski gmail com>\n"
+"Language-Team: Tomasz Dominikowski (Aviary.pl) <dominikowski gmail com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Polish\n"
+"X-Poedit-Country: Poland\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:92
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "Acquisition"
+msgstr "Pobieranie"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:127
+msgid ""
+"The software now acquires and processes images according to the settings."
+msgstr "Oprogramowanie pobierze i przetworzy teraz obrazy wedÅ?ug ustawieÅ?."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:142 ../lib/gnome-scan-job.c:498
+msgid "Waiting for device"
+msgstr "Oczekiwanie na urzÄ?dzenie"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:267
+msgid "_General"
+msgstr "_Ogólne"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:275
+msgid "Pre_view"
+msgstr "P_odglÄ?d"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:284
+msgid "_Advanced"
+msgstr "Z_aawansowane"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:292
+msgid "P_rocessing"
+msgstr "P_rzetwarzanie"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:301
+msgid "_Output"
+msgstr "_Dane wyjÅ?ciowe"
+
+#. translator: this is the dialog title
+#: ../lib/gnome-scan-dialog.c:477
+msgid "Scan"
+msgstr "Skanuj"
+
+#: ../lib/gnome-scan-dialog.c:515
+msgid "Unable to detect scanners!"
+msgstr "Wykrycie skanerów nieudane!"
+
+#: ../lib/gnome-scan-dialog.c:516
+msgid "No drivers has been found."
+msgstr "Nie odnaleziono sterowników."
+
+#: ../lib/gnome-scan-dialog.c:522
+msgid "No device found!"
+msgstr "Nie odnaleziono urzÄ?dzeÅ?!"
+
+#: ../lib/gnome-scan-dialog.c:523
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+"ProszÄ? siÄ? upewniÄ?, że urzÄ?dzenie jest podÅ?Ä?czone do komputera i zasilania, "
+"obsÅ?ugiwane i skonfigurowane. Te okno bÄ?dzie wyÅ?wietlone dopóki nie zostanie "
+"podÅ?Ä?czony skaner lub zostanie to anulowane."
+
+#: ../lib/gnome-scan-dialog.c:891
+msgid "No device found !"
+msgstr "Nie odnaleziono urzÄ?dzeÅ?!"
+
+#: ../lib/gnome-scan-dialog.c:892
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr ""
+"ProszÄ? siÄ? upewniÄ?, że urzÄ?dzenie jest podÅ?Ä?czone do komputera i zasilania, "
+"obsÅ?ugiwane i skonfigurowane."
+
+#: ../lib/gnome-scan-dialog.c:932
+msgid "Scanner"
+msgstr "Skaner"
+
+#: ../lib/gnome-scan-dialog.c:939
+msgid "Status"
+msgstr "Stan"
+
+#: ../lib/gnome-scan-dialog.c:1378
+msgid "Acquiring Preview"
+msgstr "Pobieranie podglÄ?du"
+
+#: ../lib/gnome-scan-dialog.c:1383
+msgid "The software preview acquisition and processing."
+msgstr "Program do podglÄ?du, pobierania i przetwarzania obrazów ze skanerów."
+
+#. translator: initial state before preview begin.
+#: ../lib/gnome-scan-dialog.c:1394
+msgid "Inactive"
+msgstr "Nieaktywny"
+
+#: ../lib/gnome-scan-init.c:42
+msgid "_Scan"
+msgstr "_Skanuj"
+
+#: ../lib/gnome-scan-job.c:380
+msgid "Configuring"
+msgstr "Konfigurowanie"
+
+#: ../lib/gnome-scan-job.c:479
+msgid "Job completed"
+msgstr "Zadanie ukoÅ?czone"
+
+#: ../lib/gnome-scan-job.c:511
+msgid "Acquiring from scanner"
+msgstr "Pobieranie ze skanera"
+
+#: ../lib/gnome-scan-job.c:525
+msgid "Processing page"
+msgstr "Przetwarzanie strony"
+
+#: ../lib/gnome-scan-job.c:538
+msgid "Outputting page"
+msgstr "Wyprowadzanie strony"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Unknown"
+msgstr "Nieznany"
+
+#: ../lib/gnome-scanner.c:274
+msgid "Ready"
+msgstr "Gotowy"
+
+#: ../lib/gnome-scanner.c:275
+msgid "Busy"
+msgstr "ZajÄ?ty"
+
+#. translators: this is the paper size width and height expressed in
+#. millimeters, shown just below the selector.
+#: ../lib/gnome-scan-paper-size-widget.c:73
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:68
+msgid "Scan options"
+msgstr "Opcje skanowania"
+
+#: ../lib/gnome-scan-param-specs.c:69
+msgid "Format"
+msgstr "Format"
+
+#: ../lib/gnome-scan-param-specs.c:70
+msgid "Output options"
+msgstr "Opcje wyjÅ?cia"
+
+#: ../lib/gnome-scan-param-specs.c:71 ../modules/gsfile-filenames-widget.c:115
+msgid "Preview"
+msgstr "PodglÄ?d"
+
+#: ../lib/gnome-scan-param-specs.c:72
+msgid "Hidden"
+msgstr "Ukryte"
+
+#. translator: unit pixel
+#: ../lib/gnome-scan-param-widget.c:105
+msgid "px"
+msgstr "pikseli"
+
+#. translator: unit bit
+#: ../lib/gnome-scan-param-widget.c:109
+msgid "bit"
+msgstr "bit"
+
+#. translator: unit millimeter
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "mm"
+msgstr "mm"
+
+#. translator: unit dot per inch
+#: ../lib/gnome-scan-param-widget.c:117
+msgid "dpi"
+msgstr "DPI"
+
+#. translator: unit percent
+#: ../lib/gnome-scan-param-widget.c:121
+msgid "%"
+msgstr "%"
+
+#. translator: unit microsecond
+#: ../lib/gnome-scan-param-widget.c:125
+msgid "ms"
+msgstr "ms"
+
+#. translator: Manual is the name of user defined paper size.
+#: ../lib/gnome-scan-preview-plugin-area.c:487
+#: ../modules/gsane-meta-param.c:332
+msgid "Manual"
+msgstr "RÄ?czne"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:619
+msgid "Select _All"
+msgstr "Zaznacz _wszystko"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "ObróÄ? w lewo"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "ObróÄ? w prawo"
+
+#: ../lib/gnome-scan-processor-common.c:44
+msgid "Common Processing"
+msgstr "Ogólne przetwarzanie"
+
+#: ../lib/gnome-scan-processor-common.c:63
+msgid "Rotation"
+msgstr "Obracanie"
+
+#: ../lib/gnome-scan-processor-common.c:70
+msgid "Automatic color enhancement"
+msgstr "Automatyczna regulacja kolorów"
+
+#: ../lib/gnome-scan-processor-common.c:71
+msgid ""
+"Color enhancement produces better photos, but takes more time to process and "
+"can be useless for text."
+msgstr ""
+"Regulacja kolorów polepsza jakoÅ?Ä? zdjÄ?Ä?, lecz przetwarzanie obrazu trwa "
+"dÅ?użej."
+
+#. note: decomposing area in three options orientation, origin and paper-size
+#. except these optoin to appear in this order.
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:272
+msgid "Page Orientation"
+msgstr "PoÅ?ożenie strony"
+
+#: ../modules/gsane-meta-param.c:272
+msgid "Page orientation"
+msgstr "PoÅ?ożenie strony"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:282
+msgid "Origin"
+msgstr "ŹródÅ?o"
+
+#: ../modules/gsane-meta-param.c:282
+msgid "Origin of scan window"
+msgstr "ŹródÅ?o okna skanowania"
+
+#: ../modules/gsane-meta-param.c:337
+msgid "Maximal"
+msgstr "Maksymalny"
+
+#: ../modules/gsane-meta-param.c:346
+msgid "Paper Size"
+msgstr "Rozmiar papieru"
+
+#: ../modules/gsane-meta-param.c:347
+msgid "Document paper size."
+msgstr "Rozmiar papieru."
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:538
+msgid "Flatbed"
+msgstr "Skaner stacjonarny"
+
+#: ../modules/gsane-meta-param.c:539
+msgid "Automatic Document Feeder"
+msgstr "Automatyczny podajnik dokumentów"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:541
+msgid "Transparency Adapter"
+msgstr "Przystawka do przezroczy"
+
+#: ../modules/gsfile-filenames-widget.c:122
+msgid "Filename"
+msgstr "Nazwa pliku"
+
+#: ../modules/gsfile-filenames-widget.c:180
+msgid "Select files"
+msgstr "Zaznacz pliki"
+
+#: ../modules/gsfile-filenames-widget.c:193
+msgid "Supported formats"
+msgstr "ObsÅ?ugiwane formaty"
+
+#: ../modules/gsfile-scanner.c:71 ../src/flegita-sink.c:105
+msgid "PNG picture"
+msgstr "Obraz PNG"
+
+#: ../modules/gsfile-scanner.c:89
+msgid "JPEG picture"
+msgstr "Obraz JPEG"
+
+#. translator: this is the name of the file
+#. loader backend which allow user to scan
+#. a list a images
+#: ../modules/gsfile-scanner.c:94 ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Pliki"
+
+#: ../modules/gsfile-scanner.c:95
+msgid "Files to import."
+msgstr "Pliki do zaimportowania."
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Importuj z plików."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Konfiguruj drukowanie"
+
+#: ../src/flegita.c:52 ../flegita.desktop.in.h:2
+msgid "Simply scan images"
+msgstr "Proste skanowanie obrazów"
+
+#. Translators: Add your names here with one name per
+#. line, like
+#. "John Smith <email1 example com>\n
+#. Robert Foo <email2 example com>"
+#: ../src/flegita.c:76
+msgid "translator-credit"
+msgstr "Tomasz Dominikowski (Aviary.pl) <dominikowski gmail com>"
+
+#: ../src/flegita.c:79
+msgid "Gnome Scan website"
+msgstr "Strona WWW GNOME Scan"
+
+#: ../src/flegita.c:98 ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "NarzÄ?dzie skanera"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Skanowanie nowego obrazu."
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Pomoc"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Skanowanie..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Skanowanie obrazu jako nowej warstwy..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Skanowanie jako warstwy..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Warstwa"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "Nazwa nowej warstwy"
+
+#: ../src/flegita-gimp-sink.c:80 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Zeskanowany obraz"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Zaznacz katalog"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "Opcje PNG"
+
+#: ../src/flegita-sink.c:111
+msgid "File"
+msgstr "Plik"
+
+#: ../src/flegita-sink.c:112
+msgid "Output filename"
+msgstr "Nazwa pliku wyjÅ?cioweggo"
+
+#: ../src/flegita-sink.c:134
+msgid "PNG Compression Level"
+msgstr "StopieÅ? kompresji PNG"
+
+#. translator: this explain the PNG compression level
+#: ../src/flegita-sink.c:136
+msgid "Higher level means lower file size, but takes more time to save"
+msgstr ""
+"Wysoki poziom oznacza mniejszy rozmiar pliku, lecz jego zapis bÄ?dzie trwaÅ? "
+"dÅ?użej"
+
+#: ../src/flegita-sink.c:178
+msgid "Various common action on scan output not related to specific software"
+msgstr "Różne ogólne dziaÅ?ania na zeskanowanym materiale wyjÅ?ciowym"
+
+#: ../src/flegita-sink.c:303
+msgid "Custom"
+msgstr "WÅ?asne"
+
+#: ../src/flegita-sink.c:334
+msgid "Scan to printer"
+msgstr "Skanuj do drukarki"
+
+#~ msgid "%s:"
+#~ msgstr "%s:"
+
+#~ msgid "Files (%i)"
+#~ msgstr "Pliki (%i)"
+
+#~ msgid "Action"
+#~ msgstr "DziaÅ?anie"
+
+#~ msgid "Action over the scan output"
+#~ msgstr "DziaÅ?anie na wyjÅ?ciu skanera"
+
+#~ msgid "Scan Area"
+#~ msgstr "Obszar skanowania"
+
+#~ msgid "Region of the scan window actually acquired"
+#~ msgstr "Obszar skanowania, który ma zostaÄ? pobrany"
+
+#~ msgid "Write scanned image to file"
+#~ msgstr "Zapisz zeskanowany obraz do pliku"
diff --git a/trunk/po/pt.po b/trunk/po/pt.po
new file mode 100644
index 0000000..d9a6549
--- /dev/null
+++ b/trunk/po/pt.po
@@ -0,0 +1,439 @@
+# Portuguese translation of gnome-scan
+# Copyright © 2008 gnome-scan
+# This file is distributed under the same license as the gnome-scan package.
+# António Lima <amrlima gmail com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-03-09 11:19+0000\n"
+"PO-Revision-Date: 2008-03-06 18:55-0100\n"
+"Last-Translator: António Lima <amrlima gmail com>\n"
+"Language-Team: Portuguese <gnome_pt yahoogroups com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Portuguese\n"
+"X-Poedit-Country: PORTUGAL\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:92
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "Acquisition"
+msgstr "Aquisição"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:127
+msgid ""
+"The software now acquires and processes images according to the settings."
+msgstr ""
+"O software agora adquire e processa imagens de acordo com as configurações."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:142 ../lib/gnome-scan-job.c:498
+msgid "Waiting for device"
+msgstr "Ã? espera do dispositivo"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:267
+msgid "_General"
+msgstr "_Geral"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:275
+msgid "Pre_view"
+msgstr "Ante_ver"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:284
+msgid "_Advanced"
+msgstr "_Avançado"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:292
+msgid "P_rocessing"
+msgstr "P_rocessando"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:301
+msgid "_Output"
+msgstr "_SaÃda"
+
+#. translator: this is the dialog title
+#: ../lib/gnome-scan-dialog.c:477
+msgid "Scan"
+msgstr "Digitalizar"
+
+#: ../lib/gnome-scan-dialog.c:515
+msgid "Unable to detect scanners!"
+msgstr "Não foi possÃvel detectar scanners!"
+
+#: ../lib/gnome-scan-dialog.c:516
+msgid "No drivers has been found."
+msgstr "Nenhum controlador encontrado."
+
+#: ../lib/gnome-scan-dialog.c:522
+msgid "No device found!"
+msgstr "Nenhum dispositivo encontrado!"
+
+#: ../lib/gnome-scan-dialog.c:523
+msgid ""
+"Ensure your device is plugged, powered, supported and configured. The dialog "
+"will run until you plug a scanner or cancel."
+msgstr ""
+"Assegure-se de que o seu dispositivo se encontra ligado ao computador e à "
+"corrente, e que é suportado e está configurado. O diálogo irá ser executado "
+"até que ligue um scanner ou cancele."
+
+#: ../lib/gnome-scan-dialog.c:891
+msgid "No device found !"
+msgstr "Nenhum dispositivo encontrado !"
+
+#: ../lib/gnome-scan-dialog.c:892
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr ""
+"Assegure-se de que o seu dispositivo se encontra ligado ao computador e à "
+"corrente, e que é suportado e está configurado."
+
+#: ../lib/gnome-scan-dialog.c:932
+msgid "Scanner"
+msgstr "Scanner"
+
+#: ../lib/gnome-scan-dialog.c:939
+msgid "Status"
+msgstr "Estado"
+
+#: ../lib/gnome-scan-dialog.c:1378
+msgid "Acquiring Preview"
+msgstr "A Adquirir a Antevisão"
+
+#: ../lib/gnome-scan-dialog.c:1383
+msgid "The software preview acquisition and processing."
+msgstr "A antevisão de aquisição e processamento da aplicação."
+
+#. translator: initial state before preview begin.
+#: ../lib/gnome-scan-dialog.c:1394
+msgid "Inactive"
+msgstr "Inactivo"
+
+#: ../lib/gnome-scan-init.c:42
+msgid "_Scan"
+msgstr "_Digitializar"
+
+#: ../lib/gnome-scan-job.c:380
+msgid "Configuring"
+msgstr "A Configurar"
+
+#: ../lib/gnome-scan-job.c:479
+msgid "Job completed"
+msgstr "Tarefa terminada"
+
+#: ../lib/gnome-scan-job.c:511
+msgid "Acquiring from scanner"
+msgstr "A adquirir a partir do scanner"
+
+#: ../lib/gnome-scan-job.c:525
+msgid "Processing page"
+msgstr "A processar página"
+
+#: ../lib/gnome-scan-job.c:538
+msgid "Outputting page"
+msgstr "A exportar página"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: ../lib/gnome-scanner.c:274
+msgid "Ready"
+msgstr "DisponÃvel"
+
+#: ../lib/gnome-scanner.c:275
+msgid "Busy"
+msgstr "Ocupado"
+
+#. translators: this is the paper size width and height expressed in
+#. millimeters, shown just below the selector.
+#: ../lib/gnome-scan-paper-size-widget.c:73
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:68
+msgid "Scan options"
+msgstr "Opções de digitalização"
+
+#: ../lib/gnome-scan-param-specs.c:69
+msgid "Format"
+msgstr "Formato"
+
+#: ../lib/gnome-scan-param-specs.c:70
+msgid "Output options"
+msgstr "Opções de saÃda"
+
+#. translator: unit pixel
+#: ../lib/gnome-scan-param-widget.c:105
+msgid "px"
+msgstr "px"
+
+#. translator: unit bit
+#: ../lib/gnome-scan-param-widget.c:109
+msgid "bit"
+msgstr "bit"
+
+#. translator: unit millimeter
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "mm"
+msgstr "mm"
+
+#. translator: unit dot per inch
+#: ../lib/gnome-scan-param-widget.c:117
+msgid "dpi"
+msgstr "dpi"
+
+#. translator: unit percent
+#: ../lib/gnome-scan-param-widget.c:121
+msgid "%"
+msgstr "%"
+
+#. translator: unit microsecond
+#: ../lib/gnome-scan-param-widget.c:125
+msgid "ms"
+msgstr "ms"
+
+#. translator: Manual is the name of user defined paper size.
+#: ../lib/gnome-scan-preview-plugin-area.c:487
+#: ../modules/gsane-meta-param.c:335
+msgid "Manual"
+msgstr "Manual"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:619
+msgid "Select _All"
+msgstr "Seleccionar _Todos"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "Rodar para a esquerda"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "Rodar para a direita"
+
+#: ../lib/gnome-scan-processor-common.c:44
+msgid "Common Processing"
+msgstr "Processamento Comum"
+
+#: ../lib/gnome-scan-processor-common.c:63
+msgid "Rotation"
+msgstr "Rotação"
+
+#: ../lib/gnome-scan-processor-common.c:70
+msgid "Automatic color enhancement"
+msgstr "Melhoramento automático de cor"
+
+#: ../lib/gnome-scan-processor-common.c:71
+msgid ""
+"Color enhancement produces better photos, but takes more time to process and "
+"can be useless for text."
+msgstr ""
+"O melhoramento de cor produz melhores fotos, mas demora mais a processar e "
+"pode ser inútil para texto."
+
+#. note: decomposing area in three options orientation, origin and paper-size
+#. except these optoin to appear in this order.
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:275
+msgid "Page Orientation"
+msgstr "Orientação da Página"
+
+#: ../modules/gsane-meta-param.c:275
+msgid "Page orientation"
+msgstr "Orientação da página"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:285
+msgid "Origin"
+msgstr "Origem"
+
+#: ../modules/gsane-meta-param.c:285
+msgid "Origin of scan window"
+msgstr "Origem da janela de digitalização"
+
+#: ../modules/gsane-meta-param.c:340
+msgid "Maximal"
+msgstr "Máximo"
+
+#: ../modules/gsane-meta-param.c:349
+msgid "Paper Size"
+msgstr "Dimensão do Papel"
+
+#: ../modules/gsane-meta-param.c:350
+msgid "Document paper size."
+msgstr "Dimensão do papel de documento."
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:544
+msgid "Flatbed"
+msgstr "Fundo Plano"
+
+#: ../modules/gsane-meta-param.c:545
+msgid "Automatic Document Feeder"
+msgstr "Alimentação Automática de Documento"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:547
+msgid "Transparency Adapter"
+msgstr "Adaptador de Transparência"
+
+#: ../modules/gsfile-filenames-widget.c:115
+msgid "Preview"
+msgstr "Antever"
+
+#: ../modules/gsfile-filenames-widget.c:122
+msgid "Filename"
+msgstr "Nome do Ficheiro"
+
+#: ../modules/gsfile-filenames-widget.c:180
+msgid "Select files"
+msgstr "Seleccionar ficheiros"
+
+#: ../modules/gsfile-filenames-widget.c:193
+msgid "Supported formats"
+msgstr "Formatos suportados"
+
+#: ../modules/gsfile-scanner.c:71 ../src/flegita-sink.c:105
+msgid "PNG picture"
+msgstr "Imagem PNG"
+
+#: ../modules/gsfile-scanner.c:89
+msgid "JPEG picture"
+msgstr "Imagem JPEG"
+
+#. translator: this is the name of the file
+#. loader backend which allow user to scan
+#. a list a images
+#: ../modules/gsfile-scanner.c:94 ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Ficheiros"
+
+#: ../modules/gsfile-scanner.c:95
+msgid "Files to import."
+msgstr "Ficheiro a Importar."
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Importar a partir dos ficheiros."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Configurar impressão"
+
+#: ../src/flegita.c:52 ../flegita.desktop.in.h:2
+msgid "Simply scan images"
+msgstr "Apenas digitalizar imagens"
+
+#. Translators: Add your names here with one name per
+#. line, like
+#. "John Smith <email1 example com>\n
+#. Robert Foo <email2 example com>"
+#: ../src/flegita.c:76
+msgid "translator-credit"
+msgstr "António Lima <amrlima gmail com>"
+
+#: ../src/flegita.c:79
+msgid "Gnome Scan website"
+msgstr "Página web do Gnome Scan"
+
+#: ../src/flegita.c:98 ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Utilitário de Scanner"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Digitalizar uma nova imagem."
+
+#: ../src/flegita-gimp.c:90 ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Ajuda"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Digitalizar ..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Digitalizar imagem como nova camada..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Digitalizar como Camada..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Camada"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "Nome da nova camada"
+
+#: ../src/flegita-gimp-sink.c:80 ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Imagem digitalizada"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Seleccionar directório"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "Opções PNG"
+
+#: ../src/flegita-sink.c:111
+msgid "File"
+msgstr "Ficheiro"
+
+#: ../src/flegita-sink.c:112
+msgid "Output filename"
+msgstr "Nome de ficheiro de saÃda"
+
+#: ../src/flegita-sink.c:134
+msgid "PNG Compression Level"
+msgstr "NÃvel de Compressão PNG"
+
+#. translator: this explain the PNG compression level
+#: ../src/flegita-sink.c:136
+msgid "Higher level means lower file size, but takes more time to save"
+msgstr ""
+"Um nÃvel mais elevado significa um tamanho de ficheiro menor, mas demora "
+"mais tempo a gravar"
+
+#: ../src/flegita-sink.c:178
+msgid "Various common action on scan output not related to specific software"
+msgstr ""
+"Várias acções comuns da saÃda de digitalização não relacionadas a aplicação "
+"especÃfica"
+
+#: ../src/flegita-sink.c:303
+msgid "Custom"
+msgstr "Personalizar"
+
+#: ../src/flegita-sink.c:334
+msgid "Scan to printer"
+msgstr "Digitalizar para impressora"
+
+#~ msgid "%s:"
+#~ msgstr "%s:"
+
+#~ msgid "Hidden"
+#~ msgstr "Oculto"
+
+#~ msgid "Files (%i)"
+#~ msgstr "Ficheiros (%i)"
+
+#~ msgid "Action"
+#~ msgstr "Acção"
+
+#~ msgid "Action over the scan output"
+#~ msgstr "Acção sobre a saÃda da digitalização"
diff --git a/trunk/po/pt_BR.po b/trunk/po/pt_BR.po
new file mode 100644
index 0000000..3e3b59f
--- /dev/null
+++ b/trunk/po/pt_BR.po
@@ -0,0 +1,313 @@
+# Brazilian Portuguse translation of gnome-scan.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-scan package.
+# Raphael Higino <phhigino gmail com>, 2007.
+#
+# Acquire -> Digitalizar
+# Scan -> Digitalizar, Scannear
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-07-23 03:50+0100\n"
+"PO-Revision-Date: 2007-07-23 20:27-0300\n"
+"Last-Translator: Raphael Higino <phhigino gmail com>\n"
+"Language-Team: Brazilian Portugues <gnome-l10n-br listas cipsga org br>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:87
+#: ../lib/gnome-scan-acquisition-dialog.c:117
+msgid "Acquisition"
+msgstr "Digitalização"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "The software now acquire and process images according to the settings."
+msgstr "Agora o software digitaliza e processa imagens de acordo com as configurações."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:137 ../lib/gnome-scan-job.c:366
+msgid "Waiting for device"
+msgstr "Esperando por dispositivo"
+
+#: ../lib/gnome-scan-dialog.c:226
+msgid "Scan"
+msgstr "Digitalizar"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:275
+msgid "_General"
+msgstr "_Geral"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:283
+msgid "Pre_view"
+msgstr "Pré_ver"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:292
+msgid "_Advanced"
+msgstr "_Avançado"
+
+#. Processing
+#. label = gtk_label_new_with_mnemonic (_("P_rocessing"));
+#. priv->processing_box = gtk_vbox_new (FALSE, 6);
+#.
+#. scrolled = gtk_scrolled_window_new (NULL, NULL);
+#. gtk_container_set_border_width (GTK_CONTAINER (scrolled), 12);
+#. gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+#. GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+#. gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
+#. priv->processing_box);
+#.
+#. gtk_notebook_insert_page (GTK_NOTEBOOK (priv->notebook),
+#. scrolled, label,
+#. PAGE_PROCESSING);
+#. Sink
+#: ../lib/gnome-scan-dialog.c:315
+msgid "_Output"
+msgstr "_SaÃda"
+
+#: ../lib/gnome-scan-dialog.c:490
+msgid "Unable to detect scanners !"
+msgstr "Não foi possÃvel detectar scanners."
+
+#: ../lib/gnome-scan-dialog.c:491
+msgid "No drivers has been found."
+msgstr "Nenhum driver foi encontrado."
+
+#: ../lib/gnome-scan-dialog.c:497 ../lib/gnome-scan-dialog.c:877
+msgid "No device found !"
+msgstr "Nenhum dispositivo encontrado."
+
+#: ../lib/gnome-scan-dialog.c:498
+msgid ""
+"Ensure your device is plugged, powered, supported and configured.The dialog "
+"will run until you plug a scanner or cancel."
+msgstr "Certifique-se de que o dispositivo está conectado, ligado, que é suportado e está configurado. O diálogo executará até que você conecte um scanner ou cancele."
+
+#: ../lib/gnome-scan-dialog.c:637
+#, c-format
+msgid "%s:"
+msgstr "%s:"
+
+#: ../lib/gnome-scan-dialog.c:878
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr "Certifique-se de que o dispositivo está conectado, ligado, que é suportado e está configurado."
+
+#: ../lib/gnome-scan-dialog.c:911
+msgid "Scanner"
+msgstr "Scanner"
+
+#: ../lib/gnome-scan-dialog.c:918
+msgid "Status"
+msgstr "Status"
+
+#: ../lib/gnome-scan-dialog.c:1338
+msgid "Acquiring Preview"
+msgstr "Obtendo visualização"
+
+#: ../lib/gnome-scan-dialog.c:1343
+msgid "The software preview acquisition and processing."
+msgstr ""
+
+#: ../lib/gnome-scan-dialog.c:1353
+msgid "Inactive"
+msgstr "Inativo"
+
+#: ../lib/gnome-scan-init.c:41
+msgid "_Scan"
+msgstr "_Digitalizar"
+
+#: ../lib/gnome-scan-job.c:319
+msgid "Configuring"
+msgstr "Configurando"
+
+#: ../lib/gnome-scan-job.c:354
+msgid "Job completed"
+msgstr "Tarefa completada"
+
+#: ../lib/gnome-scan-job.c:372
+msgid "Acquiring from scanner"
+msgstr "Digitalizando do scanner"
+
+#: ../lib/gnome-scan-job.c:390
+msgid "Outputing page"
+msgstr ""
+
+#: ../lib/gnome-scanner.c:271
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: ../lib/gnome-scanner.c:272
+msgid "Ready"
+msgstr "Pronto"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Busy"
+msgstr "Ocupado"
+
+#: ../lib/gnome-scan-paper-size-widget.c:74
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#: ../lib/gnome-scan-paper-size-widget.c:129
+msgid "Manual"
+msgstr "Manual"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:62
+msgid "Scan options"
+msgstr "Opções de digitalização"
+
+#: ../lib/gnome-scan-param-specs.c:63
+msgid "Format"
+msgstr "Formato"
+
+#: ../lib/gnome-scan-param-specs.c:64
+msgid "Output options"
+msgstr "Opções de saÃda"
+
+#: ../lib/gnome-scan-param-specs.c:65 ../plugins/gsfile-filenames-widget.c:107
+msgid "Preview"
+msgstr "Visualização"
+
+#: ../lib/gnome-scan-param-specs.c:66
+msgid "Hidden"
+msgstr "Oculto"
+
+#: ../lib/gnome-scan-param-widget.c:104
+msgid "px"
+msgstr "px"
+
+#: ../lib/gnome-scan-param-widget.c:107
+msgid "bit"
+msgstr "bit"
+
+#: ../lib/gnome-scan-param-widget.c:110
+msgid "mm"
+msgstr "mm"
+
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "dpi"
+msgstr "dpi"
+
+#: ../lib/gnome-scan-param-widget.c:116
+msgid "%"
+msgstr "%"
+
+#: ../lib/gnome-scan-param-widget.c:119
+msgid "ms"
+msgstr "ms"
+
+#: ../lib/gnome-scan-preview-plugins.c:334
+msgid "Select _All"
+msgstr "Selecionar _tudo"
+
+#: ../plugins/gsane-meta-param.c:262
+msgid "Scan Area"
+msgstr "�rea de digitalização"
+
+#: ../plugins/gsane-meta-param.c:263
+msgid "Region of the scan window actually acquired"
+msgstr "Região da janela do scanner realmente digitalizada"
+
+#. PAPER SIZE
+#: ../plugins/gsane-meta-param.c:278
+msgid "Paper Size"
+msgstr "Tamanho do papel"
+
+#: ../plugins/gsane-meta-param.c:279
+msgid "Document paper size."
+msgstr "Tamanho do papel do documento."
+
+#. ORIENTATION
+#: ../plugins/gsane-meta-param.c:291
+msgid "Page Orientation"
+msgstr "Orientação da página"
+
+#: ../plugins/gsane-meta-param.c:291
+msgid "Page orientation"
+msgstr "Orientação da página"
+
+#. SANE 2 well known source option value
+#: ../plugins/gsane-meta-param.c:403
+msgid "Flatbed"
+msgstr ""
+
+#: ../plugins/gsane-meta-param.c:404
+msgid "Automatic Document Feeder"
+msgstr "Alimentadora automática de documentos"
+
+#: ../plugins/gsane-meta-param.c:405
+msgid "Transparency Adapter"
+msgstr "Adptador de transparência"
+
+#: ../plugins/gsfile-filenames-widget.c:114
+msgid "Filename"
+msgstr "Nome do arquivo"
+
+#: ../plugins/gsfile-filenames-widget.c:172
+msgid "Select files"
+msgstr "Selecionar arquivos"
+
+#: ../plugins/gsfile-filenames-widget.c:185
+msgid "Supported formats"
+msgstr "Formatos suportados"
+
+#: ../plugins/gsfile-scanner.c:73 ../src/flegita-sink.c:79
+msgid "PNG picture"
+msgstr "Imagem PNG"
+
+#: ../plugins/gsfile-scanner.c:91
+msgid "JPEG picture"
+msgstr "Imagem JPEG"
+
+#: ../plugins/gsfile-scanner.c:96 ../plugins/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Arquivos"
+
+#: ../plugins/gsfile-scanner.c:97
+msgid "Files to import."
+msgstr "Arquivos para importar."
+
+#: ../plugins/gsfile-scanner.c:136
+#, c-format
+msgid "Files (%i)"
+msgstr "Arquivos (%i)"
+
+#: ../plugins/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Importar de arquivos."
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:79
+msgid "Select directory"
+msgstr "Selecionar diretório"
+
+#: ../src/flegita-output-filename-widget.c:89
+msgid "Scanned image"
+msgstr "Imagem digitalizada"
+
+#: ../src/flegita-sink.c:56
+msgid "PNG Options"
+msgstr "Opções de PNG"
+
+#: ../src/flegita-sink.c:84
+msgid "File"
+msgstr "Arquivo"
+
+#: ../src/flegita-sink.c:85
+msgid "Output filename"
+msgstr "Nome do arquivo de saida"
+
+#: ../src/flegita-sink.c:105
+msgid "PNG Compression Level"
+msgstr "NÃvel de compressão de PNG"
+
+#: ../src/flegita-sink.c:143
+msgid "Write scanned image to file"
+msgstr "Gravar a imagem digitalizada em arquivo"
diff --git a/trunk/po/ru.po b/trunk/po/ru.po
new file mode 100644
index 0000000..bb9ca5e
--- /dev/null
+++ b/trunk/po/ru.po
@@ -0,0 +1,379 @@
+# Translation of gnome-scan to Russian
+# Copyright (C) 2007 Free Software Foundation
+# This file is distributed under the same license as the gnome-scan package.
+# Alexandre Prokoudine <alexandre prokoudine gmail com>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan trunk\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-09-22 17:39+0200\n"
+"PO-Revision-Date: 2007-09-23 17:11+0300\n"
+"Last-Translator: Alexandre Prokoudine <alexandre prokoudine gmail com>\n"
+"Language-Team: Russian <gnome-cyr lists gnome org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:89
+#: ../lib/gnome-scan-acquisition-dialog.c:119
+msgid "Acquisition"
+msgstr "Ð?аÑ?ваÑ?"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:124
+msgid "The software now acquires and processes images according to the settings."
+msgstr "Ð?Ñ?огÑ?амма пÑ?Ñ?аеÑ?Ñ?Ñ? заÑ?ваÑ?иÑ?Ñ? и обÑ?абоÑ?аÑ?Ñ? изобÑ?ажениÑ? Ñ?оглаÑ?но Ñ?казаннÑ?м паÑ?амеÑ?Ñ?ам."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:139
+#: ../lib/gnome-scan-job.c:367
+msgid "Waiting for device"
+msgstr "Ð?жидание Ñ?Ñ?Ñ?Ñ?ойÑ?Ñ?ва"
+
+#: ../lib/gnome-scan-dialog.c:221
+msgid "Scan"
+msgstr "СканиÑ?ование"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:270
+msgid "_General"
+msgstr "_Ð?бÑ?ие"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:278
+msgid "Pre_view"
+msgstr "Ð?Ñ?&едпÑ?оÑ?моÑ?Ñ?"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:287
+msgid "_Advanced"
+msgstr "_РаÑ?Ñ?иÑ?еннÑ?е"
+
+#. Processing
+#. label = gtk_label_new_with_mnemonic (_("P_rocessing"));
+#. priv->processing_box = gtk_vbox_new (FALSE, 6);
+#.
+#. scrolled = gtk_scrolled_window_new (NULL, NULL);
+#. gtk_container_set_border_width (GTK_CONTAINER (scrolled), 12);
+#. gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+#. GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+#. gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
+#. priv->processing_box);
+#.
+#. gtk_notebook_insert_page (GTK_NOTEBOOK (priv->notebook),
+#. scrolled, label,
+#. PAGE_PROCESSING);
+#. Sink
+#: ../lib/gnome-scan-dialog.c:310
+msgid "_Output"
+msgstr "_Ð?Ñ?вод"
+
+#: ../lib/gnome-scan-dialog.c:486
+msgid "Unable to detect scanners !"
+msgstr "Ð?е Ñ?далоÑ?Ñ? обнаÑ?Ñ?жиÑ?Ñ? Ñ?канеÑ?Ñ?!"
+
+#: ../lib/gnome-scan-dialog.c:487
+msgid "No drivers has been found."
+msgstr "Ð?и один дÑ?айвеÑ? не найден."
+
+#: ../lib/gnome-scan-dialog.c:493
+#: ../lib/gnome-scan-dialog.c:871
+msgid "No device found !"
+msgstr "УÑ?Ñ?Ñ?ойÑ?Ñ?во не найдено!"
+
+#: ../lib/gnome-scan-dialog.c:494
+msgid "Ensure your device is plugged, powered, supported and configured. The dialog will run until you plug a scanner or cancel."
+msgstr "УбедиÑ?еÑ?Ñ?, Ñ?Ñ?о Ñ?Ñ?Ñ?Ñ?ойÑ?Ñ?во подклÑ?Ñ?ено к компÑ?Ñ?Ñ?еÑ?Ñ?, вклÑ?Ñ?ено в Ñ?еÑ?Ñ?, поддеÑ?живаеÑ?Ñ?Ñ? Ñ?иÑ?Ñ?емой и наÑ?Ñ?Ñ?оено в ней. Ð?иалог бÑ?деÑ? оÑ?кÑ?Ñ?Ñ? до Ñ?еÑ? поÑ?, пока вÑ? не подклÑ?Ñ?иÑ?е Ñ?канеÑ? или не оÑ?мениÑ?е вÑ?полнение задаÑ?и."
+
+#: ../lib/gnome-scan-dialog.c:633
+#, c-format
+msgid "%s:"
+msgstr "%s:"
+
+#: ../lib/gnome-scan-dialog.c:872
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr "УбедиÑ?еÑ?Ñ?, Ñ?Ñ?о Ñ?Ñ?Ñ?Ñ?ойÑ?Ñ?во подклÑ?Ñ?ено к компÑ?Ñ?Ñ?еÑ?Ñ?, вклÑ?Ñ?ено в Ñ?еÑ?Ñ?, поддеÑ?живаеÑ?Ñ?Ñ? Ñ?иÑ?Ñ?емой и наÑ?Ñ?Ñ?оено в ней."
+
+#: ../lib/gnome-scan-dialog.c:905
+msgid "Scanner"
+msgstr "СканеÑ?"
+
+#: ../lib/gnome-scan-dialog.c:912
+msgid "Status"
+msgstr "СÑ?аÑ?Ñ?Ñ?"
+
+#: ../lib/gnome-scan-dialog.c:1315
+msgid "Acquiring Preview"
+msgstr "Ð?Ñ?оÑ?моÑ?Ñ? заÑ?ваÑ?а"
+
+#: ../lib/gnome-scan-dialog.c:1320
+msgid "The software preview acquisition and processing."
+msgstr "Ð?Ñ?едпÑ?оÑ?моÑ?Ñ? заÑ?ваÑ?а и обÑ?абоÑ?ка."
+
+#: ../lib/gnome-scan-dialog.c:1330
+msgid "Inactive"
+msgstr "Ð?е акÑ?ивен"
+
+#: ../lib/gnome-scan-init.c:41
+msgid "_Scan"
+msgstr "_СканиÑ?оваÑ?Ñ?"
+
+#: ../lib/gnome-scan-job.c:319
+msgid "Configuring"
+msgstr "Ð?аÑ?Ñ?Ñ?ойка"
+
+#: ../lib/gnome-scan-job.c:355
+msgid "Job completed"
+msgstr "Ð?адание вÑ?полнено"
+
+#: ../lib/gnome-scan-job.c:373
+msgid "Acquiring from scanner"
+msgstr "Ð?Ñ?полнÑ?еÑ?Ñ?Ñ? заÑ?ваÑ? Ñ?о Ñ?канеÑ?а"
+
+#: ../lib/gnome-scan-job.c:391
+msgid "Outputting page"
+msgstr "Ð?Ñ?водиÑ?Ñ?Ñ? Ñ?Ñ?Ñ?аниÑ?а"
+
+#: ../lib/gnome-scanner.c:271
+msgid "Unknown"
+msgstr "Ð?еизвеÑ?Ñ?но"
+
+#: ../lib/gnome-scanner.c:272
+msgid "Ready"
+msgstr "Ð?оÑ?ов"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Busy"
+msgstr "Ð?анÑ?Ñ?"
+
+#: ../lib/gnome-scan-paper-size-widget.c:71
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f � %.0f мм"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:61
+msgid "Scan options"
+msgstr "Ð?аÑ?амеÑ?Ñ?Ñ? Ñ?каниÑ?ованиÑ?"
+
+#: ../lib/gnome-scan-param-specs.c:62
+msgid "Format"
+msgstr "ФоÑ?маÑ?"
+
+#: ../lib/gnome-scan-param-specs.c:63
+msgid "Output options"
+msgstr "Ð?аÑ?амеÑ?Ñ?Ñ? вÑ?вода"
+
+#: ../lib/gnome-scan-param-specs.c:64
+#: ../modules/gsfile-filenames-widget.c:107
+msgid "Preview"
+msgstr "ÐÑ?киз"
+
+#: ../lib/gnome-scan-param-specs.c:65
+msgid "Hidden"
+msgstr "СкÑ?Ñ?Ñ?о"
+
+#: ../lib/gnome-scan-param-widget.c:104
+msgid "px"
+msgstr "px"
+
+#: ../lib/gnome-scan-param-widget.c:107
+msgid "bit"
+msgstr "биÑ?"
+
+#: ../lib/gnome-scan-param-widget.c:110
+msgid "mm"
+msgstr "мм"
+
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "dpi"
+msgstr "dpi"
+
+#: ../lib/gnome-scan-param-widget.c:116
+msgid "%"
+msgstr "%"
+
+#: ../lib/gnome-scan-param-widget.c:119
+msgid "ms"
+msgstr "мÑ?"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:459
+#: ../modules/gsane-meta-param.c:289
+msgid "Manual"
+msgstr "Ð?Ñ?Ñ?Ñ?нÑ?Ñ?"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:565
+msgid "Select _All"
+msgstr "Ð?Ñ?бÑ?аÑ?Ñ? _вÑ?е"
+
+#: ../modules/gsane-meta-param.c:295
+msgid "Maximal"
+msgstr "Ð?акÑ?ималÑ?ное"
+
+#: ../modules/gsane-meta-param.c:304
+msgid "Paper Size"
+msgstr "РазмеÑ? бÑ?маги"
+
+#: ../modules/gsane-meta-param.c:305
+msgid "Document paper size."
+msgstr "ФоÑ?маÑ? бÑ?маги докÑ?менÑ?а"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin"
+msgstr "Ð?Ñ?игинал"
+
+#: ../modules/gsane-meta-param.c:317
+msgid "Origin of scan window"
+msgstr "Ð?Ñ?игинал окна Ñ? паÑ?амеÑ?Ñ?ами Ñ?каниÑ?ованиÑ?"
+
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:327
+msgid "Page Orientation"
+msgstr "Ð?Ñ?иенÑ?аÑ?иÑ? Ñ?Ñ?Ñ?аниÑ?Ñ?"
+
+#: ../modules/gsane-meta-param.c:327
+msgid "Page orientation"
+msgstr "Ð?Ñ?иенÑ?аÑ?иÑ? Ñ?Ñ?Ñ?аниÑ?Ñ?"
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:473
+msgid "Flatbed"
+msgstr "Ð?ланÑ?еÑ?нÑ?й Ñ?канеÑ?"
+
+#: ../modules/gsane-meta-param.c:474
+msgid "Automatic Document Feeder"
+msgstr "Ð?вÑ?омаÑ?иÑ?еÑ?каÑ? подаÑ?а докÑ?менÑ?а"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:476
+msgid "Transparency Adapter"
+msgstr "Ð?дапÑ?еÑ? длÑ? пленки и Ñ?лайдов"
+
+#: ../modules/gsfile-filenames-widget.c:114
+msgid "Filename"
+msgstr "Ð?мÑ? Ñ?айла"
+
+#: ../modules/gsfile-filenames-widget.c:172
+msgid "Select files"
+msgstr "Ð?Ñ?беÑ?иÑ?е Ñ?айлÑ?"
+
+#: ../modules/gsfile-filenames-widget.c:185
+msgid "Supported formats"
+msgstr "Ð?оддеÑ?живаемÑ?е Ñ?оÑ?маÑ?Ñ?"
+
+#: ../modules/gsfile-scanner.c:73
+#: ../src/flegita-sink.c:115
+msgid "PNG picture"
+msgstr "Ð?зобÑ?ажение PNG"
+
+#: ../modules/gsfile-scanner.c:91
+msgid "JPEG picture"
+msgstr "Ð?зобÑ?ажение JPEG"
+
+#: ../modules/gsfile-scanner.c:96
+#: ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "ФайлÑ?"
+
+#: ../modules/gsfile-scanner.c:97
+msgid "Files to import."
+msgstr "Ð?мпоÑ?Ñ?иÑ?Ñ?емÑ?е Ñ?айлÑ?."
+
+#: ../modules/gsfile-scanner.c:136
+#, c-format
+msgid "Files (%i)"
+msgstr "ФайлÑ? (%i)"
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Ð?мпоÑ?Ñ? из Ñ?айлов."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:143
+msgid "Configure printing"
+msgstr "Ð?аÑ?Ñ?Ñ?ойка пеÑ?аÑ?и"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Ð?Ñ?Ñ?каниÑ?оваÑ?Ñ? новое изобÑ?ажение."
+
+#: ../src/flegita-gimp.c:90
+#: ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "СпÑ?авка"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "СканиÑ?оваÑ?Ñ?..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Ð?Ñ?Ñ?каниÑ?оваÑ?Ñ? как новÑ?й Ñ?лой..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Ð?Ñ?Ñ?каниÑ?оваÑ?Ñ? как Ñ?лой..."
+
+#: ../src/flegita-gimp-sink.c:70
+msgid "Layer"
+msgstr "Слой"
+
+#: ../src/flegita-gimp-sink.c:71
+msgid "New layer name"
+msgstr "Ð?мÑ? нового Ñ?лоÑ?"
+
+#: ../src/flegita-gimp-sink.c:73
+#: ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Ð?Ñ?Ñ?каниÑ?ованное изобÑ?ажение"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Ð?Ñ?беÑ?иÑ?е каÑ?алог"
+
+#: ../src/flegita-sink.c:80
+msgid "PNG Options"
+msgstr "Ð?аÑ?амеÑ?Ñ?Ñ? PNG"
+
+#: ../src/flegita-sink.c:103
+msgid "Action"
+msgstr "Ð?ейÑ?Ñ?вие"
+
+#: ../src/flegita-sink.c:104
+msgid "Action over the scan output"
+msgstr "Ð?ейÑ?Ñ?вие Ñ? вÑ?водом из Ñ?канеÑ?а"
+
+#: ../src/flegita-sink.c:121
+msgid "File"
+msgstr "Файл"
+
+#: ../src/flegita-sink.c:122
+msgid "Output filename"
+msgstr "Ð?мÑ? вÑ?водимого Ñ?айла"
+
+#: ../src/flegita-sink.c:144
+msgid "PNG Compression Level"
+msgstr "УÑ?овенÑ? Ñ?жаÑ?иÑ? PNG"
+
+#: ../src/flegita-sink.c:184
+msgid "Various common action on scan output not related to specific software"
+msgstr "РазлиÑ?нÑ?е Ñ?иповÑ?е дейÑ?Ñ?виÑ? Ñ? вÑ?водом Ñ?канеÑ?а, не Ñ?вÑ?заннÑ?е Ñ? Ñ?ем или инÑ?м пÑ?огÑ?аммнÑ?м обеÑ?пеÑ?ением"
+
+#: ../src/flegita-sink.c:304
+msgid "Custom"
+msgstr "Ð?Ñ?Ñ?гой"
+
+#: ../src/flegita-sink.c:335
+msgid "Scan to printer"
+msgstr "СканиÑ?оваÑ?Ñ? в пÑ?инÑ?еÑ?"
+
+#: ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Ð?Ñ?огÑ?амма длÑ? Ñ?каниÑ?ованиÑ?"
+
+#: ../flegita.desktop.in.h:2
+msgid "Simply scan image"
+msgstr "Ð?Ñ?оÑ?Ñ?ое Ñ?каниÑ?ование изобÑ?ажений"
+
diff --git a/trunk/po/sv.po b/trunk/po/sv.po
new file mode 100644
index 0000000..095c385
--- /dev/null
+++ b/trunk/po/sv.po
@@ -0,0 +1,439 @@
+# Swedish translation for gnome-scan.
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the gnome-scan package.
+# Daniel Nylander <po danielnylander se>, 2007, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnome-scan\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-03-02 00:10+0100\n"
+"PO-Revision-Date: 2008-03-02 00:10+0100\n"
+"Last-Translator: Daniel Nylander <po danielnylander se>\n"
+"Language-Team: Swedish <tp-sv listor tp-sv se>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../lib/gnome-scan-acquisition-dialog.c:92
+#: ../lib/gnome-scan-acquisition-dialog.c:122
+msgid "Acquisition"
+msgstr "Inhämtning"
+
+#. secondary text
+#: ../lib/gnome-scan-acquisition-dialog.c:127
+msgid "The software now acquires and processes images according to the settings."
+msgstr "Programvaran kommer nu att hämta in och behandla bilderna enligt inställningarna."
+
+#: ../lib/gnome-scan-acquisition-dialog.c:142
+#: ../lib/gnome-scan-job.c:498
+msgid "Waiting for device"
+msgstr "Väntar på enhet"
+
+#. General
+#: ../lib/gnome-scan-dialog.c:267
+msgid "_General"
+msgstr "_Allmänt"
+
+#. Preview
+#: ../lib/gnome-scan-dialog.c:275
+msgid "Pre_view"
+msgstr "Förhands_granska"
+
+#. Advanced
+#: ../lib/gnome-scan-dialog.c:284
+msgid "_Advanced"
+msgstr "_Avancerat"
+
+#. Processing
+#: ../lib/gnome-scan-dialog.c:292
+msgid "P_rocessing"
+msgstr "Beha_ndling"
+
+#. Sink
+#: ../lib/gnome-scan-dialog.c:301
+msgid "_Output"
+msgstr "_Utmatning"
+
+#. translator: this is the dialog title
+#: ../lib/gnome-scan-dialog.c:477
+msgid "Scan"
+msgstr "Läs in"
+
+#: ../lib/gnome-scan-dialog.c:515
+msgid "Unable to detect scanners!"
+msgstr "Kunde inte identifiera några bildläsare!"
+
+#: ../lib/gnome-scan-dialog.c:516
+msgid "No drivers has been found."
+msgstr "Inga drivrutiner hittades."
+
+#: ../lib/gnome-scan-dialog.c:522
+msgid "No device found!"
+msgstr "Ingen enhet hittades!"
+
+#: ../lib/gnome-scan-dialog.c:523
+msgid "Ensure your device is plugged, powered, supported and configured. The dialog will run until you plug a scanner or cancel."
+msgstr "Försäkra dig om att din enhet är ansluten, påslagen, stöds och är konfigurerad. Dialogrutan kommer att vara kvar tills du ansluter en bildläsare eller avbryter."
+
+#: ../lib/gnome-scan-dialog.c:891
+msgid "No device found !"
+msgstr "Ingen enhet hittades!"
+
+#: ../lib/gnome-scan-dialog.c:892
+msgid "Ensure your device is plugged, powered, supported and configured."
+msgstr "Försäkra dig om att din enhet är ansluten, påslagen, stöds och konfigurerad."
+
+#: ../lib/gnome-scan-dialog.c:932
+msgid "Scanner"
+msgstr "Bildläsare"
+
+#: ../lib/gnome-scan-dialog.c:939
+msgid "Status"
+msgstr "Status"
+
+#: ../lib/gnome-scan-dialog.c:1378
+msgid "Acquiring Preview"
+msgstr "Hämtar in förhandsvisning"
+
+#: ../lib/gnome-scan-dialog.c:1383
+msgid "The software preview acquisition and processing."
+msgstr "Programvaran förhandsvisar inhämtning och behandling."
+
+#. translator: initial state before preview begin.
+#: ../lib/gnome-scan-dialog.c:1394
+msgid "Inactive"
+msgstr "Inaktiv"
+
+#: ../lib/gnome-scan-init.c:42
+msgid "_Scan"
+msgstr "_Läs in"
+
+#: ../lib/gnome-scan-job.c:380
+msgid "Configuring"
+msgstr "Konfigurerar"
+
+#: ../lib/gnome-scan-job.c:479
+msgid "Job completed"
+msgstr "Jobbet är färdigt"
+
+#: ../lib/gnome-scan-job.c:511
+msgid "Acquiring from scanner"
+msgstr "Hämtar från bildläsare"
+
+#: ../lib/gnome-scan-job.c:525
+msgid "Processing page"
+msgstr "Behandlar sida"
+
+#: ../lib/gnome-scan-job.c:538
+msgid "Outputting page"
+msgstr "Matar ut sida"
+
+#: ../lib/gnome-scanner.c:273
+msgid "Unknown"
+msgstr "Okänd"
+
+#: ../lib/gnome-scanner.c:274
+msgid "Ready"
+msgstr "Redo"
+
+#: ../lib/gnome-scanner.c:275
+msgid "Busy"
+msgstr "Upptagen"
+
+#. translators: this is the paper size width and height expressed in
+#. millimeters, shown just below the selector.
+#: ../lib/gnome-scan-paper-size-widget.c:73
+#, c-format
+msgid "%.0f x %.0f mm"
+msgstr "%.0f x %.0f mm"
+
+#. groups
+#: ../lib/gnome-scan-param-specs.c:68
+msgid "Scan options"
+msgstr "Alternativ för inläsning"
+
+#: ../lib/gnome-scan-param-specs.c:69
+msgid "Format"
+msgstr "Format"
+
+#: ../lib/gnome-scan-param-specs.c:70
+msgid "Output options"
+msgstr "Alternativ för utdata"
+
+#: ../lib/gnome-scan-param-specs.c:71
+#: ../modules/gsfile-filenames-widget.c:115
+msgid "Preview"
+msgstr "Förhandsgranska"
+
+#: ../lib/gnome-scan-param-specs.c:72
+msgid "Hidden"
+msgstr "Dold"
+
+#. translator: unit pixel
+#: ../lib/gnome-scan-param-widget.c:105
+msgid "px"
+msgstr "bp"
+
+#. translator: unit bit
+#: ../lib/gnome-scan-param-widget.c:109
+msgid "bit"
+msgstr "bitar"
+
+#. translator: unit millimeter
+#: ../lib/gnome-scan-param-widget.c:113
+msgid "mm"
+msgstr "mm"
+
+#. translator: unit dot per inch
+#: ../lib/gnome-scan-param-widget.c:117
+msgid "dpi"
+msgstr "dpi"
+
+#. translator: unit percent
+#: ../lib/gnome-scan-param-widget.c:121
+msgid "%"
+msgstr "%"
+
+#. translator: unit microsecond
+#: ../lib/gnome-scan-param-widget.c:125
+msgid "ms"
+msgstr "ms"
+
+#. translator: Manual is the name of user defined paper size.
+#: ../lib/gnome-scan-preview-plugin-area.c:487
+#: ../modules/gsane-meta-param.c:332
+msgid "Manual"
+msgstr "Manuell"
+
+#: ../lib/gnome-scan-preview-plugin-area.c:619
+msgid "Select _All"
+msgstr "Markera _allt"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:65
+msgid "Rotate left"
+msgstr "Rotera åt vänster"
+
+#: ../lib/gnome-scan-preview-plugin-rotation.c:74
+msgid "Rotate right"
+msgstr "Rotera åt höger"
+
+#: ../lib/gnome-scan-processor-common.c:44
+msgid "Common Processing"
+msgstr "Vanlig behandling"
+
+#: ../lib/gnome-scan-processor-common.c:63
+msgid "Rotation"
+msgstr "Rotation"
+
+#: ../lib/gnome-scan-processor-common.c:70
+msgid "Automatic color enhancement"
+msgstr "Automatisk färgförbättring"
+
+#: ../lib/gnome-scan-processor-common.c:71
+msgid "Color enhancement produces better photos, but takes more time to process and can be useless for text."
+msgstr "Färgförbättringar ger bättre foton men tar längre tid att behandla och kan vara onödigt för text."
+
+#. note: decomposing area in three options orientation, origin and paper-size
+#. except these optoin to appear in this order.
+#. ORIENTATION
+#: ../modules/gsane-meta-param.c:272
+msgid "Page Orientation"
+msgstr "Sidorientering"
+
+#: ../modules/gsane-meta-param.c:272
+msgid "Page orientation"
+msgstr "Sidorientering"
+
+#. ORIG
+#: ../modules/gsane-meta-param.c:282
+msgid "Origin"
+msgstr "Ursprung"
+
+#: ../modules/gsane-meta-param.c:282
+msgid "Origin of scan window"
+msgstr "Ursprung för inläsningsfönstret"
+
+#: ../modules/gsane-meta-param.c:337
+msgid "Maximal"
+msgstr "Maximal"
+
+#: ../modules/gsane-meta-param.c:346
+msgid "Paper Size"
+msgstr "Pappersstorlek"
+
+#: ../modules/gsane-meta-param.c:347
+msgid "Document paper size."
+msgstr "Dokumentets pappersstorlek."
+
+#. SANE 2 well known source option value
+#: ../modules/gsane-meta-param.c:538
+msgid "Flatbed"
+msgstr "Flatbädd"
+
+#: ../modules/gsane-meta-param.c:539
+msgid "Automatic Document Feeder"
+msgstr "Automatisk dokumentmatare"
+
+#. device source option allowing to scan film and transparency
+#: ../modules/gsane-meta-param.c:541
+msgid "Transparency Adapter"
+msgstr "Transparensadapter"
+
+#: ../modules/gsfile-filenames-widget.c:122
+msgid "Filename"
+msgstr "Filnamn"
+
+#: ../modules/gsfile-filenames-widget.c:180
+msgid "Select files"
+msgstr "Välj filer"
+
+#: ../modules/gsfile-filenames-widget.c:193
+msgid "Supported formats"
+msgstr "Format som stöds"
+
+#: ../modules/gsfile-scanner.c:71
+#: ../src/flegita-sink.c:105
+msgid "PNG picture"
+msgstr "PNG-bild"
+
+#: ../modules/gsfile-scanner.c:89
+msgid "JPEG picture"
+msgstr "JPEG-bild"
+
+#. translator: this is the name of the file
+#. loader backend which allow user to scan
+#. a list a images
+#: ../modules/gsfile-scanner.c:94
+#: ../modules/gsfile-scanner.c:136
+msgid "Files"
+msgstr "Filer"
+
+#: ../modules/gsfile-scanner.c:95
+msgid "Files to import."
+msgstr "Filer att importera."
+
+#: ../modules/gsfile-scanner.c:137
+msgid "Import from files."
+msgstr "Importera från filer."
+
+#. GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw));
+#: ../src/flegita-action-selector.c:148
+msgid "Configure printing"
+msgstr "Konfigurera utskrift"
+
+#: ../src/flegita.c:52
+#: ../flegita.desktop.in.h:2
+msgid "Simply scan images"
+msgstr "Enkel bildinläsning"
+
+#. Translators: Add your names here with one name per
+#. line, like
+#. "John Smith <email1 example com>\n
+#. Robert Foo <email2 example com>"
+#: ../src/flegita.c:76
+msgid "translator-credit"
+msgstr ""
+"Daniel Nylander <po danielnylander se>\n"
+"\n"
+"Skicka synpunkter på översättningen till\n"
+"tp-sv listor tp-sv se"
+
+#: ../src/flegita.c:79
+msgid "Gnome Scan website"
+msgstr "Webbplatsen för Gnome Scan"
+
+#: ../src/flegita.c:98
+#: ../flegita.desktop.in.h:1
+msgid "Scanner Utility"
+msgstr "Bildläsarverktyg"
+
+#: ../src/flegita-gimp.c:89
+msgid "Scan a new image."
+msgstr "Läs in en ny bild."
+
+#: ../src/flegita-gimp.c:90
+#: ../src/flegita-gimp.c:105
+msgid "Help"
+msgstr "Hjälp"
+
+#: ../src/flegita-gimp.c:94
+msgid "Scan ..."
+msgstr "Läs in ..."
+
+#: ../src/flegita-gimp.c:104
+msgid "Scan picture as new layer..."
+msgstr "Läs in bild som nytt lager..."
+
+#: ../src/flegita-gimp.c:109
+msgid "Scan as Layer..."
+msgstr "Läs in som lager..."
+
+#: ../src/flegita-gimp-sink.c:77
+msgid "Layer"
+msgstr "Lager"
+
+#: ../src/flegita-gimp-sink.c:78
+msgid "New layer name"
+msgstr "Nytt lagernamn"
+
+#: ../src/flegita-gimp-sink.c:80
+#: ../src/flegita-output-filename-widget.c:88
+msgid "Scanned image"
+msgstr "Inläst bild"
+
+#. directory
+#: ../src/flegita-output-filename-widget.c:77
+msgid "Select directory"
+msgstr "Välj katalog"
+
+#: ../src/flegita-sink.c:81
+msgid "PNG Options"
+msgstr "PNG-alternativ"
+
+#: ../src/flegita-sink.c:111
+msgid "File"
+msgstr "Fil"
+
+#: ../src/flegita-sink.c:112
+msgid "Output filename"
+msgstr "Filnamn för utdata"
+
+#: ../src/flegita-sink.c:134
+msgid "PNG Compression Level"
+msgstr "Komprimeringsnivå för PNG"
+
+#. translator: this explain the PNG compression level
+#: ../src/flegita-sink.c:136
+msgid "Higher level means lower file size, but takes more time to save"
+msgstr "Högre nivå betyder mindre filstorlek men tar längre tid att spara"
+
+#: ../src/flegita-sink.c:178
+msgid "Various common action on scan output not related to specific software"
+msgstr "Olika vanliga åtgärder vid utmatning av inläsning som inte är relaterad till specifik programvara"
+
+#: ../src/flegita-sink.c:303
+msgid "Custom"
+msgstr "Anpassad"
+
+#: ../src/flegita-sink.c:334
+msgid "Scan to printer"
+msgstr "Läs in till skrivare"
+
+#~ msgid "%s:"
+#~ msgstr "%s:"
+#~ msgid "Files (%i)"
+#~ msgstr "Filer (%i)"
+#~ msgid "Action"
+#~ msgstr "�tgärd"
+#~ msgid "Action over the scan output"
+#~ msgstr "�tgärd för inläsningen"
+#~ msgid "Scan Area"
+#~ msgstr "Inläsningsområde"
+#~ msgid "Region of the scan window actually acquired"
+#~ msgstr "Det område av inläsningsfönstret som blir inhämtat"
+#~ msgid "Write scanned image to file"
+#~ msgstr "Skriv inläst bild till fil"
+#~ msgid "Configuring output"
+#~ msgstr "Konfigurerar utdata"
+
diff --git a/trunk/src/Makefile.am b/trunk/src/Makefile.am
new file mode 100644
index 0000000..d8d47f0
--- /dev/null
+++ b/trunk/src/Makefile.am
@@ -0,0 +1,88 @@
+INCLUDES = \
+ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+ $(GNOME_SCAN_CFLAGS) $(FLEGITA_CFLAGS) \
+ -I$(top_srcdir)/lib
+
+AM_CFLAGS = -Wall -g
+
+# FLEGITA
+
+bin_PROGRAMS = \
+ flegita
+
+BUILT_HEADER = \
+ $(srcdir)/flegita-types.h
+
+BUILT_SOURCE = \
+ $(srcdir)/flegita-types.c
+
+types_deps = \
+ flegita.h \
+ $(NULL)
+
+flegita-types.%: $(types_deps) Makefile flegita-types.%.tpl
+ test ! -e $@ && touch $@ || exit 0;
+ test -w $@ && glib-mkenums --template $(srcdir)/$ tpl $(types_deps) > $@ || exit 0
+
+
+flegita_SOURCES = \
+ $(BUILT_SOURCE) \
+ $(BUILT_HEADER) \
+ flegita.c \
+ flegita.h \
+ flegita-sink.h \
+ flegita-sink.c \
+ flegita-pspec.h \
+ flegita-pspec.c \
+ flegita-output-filename-widget.h \
+ flegita-output-filename-widget.c \
+ flegita-action-selector.h \
+ flegita-action-selector.c
+
+flegita_LDFLAGS = \
+ $(GNOME_SCAN_LIBS) $(FLEGITA_LIBS) \
+ -L$(top_builddir)/lib -l SONAME@
+
+
+# FLEGITA-GIMP
+
+libgimpdir = $(GIMP_LIBDIR)/plug-ins
+libgimp_PROGRAMS = \
+ flegita-gimp
+
+flegita_gimp_SOURCES = \
+ flegita-gimp.c\
+ flegita-gimp-sink.h \
+ flegita-gimp-sink.c
+
+flegita_gimp_CFLAGS = \
+ -DPLUGIN_NAME=\""flegita-gimp"\" \
+ -DACTION_ICON_DIR=\""@ICON_DIR@/hicolor/scalable/actions"\" \
+ -DDATADIR=\""$(datadir)"\" \
+ $(FLEGITA_GIMP_CFLAGS)
+
+flegita_gimp_LDFLAGS = \
+ $(GNOME_SCAN_LIBS) \
+ $(FLEGITA_LIBS) \
+ $(FLEGITA_GIMP_LIBS) \
+ -L$(top_builddir)/lib -l SONAME@
+
+
+
+quick: $(libgimp_PROGRAMS)
+ mkdir -p ~/.gimp-2.3/plug-ins/.libs/
+ cp -r $(bin_PROGRAMS) ~/.gimp-2.2/plug-ins/
+ cp -r .libs/* ~/.gimp-2.3/plug-ins/.libs/
+
+
+EXTRA_DIST = \
+ flegita-types.h.tpl \
+ flegita-types.c.tpl
+
+
+
+
+
+
diff --git a/trunk/src/flegita-action-selector.c b/trunk/src/flegita-action-selector.c
new file mode 100644
index 0000000..7605090
--- /dev/null
+++ b/trunk/src/flegita-action-selector.c
@@ -0,0 +1,220 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:
+ * @short_description: #FlegitaActionSelector class
+ *
+ **/
+#include <string.h>
+#include <glib/gi18n.h>
+#include <gtk/gtkprintunixdialog.h>
+#include "flegita-action-selector.h"
+#include "flegita.h"
+#include "flegita-types.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FLEGITA_TYPE_ACTION_SELECTOR, FlegitaActionSelectorPrivate))
+
+typedef struct _FlegitaActionSelectorPrivate FlegitaActionSelectorPrivate;
+struct _FlegitaActionSelectorPrivate
+{
+ GtkListStore *store;
+ GtkWidget *combo;
+#ifdef PRINT
+ GtkWidget *print_setup;
+ GtkWidget *print_unix_dialog;
+#endif
+};
+
+enum {
+ COLUMN_ICON,
+ COLUMN_LABEL,
+ COLUMN_ACTION,
+ N_COLUMN
+};
+
+GS_DEFINE_PARAM_WIDGET (FlegitaActionSelector, flegita_action_selector)
+
+static void fas_changed (GtkComboBox *combo, FlegitaActionSelector *fas);
+#ifdef PRINT
+static void fas_print_setup_clicked (GtkButton *button, FlegitaActionSelector *fas);
+#endif
+
+static void
+flegita_action_selector_init (FlegitaActionSelector *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+flegita_action_selector_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (flegita_action_selector_parent_class)->finalize (object);
+}
+
+static void
+flegita_action_selector_build (GnomeScanParamWidget *gspw)
+{
+ FlegitaActionSelectorPrivate *priv = GET_PRIVATE (gspw);
+ GtkCellRenderer *renderer;
+ GEnumClass *klass = g_type_class_ref (FLEGITA_TYPE_ACTION);
+ GtkTreeIter iter;
+ GtkStockItem item;
+ guint i;
+ gchar *stock_id;
+ gchar *label, *end;
+
+ gspw->shows_unit = TRUE;
+
+ priv->store = gtk_list_store_new (N_COLUMN,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ FLEGITA_TYPE_ACTION);
+
+ priv->combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (priv->store));
+ gtk_box_pack_start (GTK_BOX (gspw), priv->combo, FALSE, TRUE, 0);
+
+ /* icon */
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->combo), renderer, FALSE);
+ g_object_set (renderer,
+ "stock-size", GTK_ICON_SIZE_BUTTON,
+ NULL);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->combo), renderer,
+ "stock-id", COLUMN_ICON);
+
+ /* label */
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->combo), renderer, TRUE);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (priv->combo), renderer,
+ "text", COLUMN_LABEL);
+
+ g_debug (G_STRLOC ": %i actions", klass->n_values);
+ for (i = 0; i < klass->n_values; i++) {
+ stock_id = g_strdup(klass->values[i].value_nick);
+
+ if (gtk_stock_lookup (stock_id, &item)) {
+ /* strip _ */
+ label = g_strdup(dgettext (item.translation_domain, item.label));
+ end = g_utf8_strchr (label, -1, '_');
+ memcpy(end, end+1, strlen(end));
+ }
+ else {
+ label = stock_id;
+ }
+
+ gtk_list_store_append (priv->store, &iter);
+ gtk_list_store_set (priv->store, &iter,
+ COLUMN_ICON, stock_id,
+ COLUMN_LABEL, label,
+ COLUMN_ACTION, i,
+ -1);
+ }
+
+ g_signal_connect (priv->combo, "changed",
+ G_CALLBACK (fas_changed),
+ FLEGITA_ACTION_SELECTOR (gspw));
+
+#ifdef PRINT
+ priv->print_setup = gtk_button_new_from_stock (GTK_STOCK_PROPERTIES);
+ gtk_box_pack_start (GTK_BOX (gspw), priv->print_setup, FALSE, TRUE, 0);
+ g_signal_connect (priv->print_setup, "clicked",
+ G_CALLBACK (fas_print_setup_clicked),
+ FLEGITA_ACTION_SELECTOR (gspw));
+/* GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gspw)); */
+ priv->print_unix_dialog = gtk_print_unix_dialog_new(_("Configure printing"),
+ NULL/* GTK_WINDOW (toplevel) */);
+ GtkDialog *dialog = GTK_DIALOG (priv->print_unix_dialog);
+ gtk_container_foreach (GTK_CONTAINER (dialog->action_area),
+ (GtkCallback) gtk_widget_destroy,
+ NULL);
+ gtk_dialog_add_buttons (GTK_DIALOG (priv->print_unix_dialog),
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK, GTK_RESPONSE_OK,
+ NULL);
+#endif
+}
+
+static void
+flegita_action_selector_set (GnomeScanParamWidget *gspw,
+ GValue *value)
+{
+ FlegitaActionSelectorPrivate *priv = GET_PRIVATE (gspw);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (priv->combo),
+ (gint) g_value_get_enum (value));
+}
+
+
+
+static void
+fas_changed (GtkComboBox *combo, FlegitaActionSelector *fas)
+{
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (fas);
+ FlegitaActionSelectorPrivate *priv = GET_PRIVATE (fas);
+ GtkTreeIter iter;
+ FlegitaAction action;
+
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->combo), &iter);
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->store), &iter,
+ COLUMN_ACTION, &action,
+ -1);
+
+#ifdef PRINT
+ switch (action) {
+ case FLEGITA_PRINT:
+ gtk_widget_set_no_show_all (priv->print_setup, FALSE);
+ gtk_widget_show (priv->print_setup);
+ break;
+ default:
+ gtk_widget_set_no_show_all (priv->print_setup, TRUE);
+ gtk_widget_hide (priv->print_setup);
+ break;
+ }
+#endif
+
+ g_value_set_enum (gspw->value, action);
+ gnome_scan_param_widget_changed (gspw);
+}
+
+#ifdef PRINT
+static void
+fas_print_setup_clicked (GtkButton *button, FlegitaActionSelector *fas)
+{
+ FlegitaActionSelectorPrivate *priv = GET_PRIVATE (fas);
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (fas);
+ gint res = gtk_dialog_run (GTK_DIALOG (priv->print_unix_dialog));
+ gtk_widget_hide (priv->print_unix_dialog);
+ GEnumClass *klass = g_type_class_ref (GTK_TYPE_RESPONSE_TYPE);
+ GEnumValue *val = g_enum_get_value (klass, res);
+ g_debug (G_STRLOC ": %s", val->value_nick);
+
+ gnome_scan_settings_set_object (gspw->settings, "printer",
+ gtk_print_unix_dialog_get_selected_printer (GTK_PRINT_UNIX_DIALOG (priv->print_unix_dialog)));
+
+ g_type_class_unref (klass);
+ gnome_scan_param_widget_changed (gspw);
+}
+#endif
diff --git a/trunk/src/flegita-action-selector.h b/trunk/src/flegita-action-selector.h
new file mode 100644
index 0000000..b458cc7
--- /dev/null
+++ b/trunk/src/flegita-action-selector.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _FLEGITA_ACTION_SELECTOR_H_
+#define _FLEGITA_ACTION_SELECTOR_H_
+
+#include <glib-object.h>
+#include <gnome-scan-param-widget.h>
+
+G_BEGIN_DECLS
+
+#define FLEGITA_TYPE_ACTION_SELECTOR (flegita_action_selector_get_type ())
+#define FLEGITA_ACTION_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FLEGITA_TYPE_ACTION_SELECTOR, FlegitaActionSelector))
+#define FLEGITA_ACTION_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FLEGITA_TYPE_ACTION_SELECTOR, FlegitaActionSelectorClass))
+#define FLEGITA_IS_ACTION_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FLEGITA_TYPE_ACTION_SELECTOR))
+#define FLEGITA_IS_ACTION_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FLEGITA_TYPE_ACTION_SELECTOR))
+#define FLEGITA_ACTION_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FLEGITA_TYPE_ACTION_SELECTOR, FlegitaActionSelectorClass))
+
+typedef struct _FlegitaActionSelector FlegitaActionSelector;
+
+/**
+ * FlegitaActionSelector:
+ *
+ *
+ **/
+struct _FlegitaActionSelector
+{
+ /*< private >*/
+ GnomeScanParamWidget parent_instance;
+};
+
+GS_DEFINE_PARAM_WIDGET_HEADER (FlegitaActionSelector, flegita_action_selector);
+
+G_END_DECLS
+
+#endif /* _FLEGITA_ACTION_SELECTOR_H_ */
diff --git a/trunk/src/flegita-gimp-sink.c b/trunk/src/flegita-gimp-sink.c
new file mode 100644
index 0000000..fb7d20a
--- /dev/null
+++ b/trunk/src/flegita-gimp-sink.c
@@ -0,0 +1,285 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION:
+ * @short_description: #FlegitaGimpSink class
+ *
+ **/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <string.h>
+#include <glib/gi18n.h>
+#include <gegl.h>
+#include <libgimp/gimp.h>
+#include "flegita-gimp-sink.h"
+
+
+typedef struct _FlegitaGimpSinkPrivate FlegitaGimpSinkPrivate;
+struct _FlegitaGimpSinkPrivate
+{
+ gint32 layer;
+ gchar *layer_name;
+ GimpDrawable *drawable;
+ const GeglRectangle *extent;
+ GeglRectangle actual_extent;
+ BablFormat *format;
+ GimpPixelRgn rgn;
+ gpointer iter;
+ GeglBuffer *buffer;
+ GeglNode *save;
+};
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FLEGITA_TYPE_GIMP_SINK, FlegitaGimpSinkPrivate))
+
+static void fgs_configure (GnomeScanPlugin *plugin,
+ GnomeScanSettings *settings);
+static GList* fgs_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root);
+static gboolean fgs_start_frame (GnomeScanPlugin *plugin);
+static gboolean fgs_work (GnomeScanPlugin *plugin,
+ gdouble *progress);
+static void fgs_end_frame (GnomeScanPlugin *plugin);
+
+G_DEFINE_TYPE (FlegitaGimpSink, flegita_gimp_sink, GNOME_TYPE_SCAN_SINK);
+
+#define PARAM_LAYER_NAME "layer-name"
+
+static void
+flegita_gimp_sink_init (FlegitaGimpSink *object)
+{
+ /* FlegitaGimpSinkPrivate *priv = GET_PRIVATE (object); */
+ GParamSpec *pspec;
+
+ pspec = gs_param_spec_string (PARAM_LAYER_NAME,
+ N_("Layer"),
+ N_("New layer name"),
+ GS_PARAM_GROUP_SINK_FRONT,
+ _("Scanned image"),
+ G_PARAM_WRITABLE);
+ gs_param_spec_set_domain (pspec, GETTEXT_PACKAGE);
+ gs_param_spec_set_unit (pspec, GS_UNIT_NONE);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (object),
+ pspec);
+}
+
+static void
+flegita_gimp_sink_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (flegita_gimp_sink_parent_class)->finalize (object);
+}
+
+static void
+flegita_gimp_sink_class_init (FlegitaGimpSinkClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ GnomeScanSinkClass* parent_class = GNOME_SCAN_SINK_CLASS (klass);
+ GnomeScanPluginClass *plugin_class = GNOME_SCAN_PLUGIN_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (FlegitaGimpSinkPrivate));
+
+ plugin_class->configure = fgs_configure;
+ plugin_class->get_child_nodes = fgs_get_child_nodes;
+ plugin_class->start_frame = fgs_start_frame;
+ plugin_class->work = fgs_work;
+ plugin_class->end_frame = fgs_end_frame;
+
+ object_class->finalize = flegita_gimp_sink_finalize;
+}
+
+GnomeScanSink*
+flegita_gimp_sink_new (gint32 image_ID,
+ gboolean is_new)
+{
+ GObject *o = g_object_new (FLEGITA_TYPE_GIMP_SINK,
+ NULL);
+ FlegitaGimpSink *s = FLEGITA_GIMP_SINK (o);
+
+ s->image_ID = image_ID;
+ s->is_new = is_new;
+
+ return GNOME_SCAN_SINK (o);
+}
+
+
+/* INTERNALS */
+static void
+fgs_configure (GnomeScanPlugin *plugin, GnomeScanSettings *settings)
+{
+ FlegitaGimpSink *sink = FLEGITA_GIMP_SINK (plugin);
+ FlegitaGimpSinkPrivate *priv = GET_PRIVATE (sink);
+
+ priv->layer_name = gnome_scan_settings_get_string (settings,
+ PARAM_LAYER_NAME);
+ if (sink->is_new) {
+ gdouble res = gnome_scan_settings_get_double (settings, "resolution");
+ gimp_image_set_resolution (sink->image_ID,
+ res, res);
+ }
+}
+
+static GList*
+fgs_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root)
+{
+ FlegitaGimpSinkPrivate *priv = GET_PRIVATE (plugin);
+ GList *list = NULL;
+ priv->save = gegl_node_new_child (root,
+ "operation", "save-buffer",
+ "buffer", &priv->buffer,
+ NULL);
+ list = g_list_append (list, priv->save);
+ return list;
+}
+
+static gboolean
+fgs_start_frame (GnomeScanPlugin *plugin)
+{
+ FlegitaGimpSink *sink = FLEGITA_GIMP_SINK (plugin);
+ FlegitaGimpSinkPrivate *priv = GET_PRIVATE (sink);
+ GimpPixelRgn rgn;
+ BablFormat *format = NULL;
+ gchar*format_name = NULL;
+ gint i;
+
+ if (!gegl_buffer_get_pixel_count (priv->buffer)) {
+ g_warning (G_STRLOC ": No image to process !");
+ return FALSE;
+ }
+
+ priv->extent = gegl_buffer_get_extent (priv->buffer);
+ priv->actual_extent.width = priv->extent->width - priv->extent->x;
+ priv->actual_extent.height = priv->extent->height - priv->extent->y;
+
+ g_debug (G_STRLOC ": rect is %ix%i+%i+%i",
+ priv->extent->width, priv->extent->height,
+ priv->extent->x, priv->extent->y);
+ g_object_get (priv->buffer, "format", &format, NULL);
+
+ guint image_type = 0;
+ switch (format->components) {
+ case 1:
+ image_type = GIMP_GRAY_IMAGE;
+ format_name = "Y";
+ break;
+ case 3:
+ default:
+ image_type = GIMP_RGB_IMAGE;
+ format_name = "RGB";
+ break;
+ }
+
+ gint bps = format->type[0]->bits;
+ for (i = 0; i < format->components; i++) {
+ g_debug (G_STRLOC ": component %i:%s use %i bits",i,
+ format->type[i]->instance.name,
+ format->type[i]->bits);
+ }
+ format_name = g_strdup_printf ("%s u%i", format_name, bps > 8 ? 16 : bps);
+
+ priv->format = (BablFormat*) babl_format (format_name);
+ gdouble opacity = 100.;
+
+ priv->layer = gimp_layer_new (sink->image_ID,
+ priv->layer_name,
+ priv->actual_extent.width, priv->actual_extent.height,
+ image_type,
+ opacity,
+ GIMP_NORMAL_MODE);
+
+ priv->drawable = gimp_drawable_get (priv->layer);
+ gimp_pixel_rgn_init (&priv->rgn, priv->drawable, 0, 0,
+ priv->actual_extent.width, priv->actual_extent.height,
+ TRUE, FALSE);
+
+ if (sink->is_new) {
+ gimp_image_resize (sink->image_ID,
+ MAX (priv->actual_extent.width, gimp_image_width (sink->image_ID)),
+ MAX (priv->actual_extent.height, gimp_image_height (sink->image_ID)),
+ 0, 0);
+
+ }
+
+ priv->iter = gimp_pixel_rgns_register (1, &priv->rgn);
+ return priv->iter != NULL;
+}
+
+static gboolean
+fgs_work (GnomeScanPlugin *plugin, gdouble *progress)
+{
+ FlegitaGimpSinkPrivate *priv = GET_PRIVATE (plugin);
+ GimpPixelRgn *rgn = &priv->rgn;
+
+ gint chunk_size = rgn->w * rgn->h * priv->format->bytes_per_pixel;
+ GeglRectangle rect = {
+ .x = rgn->x + priv->extent->x,
+ .y = rgn->y + priv->extent->y,
+ .width = rgn->w,
+ .height = rgn->h
+ };
+ guchar* chunk = g_new0 (guchar, chunk_size);
+
+ gegl_buffer_get (priv->buffer,
+ 1., &rect,
+ (Babl*) priv->format,
+ chunk,
+ GEGL_AUTO_ROWSTRIDE);
+
+ guchar *dest = rgn->data;
+ memcpy (dest, chunk, chunk_size);
+ g_free (chunk);
+
+ priv->iter = gimp_pixel_rgns_process (priv->iter);
+ return priv->iter != NULL;
+}
+
+static void
+fgs_end_frame (GnomeScanPlugin *plugin)
+{
+ FlegitaGimpSink *sink = FLEGITA_GIMP_SINK (plugin);
+ FlegitaGimpSinkPrivate *priv = GET_PRIVATE (plugin);
+
+ gint32 image = sink->image_ID;
+ gimp_image_add_layer (image,
+ priv->layer,
+ -1);
+
+ gimp_image_undo_freeze (image);
+ /* center */
+ gimp_layer_translate (priv->layer,
+ (gimp_image_width (image) - priv->actual_extent.width) / 2,
+ (gimp_image_height (image) - priv->actual_extent.height) / 2);
+
+ gimp_image_undo_thaw (image);
+
+ gimp_drawable_detach (priv->drawable);
+
+#define destroy(o) g_object_unref(o); o=NULL;
+ destroy (priv->buffer);
+ destroy (priv->save);
+#undef destroy
+}
diff --git a/trunk/src/flegita-gimp-sink.h b/trunk/src/flegita-gimp-sink.h
new file mode 100644
index 0000000..0f2b54d
--- /dev/null
+++ b/trunk/src/flegita-gimp-sink.h
@@ -0,0 +1,69 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _FLEGITA_GIMP_SINK_H_
+#define _FLEGITA_GIMP_SINK_H_
+
+#include <glib-object.h>
+#include <gnome-scan.h>
+
+G_BEGIN_DECLS
+
+#define FLEGITA_TYPE_GIMP_SINK (flegita_gimp_sink_get_type ())
+#define FLEGITA_GIMP_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FLEGITA_TYPE_GIMP_SINK, FlegitaGimpSink))
+#define FLEGITA_GIMP_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FLEGITA_TYPE_GIMP_SINK, FlegitaGimpSinkClass))
+#define FLEGITA_IS_GIMP_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FLEGITA_TYPE_GIMP_SINK))
+#define FLEGITA_IS_GIMP_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FLEGITA_TYPE_GIMP_SINK))
+#define FLEGITA_GIMP_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FLEGITA_TYPE_GIMP_SINK, FlegitaGimpSinkClass))
+
+typedef struct _FlegitaGimpSinkClass FlegitaGimpSinkClass;
+typedef struct _FlegitaGimpSink FlegitaGimpSink;
+
+struct _FlegitaGimpSinkClass
+{
+ GnomeScanSinkClass parent_class;
+};
+
+/**
+ * FlegitaGimpSink:
+ *
+ *
+ **/
+struct _FlegitaGimpSink
+{
+ /*< private >*/
+ GnomeScanSink parent_instance;
+
+ /*< public >*/
+ gint32 image_ID; /* ID of the image where to add new layers */
+ gboolean is_new; /* Wether image image_ID is new (and thus, we should resize it */
+};
+
+GType flegita_gimp_sink_get_type (void) G_GNUC_CONST;
+GnomeScanSink *flegita_gimp_sink_new (gint32 image_ID,
+ gboolean is_new);
+
+G_END_DECLS
+
+#endif /* _FLEGITA_GIMP_SINK_H_ */
diff --git a/trunk/src/flegita-gimp.c b/trunk/src/flegita-gimp.c
new file mode 100644
index 0000000..646dcfa
--- /dev/null
+++ b/trunk/src/flegita-gimp.c
@@ -0,0 +1,191 @@
+/* FlegitaGimp - Gimp Scan Plugin
+ *
+ * main.c
+ *
+ * Copyright © 2006 �tienne Bersac
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <gnome-scan.h>
+#include <libgimp/gimp.h>
+#include <libgimp/gimpui.h>
+#include <glib/gi18n.h>
+#include "flegita-gimp-sink.h"
+
+/* Local function prototypes */
+#define PROCEDURE_SCAN "flegita_scan"
+#define PROCEDURE_SCAN_AS_LAYER "flegita_scan_as_layer"
+
+static void init (void);
+static void quit (void);
+static void query (void);
+
+static void run (const gchar *name,
+ gint nparams,
+ const GimpParam *param,
+ gint *nreturn_vals,
+ GimpParam **return_vals);
+
+
+
+/* Local variables */
+
+GimpPlugInInfo PLUG_IN_INFO = {
+ NULL, /* init_proc */
+ NULL, /* quit_proc */
+ query, /* query_proc */
+ run, /* run_proc */
+};
+
+MAIN ()
+
+static void
+query (void)
+{
+ gchar *help_path;
+ gchar *help_uri;
+
+ static GimpParamDef scan_args[] = {
+ { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
+ };
+
+ static GimpParamDef scan_return[] = {
+ { GIMP_PDB_STATUS, "status", "Return status" },
+ { GIMP_PDB_IMAGE, "image", "New image" },
+ };
+
+ static GimpParamDef scan_as_layer_args[] = {
+ { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
+ { GIMP_PDB_IMAGE, "image", "Input image" },
+ { GIMP_PDB_DRAWABLE, "drawable", "Input drawable" },
+ };
+
+ gimp_plugin_domain_register (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+
+ help_path = g_build_filename (DATADIR, "help", NULL);
+ help_uri = g_filename_to_uri (help_path, NULL, NULL);
+ g_free (help_path);
+
+ gimp_install_procedure (PROCEDURE_SCAN,
+ _("Scan a new image."),
+ _("Help"),
+ "Ã?tienne Bersac <bersace03 laposte net>",
+ "Ã?tienne Bersac <bersace03 laposte net>",
+ "2006-2007",
+ _("Scan ..."),
+ NULL,
+ GIMP_PLUGIN,
+ G_N_ELEMENTS (scan_args), G_N_ELEMENTS (scan_return),
+ scan_args, scan_return);
+
+ gimp_plugin_menu_register (PROCEDURE_SCAN, "<Toolbox>/File/Acquire");
+ gimp_plugin_icon_register (PROCEDURE_SCAN, GIMP_ICON_TYPE_IMAGE_FILE, ACTION_ICON_DIR "/scan.svg");
+
+ gimp_install_procedure (PROCEDURE_SCAN_AS_LAYER,
+ _("Scan picture as new layer..."),
+ _("Help"),
+ "Ã?tienne Bersac <bersace03 laposte net>",
+ "Ã?tienne Bersac <bersace03 laposte net>",
+ "2006-2007",
+ _("Scan as Layer..."),
+ "RGB*",
+ GIMP_PLUGIN,
+ G_N_ELEMENTS (scan_as_layer_args), G_N_ELEMENTS (scan_return),
+ scan_as_layer_args, scan_return);
+
+ gimp_plugin_menu_register (PROCEDURE_SCAN_AS_LAYER, "<Image>/File/Open");
+ gimp_plugin_icon_register (PROCEDURE_SCAN_AS_LAYER, GIMP_ICON_TYPE_IMAGE_FILE, ACTION_ICON_DIR "/scan-as-layer.svg");
+}
+
+static void
+run (const gchar *name,
+ gint n_params,
+ const GimpParam *param,
+ gint *nreturn_vals,
+ GimpParam **return_vals)
+{
+ static GimpParam values[2];
+ GimpDrawable *drawable;
+ gint32 image_ID;
+ gboolean is_new;
+ GimpRunMode run_mode;
+ GimpPDBStatusType status = GIMP_PDB_SUCCESS;
+ gint n_layers;
+
+ gimp_ui_init (PACKAGE, FALSE);
+ gnome_scan_init(NULL, NULL);
+ textdomain (GETTEXT_PACKAGE);
+ gdouble xres, yres, res;
+
+ /* if we are scanning, create a new image */
+ g_debug (G_STRLOC " " PROCEDURE_SCAN);
+ if (g_str_equal (name, PROCEDURE_SCAN)) {
+ image_ID = gimp_image_new (1, 1, GIMP_RGB);
+ is_new = TRUE;
+ }
+ /* else use the existing one. */
+ else {
+ image_ID = param[1].data.d_image;
+ is_new = FALSE;
+ gimp_drawable_detach (gimp_drawable_get (param[2].data.d_drawable));
+ }
+
+ GnomeScanSettings* settings = gnome_scan_settings_new();
+ GnomeScanSink *sink = flegita_gimp_sink_new(image_ID, is_new);
+ GnomeScanJob *job = gnome_scan_job_new(settings, sink);
+
+ /* set default scan resolution from existing image */
+ if (!is_new) {
+ if (gimp_image_get_resolution (image_ID, &xres, &yres)) {
+ res = MAX (xres, yres);
+ gnome_scan_settings_set_double (settings, "resolution", res);
+ }
+ }
+
+ gnome_scan_job_set_sink (job, sink);
+ gnome_scan_job_set_settings(job, settings);
+ GtkWidget*dialog = gnome_scan_dialog_new (NULL, job);
+ gnome_scan_dialog_run (GNOME_SCAN_DIALOG (dialog));
+
+ gimp_image_get_layers (image_ID,
+ &n_layers);
+
+ if (is_new) {
+ /* if we have a layer, then display */
+ if (n_layers == 1) {
+ gimp_display_new (image_ID);
+ }
+ /* else, the scan has been cancel */
+ else {
+ gimp_image_delete (image_ID);
+ }
+ }
+ gimp_displays_flush ();
+
+ values[1].type = GIMP_PDB_IMAGE;
+ values[1].data.d_image = image_ID;
+ values[0].type = GIMP_PDB_STATUS;
+ values[0].data.d_status = status;
+
+ *nreturn_vals = 1;
+ *return_vals = values;
+}
diff --git a/trunk/src/flegita-output-filename-widget.c b/trunk/src/flegita-output-filename-widget.c
new file mode 100644
index 0000000..649c108
--- /dev/null
+++ b/trunk/src/flegita-output-filename-widget.c
@@ -0,0 +1,184 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <glib/gi18n.h>
+#include "gnome-scan-param-specs.h"
+#include "flegita-output-filename-widget.h"
+#include "flegita-pspec.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FLEGITA_TYPE_OUTPUT_FILENAME_WIDGET, FlegitaOutputFilenameWidgetPrivate))
+
+typedef struct _FlegitaOutputFilenameWidgetPrivate FlegitaOutputFilenameWidgetPrivate;
+struct _FlegitaOutputFilenameWidgetPrivate
+{
+ GtkWidget *filechooser;
+ GtkWidget *entry;
+ GtkWidget *combo;
+ GtkListStore *liststore;
+};
+
+enum {
+ SUFFIX_ICON,
+ SUFFIX_DESC,
+ SUFFIX_NAME,
+ SUFFIX_N_COLUMNS
+};
+
+GS_DEFINE_PARAM_WIDGET (FlegitaOutputFilenameWidget, flegita_output_filename_widget)
+
+static gboolean fofw_output_filename_changed (FlegitaOutputFilenameWidget *widget);
+
+static void
+flegita_output_filename_widget_init (FlegitaOutputFilenameWidget *object)
+{
+ /* TODO: Add initialization code here */
+}
+
+static void
+flegita_output_filename_widget_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (flegita_output_filename_widget_parent_class)->finalize (object);
+}
+
+static void
+flegita_output_filename_widget_build (GnomeScanParamWidget *widget)
+{
+ FlegitaOutputFilenameWidget *fofw = FLEGITA_OUTPUT_FILENAME_WIDGET (widget);
+ FlegitaOutputFilenameWidgetPrivate *priv = GET_PRIVATE (fofw);
+ GtkTreeIter iter;
+ GtkCellRenderer *renderer;
+ GSList *node;
+ GnomeScanFormat *format;
+ widget->shows_label = FALSE;
+ widget->expands = FALSE;
+
+ /* directory */
+ priv->filechooser = gtk_file_chooser_button_new (_("Select directory"),
+ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (priv->filechooser),
+ g_get_user_special_dir (G_USER_DIRECTORY_PICTURES));
+ g_signal_connect_swapped (priv->filechooser, "selection-changed",
+ (GCallback) fofw_output_filename_changed,
+ fofw);
+ gtk_box_pack_start (GTK_BOX (widget), priv->filechooser, FALSE, TRUE, 0);
+
+ /* filename */
+ priv->entry = gtk_entry_new ();
+ gtk_entry_set_text (GTK_ENTRY (priv->entry), _("Scanned image"));
+ g_signal_connect_swapped (priv->entry, "focus-out-event",
+ (GCallback) fofw_output_filename_changed,
+ fofw);
+ gtk_box_pack_start (GTK_BOX (widget), priv->entry, TRUE, TRUE, 0);
+
+
+ /* suffixes */
+ priv->liststore = gtk_list_store_new (SUFFIX_N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING);
+
+ priv->combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (priv->liststore));
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ g_object_set (renderer,
+ "stock-size", GTK_ICON_SIZE_BUTTON,
+ NULL);
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT(priv->combo), renderer, FALSE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (priv->combo), renderer,
+ "icon-name", SUFFIX_ICON,
+ NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->combo), renderer, TRUE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (priv->combo), renderer,
+ "text", SUFFIX_DESC,
+ NULL);
+
+ node = flegita_param_output_filename_get_formats (widget->pspec);
+ for (; node ; node = node->next) {
+ format = node->data;
+ gtk_list_store_insert_with_values (priv->liststore, &iter, -1,
+ SUFFIX_ICON, "gnome-mime-image",
+ SUFFIX_DESC, format->extensions[0],
+ SUFFIX_NAME, format->name,
+ -1);
+ }
+ gtk_box_pack_start (GTK_BOX (widget), priv->combo, FALSE, FALSE, 0);
+
+ gtk_combo_box_set_active (GTK_COMBO_BOX (priv->combo), 0);
+
+ g_signal_connect_swapped (priv->combo, "changed",
+ (GCallback) fofw_output_filename_changed,
+ FLEGITA_OUTPUT_FILENAME_WIDGET (widget));
+}
+
+static void
+flegita_output_filename_widget_set (GnomeScanParamWidget *widget,
+ GValue *value)
+{
+ FlegitaOutputFilenameWidgetPrivate *priv = GET_PRIVATE(widget);
+ const gchar *path = g_value_get_string(value);
+ gchar *dir = g_path_get_dirname (path);
+ gchar *file = g_path_get_basename (path);
+ gchar **parts = g_strsplit (file, ".", 2);
+
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(priv->filechooser),
+ dir);
+ gtk_entry_set_text (GTK_ENTRY(priv->entry), parts[0]);
+}
+
+
+/* OUTPUT_FILENAME */
+
+static gboolean
+fofw_output_filename_changed (FlegitaOutputFilenameWidget *fofw)
+{
+ GnomeScanParamWidget *gspw = GNOME_SCAN_PARAM_WIDGET (fofw);
+ FlegitaOutputFilenameWidgetPrivate *priv = GET_PRIVATE (fofw);
+ GtkTreeIter iter;
+ gchar*suffix;
+
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->combo), &iter);
+ if (!gtk_list_store_iter_is_valid (priv->liststore, &iter))
+ return FALSE;
+
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->liststore), &iter,
+ SUFFIX_NAME, &suffix,
+ -1);
+
+ gchar *path = g_strdup_printf ("%s%c%s.%s",
+ gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (priv->filechooser)),
+ G_DIR_SEPARATOR,
+ gtk_entry_get_text (GTK_ENTRY (priv->entry)),
+ suffix);
+
+ if (!g_str_equal (path, g_value_get_string(gspw->value))) {
+ g_value_set_string (gspw->value,
+ path);
+
+ gnome_scan_param_widget_changed (gspw);
+ }
+
+ g_free (path);
+ return FALSE;
+}
diff --git a/trunk/src/flegita-output-filename-widget.h b/trunk/src/flegita-output-filename-widget.h
new file mode 100644
index 0000000..02be545
--- /dev/null
+++ b/trunk/src/flegita-output-filename-widget.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * gnome-scan
+ * Copyright (C) Ã?tienne Bersac 2007 <bersace03 laposte net>
+ *
+ * gnome-scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ * The Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _FLEGITA_OUTPUT_FILENAME_WIDGET_H_
+#define _FLEGITA_OUTPUT_FILENAME_WIDGET_H_
+
+#include <glib-object.h>
+#include <gnome-scan-param-widget.h>
+
+G_BEGIN_DECLS
+
+#define FLEGITA_TYPE_OUTPUT_FILENAME_WIDGET (flegita_output_filename_widget_get_type ())
+#define FLEGITA_OUTPUT_FILENAME_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FLEGITA_TYPE_OUTPUT_FILENAME_WIDGET, FlegitaOutputFilenameWidget))
+#define FLEGITA_OUTPUT_FILENAME_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FLEGITA_TYPE_OUTPUT_FILENAME_WIDGET, FlegitaOutputFilenameWidgetClass))
+#define FLEGITA_IS_OUTPUT_FILENAME_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FLEGITA_TYPE_OUTPUT_FILENAME_WIDGET))
+#define FLEGITA_IS_OUTPUT_FILENAME_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FLEGITA_TYPE_OUTPUT_FILENAME_WIDGET))
+#define FLEGITA_OUTPUT_FILENAME_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FLEGITA_TYPE_OUTPUT_FILENAME_WIDGET, FlegitaOutputFilenameWidgetClass))
+
+typedef struct _FlegitaOutputFilenameWidget FlegitaOutputFilenameWidget;
+struct _FlegitaOutputFilenameWidget
+{
+ GnomeScanParamWidget parent_instance;
+};
+
+GS_DEFINE_PARAM_WIDGET_HEADER (FlegitaOutputFilenameWidget, flegita_output_filename_widget);
+
+G_END_DECLS
+
+#endif /* _FLEGITA_OUTPUT_FILENAME_WIDGET_H_ */
diff --git a/trunk/src/flegita-pspec.c b/trunk/src/flegita-pspec.c
new file mode 100644
index 0000000..61a6032
--- /dev/null
+++ b/trunk/src/flegita-pspec.c
@@ -0,0 +1,110 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#include <glib/gi18n.h>
+#include "flegita-sink.h"
+#include "flegita-pspec.h"
+#include "flegita-output-filename-widget.h"
+#include "flegita-action-selector.h"
+
+/* ACTION */
+GS_DEFINE_PARAM (flegita, Flegita, action, Action, FLEGITA_TYPE_ACTION);
+
+GParamSpec*
+flegita_param_spec_action (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ FlegitaAction default_action,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_internal (FLEGITA_TYPE_PARAM_ACTION,
+ name, nick, blurb, flags);
+ g_param_spec_set_qdata (spec, GS_PARAM_GROUP_QUARK, (gpointer) group);
+ gs_param_spec_set_widget_type (spec, FLEGITA_TYPE_ACTION_SELECTOR);
+ return G_PARAM_SPEC (spec);
+}
+
+
+static void
+flegita_param_action_value_set_default (GParamSpec *pspec, GValue *value)
+{
+ g_value_set_enum (value, FLEGITA_PARAM_SPEC_ACTION (pspec)->default_action);
+}
+
+static gint
+flegita_param_action_values_cmp (GParamSpec *pspec, const GValue *a, const GValue *b)
+{
+ return g_value_get_enum (a) - g_value_get_enum (b);
+}
+
+
+/* FILENAME */
+GS_DEFINE_PARAM (flegita, Flegita, output_filename, OutputFilename, G_TYPE_STRING);
+
+/**
+ * flegita_param_spec_output_filename:
+ * @name: Param name
+ * @nick: Param nick
+ * @blurb: Param blurb
+ * @group: The quark of the group the param belong to
+ * @formats: The list of #GdkPixbufFormats
+ * @flags: Param flags.
+ *
+ * Create a new #GSParamSpecFilename.
+ *
+ * Returns: The new #GSParamSpecFilename
+ **/
+GParamSpec*
+flegita_param_spec_output_filename (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GSList *formats,
+ GParamFlags flags)
+{
+ GParamSpec *spec = g_param_spec_internal (FLEGITA_TYPE_PARAM_OUTPUT_FILENAME,
+ name, nick, blurb, flags);
+ g_param_spec_set_qdata (spec, GS_PARAM_GROUP_QUARK, (gpointer) group);
+ g_param_spec_set_qdata (spec, GS_PARAM_FORMATS_QUARK, (gpointer) formats);
+ gs_param_spec_set_widget_type (spec, FLEGITA_TYPE_OUTPUT_FILENAME_WIDGET);
+ return G_PARAM_SPEC (spec);
+}
+
+static void
+flegita_param_output_filename_value_set_default (GParamSpec *pspec, GValue *value)
+{
+ g_value_set_string (value, "");
+}
+
+static gint
+flegita_param_output_filename_values_cmp (GParamSpec *pspec, const GValue *a, const GValue *b)
+{
+ return g_ascii_strcasecmp (g_value_get_string (a),
+ g_value_get_string (b));
+}
+
+GSList*
+flegita_param_output_filename_get_formats (GParamSpec *pspec)
+{
+ return (GSList *) g_param_spec_get_qdata (pspec, GS_PARAM_FORMATS_QUARK);
+}
+
diff --git a/trunk/src/flegita-pspec.h b/trunk/src/flegita-pspec.h
new file mode 100644
index 0000000..b06f219
--- /dev/null
+++ b/trunk/src/flegita-pspec.h
@@ -0,0 +1,92 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _FLEGITA_PSPEC_H
+#define _FLEGITA_PSPEC_H
+
+#include <gnome-scan-param-specs.h>
+#include "flegita-types.h"
+#include "flegita.h"
+
+G_BEGIN_DECLS
+
+/* COMMON */
+
+/* ACTION */
+#define FLEGITA_TYPE_PARAM_ACTION (flegita_param_action_get_type ())
+#define FLEGITA_PARAM_SPEC_ACTION(p) (G_TYPE_CHECK_INSTANCE_CAST ((p), FLEGITA_TYPE_PARAM_ACTION, FlegitaParamSpecAction))
+#define FLEGITA_IS_PARAM_SPEC_ACTION(p) (G_TYPE_CHECK_INSTANCE_TYPE ((p), FLEGITA_TYPE_PARAM_ACTION))
+
+typedef struct _FlegitaParamSpecAction FlegitaParamSpecAction;
+/**
+ * FlegitaParamSpecAction:
+ *
+ **/
+struct _FlegitaParamSpecAction
+{
+ /*< private >*/
+ GParamSpec parent_instance;
+ FlegitaAction default_action;
+};
+
+GType flegita_param_action_get_type (void) G_GNUC_CONST;
+GParamSpec* flegita_param_spec_action (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ FlegitaAction default_action,
+ GParamFlags flags);
+
+
+/* OUTPUT_FILENAME */
+#define FLEGITA_TYPE_PARAM_OUTPUT_FILENAME (flegita_param_output_filename_get_type ())
+#define FLEGITA_PARAM_SPEC_OUTPUT_FILENAME(p) (G_TYPE_CHECK_INSTANCE_CAST ((p), FLEGITA_TYPE_PARAM_OUTPUT_FILENAME, FlegitaParamSpecOutputFilename))
+#define FLEGITA_IS_PARAM_SPEC_OUTPUT_FILENAME(p) (G_TYPE_CHECK_INSTANCE_TYPE ((p), FLEGITA_TYPE_PARAM_OUTPUT_FILENAME))
+
+typedef struct _FlegitaParamSpecOutputFilename FlegitaParamSpecOutputFilename;
+/**
+ * FlegitaParamSpecOutputFilename:
+ *
+ * This spec is used to select an output filename, this mean that the
+ * widget will have a "save as" behaviour.
+ **/
+struct _FlegitaParamSpecOutputFilename
+{
+ /*< private >*/
+ GParamSpec parent_instance;
+};
+
+GType flegita_param_output_filename_get_type (void) G_GNUC_CONST;
+GParamSpec* flegita_param_spec_output_filename (const gchar *name,
+ const gchar *nick,
+ const gchar *blurb,
+ GQuark group,
+ GSList *formats,
+ GParamFlags flags);
+
+GSList* flegita_param_output_filename_get_formats (GParamSpec *pspec);
+
+
+
+
+G_END_DECLS
+
+#endif /* _FLEGITA_PSPEC_H */
diff --git a/trunk/src/flegita-sink.c b/trunk/src/flegita-sink.c
new file mode 100644
index 0000000..6d9d346
--- /dev/null
+++ b/trunk/src/flegita-sink.c
@@ -0,0 +1,501 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <glib/gi18n.h>
+#include <gnome-scan-module.h>
+#include <gnome-scan-param-specs.h>
+#include <gtk/gtk.h>
+#include <gtk/gtkprintjob.h>
+#include "flegita-sink.h"
+#include "flegita-pspec.h"
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FLEGITA_TYPE_SINK, FlegitaSinkPrivate))
+
+typedef struct _FlegitaSinkPrivate FlegitaSinkPrivate;
+
+struct _FlegitaSinkPrivate
+{
+ /* pspecs */
+ GParamSpec *action_spec;
+ GParamSpec *output_filename_spec;
+ GParamSpec *png_compression_spec;
+
+ /* actions */
+ FlegitaAction action;
+
+ /* save */
+ GeglNode *output;
+ GeglProcessor *processor;
+ gchar *filename;
+ guint png_compression;
+
+ /* print */
+ GtkPrintJob *job;
+ cairo_t *cr;
+};
+
+static GnomeScanSinkClass* parent_class = NULL;
+
+static void fs_configure (GnomeScanPlugin *plugin,
+ GnomeScanSettings *settings);
+static GList* fs_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root);
+static void fs_configure_frame (GnomeScanPlugin *plugin);
+static gboolean fs_work (GnomeScanPlugin *plugin,
+ gdouble *progress);
+static void fs_end_frame (GnomeScanPlugin *plugin);
+static void fs_end_scan (GnomeScanPlugin *plugin);
+#if 0
+static void fs_draw_page (GtkPrintOperation *op,
+ GtkPrintContext *context,
+ gint page_no,
+ FlegitaSink *sink);
+#endif
+
+G_DEFINE_TYPE (FlegitaSink, flegita_sink, GNOME_TYPE_SCAN_SINK)
+
+GS_DEFINE_QUARK(flegita_group_png_options, N_("PNG Options"))
+#define FLEGITA_PARAM_GROUP_PNG_OPTIONS (flegita_group_png_options_quark())
+
+static void
+flegita_sink_init (FlegitaSink *object)
+{
+ FlegitaSinkPrivate *priv = GET_PRIVATE (object);
+ GParamSpec *pspec;
+ GSList *formats = NULL;
+ GValue *min, *step, *max, *val;
+
+ static gchar *png_mime[] = {
+ "image/png",
+ NULL
+ };
+ static gchar *png_exts[] = {
+ "png",
+ NULL
+ };
+
+ /* FORMAT */
+ formats = g_slist_append (formats,
+ gnome_scan_format_new ("png",
+ GETTEXT_PACKAGE,
+ N_("PNG picture"),
+ png_mime,
+ png_exts));
+
+ pspec = priv->output_filename_spec =
+ flegita_param_spec_output_filename ("output-filename",
+ N_("File"),
+ N_("Output filename"),
+ GS_PARAM_GROUP_SINK_FRONT,
+ formats,
+ G_PARAM_WRITABLE);
+ gs_param_spec_set_domain (pspec, GETTEXT_PACKAGE);
+ gs_param_spec_set_unit (pspec, GS_UNIT_NONE);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (object),
+ pspec);
+
+ /* PNG COMPRESSION */
+#define flegita_g_value_new_int(var, val) \
+ var = g_new0(GValue,1); \
+ g_value_init (var, G_TYPE_INT); \
+ g_value_set_int (var, val);
+
+ flegita_g_value_new_int(min, 0);
+ flegita_g_value_new_int(step, 1);
+ flegita_g_value_new_int(max, 9);
+ flegita_g_value_new_int(val, 9);
+#undef flegita_g_value_new_int
+
+ pspec = priv->png_compression_spec =
+ gs_param_spec_range("png-compression-level", N_("PNG Compression Level"),
+ /* translator: this explain the PNG compression level */
+ N_("Higher level means lower file size, but takes more "
+ "time to save"),
+ FLEGITA_PARAM_GROUP_PNG_OPTIONS,
+ min, max, step, val, G_PARAM_WRITABLE);
+ gs_param_spec_set_domain (pspec, GETTEXT_PACKAGE);
+ gs_param_spec_set_unit (pspec, GS_UNIT_NONE);
+ gnome_scan_plugin_params_add (GNOME_SCAN_PLUGIN (object),
+ pspec);
+
+}
+
+static void
+flegita_sink_finalize (GObject *object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+flegita_sink_class_init (FlegitaSinkClass *klass)
+{
+ GObjectClass* object_class = G_OBJECT_CLASS (klass);
+ parent_class = GNOME_SCAN_SINK_CLASS (g_type_class_peek_parent (klass));
+ GnomeScanPluginClass *plugin_class = GNOME_SCAN_PLUGIN_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (FlegitaSinkPrivate));
+ plugin_class->configure = fs_configure;
+ plugin_class->get_child_nodes = fs_get_child_nodes;
+ plugin_class->configure_frame = fs_configure_frame;
+ plugin_class->work = fs_work;
+ plugin_class->end_frame = fs_end_frame;
+ plugin_class->end_scan = fs_end_scan;
+
+ object_class->finalize = flegita_sink_finalize;
+}
+
+GnomeScanSink*
+flegita_sink_new ()
+{
+ GObject *object = g_object_new (FLEGITA_TYPE_SINK,
+ "name", "flegita",
+ "blurb", _("Various common action on scan output "
+ "not related to specific software"),
+ NULL);
+ return GNOME_SCAN_SINK (object);
+}
+
+
+/* INTERNALS */
+
+static gchar*
+fs_get_filename (gchar *filename,
+ gint count,
+ gchar *suffix)
+{
+ if (count) {
+ filename = g_strdup_printf ("%s-%i.%s",
+ filename,
+ count,
+ suffix);
+ }
+ else {
+ filename = g_strdup_printf ("%s.%s",
+ filename,
+ suffix);
+ }
+
+ return filename;
+}
+
+/* find the next file no available, starting from count. */
+static gint
+fs_get_next_file_no (gchar *filename,
+ gint count,
+ gchar *suffix)
+{
+ gchar *tmpf = NULL;
+ gboolean exists = FALSE;
+
+ do {
+ tmpf = fs_get_filename (filename, count, suffix);
+ exists = g_file_test (tmpf, G_FILE_TEST_EXISTS);
+ g_free (tmpf);
+ } while (exists && ++count);
+
+ return count;
+}
+
+
+static void
+fs_configure (GnomeScanPlugin *plugin,
+ GnomeScanSettings *settings)
+{
+ FlegitaSink *sink = FLEGITA_SINK (plugin);
+ FlegitaSinkPrivate *priv = GET_PRIVATE (sink);
+
+#if 0
+ priv->action = gnome_scan_settings_get_enum (settings,
+ "flegita-action",
+ FLEGITA_TYPE_ACTION);
+#else
+ priv->action = FLEGITA_SAVE;
+#endif
+
+ switch (priv->action) {
+ case FLEGITA_SAVE:
+ /* enable SAVE options */
+ priv->output_filename_spec->flags = G_PARAM_WRITABLE;
+ gnome_scan_plugin_params_changed (plugin,
+ priv->output_filename_spec);
+
+ priv->png_compression_spec->flags = G_PARAM_WRITABLE;
+ gnome_scan_plugin_params_changed (plugin,
+ priv->png_compression_spec);
+
+ sink->filename = gnome_scan_settings_get_string (settings, "output-filename");
+ sink->suffix = NULL;
+ gint i;
+
+ for (i = strlen (sink->filename) ; i ; i--) {
+ if (sink->filename[i] != '.') {
+ sink->suffix = g_strdup_printf ("%c%s",
+ sink->filename[i],
+ sink->suffix);
+ }
+ else {
+ sink->filename[i] = '\0';
+ break;
+ }
+ }
+ sink->count = fs_get_next_file_no (sink->filename, 0, sink->suffix);
+ priv->png_compression = gnome_scan_settings_get_int (settings, "png-compression-level");
+ break;
+#ifdef PRINT
+ case FLEGITA_PRINT:
+ /* disable save options */
+ priv->output_filename_spec->flags = 0;
+ gnome_scan_plugin_params_changed (plugin,
+ priv->output_filename_spec);
+
+ priv->png_compression_spec->flags = 0;
+ gnome_scan_plugin_params_changed (plugin,
+ priv->png_compression_spec);
+
+ /* sink->filename = "/tmp/flegita-print"; */
+ /* sink->suffix = "png"; */
+
+ GtkPageSetup* page_setup = gtk_page_setup_new ();
+ gtk_page_setup_set_orientation (page_setup,
+ gnome_scan_settings_get_enum (settings,
+ "page-orientation",
+ GTK_TYPE_PAGE_ORIENTATION));
+ /* paper size */
+ GtkPaperSize *paper_size;
+ gchar *papername = gnome_scan_settings_get_string (settings,
+ "paper-size");
+ if (papername && strlen(papername)) {
+ paper_size = gtk_paper_size_new (papername);
+ }
+ else {
+ GeglRectangle *area = gnome_scan_settings_get_pointer (settings,
+ "area");
+ if (!area)
+ break;
+
+ paper_size = gtk_paper_size_new_custom ("custom",
+ _("Custom"),
+ area->width,
+ area->height,
+ GTK_UNIT_MM);
+ }
+ gtk_page_setup_set_paper_size (page_setup, paper_size);
+
+ gtk_page_setup_set_top_margin (page_setup, 0., GTK_UNIT_MM);
+ gtk_page_setup_set_bottom_margin (page_setup, 0., GTK_UNIT_MM);
+ gtk_page_setup_set_left_margin (page_setup, 0., GTK_UNIT_MM);
+ gtk_page_setup_set_right_margin (page_setup, 0., GTK_UNIT_MM);
+
+ GtkPrintSettings *psettings =
+ GTK_PRINT_SETTINGS (gnome_scan_settings_get_object (settings,
+ "print-settings"));
+ if (!psettings)
+ break;
+
+ GtkPrinter* printer =
+ GTK_PRINTER (gnome_scan_settings_get_object (settings,
+ "printer"));
+ if (!printer)
+ break;
+
+ gtk_print_settings_set_printer (psettings,
+ gtk_printer_get_name (printer));
+
+ if (priv->job) {
+ g_object_unref (priv->job);
+ }
+
+ priv->job = gtk_print_job_new (_("Scan to printer"),
+ printer,
+ psettings,
+ page_setup);
+
+
+ gtk_print_job_set_track_print_status (priv->job, TRUE);
+
+ break;
+#endif
+ }
+}
+
+static GList*
+fs_get_child_nodes (GnomeScanPlugin *plugin,
+ GeglNode *root)
+{
+ FlegitaSinkPrivate *priv = GET_PRIVATE (plugin);
+ GList *list = NULL;
+ priv->output = gegl_node_new_child (root,
+ "operation", "png-save",
+ NULL);
+
+ list = g_list_append (list, priv->output);
+
+ return list;
+}
+
+static void
+fs_configure_frame (GnomeScanPlugin *plugin)
+{
+ FlegitaSink *sink = FLEGITA_SINK (plugin);
+ FlegitaSinkPrivate *priv = GET_PRIVATE (sink);
+ gchar *filename;
+
+ switch (priv->action) {
+ case FLEGITA_SAVE:
+ filename = fs_get_filename (sink->filename, sink->count, sink->suffix);
+ g_debug (G_STRLOC ": writing to %s", filename);
+ gegl_node_set (priv->output,
+ "path", filename,
+ "compression", priv->png_compression,
+ NULL);
+ priv->filename = filename;
+ break;
+#ifdef PRINT
+ case FLEGITA_PRINT:
+ break;
+#endif
+ }
+}
+
+static gboolean
+fs_work (GnomeScanPlugin *plugin, gdouble *progress)
+{
+ FlegitaSinkPrivate *priv = GET_PRIVATE (plugin);
+#ifdef PRINT
+ GError *error = NULL;
+ cairo_surface_t *cs;
+#endif
+
+ switch (priv->action) {
+ case FLEGITA_SAVE:
+ *progress = 1.; /* all is done using gegl */
+ break;
+#ifdef PRINT
+ case FLEGITA_PRINT:
+ cs = gtk_print_job_get_surface (priv->job,
+ &error);
+ cairo_t *cr = cairo_create (cs);
+ GeglRectangle *extent = gegl_buffer_extent (priv->buffer);
+ Babl * format = babl_format("RGB u8");
+ guchar *data = g_new0 (guchar, (extent->width * extent->height * 3));
+ gegl_buffer_get (plugin->buffer, 1., extent,
+ format,
+ data, GEGL_AUTO_ROWSTRIDE);
+ cs = cairo_image_surface_create_for_data (data,
+ CAIRO_FORMAT_RGB24,
+ extent->width,
+ extent->height,
+ extent->width * 3);
+ cairo_set_source_surface (cr, cs, 0., 0.);
+ cairo_paint (cr);
+ cairo_show_page (cr);
+ cairo_destroy (cr);
+ return FALSE;
+ break;
+#endif
+ }
+
+ return FALSE;
+}
+
+static void
+fs_end_frame (GnomeScanPlugin *plugin)
+{
+ FlegitaSinkPrivate *priv = GET_PRIVATE (plugin);
+ FlegitaSink *sink = FLEGITA_SINK (plugin);
+ g_free (priv->filename);
+
+ switch (priv->action) {
+ case FLEGITA_SAVE:
+ sink->count = fs_get_next_file_no (sink->filename,
+ sink->count+1,
+ sink->suffix);
+
+ g_object_unref(priv->output);
+ /* needs to unref one more time. Maybe a bug in GeglOp buffer ? */
+ break;
+#ifdef PRINT
+ case FLEGITA_PRINT:
+ break;
+#endif
+ }
+}
+
+#ifdef PRINT
+static void complete (GtkPrintJob *job, FlegitaSink *sink, GError *error)
+{
+ g_debug (G_STRLOC ": job complete %i",
+ gtk_print_job_get_status (job));
+ if (error) {
+ g_debug (G_STRLOC ": an error occured : %s",
+ error->message);
+ }
+}
+#endif
+
+static void
+fs_end_scan (GnomeScanPlugin *plugin)
+{
+ FlegitaSinkPrivate *priv = GET_PRIVATE (plugin);
+
+ switch (priv->action) {
+ case FLEGITA_SAVE:
+ break;
+#ifdef PRINT
+ case FLEGITA_PRINT:
+ gtk_print_job_send (priv->job,
+ (GtkPrintJobCompleteFunc) complete,
+ sink,
+ NULL);
+ break;
+#endif
+ }
+}
+
+#if 0
+static void
+fs_draw_page (GtkPrintOperation *op,
+ GtkPrintContext *context,
+ gint page_no,
+ FlegitaSink *sink)
+{
+ gchar *filename = page_no > 0 ?
+ g_strdup_printf ("/tmp/flegita-print-%i.png", page_no) :
+ g_strdup ("/tmp/flegita-print.png");
+ cairo_surface_t *cs = cairo_image_surface_create_from_png (filename);
+ cairo_t *cr = gtk_print_context_get_cairo_context (context);
+ cairo_set_source_surface (cr, cs, 0., 0.);
+ cairo_paint (cr);
+
+ g_debug (G_STRLOC ": imprimer page %i (%s)", page_no, filename);
+
+ cairo_surface_destroy (cs);
+ g_free (filename);
+}
+#endif
diff --git a/trunk/src/flegita-sink.h b/trunk/src/flegita-sink.h
new file mode 100644
index 0000000..1118425
--- /dev/null
+++ b/trunk/src/flegita-sink.h
@@ -0,0 +1,61 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#ifndef _FLEGITA_SINK_H_
+#define _FLEGITA_SINK_H_
+
+#include <glib-object.h>
+#include <gnome-scan-sink.h>
+
+G_BEGIN_DECLS
+
+#define FLEGITA_TYPE_SINK (flegita_sink_get_type ())
+#define FLEGITA_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FLEGITA_TYPE_SINK, FlegitaSink))
+#define FLEGITA_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FLEGITA_TYPE_SINK, FlegitaSinkClass))
+#define FLEGITA_IS_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FLEGITA_TYPE_SINK))
+#define FLEGITA_IS_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FLEGITA_TYPE_SINK))
+#define FLEGITA_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FLEGITA_TYPE_SINK, FlegitaSinkClass))
+
+typedef struct _FlegitaSinkClass FlegitaSinkClass;
+typedef struct _FlegitaSink FlegitaSink;
+
+struct _FlegitaSinkClass
+{
+ GnomeScanSinkClass parent_class;
+};
+
+struct _FlegitaSink
+{
+ GnomeScanSink parent_instance;
+
+ gint count;
+ gchar *filename;
+ gchar *suffix;
+};
+
+GType flegita_sink_get_type (void) G_GNUC_CONST;
+void flegita_sink_register_type (GTypeModule *module);
+GnomeScanSink* flegita_sink_new ();
+
+G_END_DECLS
+
+#endif /* _FLEGITA_SINK_H_ */
diff --git a/trunk/src/flegita-types.c b/trunk/src/flegita-types.c
new file mode 100644
index 0000000..2acee78
--- /dev/null
+++ b/trunk/src/flegita-types.c
@@ -0,0 +1,54 @@
+
+/* Generated data (by glib-mkenums) */
+
+/* Flegita - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#include "flegita-types.h"
+
+/**
+ * SECTION: flegita-types
+ * @title: Enums and Flags
+ * @short_description: Declared enumeration and flags
+ */
+
+/* Enumerations from "flegita.h" */
+#include "flegita.h"
+
+GType
+flegita_action_get_type (void)
+{
+ static GType type = 0;
+ static const GEnumValue _flegita_action_values[] = {
+ { FLEGITA_SAVE, "FLEGITA_SAVE", "gtk-save" },
+ { 0, NULL, NULL }
+};
+
+ if (type == 0) {
+ type = g_enum_register_static ("FlegitaAction", _flegita_action_values);
+ }
+
+ return type;
+}
+
+
+/* Generated data ends here */
+
diff --git a/trunk/src/flegita-types.c.tpl b/trunk/src/flegita-types.c.tpl
new file mode 100644
index 0000000..4fdd010
--- /dev/null
+++ b/trunk/src/flegita-types.c.tpl
@@ -0,0 +1,63 @@
+/*-*- c -*-*/
+/*** BEGIN file-header ***/
+/* Flegita - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#include "flegita-types.h"
+
+/**
+ * SECTION: flegita-types
+ * @title: Enums and Flags
+ * @short_description: Declared enumeration and flags
+ */
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* Enumerations from "@filename@" */
+#include "@filename@"
+
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType
+ enum_name@_get_type (void)
+{
+ static GType type = 0;
+ static const G Type@Value _ enum_name@_values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+};
+
+ if (type == 0) {
+ type = g_ type@_register_static ("@EnumName@", _ enum_name@_values);
+ }
+
+ return type;
+}
+
+/*** END value-tail ***/
diff --git a/trunk/src/flegita-types.h b/trunk/src/flegita-types.h
new file mode 100644
index 0000000..46c08fd
--- /dev/null
+++ b/trunk/src/flegita-types.h
@@ -0,0 +1,40 @@
+
+/* Generated data (by glib-mkenums) */
+
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef FLEGITA_TYPES_H
+#define FLEGITA_TYPES_H
+
+#include <glib-object.h>
+
+/* Enumerations from "flegita.h" */
+#define FLEGITA_TYPE_ACTION (flegita_action_get_type ())
+GType flegita_action_get_type (void) G_GNUC_CONST;
+
+
+G_END_DECLS
+
+#endif
+
+/* Generated data ends here */
+
diff --git a/trunk/src/flegita-types.h.tpl b/trunk/src/flegita-types.h.tpl
new file mode 100644
index 0000000..447882c
--- /dev/null
+++ b/trunk/src/flegita-types.h.tpl
@@ -0,0 +1,50 @@
+/*-*- c -*-*/
+/*** BEGIN file-header ***/
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with main.c; if not, write to
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef FLEGITA_TYPES_H
+#define FLEGITA_TYPES_H
+
+#include <glib-object.h>
+
+/*** END file-header ***/
+
+G_BEGIN_DECLS
+
+
+/*** BEGIN file-production ***/
+/* Enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN enumeration-production ***/
+#define FLEGITA_TYPE_ ENUMSHORT@ (@enum_name _get_type ())
+GType @enum_name _get_type (void) G_GNUC_CONST;
+
+/*** END enumeration-production ***/
+
+/*** BEGIN file-tail ***/
+
+G_END_DECLS
+
+#endif
+/*** END file-tail ***/
+
diff --git a/trunk/src/flegita.c b/trunk/src/flegita.c
new file mode 100644
index 0000000..43684f6
--- /dev/null
+++ b/trunk/src/flegita.c
@@ -0,0 +1,124 @@
+/***************************************************************************
+ * main.c
+ *
+ * Tue Mar 13 13:40:25 2007
+ * Copyright 2007 Ã?tienne Bersac <bersace03 laposte net>
+ ****************************************************************************/
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib/gprintf.h>
+#include <glib/gi18n.h>
+#include <gnome-scan-init.h>
+#include <gnome-scan-dialog.h>
+#include <gnome-scan-job.h>
+#include <gnome-scan-sink.h>
+#include "flegita-sink.h"
+
+void
+flegita_about(GtkButton *about,
+ GtkWindow *parent)
+{
+ const gchar *authors[] = {
+ "Ã?tienne Bersac <bersace03 laposte net>",
+ "Ross Burton <ross burtonini com>",
+ NULL
+ };
+
+ gtk_show_about_dialog(parent,
+ "modal", TRUE,
+ "authors", authors,
+ "comments", g_strdup_printf("%s\n"
+ "\n"
+ "In Memoriam â? Mark Finlay",
+ _("Simply scan images")),
+ "copyright", "Copyright © 2006-2008 �tienne Bersac",
+ "license", "This program is free software; you can "
+ "redistribute it and/or modify it under the terms of "
+ "the GNU General Public License as published by "
+ "the Free Software Foundation; either version 3 of "
+ "the License, or (at your option) any later version."
+ "\n\n"
+ " This program is distributed in the hope that it "
+ "will be useful, but WITHOUT ANY WARRANTY; without "
+ "even the implied warranty of MERCHANTABILITY or "
+ "FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
+ "General Public License for more details."
+ "\n\n"
+ "You should have received a copy of the GNU General "
+ "Public License along with this program; if not, "
+ "write to the Free Software Foundation, Inc., 51 "
+ "Franklin Street, Fifth Floor Boston, MA 02110-1301, "
+ "USA\n\n",
+ "logo-icon-name", "flegita",
+ /* Translators: Add your names here with one name per
+ line, like
+ "John Smith <email1 example com>\n
+ Robert Foo <email2 example com>" */
+ "translator-credits", _("translator-credit"),
+ "version", PACKAGE_VERSION,
+ "website", "http://www.gnome.org/project/gnome-scan/index",
+ "website-label", _("Gnome Scan website"),
+ "wrap-license", TRUE,
+ NULL);
+}
+
+gint
+main (gint argc, gchar **argv)
+{
+ GnomeScanJob *job;
+ GtkWidget *dialog;
+ GnomeScanSink *sink;
+ GtkWidget *about;
+
+ textdomain (GETTEXT_PACKAGE);
+
+ gtk_init (&argc, &argv);
+ gnome_scan_init (&argc, &argv);
+
+ gtk_window_set_default_icon_name ("flegita");
+ g_set_application_name (_("Scanner Utility"));
+
+ /* build */
+ sink = flegita_sink_new();
+ job = gnome_scan_job_new(NULL, sink);
+ dialog = gnome_scan_dialog_new (NULL, job);
+
+ /* ABOUT */
+ about = gtk_button_new_from_stock (GTK_STOCK_ABOUT);
+ gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->action_area), about,
+ FALSE, FALSE, 0);
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX(GTK_DIALOG(dialog)->action_area),
+ about, TRUE);
+ g_signal_connect(about, "clicked", G_CALLBACK(flegita_about), dialog);
+ gtk_widget_show(about);
+
+ /* run */
+ gnome_scan_dialog_run (GNOME_SCAN_DIALOG (dialog));
+
+ /* free */
+ gtk_widget_destroy (dialog);
+ g_object_unref(job);
+
+ gnome_scan_exit ();
+
+ return (0);
+}
diff --git a/trunk/src/flegita.h b/trunk/src/flegita.h
new file mode 100644
index 0000000..80fee14
--- /dev/null
+++ b/trunk/src/flegita.h
@@ -0,0 +1,40 @@
+/* Gnome Scan - Scan as easy as you print
+ * Copyright © 2007 �tienne Bersac <bersace03 laposte net>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+#ifndef _FLEGITA_H
+#define _FLEGITA_H
+
+G_BEGIN_DECLS
+
+/**
+ * FlegitaAction:
+ *
+ **/
+typedef enum
+{
+ FLEGITA_SAVE, /*< nick=gtk-save >*/
+/* FLEGITA_PRINT, /\*< nick=gtk-print >*\/ */
+/* FLEGITA_MAIL /\*< nick=gnome-stock-mail >*\/ */
+} FlegitaAction;
+
+G_END_DECLS
+
+#endif /* _FLEGITA_H */
diff --git a/trunk/todo.py b/trunk/todo.py
new file mode 100755
index 0000000..d496008
--- /dev/null
+++ b/trunk/todo.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# this program transform an Anjuta TODO.tasks into a regular TODO
+# plain text file.
+#
+# GPL stuff goes here
+#
+
+from xml.dom.minidom import parse
+from string import split
+import codecs
+
+dom = parse('TODO.tasks')
+gtodo = dom.childNodes[0]
+f = codecs.open('TODO', 'w', 'utf-8')
+
+# loop categories
+for category in gtodo.childNodes:
+ if category.nodeType != category.TEXT_NODE:
+ title = category.getAttribute('title')
+ f.write("* %s\n" % title)
+
+ # loop items
+ for item in category.childNodes:
+ if item.nodeType != item.TEXT_NODE:
+ done = item.childNodes[1].getAttribute('done')
+ if done == "0":
+ summary = item.childNodes[3].childNodes[0]
+ f.write(" * %s\n" % summary.wholeText)
+
+ # print indented comment
+ comment = item.childNodes[5]
+ if (comment.childNodes.length == 1):
+ comment = comment.childNodes[0].wholeText
+ lines = split(comment,"\n")
+ for line in lines:
+ f.write(" %s\n" % line)
+ f.write("\n")
+f.close()
diff --git a/trunk/tools/Makefile.am b/trunk/tools/Makefile.am
new file mode 100644
index 0000000..50c755d
--- /dev/null
+++ b/trunk/tools/Makefile.am
@@ -0,0 +1,24 @@
+INCLUDES = \
+ $(GNOME_SCAN_CFLAGS)\
+ -DIMAGE_DIR="\"$(top_srcdir)/doc/ref/images\"" \
+ -I$(top_srcdir)/lib
+
+noinst_PROGRAMS = \
+ gs-scrot
+
+gs_scrot_SOURCES = \
+ gs-scrot.c
+
+gs_scrot_CFLAGS = \
+ $(GNOME_SCAN_CFLAGS) $(FLEGITA_CFLAGS) $(TOOLS_CFLAGS)
+
+gs_scrot_LDFLAGS = \
+ $(GNOME_SCAN_LIBS) $(FLEGITA_LIBS) $(TOOLS_LIBS) \
+ -L$(top_builddir)/lib -lgnomescan \
+ -export-dynamic
+
+## File created by the gnome-build tools
+
+
+
+
diff --git a/trunk/tools/gs-scrot.c b/trunk/tools/gs-scrot.c
new file mode 100644
index 0000000..d55d279
--- /dev/null
+++ b/trunk/tools/gs-scrot.c
@@ -0,0 +1,728 @@
+/* A widget screenshot utility. Well, a hugly hack to produce doc screenshots.
+ * Copyright © 2007 �tienne Bersac <bersace gnome org>
+ *
+ * Gnome Scan is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * gnome-scan is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with gnome-scan. If not, write to:
+ *
+ * the Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301, USA
+ */
+
+
+#include <gnome.h>
+#include <glade/glade-xml.h>
+#include <gnome-scan.h>
+#include <gnome-scan-param-widget.h>
+#include <glib.h>
+#include <gegl.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define FILENAME(n) g_strconcat (IMAGE_DIR, G_DIR_SEPARATOR_S, n, ".png", NULL)
+
+typedef struct _Scrot Scrot;
+
+struct _Scrot
+{
+ GtkWidget *window;
+ GtkToolItem *toggle;
+ GtkWidget *treeview;
+ GtkWidget *container;
+ GtkWidget *alignment;
+ GtkWidget *progressbar;
+ GtkListStore *liststore;
+ GtkWidget *statusbar;
+ GtkTooltips *tips;
+ guint stid;
+
+ GtkWidget *selected;
+ gchar *name;
+
+ gboolean first;
+ gboolean busy;
+ gdouble progress;
+ gchar* status;
+};
+
+enum
+ {
+ COLUMN_NAME,
+ COLUMN_WIDGET,
+ N_COLUMNS
+ };
+
+Scrot *scrot;
+
+void select_widget (GtkWidget *widget);
+void scrot_widget ();
+gboolean query_widget_scrot ();
+void scrot_widget_thread (GtkWidget *widget);
+void scrot_all_widgets ();
+
+/* CALLBACKS */
+void
+on_execute_button_clicked ()
+{
+ scrot->first = TRUE;
+ g_timeout_add (500, (GSourceFunc) query_widget_scrot, NULL);
+}
+
+void
+on_show_hide_button_clicked (GtkToggleToolButton *button)
+{
+ GtkWidget *widget;
+
+ widget = GTK_IS_WINDOW (scrot->selected) ? scrot->selected : scrot->container;
+
+ if (gtk_toggle_tool_button_get_active (button)) {
+ gtk_widget_show_all (widget);
+ }
+ else {
+ gtk_widget_hide (widget);
+ }
+}
+
+void
+on_about_button_clicked ()
+{
+ const gchar * authors[] = {
+ "Ã?tienne Bersac <bersace03 laposte net>",
+ NULL
+ };
+
+ gtk_show_about_dialog (GTK_WINDOW (scrot->window),
+ "authors", authors,
+ "copyright", "Copyright © 2007 �tienne Bersac",
+ "logo-icon-name", "applets-screenshooter",
+ "comments", "Gnome Scan Widget Screenshooter",
+ "license", "Gnome Scan is free software; you can redistribute it and/or "
+ "modify it under the terms of the GNU Lesser General Public "
+ "License as published by the Free Software Foundation; either "
+ "version 2.1 of the License, or (at your option) any later version.\n\n"
+ "Gnome Scan is distributed in the hope that it will be useful, "
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of "
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
+ "Lesser General Public License for more details.\n\n"
+ "You should have received a copy of the GNU Lesser General Public "
+ "License along with gnome-scan. If not, write to:\n\n"
+ " the Free Software Foundation, Inc.\n"
+ " 51 Franklin Street, Fifth Floor\n"
+ " Boston, MA 02110-1301, USA",
+ "wrap-license", TRUE,
+ "website", "http://www.gnome.org/projects/gnome-scan/index",
+ "website-label", "Gnome Scan Website",
+ "icon-name", "applets-screenshooter",
+ NULL);
+}
+
+void
+on_delete_button_clicked ()
+{
+ gchar*f = FILENAME (scrot->name);
+ if (g_file_test (f, G_FILE_TEST_EXISTS))
+ g_remove (f);
+ g_free (f);
+}
+
+void
+on_scrot_button_clicked (GtkButton *button)
+{
+ scrot_widget (scrot->selected);
+}
+
+void
+widget_selected (GtkTreeSelection *selection, Scrot *scrot)
+{
+ GtkTreeModel *model = GTK_TREE_MODEL (scrot->liststore);
+ GtkWidget *widget;
+ GList *rows = gtk_tree_selection_get_selected_rows (selection,
+ &model);
+ GtkTreeIter iter;
+
+ gtk_tree_model_get_iter (model, &iter, rows->data);
+ gtk_tree_model_get (model, &iter,
+ COLUMN_WIDGET, &(widget),
+ COLUMN_NAME, &(scrot->name),
+ -1);
+
+ select_widget (widget);
+}
+
+gboolean
+scrot_widget_foreach (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter)
+{
+ GtkWidget *widget;
+
+ gtk_tree_model_get (model, iter,
+ COLUMN_WIDGET, &widget,
+ -1);
+
+ select_widget (widget);
+ scrot_widget (widget);
+
+
+ return FALSE;
+}
+
+/* FUNCTIONS */
+void
+quit (void)
+{
+ gtk_main_quit ();
+}
+
+/* Iterate list store to trigger a scrot if the scroter is ready */
+gboolean
+query_widget_scrot ()
+{
+ static GtkTreeIter iter;
+ GtkWidget *widget;
+ GtkTreeSelection *selection;
+
+ if (scrot->busy) {
+ return TRUE;
+ }
+
+
+ if (scrot->first) {
+ scrot->first = FALSE;
+ gtk_tree_model_get_iter_first (GTK_TREE_MODEL (scrot->liststore),
+ &iter);
+ }
+ else {
+ gtk_tree_model_iter_next (GTK_TREE_MODEL (scrot->liststore),
+ &iter);
+ }
+
+ if (gtk_list_store_iter_is_valid (scrot->liststore, &iter)) {
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (scrot->treeview));
+ gtk_tree_selection_select_iter (selection, &iter);
+ scrot_widget (widget);
+ return TRUE; /* continue */
+ }
+ else {
+ /* no more iter valid, stop loop. */
+ return FALSE;
+ }
+}
+
+void
+select_widget (GtkWidget *widget)
+{
+ /* clean */
+ GtkWidget *child = gtk_bin_get_child (GTK_BIN (scrot->alignment));
+ if (child)
+ gtk_container_remove (GTK_CONTAINER (scrot->alignment), child);
+
+ /* select */
+ scrot->selected = widget;
+ if (GTK_IS_WINDOW (scrot->selected)) {
+ g_object_set (scrot->selected, "modal", FALSE, NULL);
+ gtk_widget_hide_all (scrot->container);
+ gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (scrot->toggle), FALSE);
+ }
+ else {
+ gtk_container_add (GTK_CONTAINER (scrot->alignment),
+ scrot->selected);
+ scrot->selected = scrot->alignment;
+ gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (scrot->toggle), TRUE);
+ }
+}
+
+GdkPixbuf*
+get_pixbuf (GtkWidget *widget)
+{
+ GdkDrawable *drawable;
+ GdkPixbuf *pixbuf, *tmp;
+ GdkRectangle rect;
+ GdkBitmap *mask;
+ GError *error = NULL;
+ gint x, y, w, h;
+ guchar *src, *dest;
+
+ gdk_threads_enter ();
+
+ g_usleep (.25 * 1000000);
+
+ if (GTK_IS_WINDOW (widget)) {
+ gdk_window_get_frame_extents (widget->window, &rect);
+ x = rect.x;
+ y = rect.y;
+ w = rect.width;
+ h = rect.height;
+ drawable = gdk_get_default_root_window ();
+ }
+ else {
+ x = widget->allocation.x;
+ y = widget->allocation.y;
+ w = widget->allocation.width;
+ h = widget->allocation.height;
+ drawable = GDK_DRAWABLE (widget->window);
+ }
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, w, h);
+ gdk_pixbuf_fill (pixbuf, 0xFFFFFFFF);
+ gdk_pixbuf_get_from_drawable (pixbuf, drawable, NULL, x, y, 0, 0, w, h);
+
+ if (GTK_IS_WINDOW (widget)) {
+ gtk_widget_hide_all (widget);
+ }
+
+ gdk_threads_leave ();
+
+ return pixbuf;
+}
+
+gboolean
+monitor ()
+{
+ if (scrot->busy) {
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (scrot->progressbar), scrot->progress);
+ gtk_progress_bar_set_text (GTK_PROGRESS_BAR (scrot->progressbar),
+ g_strdup_printf ("%3.0f%%", scrot->progress * 100));
+ return TRUE;
+ }
+ else {
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (scrot->progressbar), 0.);
+ gtk_progress_bar_set_text (GTK_PROGRESS_BAR (scrot->progressbar), NULL);
+ gtk_statusbar_push (GTK_STATUSBAR (scrot->statusbar), scrot->stid, scrot->status);
+ return FALSE;
+ }
+}
+
+void
+scrot_widget ()
+{
+ GError *error = NULL;
+ GThread *thread;
+ g_return_if_fail (scrot->selected);
+
+ gtk_statusbar_push (GTK_STATUSBAR (scrot->statusbar), scrot->stid,
+ g_strdup_printf ("Shooting %s.", scrot->name));
+
+
+
+ if (GTK_IS_WINDOW (scrot->selected)) {
+ gtk_window_present (GTK_WINDOW (scrot->selected));
+ }
+ gtk_widget_show_all (scrot->selected);
+
+ thread = g_thread_create ((GThreadFunc) scrot_widget_thread, scrot->selected,
+ TRUE, &error);
+ g_timeout_add (42, (GSourceFunc) monitor, NULL);
+ g_thread_yield ();
+}
+
+/* Use the power of Gdk and Gegl to generate nice screenshot of @widget,
+ adding a 10px shadow and for non GtkWindow widget a 1px black solid border.
+ Thanks Kevin from #gegl for helping debugging.
+*/
+void
+scrot_widget_thread (GtkWidget *widget)
+{
+ g_return_if_fail (!scrot->busy);
+ scrot->busy = TRUE;
+ GdkPixbuf *screenshot, *image;
+ GError *error = NULL;
+ GThread *thread;
+ GeglNode *root;
+ GeglNode *color, *crop, *over, *over1, *shift, *crop1, *save;
+ GeglNode *bg, *crop2, *shadow;
+ GeglNode *load, *shift1;
+ GeglProcessor *processor;
+ gchar *filename;
+ GeglRectangle roi;
+ gdouble progress;
+ gint h, w;
+ guchar *data;
+
+ filename = FILENAME (scrot->name);
+
+
+
+ screenshot = get_pixbuf (widget);
+ w = gdk_pixbuf_get_width (screenshot);
+ h = gdk_pixbuf_get_height (screenshot);
+
+#define LEN 5.
+#define N 3.
+#define W ((gdouble) w + (N * LEN))
+#define H ((gdouble) h + (N * LEN))
+
+ root = gegl_node_new ();
+
+ color = gegl_node_new_child (root,
+ "operation", "color",
+ "value", gegl_color_new ("white"),
+ NULL);
+
+ crop = gegl_node_new_child (root,
+ "operation", "crop",
+ "x", 0.,
+ "y", 0.,
+ "width", W,
+ "height", H,
+ NULL);
+
+ over = gegl_node_new_child (root,
+ "operation", "over",
+ NULL);
+
+ over1 = gegl_node_new_child (root,
+ "operation", "over",
+ NULL);
+
+ crop1 = gegl_node_new_child (root,
+ "operation", "crop",
+ "x", 0.,
+ "y", 0.,
+ "width", W,
+ "height", H,
+ NULL);
+
+ shift = gegl_node_new_child (root,
+ "operation", "shift",
+ "x", LEN,
+ "y", LEN,
+ NULL);
+
+
+ save = gegl_node_new_child (root,
+ "operation", "png-save",
+ "path", filename,
+ NULL);
+
+
+ gegl_node_link_many (color, crop, over, over1, crop1, save, NULL);
+
+ /* border */
+ bg = gegl_node_new_child (root,
+ "operation", "color",
+ NULL);
+
+
+ if (GTK_IS_WINDOW (widget)) {
+ crop2 = gegl_node_new_child (root,
+ "operation", "crop",
+ "x", 0.,
+ "y", 0.,
+ "width", (gdouble) w,
+ "height", (gdouble) h,
+ NULL);
+ }
+ else {
+ crop2 = gegl_node_new_child (root,
+ "operation", "crop",
+ "x", 0.,
+ "y", 0.,
+ "width", (gdouble) w + 2.,
+ "height", (gdouble) h + 2.,
+ NULL);
+ }
+
+ shadow = gegl_node_new_child (over,
+ "operation", "dropshadow",
+ "opacity", .9,
+ "x", LEN,
+ "y", LEN,
+ "radius", LEN - LEN/5.,
+ NULL);
+
+ gegl_node_link_many (bg, crop2, shadow, NULL);
+ gegl_node_connect_to (shadow, "output", over, "aux");
+
+ /* image */
+ load = gegl_node_new_child (over1,
+ "operation", "pixbuf",
+ "pixbuf", screenshot,
+ NULL);
+
+ if (GTK_IS_WINDOW (widget)) {
+ shift1 = gegl_node_new_child (over1,
+ "operation", "nop",
+ NULL);
+ }
+ else {
+ shift1 = gegl_node_new_child (over1,
+ "operation", "shift",
+ "x", 1.,
+ "y", 1.,
+ NULL);
+ }
+
+ gegl_node_link_many (load, shift1, NULL);
+ gegl_node_connect_to (shift1, "output", over1, "aux");
+
+#undef W
+#undef H
+#undef N
+#undef LEN
+
+ g_free (scrot->status);
+ scrot->status = g_strdup_printf ("Processing %s.", scrot->name);
+
+ processor = gegl_node_new_processor (save, NULL);
+ while (gegl_processor_work (processor, &(scrot->progress)))
+ g_debug ("%3.2f%% completed", scrot->progress);
+ scrot->busy = FALSE;
+ gegl_processor_destroy (processor);
+
+ g_object_unref (screenshot);
+ scrot->status = g_strdup_printf ("Wrote %s.", filename);
+ g_free (filename);
+}
+
+/* loop list store and scrot all widget */
+void
+scrot_all_widgets ()
+{
+ gtk_tree_model_foreach (GTK_TREE_MODEL (scrot->liststore),
+ (GtkTreeModelForeachFunc) scrot_widget_foreach,
+ NULL);
+}
+
+/* Add a widget to the liststore */
+void
+add_widget (Scrot *scrot, GtkWidget *widget, const gchar *type_name)
+{
+ GtkTreeIter iter;
+ const gchar *name = type_name ? type_name : G_OBJECT_TYPE_NAME (widget);
+ gtk_list_store_insert_with_values (scrot->liststore, &iter, G_MAXINT,
+ COLUMN_NAME, name,
+ COLUMN_WIDGET, widget,
+ -1);
+}
+
+void
+populate_liststore (Scrot *scrot)
+{
+ GtkWidget *widget;
+ GtkTreeIter iter;
+ GtkTreeSelection *selection;
+ GnomeScanJob *job;
+ GSList *pspecs = NULL;
+ GSList *formats = gdk_pixbuf_get_formats ();
+ GValue *value;
+ GValueArray *values;
+
+ /* we drop formats before PNG in order to have a nice PNG in the selector (not a wmf) */
+ for (; g_ascii_strcasecmp (*(gdk_pixbuf_format_get_extensions (formats->data)), "png") != 0 ;
+ formats = formats->next);
+
+ GQuark group = g_quark_from_static_string ("Option Group");
+
+/* pspecs = g_slist_append (pspecs, */
+/* gs_param_spec_filenames ("filenames", */
+/* g_type_name (GS_TYPE_PARAM_FILENAMES), */
+/* g_type_name (GS_TYPE_PARAM_FILENAMES), */
+/* group, formats, 0)); */
+/* pspecs = g_slist_append (pspecs, */
+/* gs_param_spec_output_filename ("output-filename", */
+/* g_type_name(GS_TYPE_PARAM_OUTPUT_FILENAME), */
+/* g_type_name(GS_TYPE_PARAM_OUTPUT_FILENAME), */
+/* group, formats, 0)); */
+
+/* values = g_value_array_new(1); */
+/* value = g_new0(GValue, 1); */
+/* g_value_init (value, G_TYPE_STRING); */
+/* g_value_set_string (value, "Value 0"); */
+/* g_value_array_append(values, value); */
+/* pspecs = g_slist_append (pspecs, */
+/* gs_param_spec_enum("enum", */
+/* g_type_name (GS_TYPE_PARAM_ENUM), */
+/* g_type_name (GS_TYPE_PARAM_ENUM), */
+/* group, values, value, 0)); */
+
+ job = gnome_scan_job_new ();
+ add_widget (scrot, gnome_scan_dialog_new (NULL, job), NULL);
+ add_widget (scrot,
+ gnome_scan_acquisition_dialog_new (NULL, job),
+ NULL);
+/* for (; pspecs ; pspecs = pspecs->next) { */
+/* add_widget (scrot, gnome_scan_param_widget_new (pspecs->data), */
+/* g_param_spec_get_nick (pspecs->data)); */
+/* } */
+
+ /* select first*/
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (scrot->treeview));
+ gtk_tree_model_get_iter_first (GTK_TREE_MODEL (scrot->liststore), &iter);
+ gtk_tree_selection_select_iter (selection, &iter);
+}
+
+build_ui (Scrot *scrot)
+{
+ GtkWidget *vbox;
+ GtkWidget *toolbar, *hbox;
+ GtkToolItem *item;
+ GtkWidget *scrolled;
+ GtkWidget *sep, *alignment;
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *renderer;
+ GtkTreeSelection *selection;
+ gint count;
+
+ scrot->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_container_add (GTK_CONTAINER (scrot->window), vbox);
+
+ gtk_window_set_resizable (GTK_WINDOW (scrot->window), FALSE);
+ gtk_window_set_title (GTK_WINDOW (scrot->window), "Gnome Scan Widget Screenshooter");
+ gtk_window_set_icon_name (GTK_WINDOW (scrot->window), "applets-screenshooter");
+ g_signal_connect (scrot->window, "delete-event", (GCallback) quit, NULL);
+
+ /* toolbar */
+ toolbar = gtk_toolbar_new ();
+ gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, TRUE, 0);
+
+ count = 0;
+ gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), FALSE);
+
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_EXECUTE);
+ gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), "Scrot all");
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, count++);
+ gtk_tool_item_set_tooltip (item, scrot->tips,
+ "Take all screenshots",
+ "Loop the list of widget and take a screenshot of each one");
+ g_signal_connect (item, "clicked", (GCallback) on_execute_button_clicked, NULL);
+
+ item = gtk_separator_tool_item_new ();
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, count++);
+
+ item = gtk_tool_button_new (NULL, "Take Screenshot");
+ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "applets-screenshooter");
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, count++);
+ gtk_tool_item_set_tooltip (item, scrot->tips,
+ "Take screenshot",
+ "Take screenshot of the selected widget");
+ g_signal_connect (item, "clicked", (GCallback) on_scrot_button_clicked, NULL);
+
+ scrot->toggle = item = gtk_toggle_tool_button_new ();
+ gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), "Show/Hide");
+ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "stock_show-all");
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, count++);
+ gtk_tool_item_set_tooltip (item, scrot->tips,
+ "Show/Hide selected widget",
+ "Show or hide selected widget allowing you to tune UI, etc.");
+ g_signal_connect (item, "toggled", (GCallback) on_show_hide_button_clicked, NULL);
+
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_DELETE);
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, count++);
+ gtk_tool_item_set_tooltip (item, scrot->tips,
+ "Delete screenshot",
+ "Delete the file from the screenshots directory.");
+ g_signal_connect (item, "clicked", (GCallback) on_delete_button_clicked, NULL);
+
+ item = gtk_separator_tool_item_new ();
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, count++);
+
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_ABOUT);
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, count++);
+ g_signal_connect (item, "clicked", (GCallback) on_about_button_clicked, NULL);
+
+ item = gtk_tool_button_new_from_stock (GTK_STOCK_QUIT);
+ gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, count++);
+ g_signal_connect (item, "clicked", (GCallback) quit, NULL);
+
+ /* content */
+ hbox = gtk_hbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
+
+ /* treeview */
+ scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_box_pack_start (GTK_BOX (hbox), scrolled, TRUE, TRUE, 0);
+
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+
+ scrot->liststore = gtk_list_store_new (N_COLUMNS,
+ G_TYPE_STRING,
+ G_TYPE_OBJECT);
+
+ scrot->treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (scrot->liststore));
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled), scrot->treeview);
+ gtk_widget_set_size_request (scrolled, -1, 256);
+
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Widget", renderer,
+ "text", COLUMN_NAME,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (scrot->treeview), column);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (scrot->treeview));
+ g_signal_connect (selection, "changed", (GCallback) widget_selected, scrot);
+
+ /* container */
+ scrot->container = gtk_hbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (hbox), scrot->container, TRUE, TRUE, 0);
+
+ sep = gtk_vseparator_new ();
+ gtk_box_pack_start (GTK_BOX (scrot->container), sep, FALSE, TRUE, 0);
+
+ alignment = gtk_alignment_new (.5, .5, 0., 0.);
+ gtk_box_pack_start (GTK_BOX (scrot->container), alignment, TRUE, TRUE, 0);
+
+ scrot->alignment = gtk_alignment_new (.5, .5, 0., 0.);
+ gtk_container_set_border_width (GTK_CONTAINER (scrot->alignment), 12);
+ gtk_container_add (GTK_CONTAINER (alignment), scrot->alignment);
+
+
+ /* status bar */
+ scrot->statusbar = gtk_statusbar_new ();
+ gtk_box_pack_start (GTK_BOX (vbox), scrot->statusbar, FALSE, TRUE, 0);
+ gtk_box_set_spacing (GTK_BOX (scrot->statusbar), 6);
+ gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (scrot->statusbar), FALSE);
+
+ scrot->progressbar = gtk_progress_bar_new ();
+ gtk_box_pack_end (GTK_BOX (scrot->statusbar), scrot->progressbar, FALSE, FALSE, 0);
+
+ scrot->stid = gtk_statusbar_get_context_id (GTK_STATUSBAR (scrot->statusbar), "scrot");
+
+ gtk_statusbar_push (GTK_STATUSBAR (scrot->statusbar), scrot->stid, "Ready");
+ gtk_widget_show_all (scrot->window);
+}
+
+
+gint
+main (gint argc, gchar **argv)
+{
+ GnomeProgram *program;
+ GladeXML *xml;
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *renderer;
+ GtkTreeSelection *selection;
+ GError *error = NULL;
+
+ program = gnome_program_init ("gs-scrot", VERSION,
+ LIBGNOMEUI_MODULE,
+ argc, argv,
+ GNOME_PARAM_NONE);
+
+ gnome_scan_init (&argc, &argv);
+ gegl_init (&argc, &argv);
+
+ scrot = g_new0 (Scrot, 1);
+ scrot->busy = FALSE;
+ scrot->tips = gtk_tooltips_new ();
+
+ build_ui (scrot);
+ gtk_widget_show_all (scrot->window);
+ /* populate liststore */
+ g_thread_create ((GThreadFunc) populate_liststore, scrot, FALSE, &error);
+
+ gtk_main ();
+
+ return (0);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]