aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-01 21:57:36 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-01 21:57:36 +0000
commitad84ac1d0f1bf5c644944dd54f599b7de1cc7452 (patch)
tree9b908560d27eaa9e9a9344206e71c772d2535e0c
parent611f99639c81c4f119f3e14d29cfc8deedabdef2 (diff)
downloadgnunet-gtk-ad84ac1d0f1bf5c644944dd54f599b7de1cc7452.tar.gz
gnunet-gtk-ad84ac1d0f1bf5c644944dd54f599b7de1cc7452.zip
-sync
-rw-r--r--src/fs/gnunet-fs-gtk-edit_publish_dialog.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/fs/gnunet-fs-gtk-edit_publish_dialog.c b/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
index 6f8f907a..bf941106 100644
--- a/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
+++ b/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
@@ -285,8 +285,17 @@ metadata_selection_changed_cb (GtkTreeSelection *ts,
285} 285}
286 286
287 287
288/**
289 * The user changed the type of a meta-data item in the meta data
290 * tree view. Update the type and text in the list store accordingly.
291 *
292 * @param renderer widget where the change happened
293 * @param path which item was changed
294 * @param new_text new value for the item
295 * @param user_data the 'struct EditPublicationDialogContext'
296 */
288void 297void
289GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb (GtkCellRendererText * renderer, 298GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb (GtkCellRendererText *renderer,
290 gchar * path, 299 gchar * path,
291 gchar * new_text, 300 gchar * new_text,
292 gpointer user_data) 301 gpointer user_data)
@@ -297,12 +306,19 @@ GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_edited_cb (GtkCellR
297 gint type_id; 306 gint type_id;
298 gchar *description = NULL; 307 gchar *description = NULL;
299 308
300 if (!gtk_tree_model_get_iter_from_string 309 if (! gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (ctx->meta_liststore),
301 (GTK_TREE_MODEL (ctx->meta_liststore), &iter, path)) 310 &iter,
311 path))
312 {
313 GNUNET_break (0);
302 return; 314 return;
303 315 }
304 if (!ctx->meta_combo_selected_iter) 316 if (NULL == ctx->meta_combo_selected_iter)
317 {
318 GNUNET_break (0);
305 return; 319 return;
320 }
321 /* FIXME from here... */
306 g_object_get (GTK_CELL_RENDERER_COMBO (gtk_builder_get_object 322 g_object_get (GTK_CELL_RENDERER_COMBO (gtk_builder_get_object
307 (ctx->builder, 323 (ctx->builder,
308 "GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer")), 324 "GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer")),
@@ -326,6 +342,7 @@ GNUNET_GTK_edit_publication_metadata_tree_view_type_renderer_changed_cb (GtkCell
326 gpointer user_data) 342 gpointer user_data)
327{ 343{
328 struct EditPublicationDialogContext *ctx = user_data; 344 struct EditPublicationDialogContext *ctx = user_data;
345
329 if (ctx->meta_combo_selected_iter) 346 if (ctx->meta_combo_selected_iter)
330 g_free (ctx->meta_combo_selected_iter); 347 g_free (ctx->meta_combo_selected_iter);
331 ctx->meta_combo_selected_iter = g_new0 (GtkTreeIter, 1); 348 ctx->meta_combo_selected_iter = g_new0 (GtkTreeIter, 1);