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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Nov 1 15:37:23 EET 2007
Author: marivoll
Date: 2007-11-01 15:37:22 +0200 (Thu, 01 Nov 2007)
New Revision: 14696

Modified:
   projects/haf/trunk/hildon-fm/ChangeLog
   projects/haf/trunk/hildon-fm/debian/changelog
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c
Log:
	* hildon-fm/hildon-file-system-smb.c: keep a list of pending
	handles in MyFileFolder object, cancel them on finalize. (N73898)


Modified: projects/haf/trunk/hildon-fm/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-fm/ChangeLog	2007-11-01 13:35:31 UTC (rev 14695)
+++ projects/haf/trunk/hildon-fm/ChangeLog	2007-11-01 13:37:22 UTC (rev 14696)
@@ -1,5 +1,8 @@
 2007-11-01  Marius Vollmer  <marius.vollmer at nokia.com>
 
+	* hildon-fm/hildon-file-system-smb.c: keep a list of pending
+	handles in MyFileFolder object, cancel them on finalize. (N73898)
+	
 	* hildon-fm/hildon-file-chooser-dialog.c (handle_folder_popup):
 	relax a bit the requirement of create_folder_handle being NULL,
 	just cancelling the previous operation. (N72950)

Modified: projects/haf/trunk/hildon-fm/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-fm/debian/changelog	2007-11-01 13:35:31 UTC (rev 14695)
+++ projects/haf/trunk/hildon-fm/debian/changelog	2007-11-01 13:37:22 UTC (rev 14696)
@@ -1,6 +1,6 @@
 libhildonfm (1:1.9.47~unreleased) unstable; urgency=low
 
-  * Fixes: NB#37279, NB#69201, NB#72950.
+  * Fixes: NB#37279, NB#69201, NB#72950, NB#73898.
 
  -- Marius Vollmer <marius.vollmer at nokia.com>  Thu, 01 Nov 2007 15:08:44 +0200
 

Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c	2007-11-01 13:35:31 UTC (rev 14695)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c	2007-11-01 13:37:22 UTC (rev 14696)
@@ -226,6 +226,7 @@
   int n_children_waiting;    /* The number of child folders we have
                                 asked for but not yet received.
 			     */
+  GSList *handles;
 };
 
 static GType my_file_folder_get_type (void);
@@ -282,6 +283,9 @@
     g_object_unref (c->data);
   g_list_free (folder->children);
 
+  g_slist_foreach (folder->handles, (GFunc) gtk_file_system_cancel_operation, NULL);
+  g_slist_free (folder->handles);
+
   g_object_unref (folder->filesystem);
 
   G_OBJECT_CLASS (my_file_folder_parent_class)->finalize (object);
@@ -422,6 +426,8 @@
 {
   MyFileFolder *my_folder = MY_FILE_FOLDER (data);
 
+  my_folder->handles = g_slist_remove (my_folder->handles, handle);
+
   g_object_unref (handle);
 
   if (folder)
@@ -446,12 +452,15 @@
   while (paths)
     {
       GtkFilePath *p = paths->data;
+      GtkFileSystemHandle *handle;
+
       my_folder->n_children_waiting++;
-      gtk_file_system_get_folder (my_folder->filesystem,
-                                  p,
-                                  my_folder->types,
-                                  my_file_folder_child_folder_added,
-                                  my_folder);
+      handle = gtk_file_system_get_folder (my_folder->filesystem,
+					   p,
+					   my_folder->types,
+					   my_file_folder_child_folder_added,
+					   my_folder);
+      my_folder->handles = g_slist_prepend (my_folder->handles, handle);
       paths = paths->next;
     }
 }


More information about the maemo-commits mailing list