[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7327 - gnunet-gtk/src/plugins/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7327 - gnunet-gtk/src/plugins/fs |
Date: |
Wed, 25 Jun 2008 18:20:55 -0600 (MDT) |
Author: grothoff
Date: 2008-06-25 18:20:55 -0600 (Wed, 25 Jun 2008)
New Revision: 7327
Modified:
gnunet-gtk/src/plugins/fs/fs.c
gnunet-gtk/src/plugins/fs/upload.c
Log:
fixing 1376
Modified: gnunet-gtk/src/plugins/fs/fs.c
===================================================================
--- gnunet-gtk/src/plugins/fs/fs.c 2008-06-25 19:03:39 UTC (rev 7326)
+++ gnunet-gtk/src/plugins/fs/fs.c 2008-06-26 00:20:55 UTC (rev 7327)
@@ -53,17 +53,6 @@
GtkTreeStore *upload_summary;
-/**
- * Last right-click event coordinates in summary.
- */
-static unsigned int last_x;
-
-/**
- * Last right-click event coordinates in summary.
- */
-static unsigned int last_y;
-
-
void
on_updateIntervalComboEntry_changed_fs (GtkWidget * button,
GtkWidget * entryBox)
@@ -329,44 +318,6 @@
> 0);
}
-int
-on_upload_copy_uri_activate_fs (void *dummy1, GtkWidget * dummy2)
-{
- GtkWidget *uploadsList =
- glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
- "activeUploadsList");
- GtkTreePath *path;
- GtkTreeIter iter;
- struct GNUNET_ECRS_URI *uri;
- char *str;
- GtkClipboard *clip;
-
- path = NULL;
- if (FALSE == gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (uploadsList),
- last_x,
- last_y,
- &path, NULL, NULL, NULL))
- {
- GNUNET_GE_BREAK (NULL, 0);
- return FALSE;
- }
- if (FALSE == gtk_tree_model_get_iter (GTK_TREE_MODEL (upload_summary),
- &iter, path))
- {
- GNUNET_GE_BREAK (NULL, 0);
- gtk_tree_path_free (path);
- return FALSE;
- }
- gtk_tree_path_free (path);
- uri = NULL;
- gtk_tree_model_get (GTK_TREE_MODEL (upload_summary),
- &iter, UPLOAD_URISTRING, &str, -1);
- clip = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
- gtk_clipboard_set_text (clip, str, strlen (str));
- GNUNET_free (str);
- return FALSE;
-}
-
/**
* Setup the summary views (in particular the models
* and the renderers).
Modified: gnunet-gtk/src/plugins/fs/upload.c
===================================================================
--- gnunet-gtk/src/plugins/fs/upload.c 2008-06-25 19:03:39 UTC (rev 7326)
+++ gnunet-gtk/src/plugins/fs/upload.c 2008-06-26 00:20:55 UTC (rev 7327)
@@ -666,6 +666,36 @@
}
static void
+do_copy_uri (GtkTreeModel * model,
+ GtkTreePath * path,
+ GtkTreeIter * iter, gpointer unused)
+{
+ char *str;
+ GtkClipboard *clip;
+
+ gtk_tree_model_get (model,
+ iter, UPLOAD_URISTRING, &str, -1);
+ clip = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
+ gtk_clipboard_set_text (clip, str, strlen (str));
+ GNUNET_free (str);
+}
+
+int
+on_upload_copy_uri_activate_fs (void *dummy1, GtkWidget * dummy2)
+{
+ GtkTreeSelection *selection;
+ GtkWidget *uploadList;
+
+ uploadList =
+ glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (),
+ "activeUploadsList");
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (uploadList));
+ GNUNET_GTK_tree_selection_selected_foreach
+ (selection, &do_copy_uri, NULL);
+ return FALSE;
+}
+
+static void
fsuiCallUploadCallback (GtkTreeModel * model,
GtkTreePath * path,
GtkTreeIter * iter, gpointer fsui_call)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7327 - gnunet-gtk/src/plugins/fs,
gnunet <=