[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis-gtk] branch master updated: get challenge buttons to sh
From: |
gnunet |
Subject: |
[taler-anastasis-gtk] branch master updated: get challenge buttons to show |
Date: |
Sun, 14 Mar 2021 22:21:24 +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 744a863 get challenge buttons to show
744a863 is described below
commit 744a863a09e5ee1697596fcd1125a311147dd4c3
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sun Mar 14 22:21:21 2021 +0100
get challenge buttons to show
---
contrib/anastasis_gtk_main_window.glade | 12 ++++++------
src/anastasis/anastasis-gtk_action.c | 26 +++++++++++++++++---------
2 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/contrib/anastasis_gtk_main_window.glade
b/contrib/anastasis_gtk_main_window.glade
index 37a1077..db9c89b 100644
--- a/contrib/anastasis_gtk_main_window.glade
+++ b/contrib/anastasis_gtk_main_window.glade
@@ -1102,16 +1102,16 @@ Author: Christian Grothoff, Dennis Neufeld
</child>
</object>
<packing>
- <property
name="expand">True</property>
- <property
name="fill">True</property>
+ <property
name="expand">False</property>
+ <property
name="fill">False</property>
<property
name="padding">5</property>
<property
name="position">0</property>
</packing>
</child>
</object>
<packing>
- <property
name="expand">True</property>
- <property
name="fill">True</property>
+ <property
name="expand">False</property>
+ <property
name="fill">False</property>
<property
name="padding">5</property>
<property
name="position">0</property>
</packing>
@@ -1193,7 +1193,7 @@ Author: Christian Grothoff, Dennis Neufeld
</child>
</object>
<packing>
- <property
name="expand">False</property>
+ <property
name="expand">True</property>
<property
name="fill">True</property>
<property
name="position">1</property>
</packing>
@@ -1214,7 +1214,7 @@ Author: Christian Grothoff, Dennis Neufeld
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
diff --git a/src/anastasis/anastasis-gtk_action.c
b/src/anastasis/anastasis-gtk_action.c
index 7c9dfbd..b950cf4 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -1261,9 +1261,11 @@ action_challenge_selecting (void)
size_t index;
json_t *challenge;
GtkBox *box;
+ json_t *rd;
AG_hide_all_frames ();
-
+ rd = json_object_get (redux_state,
+ "recovery_document");
{
GtkTreeStore *ts;
json_t *policies;
@@ -1271,13 +1273,10 @@ action_challenge_selecting (void)
json_t *policy;
char *summary = NULL;
struct TALER_Amount total;
- json_t *rd;
ts = GTK_TREE_STORE (GCG_get_main_window_object (
"policy_review_treestore"));
gtk_tree_store_clear (ts);
- rd = json_object_get (redux_state,
- "recovery_document");
policies = json_object_get (rd,
"dps");
GNUNET_assert (NULL != policies);
@@ -1389,10 +1388,11 @@ action_challenge_selecting (void)
}
} /* for each policy */
}
- challenges = json_object_get (redux_state,
- "challenges");
+ challenges = json_object_get (rd,
+ "cs");
box = GTK_BOX (GCG_get_main_window_object (
"anastasis_gtk_open_challenge_box"));
+ GNUNET_assert (NULL != box);
gtk_container_foreach (GTK_CONTAINER (box),
&remove_child,
box);
@@ -1400,12 +1400,16 @@ action_challenge_selecting (void)
{
GtkWidget *b;
const char *instructions;
+ const char *provider;
+ const char *type;
struct TALER_Amount cost;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("instructions",
&instructions),
- TALER_JSON_spec_amount ("cost",
- &cost),
+ GNUNET_JSON_spec_string ("type",
+ &type),
+ GNUNET_JSON_spec_string ("url",
+ &provider),
GNUNET_JSON_spec_end ()
};
@@ -1417,6 +1421,9 @@ action_challenge_selecting (void)
GNUNET_break (0);
continue;
}
+ lookup_recovery_cost (provider,
+ type,
+ &cost);
fprintf (stderr,
"Making button for %s\n",
instructions);
@@ -1445,9 +1452,9 @@ action_challenge_selecting (void)
&challenge_button_clicked_cb,
challenge,
NULL);
+ gtk_widget_show (GTK_WIDGET (b));
gtk_container_add (GTK_CONTAINER (box),
b);
-
}
AG_show ("anastasis_gtk_main_control_vbox");
AG_show ("anastasis_gtk_main_window_save_as_button");
@@ -1616,6 +1623,7 @@ action_challenge_solving (void)
GtkDialog *diag;
json_t *challenge = NULL; // FIXME...
+ GNUNET_break (0);
type = json_string_value (json_object_get (challenge,
"type"));
if (NULL == type)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis-gtk] branch master updated: get challenge buttons to show,
gnunet <=