diff options
Diffstat (limited to 'src/plugins/fs/namespace_create.c')
-rw-r--r-- | src/plugins/fs/namespace_create.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/plugins/fs/namespace_create.c b/src/plugins/fs/namespace_create.c index b89f3ebd..5df9b5b2 100644 --- a/src/plugins/fs/namespace_create.c +++ b/src/plugins/fs/namespace_create.c | |||
@@ -193,7 +193,7 @@ on_namespaceKeywordEntry_changed_fs (gpointer dummy2, GtkWidget * searchEntry) | |||
193 | void | 193 | void |
194 | create_namespace_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) | 194 | create_namespace_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) |
195 | { | 195 | { |
196 | const char *namespaceName; | 196 | const char *rootName; |
197 | GtkWidget *nameLine; | 197 | GtkWidget *nameLine; |
198 | GtkWidget *dialog; | 198 | GtkWidget *dialog; |
199 | GtkWidget *spin; | 199 | GtkWidget *spin; |
@@ -201,7 +201,6 @@ create_namespace_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
201 | struct GNUNET_ECRS_URI *keywordURI; | 201 | struct GNUNET_ECRS_URI *keywordURI; |
202 | struct GNUNET_ECRS_URI *root; | 202 | struct GNUNET_ECRS_URI *root; |
203 | GNUNET_HashCode namespaceId; | 203 | GNUNET_HashCode namespaceId; |
204 | GNUNET_HashCode rootEntry; | ||
205 | 204 | ||
206 | GNUNET_GTK_DEBUG_BEGIN (); | 205 | GNUNET_GTK_DEBUG_BEGIN (); |
207 | metaXML | 206 | metaXML |
@@ -241,15 +240,12 @@ create_namespace_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
241 | "namespaceMetaDataDialogKeywordList"); | 240 | "namespaceMetaDataDialogKeywordList"); |
242 | spin = glade_xml_get_widget (metaXML, "namespaceAnonymityspinbutton"); | 241 | spin = glade_xml_get_widget (metaXML, "namespaceAnonymityspinbutton"); |
243 | nameLine = glade_xml_get_widget (metaXML, "namespaceRootEntry"); | 242 | nameLine = glade_xml_get_widget (metaXML, "namespaceRootEntry"); |
244 | namespaceName = gtk_entry_get_text (GTK_ENTRY (nameLine)); | 243 | rootName = gtk_entry_get_text (GTK_ENTRY (nameLine)); |
245 | if (namespaceName == NULL) | 244 | if (rootName == NULL) |
246 | namespaceName = "root"; /* do NOT translate "root"! */ | 245 | rootName = "root"; /* do NOT translate "root"! */ |
247 | GNUNET_hash (namespaceName, strlen (namespaceName), &rootEntry); | ||
248 | nameLine = glade_xml_get_widget (metaXML, "namespaceNameEntry"); | ||
249 | namespaceName = gtk_entry_get_text (GTK_ENTRY (nameLine)); | ||
250 | root = GNUNET_NS_namespace_create (ectx, cfg, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)), 1000, /* FIXME: priority */ | 246 | root = GNUNET_NS_namespace_create (ectx, cfg, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin)), 1000, /* FIXME: priority */ |
251 | GNUNET_get_time () + 2 * GNUNET_CRON_YEARS, /* FIXME: expiration */ | 247 | GNUNET_get_time () + 2 * GNUNET_CRON_YEARS, /* FIXME: expiration */ |
252 | meta, keywordURI, &rootEntry); | 248 | meta, keywordURI, rootName); |
253 | if (root != NULL) | 249 | if (root != NULL) |
254 | { | 250 | { |
255 | GNUNET_ECRS_uri_get_namespace_from_sks (root, &namespaceId); | 251 | GNUNET_ECRS_uri_get_namespace_from_sks (root, &namespaceId); |
@@ -269,10 +265,7 @@ create_namespace_clicked_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
269 | GTK_DIALOG_MODAL, | 265 | GTK_DIALOG_MODAL, |
270 | GTK_MESSAGE_ERROR, | 266 | GTK_MESSAGE_ERROR, |
271 | GTK_BUTTONS_CLOSE, | 267 | GTK_BUTTONS_CLOSE, |
272 | _("Failed to create namespace `%s'." | 268 | _("Failed to create namespace." "Consult logs.")); |
273 | "Consult logs, most likely error is" | ||
274 | " that a namespace with that name " | ||
275 | "already exists."), namespaceName); | ||
276 | gtk_dialog_run (GTK_DIALOG (dialog)); | 269 | gtk_dialog_run (GTK_DIALOG (dialog)); |
277 | gtk_widget_destroy (dialog); | 270 | gtk_widget_destroy (dialog); |
278 | } | 271 | } |