[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11829 - gnunet-gtk/src
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11829 - gnunet-gtk/src |
Date: |
Sun, 20 Jun 2010 14:23:36 +0200 |
Author: grothoff
Date: 2010-06-20 14:23:36 +0200 (Sun, 20 Jun 2010)
New Revision: 11829
Modified:
gnunet-gtk/src/main_window_file_publish.c
Log:
free memory
Modified: gnunet-gtk/src/main_window_file_publish.c
===================================================================
--- gnunet-gtk/src/main_window_file_publish.c 2010-06-20 12:17:37 UTC (rev
11828)
+++ gnunet-gtk/src/main_window_file_publish.c 2010-06-20 12:23:36 UTC (rev
11829)
@@ -426,8 +426,6 @@
}
while (TRUE == gtk_tree_model_iter_next (tm, &child));
}
- /* FIXME: move subtree starting at old
- into subtree starting at newpos first! */
g_free (short_fn);
g_free (fsf);
if (dsel == GNUNET_YES)
@@ -791,6 +789,35 @@
}
+/**
+ * Free row reference stored in the file information's
+ * client-info pointer.
+ */
+static int
+free_fi_row_reference (void *cls,
+ struct GNUNET_FS_FileInformation *fi,
+ uint64_t length,
+ struct GNUNET_CONTAINER_MetaData *meta,
+ struct GNUNET_FS_Uri **uri,
+ uint32_t *anonymity,
+ uint32_t *priority,
+ int *do_index,
+ struct GNUNET_TIME_Absolute *expirationTime,
+ void **client_info)
+{
+ GtkTreeRowReference *row = *client_info;
+
+ if (row == NULL)
+ {
+ GNUNET_break (0);
+ return GNUNET_OK;
+ }
+ gtk_tree_row_reference_free (row);
+ return GNUNET_OK;
+}
+
+
+
void
GNUNET_GTK_master_publish_dialog_delete_button_clicked_cb (GtkWidget * dummy,
gpointer data)
@@ -799,6 +826,7 @@
GtkTreeModel *tm;
GtkTreeSelection *sel;
GtkTreeIter iter;
+ struct GNUNET_FS_FileInformation *fip;
tv = GTK_TREE_VIEW (gtk_builder_get_object (master_builder,
"GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
@@ -812,9 +840,11 @@
}
gtk_tree_model_get (tm,
&iter,
- /* FIXME */
+ 5, &fip,
-1);
- /* FIXME: free stuff */
+ GNUNET_FS_file_information_destroy (fip,
+ &free_fi_row_reference,
+ NULL);
gtk_tree_store_remove (GTK_TREE_STORE (tm),
&iter);
update_selectivity ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11829 - gnunet-gtk/src,
gnunet <=