gnome-scan r516 - in trunk: . lib
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r516 - in trunk: . lib
- Date: Tue, 26 Feb 2008 19:06:03 +0000 (GMT)
Author: bersace
Date: Tue Feb 26 19:06:03 2008
New Revision: 516
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=516&view=rev
Log:
Allow to pass NULL as setting param
Modified:
trunk/ChangeLog
trunk/lib/gnome-scan-job.c
Modified: trunk/lib/gnome-scan-job.c
==============================================================================
--- trunk/lib/gnome-scan-job.c (original)
+++ trunk/lib/gnome-scan-job.c Tue Feb 26 19:06:03 2008
@@ -25,6 +25,7 @@
/**
* 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
@@ -198,9 +199,12 @@
/**
* gnome_scan_job_new:
+ * @settings: a #GnomeScanSettings or NULL
+ * @sink: the #GnomeScanSink
+ *
*
- * Instanciate a new job. The job create its own #GnomeScanSettings
- * upon construction. Well, i don't like that, this may change later.
+ * Instanciate a new job. If @settings is null, a new
+ * #GnomeScanSettings is created.
*
* Returns: a new #GnomeScanJob
**/
@@ -208,10 +212,15 @@
gnome_scan_job_new (GnomeScanSettings *settings,
GnomeScanSink *sink)
{
+ if (settings == NULL) {
+ settings = gnome_scan_settings_new();
+ }
+
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());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]