[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12910 - in gnunet-gtk: . src
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12910 - in gnunet-gtk: . src |
Date: |
Tue, 7 Sep 2010 22:59:56 +0200 |
Author: grothoff
Date: 2010-09-07 22:59:56 +0200 (Tue, 07 Sep 2010)
New Revision: 12910
Removed:
gnunet-gtk/TODO
Modified:
gnunet-gtk/src/fs_event_handler.c
Log:
handle sks results
Deleted: gnunet-gtk/TODO
===================================================================
--- gnunet-gtk/TODO 2010-09-07 20:41:07 UTC (rev 12909)
+++ gnunet-gtk/TODO 2010-09-07 20:59:56 UTC (rev 12910)
@@ -1 +0,0 @@
-
Modified: gnunet-gtk/src/fs_event_handler.c
===================================================================
--- gnunet-gtk/src/fs_event_handler.c 2010-09-07 20:41:07 UTC (rev 12909)
+++ gnunet-gtk/src/fs_event_handler.c 2010-09-07 20:59:56 UTC (rev 12910)
@@ -1288,6 +1288,7 @@
{
struct SearchResult *sr;
GtkTreePath *tp;
+ const char *status_colour;
char *desc;
char *mime;
char *uris;
@@ -1297,15 +1298,30 @@
GtkTreePath *path;
GtkTreeModel *tm;
GtkTreeStore *ts;
+ uint64_t fsize;
if ( (uri != NULL) &&
(!GNUNET_FS_uri_test_loc (uri)) &&
(!GNUNET_FS_uri_test_chk (uri)) )
{
- /* FIXME: SKS support not implemented yet */
- GNUNET_break (0);
- return NULL ;
+ fsize = 0;
+ mime = GNUNET_strdup ("GNUnet namespace");
+ status_colour = "lightgreen";
}
+ else if (uri != NULL)
+ {
+ fsize = GNUNET_FS_uri_chk_get_file_size (uri);
+ mime = GNUNET_CONTAINER_meta_data_get_first_by_types (meta,
+
EXTRACTOR_METATYPE_MIMETYPE,
+
EXTRACTOR_METATYPE_FORMAT,
+ -1);
+ status_colour = "white";
+ }
+ else
+ {
+ fsize = 0;
+ status_colour = "gray";
+ }
desc = GNUNET_CONTAINER_meta_data_get_first_by_types (meta,
EXTRACTOR_METATYPE_PACKAGE_NAME,
EXTRACTOR_METATYPE_TITLE,
@@ -1324,10 +1340,7 @@
uris = GNUNET_strdup (_("no URI"));
else
uris = GNUNET_FS_uri_to_string (uri);
- mime = GNUNET_CONTAINER_meta_data_get_first_by_types (meta,
-
EXTRACTOR_METATYPE_MIMETYPE,
-
EXTRACTOR_METATYPE_FORMAT,
- -1);
+
pixbuf = GNUNET_GTK_get_thumbnail_from_meta_data (meta);
sr = GNUNET_malloc (sizeof (struct SearchResult));
sr->result = result;
@@ -1363,13 +1376,13 @@
G_MAXINT,
0, GNUNET_CONTAINER_meta_data_duplicate
(meta),
1, (uri == NULL) ? NULL :
GNUNET_FS_uri_dup (uri),
- 2, (uri == NULL) ? 0 :
GNUNET_FS_uri_chk_get_file_size (uri),
+ 2, (uri == NULL) ? 0 : fsize,
3, pixbuf /* preview */,
4, 0 /* percent progress */,
5, 0 /* percent availability */,
6, desc /* filename/description */,
7, uris,
- 8, "white" /* status colour */,
+ 8, status_colour,
9, sr,
10, mime,
11, applicability_rank,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12910 - in gnunet-gtk: . src,
gnunet <=