gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis-gtk] 05/05: realizing more Belen UX tweaks


From: gnunet
Subject: [taler-anastasis-gtk] 05/05: realizing more Belen UX tweaks
Date: Sat, 24 Jul 2021 12:28:05 +0200

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

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

commit acd8844fec0f7f09fa99f8af276a859561319a1b
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sat Jul 24 11:31:16 2021 +0200

    realizing more Belen UX tweaks
---
 contrib/anastasis_gtk_main_window.glade | 18 ++++++++++++++++--
 src/anastasis/anastasis-gtk_action.c    | 22 ++++++++++------------
 src/anastasis/anastasis-gtk_helper.h    |  8 +++++++-
 3 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/contrib/anastasis_gtk_main_window.glade 
b/contrib/anastasis_gtk_main_window.glade
index f1a718b..9ae07be 100644
--- a/contrib/anastasis_gtk_main_window.glade
+++ b/contrib/anastasis_gtk_main_window.glade
@@ -281,6 +281,8 @@ Author: Christian Grothoff, Dennis Neufeld
       <column type="gboolean"/>
       <!-- column-name method_index -->
       <column type="guint"/>
+      <!-- column-name was_solved -->
+      <column type="gboolean"/>
     </columns>
   </object>
   <object class="GtkAdjustment" id="policy_version_adjustment">
@@ -2441,6 +2443,20 @@ with &lt;a 
href="https://www.ngi.eu/ngi-projects/ledger/"&gt;funding&lt;/a&gt; f
                                                         <child 
internal-child="selection">
                                                           <object 
class="GtkTreeSelection"/>
                                                         </child>
+                                                        <child>
+                                                          <object 
class="GtkTreeViewColumn" id="solved_column">
+                                                            <property 
name="sizing">autosize</property>
+                                                            <property 
name="title" translatable="yes">Solved</property>
+                                                            <child>
+                                                            <object 
class="GtkCellRendererToggle" id="solved_column2">
+                                                            <property 
name="activatable">False</property>
+                                                            </object>
+                                                            <attributes>
+                                                            <attribute 
name="active">8</attribute>
+                                                            </attributes>
+                                                            </child>
+                                                          </object>
+                                                        </child>
                                                         <child>
                                                           <object 
class="GtkTreeViewColumn" id="policy_name_column1">
                                                             <property 
name="resizable">True</property>
@@ -3193,7 +3209,6 @@ date of your secret's recovery data.</property>
                                               <object class="GtkBox" 
id="recovery_expiration_box">
                                                 <property 
name="visible">True</property>
                                                 <property 
name="can_focus">False</property>
-                                                <property 
name="orientation">vertical</property>
                                                 <property 
name="spacing">5</property>
                                                 <child>
                                                   <object class="GtkLabel" 
id="backup_expiration_label">
@@ -3220,7 +3235,6 @@ date of your secret's recovery data.</property>
                                                   <packing>
                                                     <property 
name="expand">False</property>
                                                     <property 
name="fill">True</property>
-                                                    <property 
name="padding">5</property>
                                                     <property 
name="position">1</property>
                                                   </packing>
                                                 </child>
diff --git a/src/anastasis/anastasis-gtk_action.c 
b/src/anastasis/anastasis-gtk_action.c
index cf69afe..0e605cf 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -2316,6 +2316,7 @@ action_challenge_selecting (void)
         const char *type;
         const char *provider;
         const char *instructions;
+       bool solved = false;
         struct GNUNET_JSON_Specification cspec[] = {
           GNUNET_JSON_spec_string ("type",
                                    &type),
@@ -2323,6 +2324,9 @@ action_challenge_selecting (void)
                                    &provider),
           GNUNET_JSON_spec_string ("instructions",
                                    &instructions),
+         GNUNET_JSON_spec_mark_optional (
+            GNUNET_JSON_spec_bool ("solved",
+                                  &solved)),
           GNUNET_JSON_spec_end ()
         };
         struct TALER_Amount recovery_cost;
@@ -2335,15 +2339,6 @@ action_challenge_selecting (void)
           AG_error ("Policy did not parse correctly");
           return;
         }
-        {
-          const json_t *ks;
-
-          ks = json_object_get (cs,
-                                "key_share");
-          if ( (NULL != ks) &&
-               (! json_is_null (ks)) )
-            continue; /* already solved */
-        }
         if (GNUNET_OK !=
             GNUNET_JSON_parse (cs,
                                cspec,
@@ -2375,6 +2370,8 @@ action_challenge_selecting (void)
                                            TALER_amount2s (&recovery_cost),
                                            AG_PRMC_PROVIDER_URL,
                                            provider,
+                                          AG_PRMC_WAS_SOLVED,
+                                          solved,
                                            -1);
         if (NULL == summary)
         {
@@ -2895,9 +2892,6 @@ action_recovery_finished (void)
     GNUNET_JSON_spec_mark_optional (
       GNUNET_JSON_spec_string ("text",
                                &text)),
-    GNUNET_JSON_spec_mark_optional (
-      GNUNET_JSON_spec_string ("secret_name",
-                               &name)),
     GNUNET_JSON_spec_mark_optional (
       GNUNET_JSON_spec_varsize ("value",
                                 &data,
@@ -2908,6 +2902,10 @@ action_recovery_finished (void)
   GtkImage *img;
 
   AG_hide_all_frames ();
+  name = json_string_value (json_object_get (json_object_get (AG_redux_state,
+                                                             
"recovery_information"),
+                                            "secret_name"));
+
   cs = json_object_get (AG_redux_state,
                         "core_secret");
   GNUNET_assert (NULL != cs);
diff --git a/src/anastasis/anastasis-gtk_helper.h 
b/src/anastasis/anastasis-gtk_helper.h
index 1d30a63..28ddc74 100644
--- a/src/anastasis/anastasis-gtk_helper.h
+++ b/src/anastasis/anastasis-gtk_helper.h
@@ -309,7 +309,13 @@ enum AG_PolicyReviewModelColumns
   /**
    * A guint.
    */
-  AG_PRMC_METHOD_INDEX = 7
+  AG_PRMC_METHOD_INDEX = 7,
+
+  /**
+   * A gboolean. True on lines representing solved challenges.
+   */
+  AG_PRMC_WAS_SOLVED
+
 };
 
 

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