[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7461 - gnunet-gtk/src/plugins/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7461 - gnunet-gtk/src/plugins/fs |
Date: |
Sat, 19 Jul 2008 02:35:53 -0600 (MDT) |
Author: grothoff
Date: 2008-07-19 02:35:53 -0600 (Sat, 19 Jul 2008)
New Revision: 7461
Modified:
gnunet-gtk/src/plugins/fs/download.c
Log:
show metadata
Modified: gnunet-gtk/src/plugins/fs/download.c
===================================================================
--- gnunet-gtk/src/plugins/fs/download.c 2008-07-19 08:35:16 UTC (rev
7460)
+++ gnunet-gtk/src/plugins/fs/download.c 2008-07-19 08:35:53 UTC (rev
7461)
@@ -227,7 +227,9 @@
DOWNLOAD_HSIZE, size_h,
DOWNLOAD_PROGRESS, progress,
DOWNLOAD_URISTRING, uri_name,
- DOWNLOAD_INTERNAL, list, -1);
+ DOWNLOAD_INTERNAL, list,
+ DOWNLOAD_META_DATA, GNUNET_meta_data_duplicate(fi->meta),
+ -1);
GNUNET_free (uri_name);
GNUNET_free (size_h);
path = gtk_tree_model_get_path (GTK_TREE_MODEL (download_summary), &iter);
@@ -429,6 +431,7 @@
GtkTreePath *path;
DownloadList *prev;
GtkTreeModel *model;
+ struct GNUNET_MetaData * meta;
path = gtk_tree_row_reference_get_path (list->summaryViewRowReference);
if (path == NULL)
@@ -442,6 +445,12 @@
gtk_tree_path_free (path);
gtk_tree_row_reference_free (list->summaryViewRowReference);
list->summaryViewRowReference = NULL;
+ gtk_tree_model_get(GTK_TREE_MODEL(download_summary),
+ &iter,
+ DOWNLOAD_META_DATA, &meta,
+ -1);
+ if (meta != NULL)
+ GNUNET_meta_data_destroy(meta);
gtk_tree_store_remove (download_summary, &iter);
}
GNUNET_free (list->filename);
@@ -936,6 +945,40 @@
}
+static void
+fsuiShowMetaDataCallback (GtkTreeModel * model,
+ GtkTreePath * path,
+ GtkTreeIter * iter, gpointer fsui_call)
+{
+ struct GNUNET_MetaData * meta;
+ char * name;
+
+ GNUNET_GE_ASSERT (ectx,
+ model == GTK_TREE_MODEL (download_summary));
+ gtk_tree_model_get (model,
+ iter,
+ DOWNLOAD_META_DATA, &meta,
+ DOWNLOAD_SHORTNAME, &name,
+ -1);
+ if (meta != NULL)
+ open_meta_data_display_dialog(meta, name);
+ GNUNET_free_non_null(name);
+}
+
+void
+on_showDownloadMetaData_clicked_fs (void *unused, GtkWidget * dummy)
+{
+ GtkTreeSelection *selection;
+ GtkWidget *downloadList;
+
+ downloadList =
+ glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
+ "activeDownloadsList");
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (downloadList));
+ GNUNET_GTK_tree_selection_selected_foreach
+ (selection, &fsuiShowMetaDataCallback, NULL);
+}
+
/**
* Right-click on an active download
*/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7461 - gnunet-gtk/src/plugins/fs,
gnunet <=