gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis-gtk] branch master updated: fix error display


From: gnunet
Subject: [taler-anastasis-gtk] branch master updated: fix error display
Date: Tue, 16 Mar 2021 20:14:44 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis-gtk.

The following commit(s) were added to refs/heads/master by this push:
     new d6e8441  fix error display
d6e8441 is described below

commit d6e84419951a55e01bb41be4da55dc38ebbf63cd
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Tue Mar 16 20:14:41 2021 +0100

    fix error display
---
 src/anastasis/anastasis-gtk_action.c |  1 +
 src/anastasis/anastasis-gtk_helper.c | 18 ++++++++++++++++++
 src/anastasis/anastasis-gtk_helper.h |  8 ++++++++
 3 files changed, 27 insertions(+)

diff --git a/src/anastasis/anastasis-gtk_action.c 
b/src/anastasis/anastasis-gtk_action.c
index 88229cc..3d30704 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -1021,6 +1021,7 @@ action_truths_paying (void)
   GtkListStore *ls;
 
   AG_hide_all_frames ();
+  GNUNET_break (0);
   ls = GTK_LIST_STORE (GCG_get_main_window_object (
                                                   "unpaid_qrcodes_liststore"));
   gtk_list_store_clear (ls);
diff --git a/src/anastasis/anastasis-gtk_helper.c 
b/src/anastasis/anastasis-gtk_helper.c
index 70a3bf1..0c3bc34 100644
--- a/src/anastasis/anastasis-gtk_helper.c
+++ b/src/anastasis/anastasis-gtk_helper.c
@@ -30,9 +30,16 @@
 #include <jansson.h>
 
 
+/**
+ * true if we are currently showing an error message.
+ */
+static bool have_error;
+
+
 void
 AG_thaw ()
 {
+  AG_error_clear ();
   AG_sensitive ("anastasis_gtk_main_window");
   GNUNET_assert (NULL == ra);
 }
@@ -163,6 +170,8 @@ AG_hide_all_frames (void)
   AG_hide ("anastasis_gtk_start_frame");
   AG_hide_children ("anastasis_gtk_super_vbox");
   AG_hide_children ("anastasis_gtk_illustration_vbox");
+  if (have_error)
+    AG_show ("anastasis_gtk_error_label");
 }
 
 
@@ -198,6 +207,14 @@ GCG_get_main_window_object (const char *name)
 }
 
 
+void
+AG_error_clear ()
+{
+  have_error = false;
+  AG_hide ("anastasis_gtk_error_label");
+}
+
+
 void
 AG_error (const char *format,
           ...)
@@ -226,5 +243,6 @@ AG_error (const char *format,
   gtk_label_set_text (l,
                       msg);
   free (msg);
+  have_error = true;
   gtk_widget_show (GTK_WIDGET (l));
 }
diff --git a/src/anastasis/anastasis-gtk_helper.h 
b/src/anastasis/anastasis-gtk_helper.h
index 79f7d53..cd21d9e 100644
--- a/src/anastasis/anastasis-gtk_helper.h
+++ b/src/anastasis/anastasis-gtk_helper.h
@@ -257,4 +257,12 @@ AG_error (const char *format,
           ...)
 __attribute__ ((format (printf, 1, 2)));
 
+
+/**
+ * Stop showing error message.
+ */
+void
+AG_error_clear (void);
+
+
 #endif

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]