[nautilus-actions] NAIImporter: make sure of the population againt which checking for existance



commit 8ad63648b1d94aefe2dbc0286aaaf58ac7cd3da7
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Dec 5 05:31:35 2011 +0100

    NAIImporter: make sure of the population againt which checking for existance

 ChangeLog              |    7 +++++++
 src/api/na-iimporter.h |   17 +++++++++++++++++
 src/core/na-importer.c |    3 +--
 3 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ee6e875..8acf75c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-12-05 Pierre Wieser <pwieser trychlos org>
+
+	* src/core/na-importer.c (import_from_uri):
+	Make sure of the population against which we check for existance.
+
+	* src/core/na-iimporter.h: Improve comment.
+
 2011-12-04 Pierre Wieser <pwieser trychlos org>
 
 	* docs/nact/Makefile.am: Work-around against #664768.
diff --git a/src/api/na-iimporter.h b/src/api/na-iimporter.h
index fe3b112..a5f284b 100644
--- a/src/api/na-iimporter.h
+++ b/src/api/na-iimporter.h
@@ -189,6 +189,23 @@ typedef enum {
  * should be systematically regenerated as a unique id, regardless of the
  * asked import mode.
  *
+ * Standard N-A callers provide a function which checks for the existance
+ * of the newly imported item :
+ * <itemizedlist>
+ *   <listitem>
+ *     <para>
+ *       first among the current list of just imported items
+ *     </para>
+ *   </listitem>
+ *   <listitem>
+ *     <para>
+ *       and then amon the items currently visible in the main window.
+ *     </para>
+ *   </listitem>
+ * </itemizedlist>
+ * Items which may have been loaded by NAPivot at the start of the
+ * application, and deleted meanwhile, are just ignored.
+ *
  * Returns: the already existing #NAObjectItem with same id, or %NULL.
  *
  * Since: 2.30
diff --git a/src/core/na-importer.c b/src/core/na-importer.c
index 48c9d5f..5189941 100644
--- a/src/core/na-importer.c
+++ b/src/core/na-importer.c
@@ -182,8 +182,7 @@ import_from_uri( const NAPivot *pivot, GList *modules, NAImporterParms *parms, c
 /*
  * to see if an imported item already exists, we have to check
  * - the current list of just imported items
- * - the main window (if any), which contains the in-memory list of items
- * - the tree in pivot which contains the 'actual' items
+ * - the main window (if any), which contains the in-memory list of items.
  */
 static NAObjectItem *
 is_importing_already_exists( const NAObjectItem *importing, ImporterExistsStr *parms )



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