[maemo-commits] [maemo-commits] r12973 - in projects/haf/trunk/hildon-fm: . debian hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jul 31 20:38:38 EEST 2007
Author: marivoll
Date: 2007-07-31 20:38:36 +0300 (Tue, 31 Jul 2007)
New Revision: 12973

Modified:
   projects/haf/trunk/hildon-fm/ChangeLog
   projects/haf/trunk/hildon-fm/debian/changelog
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c
Log:
	* hildon-fm/hildon-file-system-model.c
	(hildon_file_system_model_add_node): Set file_info of model_node
	even if the model_node was already present since the file_info
	might have been NULL (N62101).


Modified: projects/haf/trunk/hildon-fm/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-fm/ChangeLog	2007-07-31 16:09:25 UTC (rev 12972)
+++ projects/haf/trunk/hildon-fm/ChangeLog	2007-07-31 17:38:36 UTC (rev 12973)
@@ -1,3 +1,10 @@
+2007-07-31  Marius Vollmer  <marius.vollmer at nokia.com>
+
+	* hildon-fm/hildon-file-system-model.c
+	(hildon_file_system_model_add_node): Set file_info of model_node
+	even if the model_node was already present since the file_info
+	might have been NULL (N62101).
+	
 2007-07-30  Marius Vollmer  <marius.vollmer at nokia.com>
 
 	Release 1.9.36

Modified: projects/haf/trunk/hildon-fm/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-fm/debian/changelog	2007-07-31 16:09:25 UTC (rev 12972)
+++ projects/haf/trunk/hildon-fm/debian/changelog	2007-07-31 17:38:36 UTC (rev 12973)
@@ -1,6 +1,6 @@
 libhildonfm (1:1.9.37~unreleased) unstable; urgency=low
 
-  * 
+  * Fixes: NB#62101.
 
  -- Marius Vollmer <marius.vollmer at nokia.com>  Mon, 30 Jul 2007 20:09:58 +0300
 

Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c	2007-07-31 16:09:25 UTC (rev 12972)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c	2007-07-31 17:38:36 UTC (rev 12973)
@@ -1074,7 +1074,6 @@
       g_value_set_object(value, model_node->icon_cache);
       update_cache_queue(priv, node);
       break;
-      /* Fall thru... */
     case HILDON_FILE_SYSTEM_MODEL_COLUMN_ICON_COLLAPSED:
         if (!model_node->icon_cache_collapsed)
             model_node->icon_cache_collapsed =
@@ -1856,20 +1855,6 @@
 
     ULOG_INFO("Adding %s", (const char *) path);
 
-    /* First check if this item is already part of the model */
-    {
-      node =
-        hildon_file_system_model_search_path_internal (parent_node,
-                                                       path, FALSE);
-
-        if (node) {
-            HildonFileSystemModelNode *model_node = node->data;
-            g_assert(model_node);
-            model_node->present_flag = TRUE;
-            return NULL;
-        }
-    }
-
     if (parent_folder) {
         GError *error = NULL;
         /* This can cause main loop execution on vfs backend */
@@ -1898,6 +1883,23 @@
         g_assert(file_info != NULL);
     }
 
+    /* First check if this item is already part of the model */
+    {
+      node =
+        hildon_file_system_model_search_path_internal (parent_node,
+                                                       path, FALSE);
+
+        if (node) {
+            HildonFileSystemModelNode *model_node = node->data;
+            g_assert(model_node);
+            model_node->present_flag = TRUE;
+	    if (model_node->info)
+	      gtk_file_info_free (model_node->info);
+	    model_node->info = file_info;
+            return NULL;
+        }
+    }
+
     model_node = g_new0(HildonFileSystemModelNode, 1);
     model_node->info = file_info;
     model_node->model = HILDON_FILE_SYSTEM_MODEL(model);


More information about the maemo-commits mailing list