gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r11994 - gnunet gnunet-gtk/src


From: gnunet
Subject: [GNUnet-SVN] r11994 - gnunet gnunet-gtk/src
Date: Sun, 27 Jun 2010 22:04:49 +0200

Author: grothoff
Date: 2010-06-27 22:04:49 +0200 (Sun, 27 Jun 2010)
New Revision: 11994

Modified:
   gnunet-gtk/src/fs_event_handler.c
   gnunet/TODO
Log:
support check for existing URI

Modified: gnunet/TODO
===================================================================
--- gnunet/TODO 2010-06-27 20:04:05 UTC (rev 11993)
+++ gnunet/TODO 2010-06-27 20:04:49 UTC (rev 11994)
@@ -6,17 +6,6 @@
 * UTIL:
   - only connect() sockets that are ready (select()) [Nils]
     [On W32, we need to select after calling socket before doing connect etc.]
-* GNUNET-GTK: [CG]
-  - from-URI only tab:
-    + display from open directory
-  - recursive downloads:
-    + download start: recursive/directory (!)
-      * display directory content as part of 'open directory'
-      * display directory content from download as part of search       
-      * honor recursion option (may already be done, check!)
-  - TEST download-start from-URI only in event handler
-  - TEST download lost-parent 
-
 * BUGS:
   Jun 27 11:51:54 core-7670 ERROR Assertion failed at 
gnunet-service-core.c:3616.
 
@@ -70,6 +59,9 @@
   - listing of learned namespaces
   - collection API & tests
     + gnunet-pseudonym (collection support)
+  - publishing a directory sets the embedded filename to "empty" 
+    (likely an issue with cutting off everything before '/' in the filename,
+     which in the case of a directory would leave nothing)
   - implement FS performance tests
     + insert
     + download
@@ -109,7 +101,9 @@
   - implement unindex operation (use dialog with all indexed files for 
selection)
   - implement download by URI dialog; figure out where to display those 
downloads!
   - figure out where in the GUI we should show active uploads/unindex 
operations and allow aborts
+  - handle 'lost parent' case for recursive downloads (need to move children!)
 
+
 0.9.0pre3:
 * TRACEKIT: [MW]
   - good to have for DV/DHT evaluation!

Modified: gnunet-gtk/src/fs_event_handler.c
===================================================================
--- gnunet-gtk/src/fs_event_handler.c   2010-06-27 20:04:05 UTC (rev 11993)
+++ gnunet-gtk/src/fs_event_handler.c   2010-06-27 20:04:49 UTC (rev 11994)
@@ -215,6 +215,10 @@
 {
   struct AddDirectoryEntryContext *ade = cls;
   GtkTreeIter iter;
+  GtkTreeIter piter;
+  GtkTreePath *path;
+  GtkTreeModel *tm;
+  struct GNUNET_FS_Uri *xuri;
 
   if (uri == NULL)
     {
@@ -224,8 +228,32 @@
     }
   if (ade->check_duplicates == GNUNET_YES)
     {
-      /* FIXME: check if 'uri' is already in the tab... */
-      GNUNET_break (0);
+      path = gtk_tree_row_reference_get_path (ade->prr);
+      tm = gtk_tree_row_reference_get_model (ade->prr);
+      if (TRUE != gtk_tree_model_get_iter (tm,
+                                          &piter, path))
+       {
+         GNUNET_break (0);
+         gtk_tree_path_free (path);
+         return;
+       }
+      gtk_tree_path_free (path);
+      if (TRUE == gtk_tree_model_iter_children (tm, 
+                                               &iter,
+                                               &piter))
+       {
+         do
+           {
+             gtk_tree_model_get (tm,
+                                 &iter,
+                                 1, &xuri,
+                                 -1);
+             if (GNUNET_YES == 
+                 GNUNET_FS_uri_test_equal (xuri, uri))
+               return; /* already present */
+           }
+         while (TRUE == gtk_tree_model_iter_next (tm, &iter));
+       }
     }
   GNUNET_GTK_add_search_result (ade->de->tab,
                                &iter,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]