[maemo-commits] [maemo-commits] r16985 - projects/haf/branches/hildon-fm/fremantle/hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Dec 16 17:30:59 EET 2008
Author: rabinovich
Date: 2008-12-16 17:30:57 +0200 (Tue, 16 Dec 2008)
New Revision: 16985

Modified:
   projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c
   projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-system-model.c
Log:
correct signals for the root


Modified: projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c	2008-12-16 15:14:50 UTC (rev 16984)
+++ projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-selection.c	2008-12-16 15:30:57 UTC (rev 16985)
@@ -3478,14 +3478,14 @@
       main_iter = &temp_iter;
     }
 
-    gtk_tree_model_get(self->priv->main_model, main_iter,
-                       HILDON_FILE_SYSTEM_MODEL_COLUMN_URI, &uri,
-                       -1);
-    if(g_ascii_strcasecmp (uri, "file:///") == 0) {
-      free(uri);
-      return;
-    }
-    free(uri);
+/*     gtk_tree_model_get(self->priv->main_model, main_iter, */
+/*                        HILDON_FILE_SYSTEM_MODEL_COLUMN_URI, &uri, */
+/*                        -1); */
+/*     if(g_ascii_strcasecmp (uri, "file:///") == 0) { */
+/*       free(uri); */
+/*       return; */
+/*     } */
+/*     free(uri); */
     gtk_tree_model_sort_convert_child_iter_to_iter(GTK_TREE_MODEL_SORT
                                                    (self->priv->
                                                     dir_sort),

Modified: projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-system-model.c
===================================================================
--- projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-system-model.c	2008-12-16 15:14:50 UTC (rev 16984)
+++ projects/haf/branches/hildon-fm/fremantle/hildon-fm/hildon-file-system-model.c	2008-12-16 15:30:57 UTC (rev 16985)
@@ -2610,11 +2610,20 @@
     }
     /* Let's setup parent after children, so that adding children do not
        trigger premature "files-added" signals for parents. */
-    if(!HILDON_IS_FILE_SYSTEM_SPECIAL_LOCATION(node->data) &&
-       g_ascii_strcasecmp(HILDON_FILE_SYSTEM_SPECIAL_LOCATION(node->data)->basepath, 
-			  "file:///") != 0) {
-      setup_node_for_location(result);
+    if (g_ascii_strcasecmp(HILDON_FILE_SYSTEM_SPECIAL_LOCATION(node->data)->basepath, "file:///") != 0) {
+
+        setup_node_for_location(result);
+
     }
+    else {
+        if(HILDON_IS_FILE_SYSTEM_ROOT(node->data)) {
+            setup_node_for_location(result);
+        }
+        if(HILDON_IS_FILE_SYSTEM_LOCAL_DEVICE(node->data)) {
+            setup_node_for_location(result);
+        }
+    }
+
     return result;
 }
 


More information about the maemo-commits mailing list