diff options
Diffstat (limited to 'src/plugins/fs/upload.c')
-rw-r--r-- | src/plugins/fs/upload.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/plugins/fs/upload.c b/src/plugins/fs/upload.c index a9103db9..4b17e2c6 100644 --- a/src/plugins/fs/upload.c +++ b/src/plugins/fs/upload.c | |||
@@ -666,6 +666,36 @@ on_clearCompletedUploads_clicked_fs (void *unused, GtkWidget * clearButton) | |||
666 | } | 666 | } |
667 | 667 | ||
668 | static void | 668 | static void |
669 | do_copy_uri (GtkTreeModel * model, | ||
670 | GtkTreePath * path, | ||
671 | GtkTreeIter * iter, gpointer unused) | ||
672 | { | ||
673 | char *str; | ||
674 | GtkClipboard *clip; | ||
675 | |||
676 | gtk_tree_model_get (model, | ||
677 | iter, UPLOAD_URISTRING, &str, -1); | ||
678 | clip = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); | ||
679 | gtk_clipboard_set_text (clip, str, strlen (str)); | ||
680 | GNUNET_free (str); | ||
681 | } | ||
682 | |||
683 | int | ||
684 | on_upload_copy_uri_activate_fs (void *dummy1, GtkWidget * dummy2) | ||
685 | { | ||
686 | GtkTreeSelection *selection; | ||
687 | GtkWidget *uploadList; | ||
688 | |||
689 | uploadList = | ||
690 | glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), | ||
691 | "activeUploadsList"); | ||
692 | selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (uploadList)); | ||
693 | GNUNET_GTK_tree_selection_selected_foreach | ||
694 | (selection, &do_copy_uri, NULL); | ||
695 | return FALSE; | ||
696 | } | ||
697 | |||
698 | static void | ||
669 | fsuiCallUploadCallback (GtkTreeModel * model, | 699 | fsuiCallUploadCallback (GtkTreeModel * model, |
670 | GtkTreePath * path, | 700 | GtkTreePath * path, |
671 | GtkTreeIter * iter, gpointer fsui_call) | 701 | GtkTreeIter * iter, gpointer fsui_call) |