aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-26 11:55:14 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-26 11:55:14 +0000
commit8565cf2c0a69c0bdb00e7fe87e6854fda3f07331 (patch)
tree8a6f755a068cba53743ed758fb9c2eb3cec38516
parentfd28cc359e97e45e29dec8c42b5b45ad2a139c4b (diff)
downloadgnunet-gtk-8565cf2c0a69c0bdb00e7fe87e6854fda3f07331.tar.gz
gnunet-gtk-8565cf2c0a69c0bdb00e7fe87e6854fda3f07331.zip
-fix
-rw-r--r--contrib/gnunet_setup_gtk_main_window.glade18
-rw-r--r--src/gns/gnunet-gns-gtk.c2
-rw-r--r--src/setup/gnunet-setup-gns.c42
3 files changed, 37 insertions, 25 deletions
diff --git a/contrib/gnunet_setup_gtk_main_window.glade b/contrib/gnunet_setup_gtk_main_window.glade
index 48fdfecf..253d6703 100644
--- a/contrib/gnunet_setup_gtk_main_window.glade
+++ b/contrib/gnunet_setup_gtk_main_window.glade
@@ -4523,7 +4523,7 @@
4523 </object> 4523 </object>
4524 </child> 4524 </child>
4525 <child type="label"> 4525 <child type="label">
4526 <object class="GtkLabel" id="GNUNET_GNS_GTK_zone_label"> 4526 <object class="GtkLabel" id="GNUNET_setup_gns_zone_label">
4527 <property name="visible">True</property> 4527 <property name="visible">True</property>
4528 <property name="can_focus">False</property> 4528 <property name="can_focus">False</property>
4529 <property name="label" translatable="yes">&lt;b&gt;SET TO PUBLIC KEY OF THE ZONE&lt;/b&gt;</property> 4529 <property name="label" translatable="yes">&lt;b&gt;SET TO PUBLIC KEY OF THE ZONE&lt;/b&gt;</property>
@@ -4539,8 +4539,20 @@
4539 </packing> 4539 </packing>
4540 </child> 4540 </child>
4541 <child> 4541 <child>
4542 <object class="GtkScrolledWindow" id="GNUNET_setup_gns_main_scrolledwindow"> 4542 <object class="GtkLabel" id="GNUNET_setup_gns_status_label">
4543 <property name="visible">True</property> 4543 <property name="visible">True</property>
4544 <property name="can_focus">False</property>
4545 <property name="label" translatable="yes">&lt;b&gt;&lt;big&gt;Loading...&lt;/big&gt;&lt;/b&gt;</property>
4546 <property name="use_markup">True</property>
4547 </object>
4548 <packing>
4549 <property name="expand">False</property>
4550 <property name="fill">True</property>
4551 <property name="position">1</property>
4552 </packing>
4553 </child>
4554 <child>
4555 <object class="GtkScrolledWindow" id="GNUNET_setup_gns_main_scrolledwindow">
4544 <property name="can_focus">True</property> 4556 <property name="can_focus">True</property>
4545 <property name="hscrollbar_policy">automatic</property> 4557 <property name="hscrollbar_policy">automatic</property>
4546 <property name="vscrollbar_policy">automatic</property> 4558 <property name="vscrollbar_policy">automatic</property>
@@ -4648,7 +4660,7 @@
4648 <packing> 4660 <packing>
4649 <property name="expand">True</property> 4661 <property name="expand">True</property>
4650 <property name="fill">True</property> 4662 <property name="fill">True</property>
4651 <property name="position">1</property> 4663 <property name="position">2</property>
4652 </packing> 4664 </packing>
4653 </child> 4665 </child>
4654 </object> 4666 </object>
diff --git a/src/gns/gnunet-gns-gtk.c b/src/gns/gnunet-gns-gtk.c
index 7ea8c6c3..229e4b38 100644
--- a/src/gns/gnunet-gns-gtk.c
+++ b/src/gns/gnunet-gns-gtk.c
@@ -180,7 +180,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
180 return; 180 return;
181 if (NULL != gns->ns) 181 if (NULL != gns->ns)
182 { 182 {
183 GNUNET_NAMESTORE_disconnect (gns->ns, GNUNET_NO); 183 GNUNET_NAMESTORE_disconnect (gns->ns);
184 gns->ns = NULL; 184 gns->ns = NULL;
185 } 185 }
186 if (NULL != gns->pkey) 186 if (NULL != gns->pkey)
diff --git a/src/setup/gnunet-setup-gns.c b/src/setup/gnunet-setup-gns.c
index a3feb96b..d4f73381 100644
--- a/src/setup/gnunet-setup-gns.c
+++ b/src/setup/gnunet-setup-gns.c
@@ -1202,8 +1202,8 @@ zone_iteration_proc (void *cls,
1202 GNUNET_free (zc_ctx->label); 1202 GNUNET_free (zc_ctx->label);
1203 GNUNET_free (zc_ctx); 1203 GNUNET_free (zc_ctx);
1204 1204
1205 /* FIXME: hide message 'loading' and make tree view visible! */ 1205 gtk_widget_hide (GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_gns_status_label")));
1206 1206 gtk_widget_show (GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_gns_main_scrolledwindow")));
1207 return; 1207 return;
1208 } 1208 }
1209 1209
@@ -1348,8 +1348,6 @@ GNUNET_SETUP_gns_pseu_entry_enter_cb (GtkWidget *widget,
1348} 1348}
1349 1349
1350 1350
1351
1352
1353/** 1351/**
1354 * The user edited the preferred name (PSEU) of this namespace. 1352 * The user edited the preferred name (PSEU) of this namespace.
1355 * Push the update to the namestore. 1353 * Push the update to the namestore.
@@ -1415,6 +1413,7 @@ GNUNET_SETUP_gns_init ()
1415 char *servicehome; 1413 char *servicehome;
1416 struct ZoneIteration_Context *zc_ctx; 1414 struct ZoneIteration_Context *zc_ctx;
1417 GtkTreeIter toplevel; 1415 GtkTreeIter toplevel;
1416 GtkLabel *status_label;
1418 1417
1419 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, 1418 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg,
1420 "PATHS", 1419 "PATHS",
@@ -1435,21 +1434,23 @@ GNUNET_SETUP_gns_init ()
1435 "ZONEKEY", 1434 "ZONEKEY",
1436 &keyfile)) 1435 &keyfile))
1437 { 1436 {
1438 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1437 status_label = GTK_LABEL (GNUNET_SETUP_get_object ("GNUNET_setup_gns_status_label"));
1439 _("Option `%s' missing in section `%s'\n"), "ZONEKEY", "gns"); 1438 label = g_markup_printf_escaped (_("Option `%s' missing in section `%s'\n"),
1440 /* FIXME: display error message in GNS tab! */ 1439 "ZONEKEY", "gns");
1440 gtk_label_set_markup (status_label, label);
1441 g_free (label);
1441 return; 1442 return;
1442 } 1443 }
1443 else 1444 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using `%s'\n", keyfile);
1444 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using `%s'\n", keyfile);
1445 pkey = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); 1445 pkey = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile);
1446 GNUNET_free (keyfile); 1446 GNUNET_free (keyfile);
1447 keyfile = NULL; 1447 keyfile = NULL;
1448 if (NULL == pkey) 1448 if (NULL == pkey)
1449 { 1449 {
1450 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1450 status_label = GTK_LABEL (GNUNET_SETUP_get_object ("GNUNET_setup_gns_status_label"));
1451 _("Failed to read or create private zone key\n")); 1451 label = g_markup_printf_escaped (_("Failed to read or create private zone key\n"));
1452 /* FIXME: display error message in GNS tab! */ 1452 gtk_label_set_markup (status_label, label);
1453 g_free (label);
1453 return; 1454 return;
1454 } 1455 }
1455 GNUNET_CRYPTO_rsa_key_get_public (pkey, &pubkey); 1456 GNUNET_CRYPTO_rsa_key_get_public (pkey, &pubkey);
@@ -1462,20 +1463,20 @@ GNUNET_SETUP_gns_init ()
1462 namestore = GNUNET_NAMESTORE_connect (cfg); 1463 namestore = GNUNET_NAMESTORE_connect (cfg);
1463 if (NULL == namestore) 1464 if (NULL == namestore)
1464 { 1465 {
1465 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1466 status_label = GTK_LABEL (GNUNET_SETUP_get_object ("GNUNET_setup_gns_status_label"));
1466 _("Failed to connect to namestore\n")); 1467 label = g_markup_printf_escaped (_("<b><big>Failed to connect to namestore</b></big>"));
1467 /* FIXME: display error message in GNS tab! */ 1468 gtk_label_set_markup (status_label, label);
1469 g_free (label);
1468 return; 1470 return;
1469 } 1471 }
1470 /* FIXME: adjust names below... */ 1472 ts = GTK_TREE_STORE (GNUNET_SETUP_get_object ("GNUNET_setup_gns_treestore"));
1471 ts = GTK_TREE_STORE (GNUNET_SETUP_get_object ("GNUNET_SETUP_gns_treestore")); 1473 ls = GTK_LIST_STORE (GNUNET_SETUP_get_object ("GNUNET_setup_gns_type_liststore"));
1472 ls = GTK_LIST_STORE (GNUNET_SETUP_get_object ("GNUNET_SETUP_gns_type_liststore")); 1474 tv = GTK_TREE_VIEW (GNUNET_SETUP_get_object ("GNUNET_setup_gns_main_treeview"));
1473 tv = GTK_TREE_VIEW (GNUNET_SETUP_get_object ("GNUNET_SETUP_gns_main_treeview"));
1474 tm = GTK_TREE_MODEL(ts); 1475 tm = GTK_TREE_MODEL(ts);
1475 zone_as_string = GNUNET_strdup ((char *) &shenc); 1476 zone_as_string = GNUNET_strdup ((char *) &shenc);
1476 label = g_markup_printf_escaped (_("<b>Editing zone %s</b>"), 1477 label = g_markup_printf_escaped (_("<b>Editing zone %s</b>"),
1477 zone_as_string); 1478 zone_as_string);
1478 gtk_label_set_markup (GTK_LABEL (GNUNET_SETUP_get_object ("GNUNET_SETUP_gns_zone_label")), 1479 gtk_label_set_markup (GTK_LABEL (GNUNET_SETUP_get_object ("GNUNET_setup_gns_zone_label")),
1479 label); 1480 label);
1480 g_free (label); 1481 g_free (label);
1481 1482
@@ -1497,7 +1498,6 @@ GNUNET_SETUP_gns_init ()
1497 GNUNET_NAMESTORE_RF_NONE, 1498 GNUNET_NAMESTORE_RF_NONE,
1498 &zone_iteration_proc, 1499 &zone_iteration_proc,
1499 zc_ctx); 1500 zc_ctx);
1500 /* FIXME: show message 'loading', when done make tree view visible! */
1501} 1501}
1502 1502
1503 1503