[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis-gtk] branch master updated: split off secret selecting
From: |
gnunet |
Subject: |
[taler-anastasis-gtk] branch master updated: split off secret selecting stage |
Date: |
Tue, 13 Jul 2021 22:11: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.
The following commit(s) were added to refs/heads/master by this push:
new ae47500 split off secret selecting stage
ae47500 is described below
commit ae475004e5e9b10b749bb79b969f53bafe47fe8d
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jul 13 22:11:02 2021 +0200
split off secret selecting stage
---
contrib/anastasis_gtk_main_window.glade | 412 +++++++++++++--------
src/anastasis/anastasis-gtk_action.c | 95 +++--
...anastasis-gtk_handle-main-window-back-clicked.c | 12 +-
...stasis-gtk_handle-main-window-forward-clicked.c | 14 +
4 files changed, 355 insertions(+), 178 deletions(-)
diff --git a/contrib/anastasis_gtk_main_window.glade
b/contrib/anastasis_gtk_main_window.glade
index 31bfae4..4a33274 100644
--- a/contrib/anastasis_gtk_main_window.glade
+++ b/contrib/anastasis_gtk_main_window.glade
@@ -101,12 +101,17 @@ Author: Christian Grothoff, Dennis Neufeld
<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="0" translatable="yes">3. Select secret</col>
+ <col id="1">^SECRET_SELECTING$</col>
+ <col id="2" translatable="yes">Please select which secret to recover.
You may switch to a different version or provider.</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">4. Solve challenges</col>
<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>
+ <col id="2" translatable="yes">Please select an authentication
challenge to pass to recover the secret.</col>
</row>
<row>
- <col id="0" translatable="yes">4. Secret recovered</col>
+ <col id="0" translatable="yes">5. Secret recovered</col>
<col id="1">^RECOVERY_FINISHED$</col>
<col id="2" translatable="yes">Your secret was successfully
recovered.</col>
</row>
@@ -417,7 +422,7 @@ Author: Christian Grothoff, Dennis Neufeld
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
- <object class="GtkBox" id="anastassis_gtk_progress_vbox">
+ <object class="GtkBox" id="anastasis_gtk_progress_vbox">
<property name="can-focus">False</property>
<property name="margin-right">5</property>
<property name="orientation">vertical</property>
@@ -2242,118 +2247,6 @@ with <a
href="https://www.ngi.eu/ngi-projects/ledger/">funding</a> f
<property
name="visible">True</property>
<property
name="can-focus">False</property>
<property
name="orientation">vertical</property>
- <child>
- <object class="GtkBox"
id="anastasis_gtk_open_challenge_box">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <child>
- <!-- n-columns=3 n-rows=3 -->
- <object class="GtkGrid"
id="anastasis_gtk_policy_selection_grid">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <property
name="row-spacing">5</property>
- <property
name="column-spacing">5</property>
- <property
name="row-homogeneous">True</property>
- <child>
- <object class="GtkLabel">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <property
name="tooltip-text" translatable="yes">This is the URL of the provider from
which we downloaded the recovery document.</property>
- <property name="label"
translatable="yes">Provider URL:</property>
- </object>
- <packing>
- <property
name="left-attach">0</property>
- <property
name="top-attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <property
name="tooltip-text" translatable="yes">This is the version of the backup at the
provider. By default, the latest available backup version is
obtained.</property>
- <property name="label"
translatable="yes">Backup version:</property>
- </object>
- <packing>
- <property
name="left-attach">0</property>
- <property
name="top-attach">1</property>
- </packing>
- </child>
- <child>
- <object
class="GtkSpinButton" id="anastasis_gtk_policy_version_spin_button">
- <property
name="visible">True</property>
- <property
name="can-focus">True</property>
- <property
name="margin-right">5</property>
- <property
name="margin-end">5</property>
- <property name="text"
translatable="yes">0</property>
- <property
name="input-purpose">number</property>
- <property
name="adjustment">policy_version_adjustment</property>
- <property
name="climb-rate">1</property>
- <property
name="numeric">True</property>
- <signal name="changed"
handler="anastasis_gtk_policy_version_spin_button_changed_cb" swapped="no"/>
- </object>
- <packing>
- <property
name="left-attach">1</property>
- <property
name="top-attach">1</property>
- </packing>
- </child>
- <child>
- <object
class="GtkComboBoxText" id="anastasis_gtk_provider_url_combo_box_text">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <property
name="margin-left">5</property>
- <property
name="margin-right">5</property>
- <property
name="margin-start">5</property>
- <property
name="margin-end">5</property>
- <property
name="margin-top">5</property>
- <property
name="margin-bottom">5</property>
- <property
name="has-entry">True</property>
- <child
internal-child="entry">
- <object class="GtkEntry"
id="anastasis_gtk_provider_url_entry">
- <property
name="visible">True</property>
- <property
name="can-focus">True</property>
- <property
name="placeholder-text" translatable="yes">https://</property>
- <property
name="input-purpose">url</property>
- <signal name="changed"
handler="anastasis_gtk_provider_url_entry_changed_cb" swapped="no"/>
- </object>
- </child>
- </object>
- <packing>
- <property
name="left-attach">1</property>
- <property
name="top-attach">0</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property
name="expand">False</property>
- <property
name="fill">True</property>
- <property
name="padding">5</property>
- <property
name="pack-type">end</property>
- <property
name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property
name="expand">False</property>
- <property
name="fill">False</property>
- <property
name="padding">5</property>
- <property
name="position">0</property>
- </packing>
- </child>
<child>
<object class="GtkFrame">
<property
name="visible">True</property>
@@ -3531,6 +3424,229 @@ date for the recovery policy.</property>
<property name="position">9</property>
</packing>
</child>
+ <child>
+ <object class="GtkFrame"
id="anastasis_gtk_select_secret_frame">
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
+ <child>
+ <object class="GtkAlignment">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
+ <child>
+ <object class="GtkBox"
id="anastasis_gtk_secret_select_vbox">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="orientation">vertical</property>
+ <property name="spacing">10</property>
+ <child>
+ <object class="GtkBox"
id="provider_selection_vbox">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="halign">start</property>
+ <property
name="orientation">vertical</property>
+ <property
name="spacing">5</property>
+ <child>
+ <object class="GtkLabel"
id="anastasis_gtk_provider_url_label">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property name="tooltip-text"
translatable="yes">This is the URL of the provider from which we downloaded the
recovery document.</property>
+ <property
name="halign">start</property>
+ <property name="label"
translatable="yes">Select a provider</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">False</property>
+ <property
name="padding">5</property>
+ <property
name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText"
id="anastasis_gtk_provider_url_combo_box_text">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="margin-left">5</property>
+ <property
name="margin-right">5</property>
+ <property
name="margin-start">5</property>
+ <property
name="margin-end">5</property>
+ <property
name="margin-top">5</property>
+ <property
name="margin-bottom">5</property>
+ <property
name="has-entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry"
id="anastasis_gtk_provider_url_entry">
+ <property
name="can-focus">True</property>
+ <property
name="max-length">1024</property>
+ <property
name="width-chars">32</property>
+ <property
name="placeholder-text" translatable="yes">https://</property>
+ <property
name="input-purpose">url</property>
+ <signal name="changed"
handler="anastasis_gtk_provider_url_entry_changed_cb" swapped="no"/>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property
name="expand">True</property>
+ <property
name="fill">True</property>
+ <property
name="padding">5</property>
+ <property
name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="padding">20</property>
+ <property
name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox"
id="backup_version_selection_vbox">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="halign">start</property>
+ <property
name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel"
id="anastasis_gtk_backup_version_label">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property name="tooltip-text"
translatable="yes">This is the version of the backup at the provider. By
default, the latest available backup version is obtained.</property>
+ <property
name="halign">start</property>
+ <property name="label"
translatable="yes">Select a backup version</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton"
id="anastasis_gtk_policy_version_spin_button">
+ <property
name="visible">True</property>
+ <property
name="can-focus">True</property>
+ <property
name="margin-right">5</property>
+ <property
name="margin-end">5</property>
+ <property name="text"
translatable="yes">0</property>
+ <property
name="input-purpose">number</property>
+ <property
name="adjustment">policy_version_adjustment</property>
+ <property
name="climb-rate">1</property>
+ <property
name="numeric">True</property>
+ <signal name="changed"
handler="anastasis_gtk_policy_version_spin_button_changed_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">False</property>
+ <property
name="padding">5</property>
+ <property
name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel"
id="backup_version_explainer_label">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property name="label"
translatable="yes">To see other backup versions,
+choose a different provider.</property>
+ <attributes>
+ <attribute name="weight"
value="normal"/>
+ <attribute name="foreground"
value="#777776767b7b"/>
+ </attributes>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="padding">10</property>
+ <property
name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox"
id="secret_identification_vbox">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="halign">start</property>
+ <property
name="orientation">vertical</property>
+ <property
name="spacing">5</property>
+ <child>
+ <object class="GtkLabel"
id="secret_name_explainer_label">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="halign">start</property>
+ <property name="label"
translatable="yes">The secret name associated with this backup version
is:</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="padding">5</property>
+ <property
name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel"
id="anastasis_gtk_secret_name_label">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="label">COMPUTATIONALLY GENERATED</property>
+ <attributes>
+ <attribute name="weight"
value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel"
id="secret_recovery_change_explainer_label">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="halign">start</property>
+ <property name="label"
translatable="yes">If this is not the secret you want to recover,
+select a different provider or backup version.</property>
+ <attributes>
+ <attribute name="foreground"
value="#777776767b7b"/>
+ </attributes>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="padding">5</property>
+ <property
name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="padding">20</property>
+ <property
name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="label"
translatable="yes">Select secret to recover</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">10</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">True</property>
@@ -3689,35 +3805,6 @@ date for the recovery policy.</property>
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkSeparator">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton"
id="anastasis_gtk_main_window_save_as_button">
- <property name="label">gtk-save-as</property>
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="can-default">True</property>
- <property name="receives-default">True</property>
- <property name="use-stock">True</property>
- <property name="always-show-image">True</property>
- <signal name="clicked"
handler="anastasis_gtk_main_window_save_as_button_clicked_cb" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="padding">5</property>
- <property name="position">2</property>
- </packing>
- </child>
<child>
<object class="GtkButton" id="anastasis_gtk_restart_button">
<property name="label" translatable="yes">_Restart</property>
@@ -3732,7 +3819,19 @@ date for the recovery policy.</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="padding">5</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -3749,7 +3848,7 @@ date for the recovery policy.</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">5</property>
- <property name="position">4</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -3760,6 +3859,25 @@ date for the recovery policy.</property>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
+ <property name="padding">5</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton"
id="anastasis_gtk_main_window_save_as_button">
+ <property name="label">gtk-save-as</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
+ <property name="always-show-image">True</property>
+ <signal name="clicked"
handler="anastasis_gtk_main_window_save_as_button_clicked_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">5</property>
<property name="position">5</property>
</packing>
</child>
diff --git a/src/anastasis/anastasis-gtk_action.c
b/src/anastasis/anastasis-gtk_action.c
index 5441478..dff5093 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -118,7 +118,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_show ("anastasis_gtk_progress_vbox");
AG_progress_update ();
if (NULL != json_object_get (AG_redux_state,
"backup_state"))
@@ -214,7 +214,7 @@ action_country_selecting (void)
AG_sensitive ("anastasis_gtk_main_window_prev_button");
AG_insensitive ("anastasis_gtk_main_window_forward_button");
AG_show ("anastasis_gtk_main_control_vbox");
- AG_show ("anastassis_gtk_progress_vbox");
+ AG_show ("anastasis_gtk_progress_vbox");
AG_progress_update ();
if (NULL != json_object_get (AG_redux_state,
"backup_state"))
@@ -613,7 +613,7 @@ action_user_attributes_collecting (void)
AG_sensitive ("anastasis_gtk_main_window_prev_button");
AG_identity_changed ();
- AG_show ("anastassis_gtk_progress_vbox");
+ AG_show ("anastasis_gtk_progress_vbox");
AG_progress_update ();
if (NULL != json_object_get (AG_redux_state,
"backup_state"))
@@ -786,7 +786,7 @@ action_authentications_editing (void)
AG_sensitive ("anastasis_gtk_main_window_forward_button");
else
AG_insensitive ("anastasis_gtk_main_window_forward_button");
- AG_show ("anastassis_gtk_progress_vbox");
+ AG_show ("anastasis_gtk_progress_vbox");
AG_progress_update ();
AG_show ("anastasis_gtk_backup_progress_scrolled_window");
AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
@@ -1030,7 +1030,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_show ("anastasis_gtk_progress_vbox");
AG_progress_update ();
AG_show ("anastasis_gtk_backup_progress_scrolled_window");
AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
@@ -1298,7 +1298,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_show ("anastasis_gtk_progress_vbox");
AG_progress_update ();
AG_show ("anastasis_gtk_backup_progress_scrolled_window");
AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
@@ -1511,7 +1511,7 @@ action_truths_paying (void)
AG_show ("anastasis_gtk_pay_frame");
AG_show ("anastasis_gtk_pay_image");
AG_show ("anastasis_gtk_main_control_vbox");
- AG_show ("anastassis_gtk_progress_vbox");
+ AG_show ("anastasis_gtk_progress_vbox");
AG_progress_update ();
AG_show ("anastasis_gtk_backup_progress_scrolled_window");
AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
@@ -1594,7 +1594,7 @@ action_policies_paying (void)
AG_show ("anastasis_gtk_pay_frame");
AG_show ("anastasis_gtk_pay_image");
AG_show ("anastasis_gtk_main_control_vbox");
- AG_show ("anastassis_gtk_progress_vbox");
+ AG_show ("anastasis_gtk_progress_vbox");
AG_progress_update ();
AG_show ("anastasis_gtk_backup_progress_scrolled_window");
AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
@@ -1657,7 +1657,7 @@ action_backup_finished (void)
true,
-1);
}
- AG_hide ("anastassis_gtk_progress_vbox");
+ AG_hide ("anastasis_gtk_progress_vbox");
AG_hide ("anastasis_gtk_backup_progress_scrolled_window");
AG_show ("anastasis_gtk_completed_frame");
AG_show ("anastasis_gtk_backup_complete_box");
@@ -1995,10 +1995,12 @@ show_challenge_feedback (void)
}
+/**
+ * FIXME.
+ */
static void
-action_challenge_selecting (void)
+action_secret_selecting (void)
{
- json_t *rd;
json_t *ri;
json_t *re;
@@ -2022,7 +2024,6 @@ action_challenge_selecting (void)
-1, /* append */
provider_url);
}
- /* FIXME: #6910: tell combo box which entry to select! */
}
re = json_object_get (AG_redux_state,
"recovery_error");
@@ -2037,8 +2038,8 @@ action_challenge_selecting (void)
&hint),
GNUNET_JSON_spec_end ()
};
- GtkTreeStore *ts;
+ AG_insensitive ("anastasis_gtk_main_window_forward_button");
if (GNUNET_OK !=
GNUNET_JSON_parse (re,
espec,
@@ -2051,21 +2052,15 @@ action_challenge_selecting (void)
AG_error ("%s",
dgettext ("taler-exchange",
hint));
- ts = GTK_TREE_STORE (GCG_get_main_window_object (
- "policy_review_treestore"));
- gtk_tree_store_clear (ts);
- AG_insensitive ("anastasis_gtk_review_policy_treeview");
- AG_show ("anastassis_gtk_progress_vbox");
+ AG_show ("anastasis_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");
AG_show ("anastasis_gtk_main_control_vbox");
AG_show ("anastasis_gtk_main_window_save_as_button");
- AG_show ("anastasis_gtk_challenge_frame");
+ AG_show ("anastasis_gtk_secret_select_frame");
AG_show ("anastasis_gtk_main_window_prev_button");
AG_hide ("anastasis_gtk_main_window_quit_button");
- AG_hide ("anastasis_gtk_main_window_forward_button");
{
GtkWidget *ge;
@@ -2108,6 +2103,55 @@ action_challenge_selecting (void)
gtk_entry_set_text (ge,
provider_url);
}
+ {
+ json_t *rd;
+ const char *sn;
+
+ rd = json_object_get (AG_redux_state,
+ "recovery_document");
+ if (NULL == rd)
+ {
+ AG_insensitive ("anastasis_gtk_main_window_forward_button");
+ }
+ else
+ {
+ AG_sensitive ("anastasis_gtk_main_window_forward_button");
+ sn = json_string_value (json_object_get (rd,
+ "secret_name"));
+ if (NULL != sn)
+ {
+ update_label ("anastasis_gtk_secret_name_label",
+ sn);
+ }
+ else
+ {
+ update_label ("anastasis_gtk_secret_name_label",
+ _ ("<not set>"));
+ }
+ }
+ }
+ AG_show ("anastasis_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_main_control_vbox");
+ AG_show ("anastasis_gtk_main_window_save_as_button");
+ AG_show ("anastasis_gtk_select_secret_frame");
+ AG_show ("anastasis_gtk_main_window_prev_button");
+ AG_hide ("anastasis_gtk_main_window_quit_button");
+ AG_show ("anastasis_gtk_main_window_forward_button");
+}
+
+
+/**
+ * FIXME.
+ */
+static void
+action_challenge_selecting (void)
+{
+ json_t *rd;
+
+ AG_hide_all_frames ();
rd = json_object_get (AG_redux_state,
"recovery_document");
{
@@ -2328,11 +2372,10 @@ action_challenge_selecting (void)
gtk_tree_view_expand_all (tv);
}
AG_sensitive ("anastasis_gtk_review_policy_treeview");
- AG_show ("anastassis_gtk_progress_vbox");
+ AG_show ("anastasis_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");
AG_show ("anastasis_gtk_main_control_vbox");
AG_show ("anastasis_gtk_main_window_save_as_button");
AG_show ("anastasis_gtk_challenge_frame");
@@ -2437,7 +2480,7 @@ action_challenge_paying (void)
{
AG_error ("ERROR: Internal error: should pay, but do not know what");
}
- AG_show ("anastassis_gtk_progress_vbox");
+ AG_show ("anastasis_gtk_progress_vbox");
AG_progress_update ();
AG_show ("anastasis_gtk_recovery_progress_scrolled_window");
AG_hide ("anastasis_gtk_backup_progress_scrolled_window");
@@ -2870,7 +2913,7 @@ action_recovery_finished (void)
AG_hide ("anastasis_gtk_secret_qr_image");
}
GNUNET_JSON_parse_free (spec);
- AG_hide ("anastassis_gtk_progress_vbox");
+ AG_hide ("anastasis_gtk_progress_vbox");
AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
AG_hide ("anastasis_gtk_backup_progress_scrolled_window");
AG_show ("anastasis_gtk_completed_frame");
@@ -2918,6 +2961,8 @@ AG_action_cb (void *cls,
.action = &action_policies_paying },
{ .state = "BACKUP_FINISHED",
.action = &action_backup_finished },
+ { .state = "SECRET_SELECTING",
+ .action = &action_secret_selecting },
{ .state = "CHALLENGE_SELECTING",
.action = &action_challenge_selecting },
{ .state = "CHALLENGE_PAYING",
diff --git a/src/anastasis/anastasis-gtk_handle-main-window-back-clicked.c
b/src/anastasis/anastasis-gtk_handle-main-window-back-clicked.c
index 33bf65e..87e2158 100644
--- a/src/anastasis/anastasis-gtk_handle-main-window-back-clicked.c
+++ b/src/anastasis/anastasis-gtk_handle-main-window-back-clicked.c
@@ -70,15 +70,15 @@ anastasis_gtk_main_window_back_clicked (GObject *object,
AG_ra = NULL;
}
state = json_string_value (json_object_get (AG_redux_state,
- "recovery_state"));
+ "recovery_state"));
if (NULL == state)
state = json_string_value (json_object_get (AG_redux_state,
- "backup_state"));
-
+ "backup_state"));
+
if ( (0 == strcasecmp (state,
- "CONTINENT_SELECTING")) ||
+ "CONTINENT_SELECTING")) ||
(0 == strcasecmp (state,
- "COUNTRY_SELECTING")) )
+ "COUNTRY_SELECTING")) )
{
AG_hide ("anastasis_gtk_country_selection_image");
AG_hide ("anastasis_gtk_continent_frame");
@@ -104,7 +104,7 @@ anastasis_gtk_main_window_back_clicked (GObject *object,
*/
void
anastasis_gtk_restart_button_clicked_cb (GObject *object,
- gpointer user_data)
+ gpointer user_data)
{
(void) object;
(void) user_data;
diff --git a/src/anastasis/anastasis-gtk_handle-main-window-forward-clicked.c
b/src/anastasis/anastasis-gtk_handle-main-window-forward-clicked.c
index 62a3129..a85a039 100644
--- a/src/anastasis/anastasis-gtk_handle-main-window-forward-clicked.c
+++ b/src/anastasis/anastasis-gtk_handle-main-window-forward-clicked.c
@@ -171,6 +171,18 @@ forward_secret_editing (void)
}
+static void
+forward_secret_selecting (void)
+{
+ AG_freeze ();
+ AG_ra = ANASTASIS_redux_action (AG_redux_state,
+ "next",
+ NULL,
+ &AG_action_cb,
+ NULL);
+}
+
+
/**
* Callback invoked if the the "forward"-button is clicked.
*
@@ -192,6 +204,8 @@ anastasis_gtk_main_window_forward_clicked (GObject *object,
.action = &forward_policies_reviewing },
{ .state = "SECRET_EDITING",
.action = &forward_secret_editing },
+ { .state = "SECRET_SELECTING",
+ .action = &forward_secret_selecting },
{ .state = NULL,
.action = NULL }
};
--
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: split off secret selecting stage,
gnunet <=