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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jun 26 15:38:32 EEST 2007
Author: richard
Date: 2007-06-26 15:38:17 +0300 (Tue, 26 Jun 2007)
New Revision: 12477

Modified:
   projects/haf/trunk/hildon-fm/ChangeLog
   projects/haf/trunk/hildon-fm/configure.ac
   projects/haf/trunk/hildon-fm/debian/changelog
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-voldev.c
Log:
Fix NB#59187.

Modified: projects/haf/trunk/hildon-fm/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-fm/ChangeLog	2007-06-26 12:19:44 UTC (rev 12476)
+++ projects/haf/trunk/hildon-fm/ChangeLog	2007-06-26 12:38:17 UTC (rev 12477)
@@ -1,3 +1,25 @@
+2007-06-26  Richard Hult  <richard at imendio.com>
+
+	* configure.ac: Bump version.
+
+2007-06-25  Carlos Garnacho  <carlos at imendio.com>
+
+	Fix NB#59187, where contents in a memory card didn't update if it
+	was unmounted/changed/mounted.
+
+	* hildon-fm/hildon-file-system-voldev.c
+	(hildon_file_system_voldev_volumes_change): emit ::rescan if any
+	volume has changed, it may be one of these.
+
+	* hildon-fm/hildon-file-system-model.c
+	(notify_volumes_changed) (real_volumes_changed): also notify other
+	nodes than the ones returned by _hildon_file_system_get_locations().
+	(location_rescan): invalidate location node and its children if it
+	becomes invisible, and load the node if it becomes visible. This
+	way we don't leave invalid nodes if the location contents change
+	after being set invisible (think changing a memory card,
+	connecting the usb cable and modifying from the computer, etc...).
+
 2007-06-21  Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>
 
 	Released 1.9.32

Modified: projects/haf/trunk/hildon-fm/configure.ac
===================================================================
--- projects/haf/trunk/hildon-fm/configure.ac	2007-06-26 12:19:44 UTC (rev 12476)
+++ projects/haf/trunk/hildon-fm/configure.ac	2007-06-26 12:38:17 UTC (rev 12477)
@@ -1,5 +1,5 @@
 AC_INIT(hildon-fm/hildon-file-system-model.c)
-AM_INIT_AUTOMAKE(libhildonfm, 1.9.32)
+AM_INIT_AUTOMAKE(libhildonfm, 1.9.33)
 AM_CONFIG_HEADER(config.h)
 
 AC_CANONICAL_HOST

Modified: projects/haf/trunk/hildon-fm/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-fm/debian/changelog	2007-06-26 12:19:44 UTC (rev 12476)
+++ projects/haf/trunk/hildon-fm/debian/changelog	2007-06-26 12:38:17 UTC (rev 12477)
@@ -1,3 +1,10 @@
+libhildonfm (1:1.9.33~unreleased) unstable; urgency=low
+
+  * Fixes: NB#59187. File/Folder operations in MMC through PC does not 
+    update in MMC.
+
+ -- Richard Hult <richard at imendio.com>  Tue, 26 Jun 2007 14:32:51 +0200
+
 libhildonfm (1:1.9.32) unstable; urgency=low
 
   * Fixes: NB#59746. MP crashed when tapping on details from Clip menu.

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-06-26 12:19:44 UTC (rev 12476)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c	2007-06-26 12:38:17 UTC (rev 12477)
@@ -1781,19 +1781,25 @@
 
 static gboolean notify_volumes_changed(GNode *node, gpointer data)
 {
-    HildonFileSystemSpecialLocation *location;
+    HildonFileSystemModelNode *model_node = node->data;
 
-    if ((location = node->data) != NULL)
-        hildon_file_system_special_location_volumes_changed(location, data);
+    if (model_node->location)
+	hildon_file_system_special_location_volumes_changed(model_node->location, data);
 
     return FALSE;
 }
 
 static void real_volumes_changed(GtkFileSystem *fs, gpointer data)
 {
+    HildonFileSystemModel *model;
+    HildonFileSystemModelPrivate *priv;
+
     ULOG_DEBUG_F("entered");
 
-    g_node_traverse(_hildon_file_system_get_locations(fs),
+    model = HILDON_FILE_SYSTEM_MODEL (data);
+    priv = CAST_GET_PRIVATE(model);
+
+    g_node_traverse(priv->roots,
             G_PRE_ORDER, G_TRAVERSE_ALL, -1,
             notify_volumes_changed, fs);
 }
@@ -2437,6 +2443,7 @@
 {
     HildonFileSystemModelNode *model_node;
     HildonFileSystemModel *model;
+    GNode *child;
 
     g_assert(HILDON_IS_FILE_SYSTEM_SPECIAL_LOCATION(location));
     g_assert(node != NULL && node->data != NULL);
@@ -2446,8 +2453,22 @@
     model_node = node->data;
     model = model_node->model;
 
-    hildon_file_system_model_queue_node_reload
-      (HILDON_FILE_SYSTEM_MODEL(model), node, TRUE);
+    if (!hildon_file_system_special_location_is_visible (location))
+      {
+	unlink_file_folder(node);
+
+	child = node->children;
+	while (child)
+	  child = hildon_file_system_model_kick_node(child, model);
+      }
+    else
+      {
+	if (!link_file_folder(node, model_node->path))
+	  return;
+
+	hildon_file_system_model_queue_node_reload
+		(HILDON_FILE_SYSTEM_MODEL(model), node, TRUE);
+      }
 }
 
 static HildonFileSystemModelNode *

Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-voldev.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-voldev.c	2007-06-26 12:19:44 UTC (rev 12476)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-voldev.c	2007-06-26 12:38:17 UTC (rev 12477)
@@ -276,6 +276,7 @@
     }
 
   g_signal_emit_by_name (location, "changed");
+  g_signal_emit_by_name (location, "rescan");
 }
 
 static char *


More information about the maemo-commits mailing list