gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r7418 - gnunet-gtk/src/plugins/fs


From: gnunet
Subject: [GNUnet-SVN] r7418 - gnunet-gtk/src/plugins/fs
Date: Sun, 13 Jul 2008 14:53:18 -0600 (MDT)

Author: grothoff
Date: 2008-07-13 14:53:18 -0600 (Sun, 13 Jul 2008)
New Revision: 7418

Modified:
   gnunet-gtk/src/plugins/fs/meta.c
   gnunet-gtk/src/plugins/fs/status.c
   gnunet-gtk/src/plugins/fs/upload.c
Log:
better metadata handling and indicator for new search results

Modified: gnunet-gtk/src/plugins/fs/meta.c
===================================================================
--- gnunet-gtk/src/plugins/fs/meta.c    2008-07-13 20:45:30 UTC (rev 7417)
+++ gnunet-gtk/src/plugins/fs/meta.c    2008-07-13 20:53:18 UTC (rev 7418)
@@ -38,6 +38,8 @@
   const char *stype;
   GtkTreeIter iter;
 
+  if (EXTRACTOR_isBinaryType(type))
+    return GNUNET_OK;
   stype = EXTRACTOR_getKeywordTypeAsString (type);
   if (stype == NULL)            /* wrong LE version!? */
     stype = _("unknown");
@@ -186,6 +188,10 @@
                            GTK_TREE_MODEL (keywordTypeModel));
   for (type = 0; type < EXTRACTOR_getHighestKeywordTypeNumber (); type++)
     {
+      if ( (type == EXTRACTOR_SPLIT) ||
+          (type == EXTRACTOR_LOWERCASE) ||
+          (EXTRACTOR_isBinaryType(type)) )
+       continue; /* these are not legal... */  
       stype = EXTRACTOR_getKeywordTypeAsString (type);
       gtk_list_store_append (keywordTypeModel, &iter);
       gtk_list_store_set (keywordTypeModel,

Modified: gnunet-gtk/src/plugins/fs/status.c
===================================================================
--- gnunet-gtk/src/plugins/fs/status.c  2008-07-13 20:45:30 UTC (rev 7417)
+++ gnunet-gtk/src/plugins/fs/status.c  2008-07-13 20:53:18 UTC (rev 7418)
@@ -49,6 +49,8 @@
   if (state &
       (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND))
     return "gray";
+  if (0 == state)
+    return "aquamarine";
   return NULL;
 }
 
@@ -72,6 +74,8 @@
   if (state &
       (GNUNET_URITRACK_SEARCH_RESULT | GNUNET_URITRACK_DIRECTORY_FOUND))
     return "";
+  if (0 == state)
+    return _("new");
   return "";
 }
 
@@ -99,6 +103,10 @@
     return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
                                      GTK_STOCK_CANCEL, 16, 0,
                                      (GError **) NULL);
+  if (0 == state)
+    return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+                                     GTK_STOCK_NEW, 16, 0,
+                                     (GError **) NULL);
   return NULL;
 }
 

Modified: gnunet-gtk/src/plugins/fs/upload.c
===================================================================
--- gnunet-gtk/src/plugins/fs/upload.c  2008-07-13 20:45:30 UTC (rev 7417)
+++ gnunet-gtk/src/plugins/fs/upload.c  2008-07-13 20:53:18 UTC (rev 7418)
@@ -447,10 +447,14 @@
   while ((filenamerest > filename) && (filenamerest[-1] != DIR_SEPARATOR))
     filenamerest--;
   GNUNET_meta_data_insert (meta, EXTRACTOR_FILENAME, filenamerest);
+  keywordURI = GNUNET_meta_data_to_uri (meta);
+  while (GNUNET_OK ==
+        GNUNET_meta_data_delete (meta, EXTRACTOR_SPLIT, NULL));
+  while (GNUNET_OK ==
+        GNUNET_meta_data_delete (meta, EXTRACTOR_LOWERCASE, NULL));  
   createMetaDataListTreeView (metaXML,
                               "metaDataDialogMetaDataList",
                               "previewImage", meta);
-  keywordURI = GNUNET_meta_data_to_uri (meta);
   GNUNET_meta_data_destroy (meta);
   createKeywordListTreeView (metaXML,
                              "metaDataDialogKeywordList", keywordURI);





reply via email to

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