gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis-gtk] branch master updated: complete implementation of


From: gnunet
Subject: [taler-anastasis-gtk] branch master updated: complete implementation of Belen's progress status indicator
Date: Sat, 03 Jul 2021 20:39:59 +0200

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 ab52867  complete implementation of Belen's progress status indicator
ab52867 is described below

commit ab528673eb806b0aa3a1f484ba471caed221d5aa
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sat Jul 3 20:39:53 2021 +0200

    complete implementation of Belen's progress status indicator
---
 contrib/anastasis_gtk_main_window.glade | 34 ++++++++++++++++-----------------
 src/anastasis/anastasis-gtk_action.c    | 11 +++++++++++
 src/anastasis/anastasis-gtk_helper.h    | 22 +++++++++++++++++++++
 src/anastasis/anastasis-gtk_progress.c  | 28 ++++++++++++++++++---------
 4 files changed, 69 insertions(+), 26 deletions(-)

diff --git a/contrib/anastasis_gtk_main_window.glade 
b/contrib/anastasis_gtk_main_window.glade
index e8c3cd9..a6ffdd5 100644
--- a/contrib/anastasis_gtk_main_window.glade
+++ b/contrib/anastasis_gtk_main_window.glade
@@ -45,38 +45,38 @@ Author: Christian Grothoff, Dennis Neufeld
     <data>
       <row>
         <col id="0" translatable="yes">1. Location &amp; currency</col>
-        <col id="1">*_SELECTING</col>
+        <col id="1">^(CONTINENT|COUNTRY)_SELECTING$</col>
         <col id="2" translatable="yes">Where you live will determine which 
personal information can be used to identify your backup.</col>
       </row>
       <row>
         <col id="0" translatable="yes">2. Personal information</col>
-        <col id="1">USER_ATTRIBUTES_COLLECTING</col>
+        <col id="1">^USER_ATTRIBUTES_COLLECTING$</col>
         <col id="2" translatable="yes">Your personal information will not be 
shared with anyone. But you must provide the same information during 
recovery.\</col>
       </row>
       <row>
         <col id="0" translatable="yes">3. Authorization methods</col>
-        <col id="1">AUTHENTICATIONS_EDITING</col>
-        <col id="2" translatable="yes"/>
+        <col id="1">^AUTHENTICATIONS_EDITING$</col>
+        <col id="2" translatable="yes">Specify which methods could be used to 
authenticate you during recovery.</col>
       </row>
       <row>
         <col id="0" translatable="yes">4. Recovery policies</col>
-        <col id="1">POLICIES_REVIEWING</col>
-        <col id="2" translatable="yes"/>
+        <col id="1">^POLICIES_REVIEWING$</col>
+        <col id="2" translatable="yes">These are possible ways how the secret 
could be recovered. Please review and possibly edit the policies.</col>
       </row>
       <row>
         <col id="0" translatable="yes">5. Enter secret</col>
-        <col id="1">SECRET_EDITING</col>
-        <col id="2" translatable="yes"/>
+        <col id="1">^SECRET_EDITING$</col>
+        <col id="2" translatable="yes">Please specify the secret to be backed 
up.</col>
       </row>
       <row>
         <col id="0" translatable="yes">6. Payment (optional)</col>
-        <col id="1">*_PAYING</col>
-        <col id="2" translatable="yes"/>
+        <col id="1">^.*_PAYING$</col>
+        <col id="2" translatable="yes">Some Anastasis providers require 
payment for their service. Please pay.</col>
       </row>
       <row>
         <col id="0" translatable="yes">7. Backup completed</col>
         <col id="1">BACKUP_FINISHED</col>
-        <col id="2" translatable="yes"/>
+        <col id="2" translatable="yes">Your backup is complete. Please do test 
the recovery on occasion.</col>
       </row>
     </data>
   </object>
@@ -92,23 +92,23 @@ Author: Christian Grothoff, Dennis Neufeld
     <data>
       <row>
         <col id="0" translatable="yes">1. Location &amp; currency</col>
-        <col id="1">*_SELECTING</col>
+        <col id="1">^(CONTINENT|COUNTRY)_SELECTING$</col>
         <col id="2" translatable="yes">Where you live will determine which 
personal information can be used to identify your backup.</col>
       </row>
       <row>
         <col id="0" translatable="yes">2. Personal information</col>
-        <col id="1">USER_ATTRIBUTES_COLLECTING</col>
+        <col id="1">^USER_ATTRIBUTES_COLLECTING$</col>
         <col id="2" translatable="yes">Your personal information will not be 
shared with anyone. But you must provide the same information during 
recovery.</col>
       </row>
       <row>
         <col id="0" translatable="yes">3. Solve challenges</col>
-        <col id="1">CHALLENGE_SELECTING</col>
-        <col id="2" translatable="yes"/>
+        <col id="1">^CHALLENGE_SELECTING$</col>
+        <col id="2" translatable="yes">Please select an authentication 
challenge to pass to recover the secret. You may also switch to a different 
recovery document version or provider.</col>
       </row>
       <row>
         <col id="0" translatable="yes">4. Secret recovered</col>
-        <col id="1">RECOVERY_FINISHED</col>
-        <col id="2" translatable="yes"/>
+        <col id="1">^RECOVERY_FINISHED$</col>
+        <col id="2" translatable="yes">Your secret was successfully 
recovered.</col>
       </row>
     </data>
   </object>
diff --git a/src/anastasis/anastasis-gtk_action.c 
b/src/anastasis/anastasis-gtk_action.c
index 8468dbd..d2027ea 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -108,6 +108,7 @@ action_continent_selecting (void)
   AG_sensitive ("anastasis_gtk_main_window_prev_button");
   AG_insensitive ("anastasis_gtk_main_window_forward_button");
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();
   if (NULL != json_object_get (AG_redux_state,
                               "backup_state"))
   {
@@ -203,6 +204,7 @@ action_country_selecting (void)
   AG_insensitive ("anastasis_gtk_main_window_forward_button");
   AG_show ("anastasis_gtk_main_control_vbox");
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();
   if (NULL != json_object_get (AG_redux_state,
                               "backup_state"))
   {
@@ -541,6 +543,7 @@ action_user_attributes_collecting (void)
   AG_sensitive ("anastasis_gtk_main_window_prev_button");
   AG_identity_changed ();
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();  
   if (NULL != json_object_get (AG_redux_state,
                               "backup_state"))
   {
@@ -713,6 +716,7 @@ action_authentications_editing (void)
   else
     AG_insensitive ("anastasis_gtk_main_window_forward_button");
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();
   AG_show ("anastasis_gtk_backup_progress_scrolled_window");
   AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
   AG_show ("anastasis_gtk_main_control_vbox");
@@ -985,6 +989,7 @@ action_policies_reviewing (void)
   AG_sensitive ("anastasis_gtk_main_window_prev_button");
   AG_sensitive ("anastasis_gtk_main_window_forward_button");
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();
   AG_show ("anastasis_gtk_backup_progress_scrolled_window");
   AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
   AG_show ("anastasis_gtk_b_policy_frame");
@@ -1026,6 +1031,7 @@ action_secret_editing (void)
   GNUNET_JSON_parse_free (spec);
   AG_sensitive ("anastasis_gtk_main_window_prev_button");
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();
   AG_show ("anastasis_gtk_backup_progress_scrolled_window");
   AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
   AG_show ("anastasis_gtk_enter_secret_frame");
@@ -1239,6 +1245,7 @@ action_truths_paying (void)
   AG_show ("anastasis_gtk_pay_image");
   AG_show ("anastasis_gtk_main_control_vbox");
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();
   AG_show ("anastasis_gtk_backup_progress_scrolled_window");
   AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
   AG_hide ("anastasis_gtk_main_window_prev_button");
@@ -1321,6 +1328,7 @@ action_policies_paying (void)
   AG_show ("anastasis_gtk_pay_image");
   AG_show ("anastasis_gtk_main_control_vbox");
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();
   AG_show ("anastasis_gtk_backup_progress_scrolled_window");
   AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
   AG_hide ("anastasis_gtk_main_window_prev_button");
@@ -1782,6 +1790,7 @@ action_challenge_selecting (void)
     gtk_tree_store_clear (ts);
     AG_insensitive ("anastasis_gtk_review_policy_treeview");
     AG_show ("anastassis_gtk_progress_vbox");
+    AG_progress_update ();
     AG_show ("anastasis_gtk_recovery_progress_scrolled_window");
     AG_hide ("anastasis_gtk_backup_progress_scrolled_window");
     AG_show ("anastasis_gtk_open_challenge_box");
@@ -2053,6 +2062,7 @@ action_challenge_selecting (void)
   }
   AG_sensitive ("anastasis_gtk_review_policy_treeview");
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();
   AG_show ("anastasis_gtk_recovery_progress_scrolled_window");
   AG_hide ("anastasis_gtk_backup_progress_scrolled_window");
   AG_show ("anastasis_gtk_open_challenge_box");
@@ -2161,6 +2171,7 @@ action_challenge_paying (void)
     AG_error ("ERROR: Internal error: should pay, but do not know what");
   }
   AG_show ("anastassis_gtk_progress_vbox");
+  AG_progress_update ();
   AG_show ("anastasis_gtk_recovery_progress_scrolled_window");
   AG_hide ("anastasis_gtk_backup_progress_scrolled_window");
   AG_show ("anastasis_gtk_pay_frame");
diff --git a/src/anastasis/anastasis-gtk_helper.h 
b/src/anastasis/anastasis-gtk_helper.h
index 6381c60..464db70 100644
--- a/src/anastasis/anastasis-gtk_helper.h
+++ b/src/anastasis/anastasis-gtk_helper.h
@@ -302,6 +302,28 @@ enum AG_PolicyReviewModelColumns
 };
 
 
+/**
+ * Columns in the progress model liststores.
+ */
+enum AG_ProgressModelColumns
+{
+ /**
+  * A gchararray.
+  */
+ AG_PRGMC_DESCRIPTION = 0,
+
+ /**
+  * A gchararray.
+  */
+ AG_PRGMC_REGEX = 1,
+
+ /**
+  * A gchararray.
+  */
+ AG_PRGMC_TOOLTIP = 2
+};
+
+
 /**
  * Hide widget of the given @a name of the main window
  *
diff --git a/src/anastasis/anastasis-gtk_progress.c 
b/src/anastasis/anastasis-gtk_progress.c
index 1dfc545..15bf825 100644
--- a/src/anastasis/anastasis-gtk_progress.c
+++ b/src/anastasis/anastasis-gtk_progress.c
@@ -85,10 +85,6 @@ validate_regex (const char *input,
                     NULL,
                     0))
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "Input `%s' does not match regex `%s'\n",
-                input,
-                regexp);
     regfree (&regex);
     return false;
   }
@@ -105,12 +101,17 @@ AG_progress_update (void)
   GtkTreeIter iter;
   const char *state;
 
-  state = json_string_value (json_object_get (state,
+  state = json_string_value (json_object_get (AG_redux_state,
                                              "backup_state"));
   if (NULL == state)
   {
-    state = json_string_value (json_object_get (state,
+    state = json_string_value (json_object_get (AG_redux_state,
                                                "recovery_state"));
+    if (NULL == state)
+    {
+      GNUNET_break (0);
+      return;
+    }
     ts = GTK_TREE_SELECTION (GCG_get_main_window_object 
("anastasis_gtk_recovery_progress_tree_selection"));
   }
   else
@@ -131,10 +132,19 @@ AG_progress_update (void)
 
     gtk_tree_model_get (tm,
                        &iter,
-                       1, &regex, // FIXME: symbolic names...
+                       AG_PRGMC_REGEX, &regex, 
                        -1);
-    
+    if (validate_regex (state,
+                       regex))
+    {
+      g_free (regex);
+      gtk_tree_selection_select_iter (ts,
+                                     &iter);
+      return;
+    }
+    g_free (regex);
   } while (gtk_tree_model_iter_next (tm,
                                     &iter));
-  
+  GNUNET_break (0);
+  return;
 }

-- 
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]