seahorse r2770 - in trunk: . libseahorse



Author: nnielsen
Date: Sat Feb  7 03:45:47 2009
New Revision: 2770
URL: http://svn.gnome.org/viewvc/seahorse?rev=2770&view=rev

Log:
Fix problem with not creating 'missing' objects when the 'auto_retrieve' setting isn't set.

Fixes bug #570456

Modified:
   trunk/ChangeLog
   trunk/libseahorse/seahorse-context.c

Modified: trunk/libseahorse/seahorse-context.c
==============================================================================
--- trunk/libseahorse/seahorse-context.c	(original)
+++ trunk/libseahorse/seahorse-context.c	Sat Feb  7 03:45:47 2009
@@ -1094,6 +1094,7 @@
 seahorse_context_discover_objects (SeahorseContext *sctx, GQuark ktype, 
                                    GSList *rawids)
 {
+    SeahorseOperation *op = NULL;
     GList *robjects = NULL;
     GQuark id = 0;
     GSList *todiscover = NULL;
@@ -1101,7 +1102,6 @@
     SeahorseSource *sksrc;
     SeahorseObject* sobj;
     SeahorseLocation loc;
-    SeahorseOperation *op;
     GSList *l;
 
     if (!sctx)
@@ -1159,27 +1159,27 @@
         /* Running operations ref themselves */
         g_object_unref (op);
     }
-    
+
     /* Start a discover process on all todiscover */
     if (seahorse_gconf_get_boolean (AUTORETRIEVE_KEY) && todiscover) {
         op = seahorse_context_retrieve_objects (sctx, ktype, todiscover, NULL);
-
-        /* Add unknown objects for all these */
-        sksrc = seahorse_context_find_source (sctx, ktype, SEAHORSE_LOCATION_MISSING);
-        for (l = todiscover; l; l = g_slist_next (l)) {
-            if (sksrc) {
-                sobj = seahorse_unknown_source_add_object (SEAHORSE_UNKNOWN_SOURCE (sksrc), 
-                                                           GPOINTER_TO_UINT (l->data), op);
-                robjects = g_list_prepend (robjects, sobj);
-            }
-        }
-        
-        g_slist_free (todiscover);
         
         /* Running operations ref themselves */
         g_object_unref (op);
     }
-    
+
+    /* Add unknown objects for all these */
+    sksrc = seahorse_context_find_source (sctx, ktype, SEAHORSE_LOCATION_MISSING);
+    for (l = todiscover; l; l = g_slist_next (l)) {
+        if (sksrc) {
+            sobj = seahorse_unknown_source_add_object (SEAHORSE_UNKNOWN_SOURCE (sksrc), 
+                                                       GPOINTER_TO_UINT (l->data), op);
+            robjects = g_list_prepend (robjects, sobj);
+        }
+    }
+
+    g_slist_free (todiscover);
+
     return robjects;
 }
 



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