aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-06-18 13:34:01 +0200
committerChristian Grothoff <christian@grothoff.org>2021-06-18 13:34:01 +0200
commite4dd1cf7a0bf42e238c4b791f890833fd44ed9fd (patch)
tree095fc1e32e252ef232c7fe707116ce0879a4c122
parent517e179d9119e32d3e5afc6c2ba4bf4b772239a3 (diff)
downloadgnunet-gtk-e4dd1cf7a0bf42e238c4b791f890833fd44ed9fd.tar.gz
gnunet-gtk-e4dd1cf7a0bf42e238c4b791f890833fd44ed9fd.zip
migrate gnunet-gtk logic to new (0.14.x) GNS/identity APIs
-rw-r--r--src/conversation/gnunet-conversation-gtk_egos.c8
-rw-r--r--src/conversation/gnunet-conversation-gtk_import.c20
-rw-r--r--src/fs/gnunet-fs-gtk.c35
-rw-r--r--src/fs/gnunet-fs-gtk.h54
-rw-r--r--src/fs/gnunet-fs-gtk_common.c17
-rw-r--r--src/fs/gnunet-fs-gtk_main-window-search.c34
-rw-r--r--src/fs/gnunet-fs-gtk_publish-dialog.c274
-rw-r--r--src/namestore/gnunet-namestore-gtk.c15
-rw-r--r--src/namestore/plugin_gtk_namestore_phone.c46
-rw-r--r--src/namestore/plugin_gtk_namestore_pkey.c46
-rw-r--r--src/namestore/plugin_gtk_namestore_soa.c52
-rw-r--r--src/setup/gnunet-setup-transport-test.c4
-rw-r--r--src/setup/gnunet-setup.c13
13 files changed, 362 insertions, 256 deletions
diff --git a/src/conversation/gnunet-conversation-gtk_egos.c b/src/conversation/gnunet-conversation-gtk_egos.c
index 91ed2de7..430eda40 100644
--- a/src/conversation/gnunet-conversation-gtk_egos.c
+++ b/src/conversation/gnunet-conversation-gtk_egos.c
@@ -171,19 +171,18 @@ gnunet_conversation_gtk_ego_copy_button_clicked_cb (GtkButton *button,
171{ 171{
172 struct GNUNET_IDENTITY_Ego *ego; 172 struct GNUNET_IDENTITY_Ego *ego;
173 const gchar *label; 173 const gchar *label;
174 const struct GNUNET_IDENTITY_PrivateKey *priv;
175 struct GNUNET_IDENTITY_PublicKey pub; 174 struct GNUNET_IDENTITY_PublicKey pub;
176 const char *zkey; 175 const char *zkey;
177 char *uri; 176 char *uri;
178 GtkClipboard *cb; 177 GtkClipboard *cb;
179 178
180 label = gtk_entry_get_text (GTK_ENTRY ( 179 label = gtk_entry_get_text (GTK_ENTRY (
181 GCG_get_main_window_object ("gnunet_conversation_gtk_ego_label_entry"))); 180 GCG_get_main_window_object (
181 "gnunet_conversation_gtk_ego_label_entry")));
182 GNUNET_break ((NULL != label) && (0 != strlen (label))); 182 GNUNET_break ((NULL != label) && (0 != strlen (label)));
183 ego = GCG_EGOS_get_selected_ego (); 183 ego = GCG_EGOS_get_selected_ego ();
184 GNUNET_break (NULL != ego); 184 GNUNET_break (NULL != ego);
185 priv = GNUNET_IDENTITY_ego_get_private_key (ego); 185 GNUNET_IDENTITY_ego_get_public_key (ego, &pub);
186 GNUNET_IDENTITY_ego_get_public_key (priv, &pub);
187 zkey = GNUNET_GNSRECORD_pkey_to_zkey (&pub); 186 zkey = GNUNET_GNSRECORD_pkey_to_zkey (&pub);
188 GNUNET_asprintf (&uri, "gnunet://gns/%s.%s/", label, zkey); 187 GNUNET_asprintf (&uri, "gnunet://gns/%s.%s/", label, zkey);
189 cb = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD); 188 cb = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
@@ -227,4 +226,5 @@ GCG_EGOS_shutdown ()
227 } 226 }
228} 227}
229 228
229
230/* end of gnunet-conversation-gtk_egos.c */ 230/* end of gnunet-conversation-gtk_egos.c */
diff --git a/src/conversation/gnunet-conversation-gtk_import.c b/src/conversation/gnunet-conversation-gtk_import.c
index 002a1f71..cc16d386 100644
--- a/src/conversation/gnunet-conversation-gtk_import.c
+++ b/src/conversation/gnunet-conversation-gtk_import.c
@@ -99,9 +99,9 @@ static int private_record;
99 * operation. 99 * operation.
100 * 100 *
101 * @param cls NULL 101 * @param cls NULL
102 * @param success #GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate) 102 * @param success #GNUNET_SYSERR on failure (including timeout/queue
103 * #GNUNET_NO if content was already there 103 * drop/failure to validate) #GNUNET_NO if content was already there #GNUNET_YES
104 * #GNUNET_YES (or other positive value) on success 104 * (or other positive value) on success
105 * @param emsg NULL on success, otherwise an error message 105 * @param emsg NULL on success, otherwise an error message
106 */ 106 */
107static void 107static void
@@ -195,9 +195,9 @@ GSC_add_contact (const gchar *name, const gchar *address)
195 * add operation. Finish 'add phone' operation. 195 * add operation. Finish 'add phone' operation.
196 * 196 *
197 * @param cls closure 197 * @param cls closure
198 * @param success #GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate) 198 * @param success #GNUNET_SYSERR on failure (including timeout/queue
199 * #GNUNET_NO if content was already there or not found 199 * drop/failure to validate) #GNUNET_NO if content was already there or not
200 * #GNUNET_YES (or other positive value) on success 200 * found #GNUNET_YES (or other positive value) on success
201 * @param emsg NULL on success, otherwise an error message 201 * @param emsg NULL on success, otherwise an error message
202 */ 202 */
203static void 203static void
@@ -344,7 +344,7 @@ finish_shutdown ()
344 GNUNET_SCHEDULER_add_now (&async_disconnect, NULL); 344 GNUNET_SCHEDULER_add_now (&async_disconnect, NULL);
345 GNUNET_free (my_rd_data); 345 GNUNET_free (my_rd_data);
346 memset (&my_rd, 0, sizeof (my_rd)); 346 memset (&my_rd, 0, sizeof (my_rd));
347 GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey); 347 memset (&zone_pkey, 0, sizeof (zone_pkey));
348} 348}
349 349
350 350
@@ -354,9 +354,9 @@ finish_shutdown ()
354 * with 'add phone' operation if one is pending. 354 * with 'add phone' operation if one is pending.
355 * 355 *
356 * @param cls closure 356 * @param cls closure
357 * @param success #GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate) 357 * @param success #GNUNET_SYSERR on failure (including timeout/queue
358 * #GNUNET_NO if content was already there or not found 358 * drop/failure to validate) #GNUNET_NO if content was already there or not
359 * #GNUNET_YES (or other positive value) on success 359 * found #GNUNET_YES (or other positive value) on success
360 * @param emsg NULL on success, otherwise an error message 360 * @param emsg NULL on success, otherwise an error message
361 */ 361 */
362static void 362static void
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c
index c4cf18af..bedefb1e 100644
--- a/src/fs/gnunet-fs-gtk.c
+++ b/src/fs/gnunet-fs-gtk.c
@@ -35,7 +35,8 @@
35#include <gnunet/gnunet_arm_service.h> 35#include <gnunet/gnunet_arm_service.h>
36 36
37/** 37/**
38 * How many block requests can we have outstanding in parallel at a time by default? 38 * How many block requests can we have outstanding in parallel at a time by
39 * default?
39 */ 40 */
40#define DEFAULT_MAX_PARALLEL_REQUESTS 100000 41#define DEFAULT_MAX_PARALLEL_REQUESTS 100000
41 42
@@ -205,7 +206,7 @@ main_window_save_position (GtkWidget *main_window)
205 "gnunet-fs-gtk", 206 "gnunet-fs-gtk",
206 "MAIN_WINDOW_MAXIMIZED", 207 "MAIN_WINDOW_MAXIMIZED",
207 (maximized == GNUNET_YES) ? "YES" 208 (maximized == GNUNET_YES) ? "YES"
208 : "NO"); 209 : "NO");
209 210
210 cfgDefault = GNUNET_CONFIGURATION_create (); 211 cfgDefault = GNUNET_CONFIGURATION_create ();
211 (void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only */ 212 (void) GNUNET_CONFIGURATION_load (cfgDefault, NULL); /* load defaults only */
@@ -300,11 +301,6 @@ shutdown_task (void *cls)
300 GNUNET_GNS_disconnect (main_context.gns); 301 GNUNET_GNS_disconnect (main_context.gns);
301 main_context.gns = NULL; 302 main_context.gns = NULL;
302 } 303 }
303 if (NULL != main_context.sks_zone)
304 {
305 GNUNET_free (main_context.sks_zone);
306 main_context.sks_zone = NULL;
307 }
308} 304}
309 305
310 306
@@ -454,6 +450,8 @@ unique_app_message_cb (UniqueApp *app,
454 } 450 }
455 return UNIQUE_RESPONSE_OK; 451 return UNIQUE_RESPONSE_OK;
456} 452}
453
454
457#endif 455#endif
458 456
459 457
@@ -663,21 +661,22 @@ handle_sks_zone_identity (void *cls,
663 "No default ego specified for `fs-sks` service, will not enable namespace search.\n")); 661 "No default ego specified for `fs-sks` service, will not enable namespace search.\n"));
664 return; 662 return;
665 } 663 }
666 main_context.sks_zone = GNUNET_new (struct GNUNET_IDENTITY_PrivateKey); 664 main_context.sks_zone = ego;
667 *main_context.sks_zone = *GNUNET_IDENTITY_ego_get_private_key (ego);
668 gtk_widget_show (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object ( 665 gtk_widget_show (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object (
669 "main_window_search_namespace_label"))); 666 "main_window_search_namespace_label")));
670 gtk_widget_show (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object ( 667 gtk_widget_show (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object (
671 "main_window_search_namespace_combobox"))); 668 "main_window_search_namespace_combobox")));
672 main_context.zm = GNUNET_NAMESTORE_zone_monitor_start (main_context.cfg, 669 main_context.zm =
673 main_context.sks_zone, 670 GNUNET_NAMESTORE_zone_monitor_start (main_context.cfg,
674 GNUNET_YES, 671 GNUNET_IDENTITY_ego_get_private_key (
675 &monitor_zone_error, 672 main_context.sks_zone),
676 NULL, 673 GNUNET_YES,
677 &monitor_zone_records, 674 &monitor_zone_error,
678 NULL, 675 NULL,
679 &monitor_zone_sync, 676 &monitor_zone_records,
680 NULL); 677 NULL,
678 &monitor_zone_sync,
679 NULL);
681} 680}
682 681
683 682
diff --git a/src/fs/gnunet-fs-gtk.h b/src/fs/gnunet-fs-gtk.h
index 690e36e6..a14f81b9 100644
--- a/src/fs/gnunet-fs-gtk.h
+++ b/src/fs/gnunet-fs-gtk.h
@@ -253,7 +253,7 @@ struct GNUNET_GTK_MainWindowContext
253 /** 253 /**
254 * Our zone for SKS operations. Can be NULL. 254 * Our zone for SKS operations. Can be NULL.
255 */ 255 */
256 struct GNUNET_IDENTITY_PrivateKey *sks_zone; 256 struct GNUNET_IDENTITY_Ego *sks_zone;
257}; 257};
258 258
259 259
@@ -263,23 +263,23 @@ struct GNUNET_GTK_MainWindowContext
263enum GNUNET_GTK_FS_MAIN_WINDOW_SearchNamespaceModelColumns 263enum GNUNET_GTK_FS_MAIN_WINDOW_SearchNamespaceModelColumns
264{ 264{
265 /** 265 /**
266 * A gchararray. 266 * A gchararray.
267 */ 267 */
268 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_NAME = 0, 268 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_NAME = 0,
269 269
270 /** 270 /**
271 * A gpointer. 271 * A gpointer.
272 */ 272 */
273 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_KEY = 1, 273 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_KEY = 1,
274 274
275 /** 275 /**
276 * A gchararray. 276 * A gchararray.
277 */ 277 */
278 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_ROOT = 2, 278 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_ROOT = 2,
279 279
280 /** 280 /**
281 * A gchararray. 281 * A gchararray.
282 */ 282 */
283 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_TOOLTIP = 3, 283 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_NAMESPACE_MC_TOOLTIP = 3,
284}; 284};
285 285
@@ -290,23 +290,23 @@ enum GNUNET_GTK_FS_MAIN_WINDOW_SearchNamespaceModelColumns
290enum GNUNET_GTK_FS_MAIN_WINDOW_MetaDataModelColumns 290enum GNUNET_GTK_FS_MAIN_WINDOW_MetaDataModelColumns
291{ 291{
292 /** 292 /**
293 * A guint. 293 * A guint.
294 */ 294 */
295 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_TYPE = 0, 295 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_TYPE = 0,
296 296
297 /** 297 /**
298 * A guint. 298 * A guint.
299 */ 299 */
300 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_FORMAT = 1, 300 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_FORMAT = 1,
301 301
302 /** 302 /**
303 * A gchararray. 303 * A gchararray.
304 */ 304 */
305 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_TYPE_STRING = 2, 305 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_TYPE_STRING = 2,
306 306
307 /** 307 /**
308 * A gchararray. 308 * A gchararray.
309 */ 309 */
310 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_VALUE = 3, 310 GNUNET_GTK_FS_MAIN_WINDOW_META_DATA_MC_META_VALUE = 3,
311}; 311};
312 312
@@ -317,28 +317,28 @@ enum GNUNET_GTK_FS_MAIN_WINDOW_MetaDataModelColumns
317enum GNUNET_GTK_FS_MAIN_WINDOW_SearchMimeModelColumns 317enum GNUNET_GTK_FS_MAIN_WINDOW_SearchMimeModelColumns
318{ 318{
319 /** 319 /**
320 * A gchararray. 320 * A gchararray.
321 */ 321 */
322 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_MIME = 0, 322 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_MIME = 0,
323 323
324 /** 324 /**
325 * A gchararray. 325 * A gchararray.
326 */ 326 */
327 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_TYPE = 1, 327 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_TYPE = 1,
328 328
329 /** 329 /**
330 * A gchararray. 330 * A gchararray.
331 */ 331 */
332 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_EXTENSION = 2, 332 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_EXTENSION = 2,
333 333
334 /** 334 /**
335 * A gchararray. 335 * A gchararray.
336 */ 336 */
337 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_LOSSYNESS = 3, 337 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_LOSSYNESS = 3,
338 338
339 /** 339 /**
340 * A gchararray. 340 * A gchararray.
341 */ 341 */
342 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_FREEDOM = 4, 342 GNUNET_GTK_FS_MAIN_WINDOW_SEARCH_MIME_MC_FREEDOM = 4,
343}; 343};
344 344
diff --git a/src/fs/gnunet-fs-gtk_common.c b/src/fs/gnunet-fs-gtk_common.c
index ebfccab0..6dd28887 100644
--- a/src/fs/gnunet-fs-gtk_common.c
+++ b/src/fs/gnunet-fs-gtk_common.c
@@ -60,7 +60,7 @@ GNUNET_FS_GTK_dubious_meta_to_utf8 (enum EXTRACTOR_MetaFormat format,
60 data, 60 data,
61 (unsigned int) data_len); 61 (unsigned int) data_len);
62 format = EXTRACTOR_METAFORMAT_C_STRING; 62 format = EXTRACTOR_METAFORMAT_C_STRING;
63 /* fall-through */ 63 /* fall-through */
64 case EXTRACTOR_METAFORMAT_C_STRING: 64 case EXTRACTOR_METAFORMAT_C_STRING:
65 if (data_len > 0) 65 if (data_len > 0)
66 { 66 {
@@ -294,8 +294,8 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
294 GtkEntry *query_entry; 294 GtkEntry *query_entry;
295 GtkComboBox *ns_cb; 295 GtkComboBox *ns_cb;
296 GtkEntry *ns_entry; 296 GtkEntry *ns_entry;
297 struct GNUNET_IDENTITY_PublicKey want; 297 struct GNUNET_CRYPTO_EcdsaPublicKey want;
298 298 struct GNUNET_IDENTITY_PublicKey pkey;
299 299
300 if (GNUNET_FS_uri_test_chk (uri) || GNUNET_FS_uri_test_loc (uri)) 300 if (GNUNET_FS_uri_test_chk (uri) || GNUNET_FS_uri_test_loc (uri))
301 { 301 {
@@ -310,7 +310,7 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
310 query_entry = GTK_ENTRY ( 310 query_entry = GTK_ENTRY (
311 GNUNET_FS_GTK_get_main_window_object ("main_window_search_entry")); 311 GNUNET_FS_GTK_get_main_window_object ("main_window_search_entry"));
312 ns_cb = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object ( 312 ns_cb = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object (
313 "main_window_search_namespace_combobox")); 313 "main_window_search_namespace_combobox"));
314 ns_entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (ns_cb))); 314 ns_entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (ns_cb)));
315 if (GNUNET_FS_uri_test_sks (uri)) 315 if (GNUNET_FS_uri_test_sks (uri))
316 { 316 {
@@ -320,10 +320,12 @@ GNUNET_FS_GTK_handle_uri (const struct GNUNET_FS_Uri *uri,
320 GNUNET_break (0); 320 GNUNET_break (0);
321 return; 321 return;
322 } 322 }
323 pkey.type = GNUNET_IDENTITY_TYPE_ECDSA;
324 pkey.ecdsa_key = want;
323 { 325 {
324 const char *ns_zkey; 326 const char *ns_zkey;
325 327
326 ns_zkey = GNUNET_GNSRECORD_pkey_to_zkey (&want); 328 ns_zkey = GNUNET_GNSRECORD_pkey_to_zkey (&pkey);
327 gtk_entry_set_text (ns_entry, ns_zkey); 329 gtk_entry_set_text (ns_entry, ns_zkey);
328 } 330 }
329 /* set search entry to the namespace identifier */ 331 /* set search entry to the namespace identifier */
@@ -373,7 +375,7 @@ GNUNET_GTK_get_iter_from_reference (GtkTreeRowReference *rr, GtkTreeIter *iter)
373 GtkTreeModel *model; 375 GtkTreeModel *model;
374 path = gtk_tree_row_reference_get_path (rr); 376 path = gtk_tree_row_reference_get_path (rr);
375 model = gtk_tree_row_reference_get_model (rr); 377 model = gtk_tree_row_reference_get_model (rr);
376 if (path != NULL && model != NULL) 378 if ((path != NULL) && (model != NULL))
377 { 379 {
378 if (gtk_tree_model_get_iter (model, iter, path)) 380 if (gtk_tree_model_get_iter (model, iter, path))
379 result = GNUNET_OK; 381 result = GNUNET_OK;
@@ -396,7 +398,7 @@ GtkTreeRowReference *
396GNUNET_GTK_get_reference_from_iter (GtkTreeModel *model, GtkTreeIter *iter) 398GNUNET_GTK_get_reference_from_iter (GtkTreeModel *model, GtkTreeIter *iter)
397{ 399{
398 GtkTreeRowReference *result = NULL; 400 GtkTreeRowReference *result = NULL;
399 if (iter != NULL && model != NULL) 401 if ((iter != NULL) && (model != NULL))
400 { 402 {
401 GtkTreePath *path = gtk_tree_model_get_path (model, iter); 403 GtkTreePath *path = gtk_tree_model_get_path (model, iter);
402 if (path != NULL) 404 if (path != NULL)
@@ -459,4 +461,5 @@ GNUNET_GTK_tree_model_get_next_flat_iter (GtkTreeModel *model,
459 return FALSE; 461 return FALSE;
460} 462}
461 463
464
462/* end of gnunet-fs-gtk-common.c */ 465/* end of gnunet-fs-gtk-common.c */
diff --git a/src/fs/gnunet-fs-gtk_main-window-search.c b/src/fs/gnunet-fs-gtk_main-window-search.c
index d23cb656..438a9517 100644
--- a/src/fs/gnunet-fs-gtk_main-window-search.c
+++ b/src/fs/gnunet-fs-gtk_main-window-search.c
@@ -43,8 +43,10 @@ static void
43beep () 43beep ()
44{ 44{
45 gdk_display_beep (gdk_screen_get_display ( 45 gdk_display_beep (gdk_screen_get_display (
46 gdk_window_get_screen (gtk_widget_get_parent_window (GTK_WIDGET ( 46 gdk_window_get_screen (gtk_widget_get_parent_window (
47 GNUNET_FS_GTK_get_main_window_object ("GNUNET_GTK_main_window")))))); 47 GTK_WIDGET (
48 GNUNET_FS_GTK_get_main_window_object (
49 "GNUNET_GTK_main_window"))))));
48} 50}
49 51
50 52
@@ -178,7 +180,7 @@ start_search (struct GNUNET_GTK_MainWindowContext *main_ctx)
178 GtkTreeIter iter; 180 GtkTreeIter iter;
179 181
180 mime_combo = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object ( 182 mime_combo = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object (
181 "main_window_search_mime_combobox")); 183 "main_window_search_mime_combobox"));
182 mime_model = gtk_combo_box_get_model (mime_combo); 184 mime_model = gtk_combo_box_get_model (mime_combo);
183 mime_keyword = NULL; 185 mime_keyword = NULL;
184 if ((NULL != mime_model) && 186 if ((NULL != mime_model) &&
@@ -198,7 +200,7 @@ start_search (struct GNUNET_GTK_MainWindowContext *main_ctx)
198 GtkComboBox *namespace_box; 200 GtkComboBox *namespace_box;
199 201
200 namespace_box = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object ( 202 namespace_box = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object (
201 "main_window_search_namespace_combobox")); 203 "main_window_search_namespace_combobox"));
202 nsid = gtk_entry_get_text ( 204 nsid = gtk_entry_get_text (
203 GTK_ENTRY (gtk_bin_get_child (GTK_BIN (namespace_box)))); 205 GTK_ENTRY (gtk_bin_get_child (GTK_BIN (namespace_box))));
204 if ((NULL != nsid) && ((0 == strcasecmp (nsid, "<none>")) || 206 if ((NULL != nsid) && ((0 == strcasecmp (nsid, "<none>")) ||
@@ -362,9 +364,9 @@ abort_pseu_lookup (struct PseuLookupContext *lctx)
362 * operation. 364 * operation.
363 * 365 *
364 * @param cls closure 366 * @param cls closure
365 * @param success #GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate) 367 * @param success #GNUNET_SYSERR on failure (including timeout/queue
366 * #GNUNET_NO if content was already there or not found 368 * drop/failure to validate) #GNUNET_NO if content was already there or not
367 * #GNUNET_YES (or other positive value) on success 369 * found #GNUNET_YES (or other positive value) on success
368 * @param emsg NULL on success, otherwise an error message 370 * @param emsg NULL on success, otherwise an error message
369 */ 371 */
370static void 372static void
@@ -416,13 +418,15 @@ save_pseudonym_with_nick (struct PseuLookupContext *lctx, const char *nick)
416 main_ctx = GNUNET_FS_GTK_get_main_context (); 418 main_ctx = GNUNET_FS_GTK_get_main_context ();
417 lctx->namestore = GNUNET_NAMESTORE_connect (main_ctx->cfg); 419 lctx->namestore = GNUNET_NAMESTORE_connect (main_ctx->cfg);
418 GNUNET_assert (NULL != lctx->namestore); 420 GNUNET_assert (NULL != lctx->namestore);
419 lctx->qe = GNUNET_NAMESTORE_records_store (lctx->namestore, 421 lctx->qe =
420 main_ctx->sks_zone, 422 GNUNET_NAMESTORE_records_store (lctx->namestore,
421 nick, 423 GNUNET_IDENTITY_ego_get_private_key (
422 1, 424 main_ctx->sks_zone),
423 &rd, 425 nick,
424 &store_continuation, 426 1,
425 lctx); 427 &rd,
428 &store_continuation,
429 lctx);
426} 430}
427 431
428 432
@@ -667,7 +671,7 @@ GNUNET_FS_GTK_save_button_clicked_cb (GtkButton *button, gpointer user_data)
667 return; 671 return;
668 } 672 }
669 widget = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object ( 673 widget = GTK_COMBO_BOX (GNUNET_FS_GTK_get_main_window_object (
670 "main_window_search_namespace_combobox")); 674 "main_window_search_namespace_combobox"));
671 text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget)))); 675 text = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (widget))));
672 ret = GNUNET_GNSRECORD_zkey_to_pkey (text, &pkey); 676 ret = GNUNET_GNSRECORD_zkey_to_pkey (text, &pkey);
673 if (GNUNET_OK != ret) 677 if (GNUNET_OK != ret)
diff --git a/src/fs/gnunet-fs-gtk_publish-dialog.c b/src/fs/gnunet-fs-gtk_publish-dialog.c
index 1e1ec7fa..db86cd26 100644
--- a/src/fs/gnunet-fs-gtk_publish-dialog.c
+++ b/src/fs/gnunet-fs-gtk_publish-dialog.c
@@ -431,6 +431,7 @@ gtk_tree_iter_equals (GtkTreeModel *tm, GtkTreeIter *i1, GtkTreeIter *i2)
431 return (0 == ret) ? GNUNET_YES : GNUNET_NO; 431 return (0 == ret) ? GNUNET_YES : GNUNET_NO;
432} 432}
433 433
434
434/** 435/**
435 * Update selectivity of execute/cancel buttons in the master dialog. 436 * Update selectivity of execute/cancel buttons in the master dialog.
436 * 437 *
@@ -474,6 +475,7 @@ update_selectivity_execute_cancel (struct MainPublishingDialogContext *ctx)
474 gtk_widget_set_sensitive (ctx->cancel_button, FALSE); 475 gtk_widget_set_sensitive (ctx->cancel_button, FALSE);
475} 476}
476 477
478
477/** 479/**
478 * Update selectivity of up/down/left/right buttons in the master dialog. 480 * Update selectivity of up/down/left/right buttons in the master dialog.
479 * 481 *
@@ -546,6 +548,7 @@ update_selectivity_edit (struct MainPublishingDialogContext *ctx)
546 gtk_widget_set_sensitive (ctx->up_button, FALSE); 548 gtk_widget_set_sensitive (ctx->up_button, FALSE);
547} 549}
548 550
551
549/** 552/**
550 * The selection in the file list tree view changed; update the button 553 * The selection in the file list tree view changed; update the button
551 * sensitivity. 554 * sensitivity.
@@ -563,6 +566,7 @@ GNUNET_GTK_master_publish_dialog_file_informatino_treeview_selection_changed_cb
563 update_selectivity_edit (ctx); 566 update_selectivity_edit (ctx);
564} 567}
565 568
569
566/** 570/**
567 * Add an empty directory to the tree model. 571 * Add an empty directory to the tree model.
568 * 572 *
@@ -631,6 +635,7 @@ create_dir_at_iter (struct MainPublishingDialogContext *ctx,
631 update_selectivity_execute_cancel (ctx); 635 update_selectivity_execute_cancel (ctx);
632} 636}
633 637
638
634/** 639/**
635 * Copy an entry in the tree from the 'old' position to the 'new' 640 * Copy an entry in the tree from the 'old' position to the 'new'
636 * position. All of the fields are copied, plain pointers will be 641 * position. All of the fields are copied, plain pointers will be
@@ -758,6 +763,7 @@ copy_entry (struct MainPublishingDialogContext *ctx,
758 } 763 }
759} 764}
760 765
766
761/** 767/**
762 * Called when global ns publication checkbox is toggled. 768 * Called when global ns publication checkbox is toggled.
763 * Adjusts execute/cancel button sensitivity. 769 * Adjusts execute/cancel button sensitivity.
@@ -773,6 +779,7 @@ GNUNET_GTK_master_publish_dialog_global_checkbox_toggled_cb (
773 update_selectivity_execute_cancel (user_data); 779 update_selectivity_execute_cancel (user_data);
774} 780}
775 781
782
776/** 783/**
777 * Called when private ns publication checkbox is toggled. 784 * Called when private ns publication checkbox is toggled.
778 * Adjusts execute/cancel button sensitivity. 785 * Adjusts execute/cancel button sensitivity.
@@ -788,6 +795,7 @@ GNUNET_GTK_master_publish_dialog_own_checkbox_toggled_cb (
788 update_selectivity_execute_cancel (user_data); 795 update_selectivity_execute_cancel (user_data);
789} 796}
790 797
798
791/** 799/**
792 * Called when updateability checkbox is toggled. 800 * Called when updateability checkbox is toggled.
793 * Adjusts execute/cancel button sensitivity. 801 * Adjusts execute/cancel button sensitivity.
@@ -803,6 +811,7 @@ GNUNET_GTK_master_publish_dialog_updateable_checkbox_toggled_cb (
803 update_selectivity_execute_cancel (user_data); 811 update_selectivity_execute_cancel (user_data);
804} 812}
805 813
814
806/** 815/**
807 * Generates an update id from a new id. 816 * Generates an update id from a new id.
808 * 817 *
@@ -840,6 +849,7 @@ generate_update_id (const gchar *new_text)
840 return new_update_id; 849 return new_update_id;
841} 850}
842 851
852
843/** 853/**
844 * Checks whether existing update id was generated or not. 854 * Checks whether existing update id was generated or not.
845 * Generates an update id from the previous id, then checks if 855 * Generates an update id from the previous id, then checks if
@@ -867,6 +877,7 @@ update_id_is_autofilled (const gchar *existing_update_id,
867 return result; 877 return result;
868} 878}
869 879
880
870/** 881/**
871 * Generates a new update id and fills the entry, if necessary. 882 * Generates a new update id and fills the entry, if necessary.
872 * Stores new identifier as previous_id in the context struct. 883 * Stores new identifier as previous_id in the context struct.
@@ -897,6 +908,7 @@ maybe_change_update_id (struct MainPublishingDialogContext *ctx,
897 ctx->previous_id = g_strdup (new_text); 908 ctx->previous_id = g_strdup (new_text);
898} 909}
899 910
911
900/** 912/**
901 * Called when identifier entry contents are changed by anything. 913 * Called when identifier entry contents are changed by anything.
902 * Generates a new update id and fills the entry, if necessary. 914 * Generates a new update id and fills the entry, if necessary.
@@ -920,6 +932,7 @@ GNUNET_GTK_master_publish_dialog_identifier_entry_changed_cb (
920 update_selectivity_execute_cancel (ctx); 932 update_selectivity_execute_cancel (ctx);
921} 933}
922 934
935
923/** 936/**
924 * The selection in the identifier tree view changed. 937 * The selection in the identifier tree view changed.
925 * Copy text into identifier entry, or 938 * Copy text into identifier entry, or
@@ -961,6 +974,7 @@ GNUNET_GTK_master_publish_dialog_previous_identifiers_treeview_selection_changed
961 g_free (new_text); 974 g_free (new_text);
962} 975}
963 976
977
964/** 978/**
965 * User has clicked on the 'right' button to move files in the master 979 * User has clicked on the 'right' button to move files in the master
966 * edit dialog tree view. Execute the move. 980 * edit dialog tree view. Execute the move.
@@ -1015,6 +1029,7 @@ GNUNET_GTK_master_publish_dialog_right_button_clicked_cb (GtkWidget *dummy,
1015 &iter); 1029 &iter);
1016} 1030}
1017 1031
1032
1018/** 1033/**
1019 * User has clicked on the 'left' button to move files in the master 1034 * User has clicked on the 'left' button to move files in the master
1020 * edit dialog tree view. Execute the move. 1035 * edit dialog tree view. Execute the move.
@@ -1056,6 +1071,7 @@ GNUNET_GTK_master_publish_dialog_left_button_clicked_cb (GtkWidget *dummy,
1056 &iter); 1071 &iter);
1057} 1072}
1058 1073
1074
1059/** 1075/**
1060 * User has clicked on the 'up' button to move files in the master 1076 * User has clicked on the 'up' button to move files in the master
1061 * edit dialog tree view. Execute the move. 1077 * edit dialog tree view. Execute the move.
@@ -1116,6 +1132,7 @@ GNUNET_GTK_master_publish_dialog_up_button_clicked_cb (GtkWidget *dummy,
1116 &iter); 1132 &iter);
1117} 1133}
1118 1134
1135
1119/** 1136/**
1120 * User has clicked on the 'down' button to move files in the master 1137 * User has clicked on the 'down' button to move files in the master
1121 * edit dialog tree view. Execute the move. 1138 * edit dialog tree view. Execute the move.
@@ -1158,6 +1175,7 @@ GNUNET_GTK_master_publish_dialog_down_button_clicked_cb (GtkWidget *dummy,
1158 &iter); 1175 &iter);
1159} 1176}
1160 1177
1178
1161/** 1179/**
1162 * User has clicked on the 'new' button to add an empty directory in the master 1180 * User has clicked on the 'new' button to add an empty directory in the master
1163 * edit dialog tree view. Add an empty directory. 1181 * edit dialog tree view. Add an empty directory.
@@ -1189,6 +1207,7 @@ GNUNET_GTK_master_publish_dialog_new_button_clicked_cb (GtkWidget *dummy,
1189 create_dir_at_iter (ctx, "unnamed/", &bo, &iter, &pos); 1207 create_dir_at_iter (ctx, "unnamed/", &bo, &iter, &pos);
1190} 1208}
1191 1209
1210
1192/** 1211/**
1193 * Free row reference stored in the file information's 1212 * Free row reference stored in the file information's
1194 * client-info pointer. 1213 * client-info pointer.
@@ -1225,6 +1244,7 @@ free_fi_row_reference (void *cls,
1225 return GNUNET_OK; 1244 return GNUNET_OK;
1226} 1245}
1227 1246
1247
1228/** 1248/**
1229 * User has clicked on the 'delete' button to delete a file or directory in the 1249 * User has clicked on the 'delete' button to delete a file or directory in the
1230 * master edit dialog tree view. Delete the selected entry. 1250 * master edit dialog tree view. Delete the selected entry.
@@ -1302,6 +1322,7 @@ GNUNET_GTK_master_publish_dialog_delete_button_clicked_cb (GtkWidget *dummy,
1302 update_selectivity_edit (ctx); 1322 update_selectivity_edit (ctx);
1303} 1323}
1304 1324
1325
1305/* ******************** progress dialog / import of directories ************* */ 1326/* ******************** progress dialog / import of directories ************* */
1306 1327
1307/** 1328/**
@@ -1329,6 +1350,7 @@ destroy_progress_dialog (struct AddDirClientContext *adcc)
1329 GNUNET_free (adcc); 1350 GNUNET_free (adcc);
1330} 1351}
1331 1352
1353
1332/** 1354/**
1333 * User clicked on the 'cancel' button of the progress dialog. 1355 * User clicked on the 'cancel' button of the progress dialog.
1334 * Cancel the operation. 1356 * Cancel the operation.
@@ -1351,6 +1373,7 @@ GNUNET_FS_GTK_progress_dialog_cancel_button_clicked_cb (GtkButton *button,
1351 destroy_progress_dialog (adcc); 1373 destroy_progress_dialog (adcc);
1352} 1374}
1353 1375
1376
1354/** 1377/**
1355 * User attempted to close the progress dialog. Refuse. 1378 * User attempted to close the progress dialog. Refuse.
1356 * 1379 *
@@ -1368,6 +1391,7 @@ GNUNET_FS_GTK_progress_dialog_delete_event_cb (GtkWidget *widget,
1368 return TRUE; 1391 return TRUE;
1369} 1392}
1370 1393
1394
1371/** 1395/**
1372 * Display some additional information in the text area of the 1396 * Display some additional information in the text area of the
1373 * progress dialog. 1397 * progress dialog.
@@ -1385,6 +1409,7 @@ insert_progress_dialog_text (struct AddDirClientContext *adcc, const char *text)
1385 adcc->textview_vertical_adjustment)); 1409 adcc->textview_vertical_adjustment));
1386} 1410}
1387 1411
1412
1388/** 1413/**
1389 * Convert a single item from the scan to an entry in the tree view. 1414 * Convert a single item from the scan to an entry in the tree view.
1390 * 1415 *
@@ -1448,14 +1473,15 @@ add_item (struct AddDirClientContext *adcc,
1448 else 1473 else
1449 { 1474 {
1450 fi = 1475 fi =
1451 GNUNET_FS_file_information_create_from_file (GNUNET_FS_GTK_get_fs_handle (), 1476 GNUNET_FS_file_information_create_from_file (
1452 row_reference, 1477 GNUNET_FS_GTK_get_fs_handle (),
1453 item->filename, 1478 row_reference,
1454 item->ksk_uri, 1479 item->filename,
1455 item->meta, 1480 item->ksk_uri,
1456 adcc 1481 item->meta,
1457 ->directory_scan_do_index, 1482 adcc
1458 &adcc->directory_scan_bo); 1483 ->directory_scan_do_index,
1484 &adcc->directory_scan_bo);
1459 file_size_fancy = GNUNET_STRINGS_byte_size_fancy (fsize); 1485 file_size_fancy = GNUNET_STRINGS_byte_size_fancy (fsize);
1460 } 1486 }
1461 gtk_tree_store_set (ts, 1487 gtk_tree_store_set (ts,
@@ -1474,13 +1500,14 @@ add_item (struct AddDirClientContext *adcc,
1474 fi, 1500 fi,
1475 PUBLISH_MC_EXPIRATION_TIME_ABSOLUTE, 1501 PUBLISH_MC_EXPIRATION_TIME_ABSOLUTE,
1476 (guint64) 1502 (guint64)
1477 adcc->directory_scan_bo.expiration_time.abs_value_us, 1503 adcc->directory_scan_bo.expiration_time.abs_value_us,
1478 PUBLISH_MC_REPLICATION_LEVEL, 1504 PUBLISH_MC_REPLICATION_LEVEL,
1479 (guint) adcc->directory_scan_bo.replication_level, 1505 (guint) adcc->directory_scan_bo.replication_level,
1480 -1); 1506 -1);
1481 GNUNET_free (file_size_fancy); 1507 GNUNET_free (file_size_fancy);
1482} 1508}
1483 1509
1510
1484/** 1511/**
1485 * Recursively traverse the share tree and add it to the tree store 1512 * Recursively traverse the share tree and add it to the tree store
1486 * 1513 *
@@ -1509,6 +1536,7 @@ add_share_items_to_treestore (struct AddDirClientContext *adcc,
1509 } 1536 }
1510} 1537}
1511 1538
1539
1512/** 1540/**
1513 * Function called when the scanner had some trouble and we 1541 * Function called when the scanner had some trouble and we
1514 * need to abort the scanning process (which we need to do 1542 * need to abort the scanning process (which we need to do
@@ -1529,6 +1557,7 @@ stop_scanner_task (void *cls)
1529 } 1557 }
1530} 1558}
1531 1559
1560
1532/** 1561/**
1533 * Progress callback called from the directory scanner with 1562 * Progress callback called from the directory scanner with
1534 * information about our progress scanning the hierarchy. 1563 * information about our progress scanning the hierarchy.
@@ -1580,8 +1609,8 @@ directory_scan_cb (void *cls,
1580 filename); 1609 filename);
1581#if ! VERBOSE_PROGRESS 1610#if ! VERBOSE_PROGRESS
1582 gtk_widget_show (GTK_WIDGET ( 1611 gtk_widget_show (GTK_WIDGET (
1583 gtk_builder_get_object (adcc->progress_dialog_builder, 1612 gtk_builder_get_object (adcc->progress_dialog_builder,
1584 "GNUNET_FS_GTK_progress_dialog_scrolled_window"))); 1613 "GNUNET_FS_GTK_progress_dialog_scrolled_window")));
1585#endif 1614#endif
1586 insert_progress_dialog_text (adcc, s); 1615 insert_progress_dialog_text (adcc, s);
1587 GNUNET_free (s); 1616 GNUNET_free (s);
@@ -1625,23 +1654,24 @@ directory_scan_cb (void *cls,
1625 } 1654 }
1626 break; 1655 break;
1627 case GNUNET_FS_DIRSCANNER_FINISHED: { 1656 case GNUNET_FS_DIRSCANNER_FINISHED: {
1628 struct GNUNET_FS_ShareTreeItem *directory_scan_result; 1657 struct GNUNET_FS_ShareTreeItem *directory_scan_result;
1629 1658
1630 insert_progress_dialog_text (adcc, _ ("Scanner has finished.\n")); 1659 insert_progress_dialog_text (adcc, _ ("Scanner has finished.\n"));
1631 directory_scan_result = GNUNET_FS_directory_scan_get_result (adcc->ds); 1660 directory_scan_result = GNUNET_FS_directory_scan_get_result (adcc->ds);
1632 adcc->ds = NULL; 1661 adcc->ds = NULL;
1633 GNUNET_FS_share_tree_trim (directory_scan_result); 1662 GNUNET_FS_share_tree_trim (directory_scan_result);
1634 add_share_items_to_treestore (adcc, directory_scan_result, NULL); 1663 add_share_items_to_treestore (adcc, directory_scan_result, NULL);
1635 GNUNET_FS_share_tree_free (directory_scan_result); 1664 GNUNET_FS_share_tree_free (directory_scan_result);
1636 destroy_progress_dialog (adcc); 1665 destroy_progress_dialog (adcc);
1637 } 1666 }
1638 break; 1667 break;
1639 default: 1668 default:
1640 GNUNET_break (0); 1669 GNUNET_break (0);
1641 break; 1670 break;
1642 } 1671 }
1643} 1672}
1644 1673
1674
1645/** 1675/**
1646 * Setup the context and progress dialog for scanning a file or 1676 * Setup the context and progress dialog for scanning a file or
1647 * directory structure (for meta data) and importing it into 1677 * directory structure (for meta data) and importing it into
@@ -1679,8 +1709,9 @@ scan_file_or_directory (struct MainPublishingDialogContext *ctx,
1679 gtk_builder_get_object (adcc->progress_dialog_builder, 1709 gtk_builder_get_object (adcc->progress_dialog_builder,
1680 "GNUNET_FS_GTK_progress_dialog_textview")); 1710 "GNUNET_FS_GTK_progress_dialog_textview"));
1681 adcc->textview_vertical_adjustment = GTK_ADJUSTMENT (gtk_builder_get_object ( 1711 adcc->textview_vertical_adjustment = GTK_ADJUSTMENT (gtk_builder_get_object (
1682 adcc->progress_dialog_builder, 1712 adcc->
1683 "GNUNET_FS_GTK_progress_dialog_textview_vertical_adjustment")); 1713 progress_dialog_builder,
1714 "GNUNET_FS_GTK_progress_dialog_textview_vertical_adjustment"));
1684 adcc->progress_dialog_textbuffer = GTK_TEXT_BUFFER ( 1715 adcc->progress_dialog_textbuffer = GTK_TEXT_BUFFER (
1685 gtk_builder_get_object (adcc->progress_dialog_builder, 1716 gtk_builder_get_object (adcc->progress_dialog_builder,
1686 "GNUNET_FS_GTK_progress_dialog_textbuffer")); 1717 "GNUNET_FS_GTK_progress_dialog_textbuffer"));
@@ -1702,6 +1733,7 @@ scan_file_or_directory (struct MainPublishingDialogContext *ctx,
1702 update_selectivity_execute_cancel (ctx); 1733 update_selectivity_execute_cancel (ctx);
1703} 1734}
1704 1735
1736
1705/** 1737/**
1706 * Function called when the "open" (directory) dialog was closed. 1738 * Function called when the "open" (directory) dialog was closed.
1707 * 1739 *
@@ -1734,24 +1766,25 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog *dialog,
1734 } 1766 }
1735 bo.content_priority = 1767 bo.content_priority =
1736 gtk_spin_button_get_value (GTK_SPIN_BUTTON (gtk_builder_get_object ( 1768 gtk_spin_button_get_value (GTK_SPIN_BUTTON (gtk_builder_get_object (
1737 ctx->open_directory_builder, 1769 ctx->open_directory_builder,
1738 "GNUNET_GTK_publish_directory_dialog_priority_spin_button"))); 1770 "GNUNET_GTK_publish_directory_dialog_priority_spin_button")));
1739 bo.replication_level = 1771 bo.replication_level =
1740 gtk_spin_button_get_value (GTK_SPIN_BUTTON (gtk_builder_get_object ( 1772 gtk_spin_button_get_value (GTK_SPIN_BUTTON (gtk_builder_get_object (
1741 ctx->open_directory_builder, 1773 ctx->open_directory_builder,
1742 "GNUNET_GTK_publish_directory_dialog_replication_spin_button"))); 1774 "GNUNET_GTK_publish_directory_dialog_replication_spin_button")));
1743 { 1775 {
1744 GtkSpinButton *sb; 1776 GtkSpinButton *sb;
1745 1777
1746 sb = GTK_SPIN_BUTTON (gtk_builder_get_object ( 1778 sb = GTK_SPIN_BUTTON (gtk_builder_get_object (
1747 ctx->open_directory_builder, 1779 ctx->open_directory_builder,
1748 "GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button")); 1780 "GNUNET_GTK_publish_directory_dialog_expiration_year_spin_button"));
1749 bo.expiration_time = GNUNET_GTK_get_expiration_time (sb); 1781 bo.expiration_time = GNUNET_GTK_get_expiration_time (sb);
1750 } 1782 }
1751 do_index = 1783 do_index =
1752 gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object ( 1784 gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (
1753 ctx->open_directory_builder, 1785 ctx->
1754 "GNUNET_GTK_publish_directory_dialog_do_index_checkbutton"))); 1786 open_directory_builder,
1787 "GNUNET_GTK_publish_directory_dialog_do_index_checkbutton")));
1755 scan_file_or_directory (ctx, filename, &bo, do_index); 1788 scan_file_or_directory (ctx, filename, &bo, do_index);
1756 g_free (filename); 1789 g_free (filename);
1757 } 1790 }
@@ -1760,6 +1793,7 @@ GNUNET_GTK_publish_directory_dialog_response_cb (GtkDialog *dialog,
1760 ctx->open_directory_builder = NULL; 1793 ctx->open_directory_builder = NULL;
1761} 1794}
1762 1795
1796
1763/** 1797/**
1764 * Function called when the "open" (file) dialog was closed. 1798 * Function called when the "open" (file) dialog was closed.
1765 * 1799 *
@@ -1792,24 +1826,24 @@ GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog *dialog,
1792 } 1826 }
1793 bo.content_priority = 1827 bo.content_priority =
1794 gtk_spin_button_get_value (GTK_SPIN_BUTTON (gtk_builder_get_object ( 1828 gtk_spin_button_get_value (GTK_SPIN_BUTTON (gtk_builder_get_object (
1795 ctx->open_file_builder, 1829 ctx->open_file_builder,
1796 "GNUNET_GTK_publish_file_dialog_priority_spin_button"))); 1830 "GNUNET_GTK_publish_file_dialog_priority_spin_button")));
1797 { 1831 {
1798 GtkSpinButton *sb; 1832 GtkSpinButton *sb;
1799 1833
1800 sb = GTK_SPIN_BUTTON (gtk_builder_get_object ( 1834 sb = GTK_SPIN_BUTTON (gtk_builder_get_object (
1801 ctx->open_file_builder, 1835 ctx->open_file_builder,
1802 "GNUNET_GTK_publish_file_dialog_expiration_year_spin_button")); 1836 "GNUNET_GTK_publish_file_dialog_expiration_year_spin_button"));
1803 bo.expiration_time = GNUNET_GTK_get_expiration_time (sb); 1837 bo.expiration_time = GNUNET_GTK_get_expiration_time (sb);
1804 } 1838 }
1805 bo.replication_level = 1839 bo.replication_level =
1806 gtk_spin_button_get_value (GTK_SPIN_BUTTON (gtk_builder_get_object ( 1840 gtk_spin_button_get_value (GTK_SPIN_BUTTON (gtk_builder_get_object (
1807 ctx->open_file_builder, 1841 ctx->open_file_builder,
1808 "GNUNET_GTK_publish_file_dialog_replication_spin_button"))); 1842 "GNUNET_GTK_publish_file_dialog_replication_spin_button")));
1809 do_index = 1843 do_index =
1810 gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object ( 1844 gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object (
1811 ctx->open_file_builder, 1845 ctx->open_file_builder,
1812 "GNUNET_GTK_publish_file_dialog_do_index_checkbutton"))); 1846 "GNUNET_GTK_publish_file_dialog_do_index_checkbutton")));
1813 1847
1814 scan_file_or_directory (ctx, filename, &bo, do_index); 1848 scan_file_or_directory (ctx, filename, &bo, do_index);
1815 g_free (filename); 1849 g_free (filename);
@@ -1819,6 +1853,7 @@ GNUNET_GTK_publish_file_dialog_response_cb (GtkDialog *dialog,
1819 ctx->open_file_builder = NULL; 1853 ctx->open_file_builder = NULL;
1820} 1854}
1821 1855
1856
1822/** 1857/**
1823 * User clicked on the 'add' button in the master publish dialog. 1858 * User clicked on the 'add' button in the master publish dialog.
1824 * Create the dialog to allow the user to select a file to add. 1859 * Create the dialog to allow the user to select a file to add.
@@ -1842,18 +1877,18 @@ GNUNET_GTK_master_publish_dialog_add_button_clicked_cb (GtkWidget *dummy,
1842 * TRUE */ 1877 * TRUE */
1843 gtk_spin_button_set_value ( 1878 gtk_spin_button_set_value (
1844 GTK_SPIN_BUTTON (gtk_builder_get_object ( 1879 GTK_SPIN_BUTTON (gtk_builder_get_object (
1845 ctx->open_file_builder, 1880 ctx->open_file_builder,
1846 "GNUNET_GTK_publish_file_dialog_priority_spin_button")), 1881 "GNUNET_GTK_publish_file_dialog_priority_spin_button")),
1847 1000); 1882 1000);
1848 gtk_spin_button_set_value ( 1883 gtk_spin_button_set_value (
1849 GTK_SPIN_BUTTON (gtk_builder_get_object ( 1884 GTK_SPIN_BUTTON (gtk_builder_get_object (
1850 ctx->open_file_builder, 1885 ctx->open_file_builder,
1851 "GNUNET_GTK_publish_file_dialog_replication_spin_button")), 1886 "GNUNET_GTK_publish_file_dialog_replication_spin_button")),
1852 0); 1887 0);
1853 gtk_toggle_button_set_active ( 1888 gtk_toggle_button_set_active (
1854 GTK_TOGGLE_BUTTON (gtk_builder_get_object ( 1889 GTK_TOGGLE_BUTTON (gtk_builder_get_object (
1855 ctx->open_file_builder, 1890 ctx->open_file_builder,
1856 "GNUNET_GTK_publish_file_dialog_do_index_checkbutton")), 1891 "GNUNET_GTK_publish_file_dialog_do_index_checkbutton")),
1857 TRUE); 1892 TRUE);
1858 1893
1859 { 1894 {
@@ -1877,6 +1912,7 @@ GNUNET_GTK_master_publish_dialog_add_button_clicked_cb (GtkWidget *dummy,
1877 } 1912 }
1878} 1913}
1879 1914
1915
1880/** 1916/**
1881 * User clicked on the 'open' button in the master publish dialog. 1917 * User clicked on the 'open' button in the master publish dialog.
1882 * Create the dialog to allow the user to select a directory. 1918 * Create the dialog to allow the user to select a directory.
@@ -1901,26 +1937,26 @@ GNUNET_GTK_master_publish_dialog_open_button_clicked_cb (GtkWidget *dummy,
1901 * TRUE */ 1937 * TRUE */
1902 gtk_spin_button_set_value ( 1938 gtk_spin_button_set_value (
1903 GTK_SPIN_BUTTON (gtk_builder_get_object ( 1939 GTK_SPIN_BUTTON (gtk_builder_get_object (
1904 ctx->open_directory_builder, 1940 ctx->open_directory_builder,
1905 "GNUNET_GTK_publish_directory_dialog_priority_spin_button")), 1941 "GNUNET_GTK_publish_directory_dialog_priority_spin_button")),
1906 1000); 1942 1000);
1907 gtk_spin_button_set_value ( 1943 gtk_spin_button_set_value (
1908 GTK_SPIN_BUTTON (gtk_builder_get_object ( 1944 GTK_SPIN_BUTTON (gtk_builder_get_object (
1909 ctx->open_directory_builder, 1945 ctx->open_directory_builder,
1910 "GNUNET_GTK_publish_directory_dialog_replication_spin_button")), 1946 "GNUNET_GTK_publish_directory_dialog_replication_spin_button")),
1911 0); 1947 0);
1912 gtk_toggle_button_set_active ( 1948 gtk_toggle_button_set_active (
1913 GTK_TOGGLE_BUTTON (gtk_builder_get_object ( 1949 GTK_TOGGLE_BUTTON (gtk_builder_get_object (
1914 ctx->open_directory_builder, 1950 ctx->open_directory_builder,
1915 "GNUNET_GTK_publish_directory_dialog_do_index_checkbutton")), 1951 "GNUNET_GTK_publish_directory_dialog_do_index_checkbutton")),
1916 TRUE); 1952 TRUE);
1917 1953
1918 { 1954 {
1919 GtkComboBox *combo; 1955 GtkComboBox *combo;
1920 1956
1921 combo = GTK_COMBO_BOX (gtk_builder_get_object ( 1957 combo = GTK_COMBO_BOX (gtk_builder_get_object (
1922 ctx->open_directory_builder, 1958 ctx->open_directory_builder,
1923 "GNUNET_GTK_publish_directory_dialog_anonymity_combobox")); 1959 "GNUNET_GTK_publish_directory_dialog_anonymity_combobox"));
1924 gtk_combo_box_set_model (combo, 1960 gtk_combo_box_set_model (combo,
1925 GNUNET_FS_GTK_get_anonymity_level_list_store ()); 1961 GNUNET_FS_GTK_get_anonymity_level_list_store ());
1926 } 1962 }
@@ -1937,6 +1973,7 @@ GNUNET_GTK_master_publish_dialog_open_button_clicked_cb (GtkWidget *dummy,
1937 } 1973 }
1938} 1974}
1939 1975
1976
1940/* ********************************* editing sub-dialog ********************* */ 1977/* ********************************* editing sub-dialog ********************* */
1941 1978
1942/** 1979/**
@@ -2013,6 +2050,7 @@ update_treeview_after_edit (void *cls,
2013 return GNUNET_SYSERR; 2050 return GNUNET_SYSERR;
2014} 2051}
2015 2052
2053
2016/** 2054/**
2017 * Function called when the edit publish dialog has been closed. 2055 * Function called when the edit publish dialog has been closed.
2018 * 2056 *
@@ -2032,6 +2070,7 @@ master_publish_edit_publish_dialog_cb (gpointer cls, gint ret, const char *root)
2032 GNUNET_free (epc); 2070 GNUNET_free (epc);
2033} 2071}
2034 2072
2073
2035/** 2074/**
2036 * The user clicked on the "edit" button in the master dialog. Edit 2075 * The user clicked on the "edit" button in the master dialog. Edit
2037 * the selected tree item. 2076 * the selected tree item.
@@ -2068,6 +2107,7 @@ GNUNET_GTK_master_publish_dialog_edit_button_clicked_cb (GtkWidget *dummy,
2068 epc); 2107 epc);
2069} 2108}
2070 2109
2110
2071/* ******************** master edit dialog shutdown *********************** */ 2111/* ******************** master edit dialog shutdown *********************** */
2072 2112
2073/** 2113/**
@@ -2105,6 +2145,7 @@ get_file_information (GtkTreeModel *tm, GtkTreeIter *iter)
2105 return fi; 2145 return fi;
2106} 2146}
2107 2147
2148
2108/** 2149/**
2109 * Recursively clean up the tree store with the file information in it. 2150 * Recursively clean up the tree store with the file information in it.
2110 * 2151 *
@@ -2130,6 +2171,7 @@ free_file_information_tree_store (GtkTreeModel *tm, GtkTreeIter *iter)
2130 } 2171 }
2131} 2172}
2132 2173
2174
2133/** 2175/**
2134 * Close the master publish dialog. If the response code was OK, starts 2176 * Close the master publish dialog. If the response code was OK, starts
2135 * the publishing operation. Otherwise, this function just cleans up the 2177 * the publishing operation. Otherwise, this function just cleans up the
@@ -2167,6 +2209,7 @@ close_master_publish_dialog (struct MainPublishingDialogContext *ctx)
2167 return GNUNET_YES; 2209 return GNUNET_YES;
2168} 2210}
2169 2211
2212
2170/** 2213/**
2171 * Insert namespace advertisement into metadata when 2214 * Insert namespace advertisement into metadata when
2172 * publishing in both private namespace and global namespace. 2215 * publishing in both private namespace and global namespace.
@@ -2203,7 +2246,13 @@ insert_advertisement (void *cls,
2203 if (NULL == ctx->ns) 2246 if (NULL == ctx->ns)
2204 return GNUNET_SYSERR; 2247 return GNUNET_SYSERR;
2205 GNUNET_IDENTITY_ego_get_public_key (ctx->ns, &pub); 2248 GNUNET_IDENTITY_ego_get_public_key (ctx->ns, &pub);
2206 sks_uri = GNUNET_FS_uri_sks_create (&pub, "/"); 2249 if (GNUNET_IDENTITY_TYPE_ECDSA != pub.type)
2250 {
2251 GNUNET_break (0); /* FIXME: EDDSA keys not yet
2252 supported for file-sharing! */
2253 return GNUNET_SYSERR;
2254 }
2255 sks_uri = GNUNET_FS_uri_sks_create (&pub.ecdsa_key, "/");
2207 sks_uri_string = GNUNET_FS_uri_to_string (sks_uri); 2256 sks_uri_string = GNUNET_FS_uri_to_string (sks_uri);
2208 GNUNET_FS_uri_destroy (sks_uri); 2257 GNUNET_FS_uri_destroy (sks_uri);
2209 if (NULL == sks_uri_string) 2258 if (NULL == sks_uri_string)
@@ -2220,6 +2269,7 @@ insert_advertisement (void *cls,
2220 return GNUNET_SYSERR; 2269 return GNUNET_SYSERR;
2221} 2270}
2222 2271
2272
2223/** 2273/**
2224 * The user pushed the 'execute' button. Start the publishing 2274 * The user pushed the 'execute' button. Start the publishing
2225 * operation and clean up the memory and the window itself. 2275 * operation and clean up the memory and the window itself.
@@ -2308,14 +2358,29 @@ GNUNET_GTK_master_publish_dialog_execute_button_clicked_cb (GtkButton *button,
2308 clear_keywords_from_tm (ctx); 2358 clear_keywords_from_tm (ctx);
2309 do 2359 do
2310 { 2360 {
2361 const struct GNUNET_IDENTITY_PrivateKey *pk;
2362
2363 if (NULL != ns)
2364 {
2365 pk = GNUNET_IDENTITY_ego_get_private_key (ns);
2366 if (GNUNET_IDENTITY_TYPE_ECDSA != pk->type)
2367 {
2368 GNUNET_break (0); /* FIXME: EDDSA keys not yet supported by FS */
2369 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ctx->own_checkbox),
2370 FALSE);
2371 return;
2372 }
2373 }
2374 else
2375 {
2376 pk = NULL;
2377 }
2311 fi = get_file_information (ctx->file_info_treemodel, &iter); 2378 fi = get_file_information (ctx->file_info_treemodel, &iter);
2312 if (do_global && do_own && ! disable_ads_insertion) 2379 if (do_global && do_own && ! disable_ads_insertion)
2313 GNUNET_FS_file_information_inspect (fi, insert_advertisement, ctx); 2380 GNUNET_FS_file_information_inspect (fi, insert_advertisement, ctx);
2314 GNUNET_FS_publish_start (GNUNET_FS_GTK_get_fs_handle (), 2381 GNUNET_FS_publish_start (GNUNET_FS_GTK_get_fs_handle (),
2315 fi, 2382 fi,
2316 (NULL == ns) 2383 (NULL == pk) ? NULL : &pk->ecdsa_key,
2317 ? NULL
2318 : GNUNET_IDENTITY_ego_get_private_key (ns),
2319 namespace_id, 2384 namespace_id,
2320 namespace_uid, 2385 namespace_uid,
2321 GNUNET_FS_PUBLISH_OPTION_NONE); 2386 GNUNET_FS_PUBLISH_OPTION_NONE);
@@ -2330,6 +2395,7 @@ GNUNET_GTK_master_publish_dialog_execute_button_clicked_cb (GtkButton *button,
2330 GNUNET_break (GNUNET_YES == close_master_publish_dialog (ctx)); 2395 GNUNET_break (GNUNET_YES == close_master_publish_dialog (ctx));
2331} 2396}
2332 2397
2398
2333/** 2399/**
2334 * Function called on entries in a `struct GNUNET_FS_FileInformation` for 2400 * Function called on entries in a `struct GNUNET_FS_FileInformation` for
2335 * publishing. 2401 * publishing.
@@ -2363,6 +2429,7 @@ clear_keywords_in_file_information (void *cls,
2363 return GNUNET_OK; 2429 return GNUNET_OK;
2364} 2430}
2365 2431
2432
2366/** 2433/**
2367 * Remove all of the keywords from the file information item in the tree store 2434 * Remove all of the keywords from the file information item in the tree store
2368 * 2435 *
@@ -2393,6 +2460,7 @@ clear_keywords_from_file_information_in_tree_store (GtkTreeModel *tm,
2393 } 2460 }
2394} 2461}
2395 2462
2463
2396/** 2464/**
2397 * Remove all of the keywords from all file information structs in the tree 2465 * Remove all of the keywords from all file information structs in the tree
2398 * store 2466 * store
@@ -2409,11 +2477,12 @@ clear_keywords_from_tm (struct MainPublishingDialogContext *ctx)
2409 do 2477 do
2410 { 2478 {
2411 clear_keywords_from_file_information_in_tree_store (ctx 2479 clear_keywords_from_file_information_in_tree_store (ctx
2412 ->file_info_treemodel, 2480 ->file_info_treemodel,
2413 &iter); 2481 &iter);
2414 } while (gtk_tree_model_iter_next (ctx->file_info_treemodel, &iter)); 2482 } while (gtk_tree_model_iter_next (ctx->file_info_treemodel, &iter));
2415} 2483}
2416 2484
2485
2417/** 2486/**
2418 * The user pushed the 'clear' button. Remove all keywords. 2487 * The user pushed the 'clear' button. Remove all keywords.
2419 * 2488 *
@@ -2427,6 +2496,7 @@ GNUNET_GTK_master_publish_dialog_clear_button_clicked_cb (GtkButton *button,
2427 clear_keywords_from_tm (user_data); 2496 clear_keywords_from_tm (user_data);
2428} 2497}
2429 2498
2499
2430/** 2500/**
2431 * The user pushed the 'cancel' button. Close the master publish dialog. 2501 * The user pushed the 'cancel' button. Close the master publish dialog.
2432 * 2502 *
@@ -2442,6 +2512,7 @@ GNUNET_GTK_master_publish_dialog_cancel_button_clicked_cb (GtkButton *button,
2442 GNUNET_break (GNUNET_YES == close_master_publish_dialog (ctx)); 2512 GNUNET_break (GNUNET_YES == close_master_publish_dialog (ctx));
2443} 2513}
2444 2514
2515
2445/** 2516/**
2446 * The user attempted to close the publish window. Check if this is 2517 * The user attempted to close the publish window. Check if this is
2447 * allowed and if so, close it. 2518 * allowed and if so, close it.
@@ -2464,6 +2535,7 @@ GNUNET_GTK_master_publish_dialog_delete_event_cb (GtkWidget *widget,
2464 return FALSE; 2535 return FALSE;
2465} 2536}
2466 2537
2538
2467/** 2539/**
2468 * Called when expander changes its state (expanded/hidden). 2540 * Called when expander changes its state (expanded/hidden).
2469 * Hides the widget, adjusts the paned position to compensate, 2541 * Hides the widget, adjusts the paned position to compensate,
@@ -2501,6 +2573,7 @@ expander_callback (GObject *object, GParamSpec *param_spec, gpointer user_data)
2501 gtk_paned_set_position (GTK_PANED (ctx->vpaned), paned_pos); 2573 gtk_paned_set_position (GTK_PANED (ctx->vpaned), paned_pos);
2502} 2574}
2503 2575
2576
2504/* ******************** master edit dialog initialization ******************* */ 2577/* ******************** master edit dialog initialization ******************* */
2505 2578
2506/** 2579/**
@@ -2676,7 +2749,8 @@ add_updateable_to_ts (void *cls,
2676 } 2749 }
2677 g_free (displaytext); 2750 g_free (displaytext);
2678 2751
2679 if (NULL == spath) 2752 if (NULL != spath)
2753 return;
2680 { 2754 {
2681 GtkTreePath *path; 2755 GtkTreePath *path;
2682 char *gspath; 2756 char *gspath;
@@ -2687,26 +2761,33 @@ add_updateable_to_ts (void *cls,
2687 * map */ 2761 * map */
2688 gspath = GNUNET_strdup (spath); 2762 gspath = GNUNET_strdup (spath);
2689 if (GNUNET_SYSERR == GNUNET_CONTAINER_multihashmap_put ( 2763 if (GNUNET_SYSERR == GNUNET_CONTAINER_multihashmap_put (
2690 uc->seen, 2764 uc->seen,
2691 &hc, 2765 &hc,
2692 gspath, 2766 gspath,
2693 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)) 2767 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST))
2694 GNUNET_free (gspath); 2768 GNUNET_free (gspath);
2695 } 2769 }
2696 else
2697 return;
2698 2770
2699 sc.parent = &iter; 2771 sc.parent = &iter;
2700 sc.ts = uc->ts; 2772 sc.ts = uc->ts;
2701 sc.ns = uc->ns; 2773 sc.ns = uc->ns;
2702 sc.seen = uc->seen; 2774 sc.seen = uc->seen;
2703 sc.update_called = GNUNET_NO; 2775 sc.update_called = GNUNET_NO;
2704 GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (), 2776 {
2705 GNUNET_IDENTITY_ego_get_private_key ( 2777 const struct GNUNET_IDENTITY_PrivateKey *pk;
2706 uc->ns), 2778
2707 next_id, 2779 pk = GNUNET_IDENTITY_ego_get_private_key (uc->ns);
2708 &add_updateable_to_ts, 2780 if (GNUNET_IDENTITY_TYPE_ECDSA != pk->type)
2709 &sc); 2781 {
2782 GNUNET_break (0);
2783 return;
2784 }
2785 GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (),
2786 &pk->ecdsa_key,
2787 next_id,
2788 &add_updateable_to_ts,
2789 &sc);
2790 }
2710 if ((sc.update_called == GNUNET_NO) && (NULL != next_id) && 2791 if ((sc.update_called == GNUNET_NO) && (NULL != next_id) &&
2711 (strlen (next_id) > 0)) 2792 (strlen (next_id) > 0))
2712 { 2793 {
@@ -2731,6 +2812,7 @@ add_updateable_to_ts (void *cls,
2731 } 2812 }
2732} 2813}
2733 2814
2815
2734/** 2816/**
2735 * Called by a hashmap iterator. 2817 * Called by a hashmap iterator.
2736 * Frees its argument with GNUNET_free(). 2818 * Frees its argument with GNUNET_free().
@@ -2747,6 +2829,7 @@ free_seen_paths (void *cls, const struct GNUNET_HashCode *key, void *value)
2747 return GNUNET_YES; 2829 return GNUNET_YES;
2748} 2830}
2749 2831
2832
2750/** 2833/**
2751 * User changed the selected namespace. Check if it is valid, 2834 * User changed the selected namespace. Check if it is valid,
2752 * and if so, update the rest of the dialog accordingly. 2835 * and if so, update the rest of the dialog accordingly.
@@ -2798,13 +2881,25 @@ GNUNET_GTK_master_publish_dialog_ego_combobox_changed_cb (GtkComboBox *combo,
2798 uc.ns = ego; 2881 uc.ns = ego;
2799 uc.update_called = GNUNET_NO; 2882 uc.update_called = GNUNET_NO;
2800 uc.seen = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO); 2883 uc.seen = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO);
2884 {
2885 const struct GNUNET_IDENTITY_PrivateKey *pk;
2801 2886
2802 GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (), 2887 pk = GNUNET_IDENTITY_ego_get_private_key (ego);
2803 GNUNET_IDENTITY_ego_get_private_key ( 2888 if (GNUNET_IDENTITY_TYPE_ECDSA != pk->type)
2804 ego), 2889 {
2805 NULL, 2890 GNUNET_break (0);
2806 &add_updateable_to_ts, 2891 gtk_widget_set_sensitive (ctx->identifier_entry, FALSE);
2807 &uc); 2892 gtk_widget_set_sensitive (ctx->updateable_checkbox, FALSE);
2893 gtk_widget_set_sensitive (ctx->update_id_entry, FALSE);
2894 update_selectivity_execute_cancel (ctx);
2895 return;
2896 }
2897 GNUNET_FS_namespace_list_updateable (GNUNET_FS_GTK_get_fs_handle (),
2898 &pk->ecdsa_key,
2899 NULL,
2900 &add_updateable_to_ts,
2901 &uc);
2902 }
2808 GNUNET_CONTAINER_multihashmap_iterate (uc.seen, &free_seen_paths, NULL); 2903 GNUNET_CONTAINER_multihashmap_iterate (uc.seen, &free_seen_paths, NULL);
2809 GNUNET_CONTAINER_multihashmap_destroy (uc.seen); 2904 GNUNET_CONTAINER_multihashmap_destroy (uc.seen);
2810 gtk_widget_set_sensitive (ctx->identifier_entry, TRUE); 2905 gtk_widget_set_sensitive (ctx->identifier_entry, TRUE);
@@ -2813,6 +2908,7 @@ GNUNET_GTK_master_publish_dialog_ego_combobox_changed_cb (GtkComboBox *combo,
2813 update_selectivity_execute_cancel (ctx); 2908 update_selectivity_execute_cancel (ctx);
2814} 2909}
2815 2910
2911
2816/** 2912/**
2817 * Add all updateable entries of the current namespace to the 2913 * Add all updateable entries of the current namespace to the
2818 * tree store. 2914 * tree store.
@@ -2883,6 +2979,7 @@ add_namespace_to_ts (void *cls,
2883 gtk_widget_set_sensitive (ctx->update_id_entry, have_ns); 2979 gtk_widget_set_sensitive (ctx->update_id_entry, have_ns);
2884} 2980}
2885 2981
2982
2886/** 2983/**
2887 * Run the file-publishing operation (by opening the master publishing dialog). 2984 * Run the file-publishing operation (by opening the master publishing dialog).
2888 * 2985 *
@@ -2936,8 +3033,8 @@ GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget *dummy,
2936 gtk_builder_get_object (ctx->builder, 3033 gtk_builder_get_object (ctx->builder,
2937 "GNUNET_GTK_master_publish_dialog_cancel_button")); 3034 "GNUNET_GTK_master_publish_dialog_cancel_button"));
2938 ctx->file_info_treeview = GTK_TREE_VIEW (gtk_builder_get_object ( 3035 ctx->file_info_treeview = GTK_TREE_VIEW (gtk_builder_get_object (
2939 ctx->builder, 3036 ctx->builder,
2940 "GNUNET_GTK_master_publish_dialog_file_information_tree_view")); 3037 "GNUNET_GTK_master_publish_dialog_file_information_tree_view"));
2941 ctx->file_info_selection = 3038 ctx->file_info_selection =
2942 gtk_tree_view_get_selection (ctx->file_info_treeview); 3039 gtk_tree_view_get_selection (ctx->file_info_treeview);
2943 ctx->file_info_treemodel = gtk_tree_view_get_model (ctx->file_info_treeview); 3040 ctx->file_info_treemodel = gtk_tree_view_get_model (ctx->file_info_treeview);
@@ -2951,8 +3048,8 @@ GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget *dummy,
2951 gtk_builder_get_object (ctx->builder, 3048 gtk_builder_get_object (ctx->builder,
2952 "GNUNET_GTK_master_publish_dialog_own_checkbox")); 3049 "GNUNET_GTK_master_publish_dialog_own_checkbox"));
2953 ctx->updateable_checkbox = GTK_WIDGET (gtk_builder_get_object ( 3050 ctx->updateable_checkbox = GTK_WIDGET (gtk_builder_get_object (
2954 ctx->builder, 3051 ctx->builder,
2955 "GNUNET_GTK_master_publish_dialog_updateable_checkbox")); 3052 "GNUNET_GTK_master_publish_dialog_updateable_checkbox"));
2956 ctx->update_id_entry = GTK_WIDGET ( 3053 ctx->update_id_entry = GTK_WIDGET (
2957 gtk_builder_get_object (ctx->builder, 3054 gtk_builder_get_object (ctx->builder,
2958 "GNUNET_GTK_master_publish_dialog_update_id_entry")); 3055 "GNUNET_GTK_master_publish_dialog_update_id_entry"));
@@ -2965,8 +3062,8 @@ GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget *dummy,
2965 "GNUNET_GTK_master_publish_dialog_update_id_hbox")); 3062 "GNUNET_GTK_master_publish_dialog_update_id_hbox"));
2966 3063
2967 ctx->identifiers_expander = GTK_WIDGET (gtk_builder_get_object ( 3064 ctx->identifiers_expander = GTK_WIDGET (gtk_builder_get_object (
2968 ctx->builder, 3065 ctx->builder,
2969 "GNUNET_GTK_master_publish_dialog_previous_identifiers_expander")); 3066 "GNUNET_GTK_master_publish_dialog_previous_identifiers_expander"));
2970 ctx->vpaned = GTK_WIDGET ( 3067 ctx->vpaned = GTK_WIDGET (
2971 gtk_builder_get_object (ctx->builder, 3068 gtk_builder_get_object (ctx->builder,
2972 "GNUNET_GTK_master_publish_dialog_vpaned")); 3069 "GNUNET_GTK_master_publish_dialog_vpaned"));
@@ -2978,11 +3075,11 @@ GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget *dummy,
2978 gtk_builder_get_object (ctx->builder, 3075 gtk_builder_get_object (ctx->builder,
2979 "GNUNET_GTK_master_publish_dialog_identifier_entry")); 3076 "GNUNET_GTK_master_publish_dialog_identifier_entry"));
2980 ctx->identifiers_scrolled = GTK_WIDGET (gtk_builder_get_object ( 3077 ctx->identifiers_scrolled = GTK_WIDGET (gtk_builder_get_object (
2981 ctx->builder, 3078 ctx->builder,
2982 "GNUNET_GTK_master_publish_dialog_previous_identifiers_scrolled")); 3079 "GNUNET_GTK_master_publish_dialog_previous_identifiers_scrolled"));
2983 ctx->identifiers_treeview = GTK_TREE_VIEW (gtk_builder_get_object ( 3080 ctx->identifiers_treeview = GTK_TREE_VIEW (gtk_builder_get_object (
2984 ctx->builder, 3081 ctx->builder,
2985 "GNUNET_GTK_master_publish_dialog_previous_identifiers_treeview")); 3082 "GNUNET_GTK_master_publish_dialog_previous_identifiers_treeview"));
2986 ctx->identifiers_treemodel = 3083 ctx->identifiers_treemodel =
2987 gtk_tree_view_get_model (ctx->identifiers_treeview); 3084 gtk_tree_view_get_model (ctx->identifiers_treeview);
2988 ctx->identifiers_selection = 3085 ctx->identifiers_selection =
@@ -3033,4 +3130,5 @@ GNUNET_GTK_main_menu_file_publish_activate_cb (GtkWidget *dummy,
3033 gtk_window_present (GTK_WINDOW (ctx->master_pubdialog)); 3130 gtk_window_present (GTK_WINDOW (ctx->master_pubdialog));
3034} 3131}
3035 3132
3133
3036/* end of gnunet-fs-gtk_publish-dialog.c */ 3134/* end of gnunet-fs-gtk_publish-dialog.c */
diff --git a/src/namestore/gnunet-namestore-gtk.c b/src/namestore/gnunet-namestore-gtk.c
index 15167f31..ea61d71f 100644
--- a/src/namestore/gnunet-namestore-gtk.c
+++ b/src/namestore/gnunet-namestore-gtk.c
@@ -416,7 +416,7 @@ static GtkTreeView *tv;
416/** 416/**
417 * Private key of the zone we are currently editing. 417 * Private key of the zone we are currently editing.
418 */ 418 */
419static struct GNUNET_IDENTITY_PrivateKey *pkey; 419static const struct GNUNET_IDENTITY_PrivateKey *pkey;
420 420
421/** 421/**
422 * Public key of the zone we are currently editing. 422 * Public key of the zone we are currently editing.
@@ -2390,8 +2390,7 @@ zone_iteration_proc (void *cls,
2390 GtkTreePath *sel_path; 2390 GtkTreePath *sel_path;
2391 2391
2392 (void) cls; 2392 (void) cls;
2393 if (0 != 2393 if (0 != memcmp (zone_key, pkey, sizeof (struct GNUNET_IDENTITY_PrivateKey)))
2394 memcmp (zone_key, pkey, sizeof (struct GNUNET_IDENTITY_PrivateKey)))
2395 { 2394 {
2396 GNUNET_break (0); 2395 GNUNET_break (0);
2397 return; 2396 return;
@@ -2608,9 +2607,8 @@ load_zone (const char *name, struct GNUNET_IDENTITY_Ego *ego)
2608 if (NULL == name) 2607 if (NULL == name)
2609 return; /* empty zone */ 2608 return; /* empty zone */
2610 current_pseudonym = GNUNET_strdup (name); 2609 current_pseudonym = GNUNET_strdup (name);
2611 pkey = GNUNET_new (struct GNUNET_IDENTITY_PrivateKey); 2610 pkey = GNUNET_IDENTITY_ego_get_private_key (ego);
2612 *pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); 2611 GNUNET_IDENTITY_ego_get_public_key (ego, &pubkey);
2613 GNUNET_IDENTITY_ego_get_public_key (pkey, &pubkey);
2614 label = g_markup_printf_escaped ("<b>%s</b>", GNUNET_GNSRECORD_z2s (&pubkey)); 2612 label = g_markup_printf_escaped ("<b>%s</b>", GNUNET_GNSRECORD_z2s (&pubkey));
2615 gtk_label_set_markup (GTK_LABEL ( 2613 gtk_label_set_markup (GTK_LABEL (
2616 get_object ("gnunet_namestore_gtk_zone_label")), 2614 get_object ("gnunet_namestore_gtk_zone_label")),
@@ -2787,11 +2785,6 @@ cleanup_task (void *cls)
2787 GNUNET_free (moc); 2785 GNUNET_free (moc);
2788 } 2786 }
2789 gtk_tree_store_clear (ts); 2787 gtk_tree_store_clear (ts);
2790 if (NULL != pkey)
2791 {
2792 GNUNET_free (pkey);
2793 pkey = NULL;
2794 }
2795 if (NULL != current_pseudonym) 2788 if (NULL != current_pseudonym)
2796 { 2789 {
2797 GNUNET_free (current_pseudonym); 2790 GNUNET_free (current_pseudonym);
diff --git a/src/namestore/plugin_gtk_namestore_phone.c b/src/namestore/plugin_gtk_namestore_phone.c
index 9d1576eb..843f4a15 100644
--- a/src/namestore/plugin_gtk_namestore_phone.c
+++ b/src/namestore/plugin_gtk_namestore_phone.c
@@ -1,22 +1,22 @@
1/* 1/*
2 * This file is part of GNUnet 2 * This file is part of GNUnet
3 * Copyright (C) 2009-2013 GNUnet e.V. 3 * Copyright (C) 2009-2013 GNUnet e.V.
4 * 4 *
5 * GNUnet is free software; you can redistribute it and/or modify 5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published 6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your 7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version. 8 * option) any later version.
9 * 9 *
10 * GNUnet is distributed in the hope that it will be useful, but 10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of 11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details. 13 * General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the 16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21/** 21/**
22 * @file namestore/plugin_gtk_namestore_phone.c 22 * @file namestore/plugin_gtk_namestore_phone.c
@@ -133,8 +133,9 @@ phone_validate (void *cls, GtkBuilder *builder)
133 (GNUNET_OK != 133 (GNUNET_OK !=
134 GNUNET_CRYPTO_ecdsa_public_key_from_string (preedit, 134 GNUNET_CRYPTO_ecdsa_public_key_from_string (preedit,
135 strlen (preedit), 135 strlen (preedit),
136 &pub))) 136 &pub.ecdsa_key)))
137 return GNUNET_SYSERR; 137 return GNUNET_SYSERR;
138 pub.type = GNUNET_IDENTITY_TYPE_ECDSA;
138 return GNUNET_OK; 139 return GNUNET_OK;
139} 140}
140 141
@@ -151,9 +152,9 @@ libgnunet_plugin_gtk_namestore_phone_init (void *cls)
151 struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = cls; 152 struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = cls;
152 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin; 153 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
153 static struct GNUNET_GTK_NAMESTORE_Symbol symbols[] = 154 static struct GNUNET_GTK_NAMESTORE_Symbol symbols[] =
154 {{"GNS_edit_dialog_phone_peer_entry_changed_cb", 155 {{"GNS_edit_dialog_phone_peer_entry_changed_cb",
155 G_CALLBACK (GNS_edit_dialog_phone_peer_entry_changed_cb)}, 156 G_CALLBACK (GNS_edit_dialog_phone_peer_entry_changed_cb)},
156 {NULL, NULL}}; 157 {NULL, NULL}};
157 158
158 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions); 159 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
159 plugin->cls = env; 160 plugin->cls = env;
@@ -182,4 +183,5 @@ libgnunet_plugin_gtk_namestore_phone_done (void *cls)
182 return NULL; 183 return NULL;
183} 184}
184 185
186
185/* end of plugin_gtk_namestore_phone.c */ 187/* end of plugin_gtk_namestore_phone.c */
diff --git a/src/namestore/plugin_gtk_namestore_pkey.c b/src/namestore/plugin_gtk_namestore_pkey.c
index c31ca79b..3e5d0321 100644
--- a/src/namestore/plugin_gtk_namestore_pkey.c
+++ b/src/namestore/plugin_gtk_namestore_pkey.c
@@ -1,22 +1,22 @@
1/* 1/*
2 * This file is part of GNUnet 2 * This file is part of GNUnet
3 * Copyright (C) 2009-2013 GNUnet e.V. 3 * Copyright (C) 2009-2013 GNUnet e.V.
4 * 4 *
5 * GNUnet is free software; you can redistribute it and/or modify 5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published 6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your 7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version. 8 * option) any later version.
9 * 9 *
10 * GNUnet is distributed in the hope that it will be useful, but 10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of 11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details. 13 * General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the 16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21/** 21/**
22 * @file namestore/plugin_gtk_namestore_pkey.c 22 * @file namestore/plugin_gtk_namestore_pkey.c
@@ -108,8 +108,9 @@ pkey_validate (void *cls, GtkBuilder *builder)
108 (GNUNET_OK != 108 (GNUNET_OK !=
109 GNUNET_CRYPTO_ecdsa_public_key_from_string (preedit, 109 GNUNET_CRYPTO_ecdsa_public_key_from_string (preedit,
110 strlen (preedit), 110 strlen (preedit),
111 &pub))) 111 &pub.ecdsa_key)))
112 return GNUNET_SYSERR; 112 return GNUNET_SYSERR;
113 pub.type = GNUNET_IDENTITY_TYPE_ECDSA;
113 return GNUNET_OK; 114 return GNUNET_OK;
114} 115}
115 116
@@ -126,9 +127,9 @@ libgnunet_plugin_gtk_namestore_pkey_init (void *cls)
126 struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = cls; 127 struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = cls;
127 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin; 128 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
128 static struct GNUNET_GTK_NAMESTORE_Symbol symbols[] = 129 static struct GNUNET_GTK_NAMESTORE_Symbol symbols[] =
129 {{"GNS_edit_dialog_pkey_entry_changed_cb", 130 {{"GNS_edit_dialog_pkey_entry_changed_cb",
130 G_CALLBACK (GNS_edit_dialog_pkey_entry_changed_cb)}, 131 G_CALLBACK (GNS_edit_dialog_pkey_entry_changed_cb)},
131 {NULL, NULL}}; 132 {NULL, NULL}};
132 133
133 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions); 134 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
134 plugin->cls = env; 135 plugin->cls = env;
@@ -157,4 +158,5 @@ libgnunet_plugin_gtk_namestore_pkey_done (void *cls)
157 return NULL; 158 return NULL;
158} 159}
159 160
161
160/* end of plugin_gtk_namestore_pkey.c */ 162/* end of plugin_gtk_namestore_pkey.c */
diff --git a/src/namestore/plugin_gtk_namestore_soa.c b/src/namestore/plugin_gtk_namestore_soa.c
index 0dfc893e..171b6eaa 100644
--- a/src/namestore/plugin_gtk_namestore_soa.c
+++ b/src/namestore/plugin_gtk_namestore_soa.c
@@ -106,24 +106,24 @@ soa_load (void *cls, gchar *n_value, GtkBuilder *builder)
106 gtk_builder_get_object (builder, "edit_dialog_soa_contact_email_entry")), 106 gtk_builder_get_object (builder, "edit_dialog_soa_contact_email_entry")),
107 soa_mname); 107 soa_mname);
108 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object ( 108 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (
109 builder, 109 builder,
110 "edit_dialog_soa_serial_number_spinbutton")), 110 "edit_dialog_soa_serial_number_spinbutton")),
111 soa_serial); 111 soa_serial);
112 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object ( 112 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (
113 builder, 113 builder,
114 "edit_dialog_soa_refresh_time_spinbutton")), 114 "edit_dialog_soa_refresh_time_spinbutton")),
115 soa_refresh); 115 soa_refresh);
116 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object ( 116 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (
117 builder, 117 builder,
118 "edit_dialog_soa_retry_time_spinbutton")), 118 "edit_dialog_soa_retry_time_spinbutton")),
119 soa_retry); 119 soa_retry);
120 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object ( 120 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (
121 builder, 121 builder,
122 "edit_dialog_soa_expire_time_spinbutton")), 122 "edit_dialog_soa_expire_time_spinbutton")),
123 soa_expire); 123 soa_expire);
124 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object ( 124 gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object (
125 builder, 125 builder,
126 "edit_dialog_soa_minimum_ttl_spinbutton")), 126 "edit_dialog_soa_minimum_ttl_spinbutton")),
127 soa_min); 127 soa_min);
128} 128}
129 129
@@ -156,21 +156,22 @@ soa_store (void *cls, GtkBuilder *builder)
156 gtk_builder_get_object (builder, "edit_dialog_soa_contact_email_entry")); 156 gtk_builder_get_object (builder, "edit_dialog_soa_contact_email_entry"));
157 contact_email = gtk_entry_get_text (entry); 157 contact_email = gtk_entry_get_text (entry);
158 soa_serial = gtk_spin_button_get_value (GTK_SPIN_BUTTON ( 158 soa_serial = gtk_spin_button_get_value (GTK_SPIN_BUTTON (
159 gtk_builder_get_object (builder, 159 gtk_builder_get_object (builder,
160 "edit_dialog_soa_serial_number_spinbutton"))); 160 "edit_dialog_soa_serial_number_spinbutton")));
161 soa_refresh = gtk_spin_button_get_value (GTK_SPIN_BUTTON ( 161 soa_refresh = gtk_spin_button_get_value (GTK_SPIN_BUTTON (
162 gtk_builder_get_object (builder, 162 gtk_builder_get_object (builder,
163 "edit_dialog_soa_refresh_time_spinbutton"))); 163 "edit_dialog_soa_refresh_time_spinbutton")));
164 soa_retry = gtk_spin_button_get_value (GTK_SPIN_BUTTON ( 164 soa_retry = gtk_spin_button_get_value (GTK_SPIN_BUTTON (
165 gtk_builder_get_object (builder, "edit_dialog_soa_retry_time_spinbutton"))); 165 gtk_builder_get_object (builder,
166 "edit_dialog_soa_retry_time_spinbutton")));
166 soa_expire = gtk_spin_button_get_value (GTK_SPIN_BUTTON ( 167 soa_expire = gtk_spin_button_get_value (GTK_SPIN_BUTTON (
167 gtk_builder_get_object (builder, 168 gtk_builder_get_object (builder,
168 "edit_dialog_soa_expire_time_spinbutton"))); 169 "edit_dialog_soa_expire_time_spinbutton")));
169 soa_min = gtk_spin_button_get_value (GTK_SPIN_BUTTON ( 170 soa_min = gtk_spin_button_get_value (GTK_SPIN_BUTTON (
170 gtk_builder_get_object (builder, 171 gtk_builder_get_object (builder,
171 "edit_dialog_soa_minimum_ttl_spinbutton"))); 172 "edit_dialog_soa_minimum_ttl_spinbutton")));
172 GNUNET_asprintf (&result, 173 GNUNET_asprintf (&result,
173 "rname=%s mname=%s %lu,%lu,%lu,%lu,%lu", 174 "rname=%s mname=%s %u,%u,%u,%u,%u",
174 source_host, 175 source_host,
175 contact_email, 176 contact_email,
176 soa_serial, 177 soa_serial,
@@ -231,11 +232,11 @@ libgnunet_plugin_gtk_namestore_soa_init (void *cls)
231 struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = cls; 232 struct GNUNET_GTK_NAMESTORE_PluginEnvironment *env = cls;
232 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin; 233 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
233 static struct GNUNET_GTK_NAMESTORE_Symbol symbols[] = 234 static struct GNUNET_GTK_NAMESTORE_Symbol symbols[] =
234 {{"GNS_edit_dialog_soa_contact_email_entry_changed_cb", 235 {{"GNS_edit_dialog_soa_contact_email_entry_changed_cb",
235 G_CALLBACK (GNS_edit_dialog_soa_contact_email_entry_changed_cb)}, 236 G_CALLBACK (GNS_edit_dialog_soa_contact_email_entry_changed_cb)},
236 {"GNS_edit_dialog_soa_source_host_entry_changed_cb", 237 {"GNS_edit_dialog_soa_source_host_entry_changed_cb",
237 G_CALLBACK (GNS_edit_dialog_soa_source_host_entry_changed_cb)}, 238 G_CALLBACK (GNS_edit_dialog_soa_source_host_entry_changed_cb)},
238 {NULL, NULL}}; 239 {NULL, NULL}};
239 240
240 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions); 241 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
241 plugin->cls = env; 242 plugin->cls = env;
@@ -264,4 +265,5 @@ libgnunet_plugin_gtk_namestore_soa_done (void *cls)
264 return NULL; 265 return NULL;
265} 266}
266 267
268
267/* end of plugin_gtk_namestore_soa.c */ 269/* end of plugin_gtk_namestore_soa.c */
diff --git a/src/setup/gnunet-setup-transport-test.c b/src/setup/gnunet-setup-transport-test.c
index fd08c633..89df2d23 100644
--- a/src/setup/gnunet-setup-transport-test.c
+++ b/src/setup/gnunet-setup-transport-test.c
@@ -122,8 +122,7 @@ start_service (const char *name)
122 path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBEXECDIR); 122 path = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_LIBEXECDIR);
123 GNUNET_asprintf (&filename, "%s/%s", path, binary); 123 GNUNET_asprintf (&filename, "%s/%s", path, binary);
124 GNUNET_free (path); 124 GNUNET_free (path);
125 proc = GNUNET_OS_start_process (GNUNET_NO, 125 proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ERR,
126 GNUNET_OS_INHERIT_STD_ERR,
127 NULL, 126 NULL,
128 NULL, 127 NULL,
129 NULL, 128 NULL,
@@ -301,4 +300,5 @@ GNUNET_setup_transport_test (const char *section_name,
301 GNUNET_NAT_AUTO_test_start (cfg, proto, section_name, &result_callback, tc); 300 GNUNET_NAT_AUTO_test_start (cfg, proto, section_name, &result_callback, tc);
302} 301}
303 302
303
304/* end of gnunet-setup-transport-test.c */ 304/* end of gnunet-setup-transport-test.c */
diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c
index a2c26f73..262645a1 100644
--- a/src/setup/gnunet-setup.c
+++ b/src/setup/gnunet-setup.c
@@ -247,7 +247,8 @@ load_options ()
247 247
248#ifndef LINUX 248#ifndef LINUX
249 gtk_widget_hide (GTK_WIDGET ( 249 gtk_widget_hide (GTK_WIDGET (
250 GNUNET_SETUP_get_object ("GNUNET_setup_gns_hijack_checkbutton"))); 250 GNUNET_SETUP_get_object (
251 "GNUNET_setup_gns_hijack_checkbutton")));
251#endif 252#endif
252 for (unsigned int i = 0; NULL != option_specifications[i].widget_name; i++) 253 for (unsigned int i = 0; NULL != option_specifications[i].widget_name; i++)
253 { 254 {
@@ -396,7 +397,6 @@ try_gksu (const char *username)
396 struct GNUNET_OS_Process *proc; 397 struct GNUNET_OS_Process *proc;
397 398
398 proc = GNUNET_OS_start_process ( 399 proc = GNUNET_OS_start_process (
399 GNUNET_NO,
400 GNUNET_OS_INHERIT_STD_ALL, 400 GNUNET_OS_INHERIT_STD_ALL,
401 NULL, 401 NULL,
402 NULL, 402 NULL,
@@ -417,6 +417,8 @@ try_gksu (const char *username)
417 GNUNET_OS_process_destroy (proc); 417 GNUNET_OS_process_destroy (proc);
418 return GNUNET_OK; 418 return GNUNET_OK;
419} 419}
420
421
420#endif 422#endif
421 423
422 424
@@ -430,8 +432,7 @@ GNUNET_setup_launch_edit_friends_button_clicked_cb (GtkButton *button,
430{ 432{
431 struct GNUNET_OS_Process *proc; 433 struct GNUNET_OS_Process *proc;
432 434
433 proc = GNUNET_OS_start_process (GNUNET_NO, 435 proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL,
434 GNUNET_OS_INHERIT_STD_ALL,
435 NULL, 436 NULL,
436 NULL, 437 NULL,
437 NULL, 438 NULL,
@@ -543,7 +544,8 @@ main (int argc, char *const *argv)
543 "run as user 'gnunet', if necessary by executing gksu to elevate rights"), 544 "run as user 'gnunet', if necessary by executing gksu to elevate rights"),
544 &do_gksu), 545 &do_gksu),
545#endif 546#endif
546 GNUNET_GETOPT_OPTION_END}; 547 GNUNET_GETOPT_OPTION_END
548 };
547 int ret; 549 int ret;
548 550
549 if (GNUNET_OK == GNUNET_GTK_main_loop_start ("gnunet-setup", 551 if (GNUNET_OK == GNUNET_GTK_main_loop_start ("gnunet-setup",
@@ -559,4 +561,5 @@ main (int argc, char *const *argv)
559 return ret; 561 return ret;
560} 562}
561 563
564
562/* end of gnunet-setup.c */ 565/* end of gnunet-setup.c */