aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_publish-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk_publish-dialog.c')
-rw-r--r--src/fs/gnunet-fs-gtk_publish-dialog.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/fs/gnunet-fs-gtk_publish-dialog.c b/src/fs/gnunet-fs-gtk_publish-dialog.c
index 73160fdd..914c62f5 100644
--- a/src/fs/gnunet-fs-gtk_publish-dialog.c
+++ b/src/fs/gnunet-fs-gtk_publish-dialog.c
@@ -1396,7 +1396,6 @@ GNUNET_GTK_master_publish_dialog_add_button_clicked_cb (GtkWidget * dummy,
1396 struct MainPublishingDialogContext *ctx = user_data; 1396 struct MainPublishingDialogContext *ctx = user_data;
1397 GtkWidget *ad; 1397 GtkWidget *ad;
1398 GtkComboBox *combo; 1398 GtkComboBox *combo;
1399 GtkTreeModel *anon_treemodel;
1400 1399
1401 /* FIXME-UGLY: should we use a fresh, specific context for this dialog? 1400 /* FIXME-UGLY: should we use a fresh, specific context for this dialog?
1402 FIXME-BUG: how does this right now prevent two dialogs from being opened? 1401 FIXME-BUG: how does this right now prevent two dialogs from being opened?
@@ -1416,13 +1415,10 @@ GNUNET_GTK_master_publish_dialog_add_button_clicked_cb (GtkWidget * dummy,
1416 1415
1417 ctx->open_file_handler_id = g_signal_connect (G_OBJECT (ad), "response", 1416 ctx->open_file_handler_id = g_signal_connect (G_OBJECT (ad), "response",
1418 G_CALLBACK (publish_file_dialog_response_cb), ctx); 1417 G_CALLBACK (publish_file_dialog_response_cb), ctx);
1419
1420 /* FIXME-BUG-MAYBE: possibly bad sharing of the anonymity tree model */
1421 anon_treemodel = GTK_TREE_MODEL (gtk_builder_get_object (ctx->main_window_builder,
1422 "main_window_search_anonymity_liststore"));
1423 combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_file_builder, 1418 combo = GTK_COMBO_BOX (gtk_builder_get_object (ctx->open_file_builder,
1424 "GNUNET_GTK_publish_file_dialog_anonymity_combobox")); 1419 "GNUNET_GTK_publish_file_dialog_anonymity_combobox"));
1425 gtk_combo_box_set_model (combo, anon_treemodel); 1420 gtk_combo_box_set_model (combo,
1421 GNUNET_FS_GTK_get_anonymity_level_list_store ());
1426 1422
1427 /* show dialog */ 1423 /* show dialog */
1428 gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog); 1424 gtk_window_set_transient_for (GTK_WINDOW (ad), ctx->master_pubdialog);
@@ -1589,10 +1585,7 @@ GNUNET_GTK_master_publish_dialog_edit_button_clicked_cb (GtkWidget * dummy,
1589{ 1585{
1590 struct MainPublishingDialogContext *ctx = user_data; 1586 struct MainPublishingDialogContext *ctx = user_data;
1591 struct EditPublishContext *epc; 1587 struct EditPublishContext *epc;
1592 GtkListStore *anon_liststore;
1593 1588
1594 anon_liststore = GTK_LIST_STORE (gtk_builder_get_object (ctx->main_window_builder,
1595 "main_window_search_anonymity_liststore"));
1596 epc = GNUNET_malloc (sizeof (struct EditPublishContext)); 1589 epc = GNUNET_malloc (sizeof (struct EditPublishContext));
1597 epc->tm = ctx->file_info_treemodel; 1590 epc->tm = ctx->file_info_treemodel;
1598 if (! gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &epc->iter)) 1591 if (! gtk_tree_selection_get_selected (ctx->file_info_selection, NULL, &epc->iter))
@@ -1605,12 +1598,9 @@ GNUNET_GTK_master_publish_dialog_edit_button_clicked_cb (GtkWidget * dummy,
1605 &epc->iter, 1598 &epc->iter,
1606 5, &epc->fip, 1599 5, &epc->fip,
1607 -1); 1600 -1);
1608 /* FIXME-UGLY: can we just give our anon_liststore out like this? What about
1609 (unintended) sharing of state? */
1610 GNUNET_FS_GTK_edit_publish_dialog (ctx->master_pubdialog, 1601 GNUNET_FS_GTK_edit_publish_dialog (ctx->master_pubdialog,
1611 epc->fip, 1602 epc->fip,
1612 GNUNET_YES, 1603 GNUNET_YES,
1613 anon_liststore,
1614 &master_publish_edit_publish_dialog_cb, 1604 &master_publish_edit_publish_dialog_cb,
1615 epc); 1605 epc);
1616} 1606}