gnome-scan r631 - in trunk: . lib modules



Author: phsadleder
Date: Tue Nov 11 16:01:46 2008
New Revision: 631
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=631&view=rev

Log:
Refactor to use GnomeScanScanner and gnome_scan_scanner_* consequently.


Modified:
   trunk/   (props changed)
   trunk/ChangeLog
   trunk/lib/gnome-scan-common.vala
   trunk/lib/gnome-scan-dialog.c
   trunk/lib/gnome-scan-job.c
   trunk/lib/gnome-scan-plugin.c
   trunk/lib/gnome-scan-plugin.h
   trunk/lib/gnome-scan-scanner.c
   trunk/lib/gnome-scan-scanner.h
   trunk/modules/gsane-scanner.c

Modified: trunk/lib/gnome-scan-common.vala
==============================================================================
--- trunk/lib/gnome-scan-common.vala	(original)
+++ trunk/lib/gnome-scan-common.vala	Tue Nov 11 16:01:46 2008
@@ -59,7 +59,7 @@
 		 * @res:	the resolution in dpi
 		 *
 		 * Convert @val from @from unit to @to at @res resolution. Useful for
-		 * preview area, #GnomeScanner, etc.
+		 * preview area, #GnomeScanScanner, etc.
 		 **/
 		public double convert(double val,
 							  Unit from,
@@ -202,4 +202,4 @@
 			}
 		}
 	}
-}
\ No newline at end of file
+}

Modified: trunk/lib/gnome-scan-dialog.c
==============================================================================
--- trunk/lib/gnome-scan-dialog.c	(original)
+++ trunk/lib/gnome-scan-dialog.c	Tue Nov 11 16:01:46 2008
@@ -824,9 +824,9 @@
 	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_ICON, gnome_scan_scanner_get_icon_name (scanner),
 									   COLUMN_NAME, gnome_scan_plugin_get_name (GNOME_SCAN_PLUGIN (scanner)),
-									   COLUMN_STATUS, gnome_scanner_get_status_string (GNOME_SCAN_SCANNER (scanner)),
+									   COLUMN_STATUS, gnome_scan_scanner_get_status_string (GNOME_SCAN_SCANNER (scanner)),
 									   COLUMN_OBJECT, scanner,
 									   -1);
 	g_object_set_data (G_OBJECT (scanner), "iter", iter);
@@ -855,7 +855,7 @@
 	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),
+						COLUMN_STATUS, gnome_scan_scanner_get_status_string (scanner),
 						-1);
 }
 
@@ -997,7 +997,7 @@
 {
 	GnomeScanDialogPrivate *priv = GET_PRIVATE (gsd);
 	GnomeScanScanner *scanner = gnome_scan_job_get_scanner (priv->job);
-	if (gnome_scanner_get_status (scanner) != GNOME_SCAN_STATUS_READY) {
+	if (gnome_scan_scanner_get_status (scanner) != GNOME_SCAN_STATUS_READY) {
 		return TRUE;
 	}
 	else {

Modified: trunk/lib/gnome-scan-job.c
==============================================================================
--- trunk/lib/gnome-scan-job.c	(original)
+++ trunk/lib/gnome-scan-job.c	Tue Nov 11 16:01:46 2008
@@ -505,7 +505,7 @@
 	}
 
 	gegl_node_set (priv->gegl_convert,
-				   "format", gnome_scanner_get_output_format (priv->scanner),
+				   "format", gnome_scan_scanner_get_output_format (priv->scanner),
 				   NULL);
 
 	job->stage = _("Acquiring from scanner");

Modified: trunk/lib/gnome-scan-plugin.c
==============================================================================
--- trunk/lib/gnome-scan-plugin.c	(original)
+++ trunk/lib/gnome-scan-plugin.c	Tue Nov 11 16:01:46 2008
@@ -26,7 +26,7 @@
  *
  * A #GnomeScanPlugin extends the processing pipeline. Only processing
  * plugin derive directly #GnomeScanPlugin. Source and Sink must
- * derive from #GnomeScanner and #GnomeScanSink. Basically, a plugin
+ * derive from #GnomeScanScanner 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.

Modified: trunk/lib/gnome-scan-plugin.h
==============================================================================
--- trunk/lib/gnome-scan-plugin.h	(original)
+++ trunk/lib/gnome-scan-plugin.h	Tue Nov 11 16:01:46 2008
@@ -71,9 +71,9 @@
  * GnomeScanPlugin:
  * @params: the pool of params
  *
- * #GnomeScanPlugin is the base class for #GnomeScanner and
+ * #GnomeScanPlugin is the base class for #GnomeScanScanner and
  * #GnomeScanSink. The @buffer property is considered as the output of
- * #a #GnomeScanner, and the input of a #GnomeScanSink.
+ * #a #GnomeScanScanner, and the input of a #GnomeScanSink.
  **/
 struct _GnomeScanPlugin
 {

Modified: trunk/lib/gnome-scan-scanner.c
==============================================================================
--- trunk/lib/gnome-scan-scanner.c	(original)
+++ trunk/lib/gnome-scan-scanner.c	Tue Nov 11 16:01:46 2008
@@ -66,21 +66,21 @@
 static GnomeScanPluginClass* parent_class = NULL;
 static guint signals[LAST_SIGNAL] = { 0 };
 
-G_DEFINE_TYPE (GnomeScanScanner, gnome_scanner, GNOME_SCAN_TYPE_PLUGIN);
+G_DEFINE_TYPE (GnomeScanScanner, gnome_scan_scanner, GNOME_SCAN_TYPE_PLUGIN);
 
 static void
-gnome_scanner_init (GnomeScanScanner *object)
+gnome_scan_scanner_init (GnomeScanScanner *object)
 {
 }
 
 static void
-gnome_scanner_finalize (GObject *object)
+gnome_scan_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)
+gnome_scan_scanner_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
 {
   g_return_if_fail (GNOME_SCAN_IS_SCANNER (object));
 
@@ -99,7 +99,7 @@
 }
 
 static void
-gnome_scanner_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+gnome_scan_scanner_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
 {
   g_return_if_fail (GNOME_SCAN_IS_SCANNER (object));
 
@@ -109,7 +109,7 @@
       /* TODO: Add getter for "sensors" property here */
       break;
     case PROP_ICON_NAME:
-      g_value_set_string (value, gnome_scanner_get_icon_name (GNOME_SCAN_SCANNER (object)));
+      g_value_set_string (value, gnome_scan_scanner_get_icon_name (GNOME_SCAN_SCANNER (object)));
       break;
     case PROP_STATUS:
       g_value_set_enum (value, GNOME_SCAN_SCANNER (object)->status);
@@ -121,15 +121,15 @@
 }
 
 static void
-gnome_scanner_class_init (GnomeScanScannerClass *klass)
+gnome_scan_scanner_class_init (GnomeScanScannerClass *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 (GnomeScanScannerPrivate));
-  object_class->finalize = gnome_scanner_finalize;
-  object_class->set_property = gnome_scanner_set_property;
-  object_class->get_property = gnome_scanner_get_property;
+  object_class->finalize = gnome_scan_scanner_finalize;
+  object_class->set_property = gnome_scan_scanner_set_property;
+  object_class->get_property = gnome_scan_scanner_get_property;
 
   /**
    * GnomeScanScanner:sensors:
@@ -201,7 +201,7 @@
 
 
 /**
- * gnome_scanner_get_icon_name:
+ * gnome_scan_scanner_get_icon_name:
  * @scanner: a #GnomeScanScanner
  * 
  * Return the icon-name representing the type of the device.
@@ -209,33 +209,33 @@
  * Returns: a icon-name string
  **/
 const gchar*
-gnome_scanner_get_icon_name (GnomeScanScanner *scanner)
+gnome_scan_scanner_get_icon_name (GnomeScanScanner *scanner)
 {
   return GET_PRIVATE (scanner)->icon_name;
 }
 
 /**
- * gnome_scanner_settings_changed:
+ * gnome_scan_scanner_settings_changed:
  * @scanner: a #GnomeScanScanner
  *
  * Emit #GnomeScanScanner::settings-changed signal.
  *
  */
 void
-gnome_scanner_settings_changed (GnomeScanScanner *scanner)
+gnome_scan_scanner_settings_changed (GnomeScanScanner *scanner)
 {
   g_signal_emit (scanner, signals[SETTINGS_CHANGED], 0);
 }
 
 
 GnomeScanStatus
-gnome_scanner_get_status			(GnomeScanScanner *scanner)
+gnome_scan_scanner_get_status			(GnomeScanScanner *scanner)
 {
   return GNOME_SCAN_SCANNER (scanner)->status;
 }
 																
 /**
- * gnome_scanner_get_status_string:
+ * gnome_scan_scanner_get_status_string:
  * @scanner: a #GnomeScanScanner
  *
  * Returns the translated string for the current @scanner status.
@@ -243,7 +243,7 @@
  * Returns: a translated string.
  **/
 const gchar*
-gnome_scanner_get_status_string		(GnomeScanScanner *scanner)
+gnome_scan_scanner_get_status_string		(GnomeScanScanner *scanner)
 {
   static const gchar* status_strings[] = {
     N_("Unknown"),
@@ -256,7 +256,7 @@
 
 
 void
-gnome_scanner_set_status (GnomeScanScanner *scanner, GnomeScanStatus status)
+gnome_scan_scanner_set_status (GnomeScanScanner *scanner, GnomeScanStatus status)
 {
   if (scanner->status != status) {
     scanner->status = status;
@@ -265,7 +265,7 @@
 }
 
 const gchar*
-gnome_scanner_get_output_format	(GnomeScanScanner *scanner)
+gnome_scan_scanner_get_output_format	(GnomeScanScanner *scanner)
 {
   GnomeScanScannerClass *klass = GNOME_SCAN_SCANNER_GET_CLASS (scanner);
   if (klass->get_output_format) {

Modified: trunk/lib/gnome-scan-scanner.h
==============================================================================
--- trunk/lib/gnome-scan-scanner.h	(original)
+++ trunk/lib/gnome-scan-scanner.h	Tue Nov 11 16:01:46 2008
@@ -29,7 +29,7 @@
 
 G_BEGIN_DECLS
 
-#define GNOME_SCAN_TYPE_SCANNER             (gnome_scanner_get_type ())
+#define GNOME_SCAN_TYPE_SCANNER             (gnome_scan_scanner_get_type ())
 #define GNOME_SCAN_SCANNER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_SCAN_TYPE_SCANNER, GnomeScanScanner))
 #define GNOME_SCAN_SCANNER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_SCAN_TYPE_SCANNER, GnomeScanScannerClass))
 #define GNOME_SCAN_IS_SCANNER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_SCAN_TYPE_SCANNER))
@@ -69,14 +69,14 @@
   GnomeScanStatus status;
 };
 
-GType			gnome_scanner_get_type		(void) G_GNUC_CONST;
-const gchar*		gnome_scanner_get_icon_name	(GnomeScanScanner *scanner);
-void			gnome_scanner_settings_changed	(GnomeScanScanner *scanner);
-void			gnome_scanner_set_status	(GnomeScanScanner *scanner,
+GType			gnome_scan_scanner_get_type		(void) G_GNUC_CONST;
+const gchar*		gnome_scan_scanner_get_icon_name	(GnomeScanScanner *scanner);
+void			gnome_scan_scanner_settings_changed	(GnomeScanScanner *scanner);
+void			gnome_scan_scanner_set_status	(GnomeScanScanner *scanner,
 							 GnomeScanStatus status);
-GnomeScanStatus		gnome_scanner_get_status	(GnomeScanScanner *scanner);
-const gchar*		gnome_scanner_get_status_string	(GnomeScanScanner *scanner);
-const gchar*		gnome_scanner_get_output_format	(GnomeScanScanner *scanner);
+GnomeScanStatus		gnome_scan_scanner_get_status	(GnomeScanScanner *scanner);
+const gchar*		gnome_scan_scanner_get_status_string	(GnomeScanScanner *scanner);
+const gchar*		gnome_scan_scanner_get_output_format	(GnomeScanScanner *scanner);
 
 G_END_DECLS
 

Modified: trunk/modules/gsane-scanner.c
==============================================================================
--- trunk/modules/gsane-scanner.c	(original)
+++ trunk/modules/gsane-scanner.c	Tue Nov 11 16:01:46 2008
@@ -688,7 +688,7 @@
 		NULL
 	};
 	
-	gnome_scanner_set_status (GNOME_SCAN_SCANNER (gss),
+	gnome_scan_scanner_set_status (GNOME_SCAN_SCANNER (gss),
 				  GNOME_SCAN_STATUS_BUSY);
 	
 	spec = gss_option_get_param_spec (gss, 0);
@@ -741,9 +741,9 @@
 	
 	
 	
-	gnome_scanner_set_status (GNOME_SCAN_SCANNER (gss), GNOME_SCAN_STATUS_READY);
+	gnome_scan_scanner_set_status (GNOME_SCAN_SCANNER (gss), GNOME_SCAN_STATUS_READY);
 	if (priv->changed) {
-		gnome_scanner_settings_changed (GNOME_SCAN_SCANNER (gss));
+		gnome_scan_scanner_settings_changed (GNOME_SCAN_SCANNER (gss));
 		priv->changed = FALSE;
 	}
 	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]