[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30144 - gnunet-gtk/src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30144 - gnunet-gtk/src/namestore |
Date: |
Fri, 11 Oct 2013 15:42:26 +0200 |
Author: grothoff
Date: 2013-10-11 15:42:26 +0200 (Fri, 11 Oct 2013)
New Revision: 30144
Modified:
gnunet-gtk/src/namestore/gnunet-namestore-gtk.c
Log:
-implement #3063: ask user about running import script, instead of warning
about not having run it
Modified: gnunet-gtk/src/namestore/gnunet-namestore-gtk.c
===================================================================
--- gnunet-gtk/src/namestore/gnunet-namestore-gtk.c 2013-10-11 13:41:40 UTC
(rev 30143)
+++ gnunet-gtk/src/namestore/gnunet-namestore-gtk.c 2013-10-11 13:42:26 UTC
(rev 30144)
@@ -1932,7 +1932,6 @@
load_zone (const char *name,
struct GNUNET_IDENTITY_Ego *ego)
{
- char *emsg;
char *label;
GtkTreeIter toplevel;
@@ -1945,12 +1944,28 @@
}
if (NULL == ego)
{
- GNUNET_asprintf (&emsg,
- _("Could not load zone `%s'; did you run
gnunet-gns-import.sh?\n"),
- name);
- show_error_message (_("Failed to load zone"),
- emsg);
- GNUNET_free (emsg);
+ GtkDialog *diag;
+ gint result;
+
+ diag = GTK_DIALOG (gtk_message_dialog_new (NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_YES_NO,
+ (NULL == name)
+ ? _("No zones found. Should I
run the import script?")
+ : _("Zone `%s' not found.
Should I run the import script?"),
+ name));
+ result = gtk_dialog_run (diag);
+ gtk_widget_destroy (GTK_WIDGET (diag));
+ switch (result)
+ {
+ case GTK_RESPONSE_YES:
+ system ("gnunet-gns-import.sh");
+ break;
+ default:
+ /* nothing */
+ break;
+ }
gtk_widget_show (GTK_WIDGET (get_object
("gnunet_namestore_gtk_zone_combobox")));
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30144 - gnunet-gtk/src/namestore,
gnunet <=