[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis-gtk] branch master updated: add back actions suggested
From: |
gnunet |
Subject: |
[taler-anastasis-gtk] branch master updated: add back actions suggested by Belen |
Date: |
Fri, 02 Jul 2021 23:07:42 +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 8d9135b add back actions suggested by Belen
8d9135b is described below
commit 8d9135bf969f24b8362abd7bfea541d724276a0b
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Fri Jul 2 23:07:39 2021 +0200
add back actions suggested by Belen
---
contrib/anastasis_gtk_main_window.glade | 58 ++++++++++++++++++++--
src/anastasis/anastasis-gtk_action.c | 12 ++---
.../anastasis-gtk_handle-backup-button-clicked.c | 4 +-
...anastasis-gtk_handle-main-window-back-clicked.c | 56 ++++++++++++++++++++-
.../anastasis-gtk_handle-recovery-button-clicked.c | 4 +-
5 files changed, 118 insertions(+), 16 deletions(-)
diff --git a/contrib/anastasis_gtk_main_window.glade
b/contrib/anastasis_gtk_main_window.glade
index 5f5eabf..4fdec59 100644
--- a/contrib/anastasis_gtk_main_window.glade
+++ b/contrib/anastasis_gtk_main_window.glade
@@ -135,6 +135,11 @@ Author: Christian Grothoff, Dennis Neufeld
</row>
</data>
</object>
+ <object class="GtkImage" id="email_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-missing-image</property>
+ </object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -180,6 +185,11 @@ Author: Christian Grothoff, Dennis Neufeld
<object class="GtkEntryBuffer" id="provider_url_entrybuffer">
<property name="text" translatable="yes">https://</property>
</object>
+ <object class="GtkImage" id="restart_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-goto-first</property>
+ </object>
<object class="GtkImage" id="restore_image">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -197,6 +207,11 @@ Author: Christian Grothoff, Dennis Neufeld
<column type="gchararray"/>
</columns>
</object>
+ <object class="GtkImage" id="video_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-orientation-portrait</property>
+ </object>
<object class="GtkWindow" id="anastasis_gtk_main_window">
<property name="can_focus">False</property>
<property name="events">GDK_BUTTON_PRESS_MASK |
GDK_STRUCTURE_MASK</property>
@@ -360,7 +375,7 @@ Author: Christian Grothoff, Dennis Neufeld
</packing>
</child>
<child>
- <object class="GtkButton">
+ <object class="GtkButton"
id="anastasis_gtk_backup_button">
<property name="label"
translatable="yes">_Back up a secret</property>
<property
name="visible">True</property>
<property
name="can_focus">True</property>
@@ -369,6 +384,7 @@ Author: Christian Grothoff, Dennis Neufeld
<property
name="image">backup_image</property>
<property
name="use_underline">True</property>
<property
name="always_show_image">True</property>
+ <signal name="clicked"
handler="anastasis_gtk_backup_button_clicked_cb" swapped="no"/>
</object>
<packing>
<property
name="expand">False</property>
@@ -378,7 +394,7 @@ Author: Christian Grothoff, Dennis Neufeld
</packing>
</child>
<child>
- <object class="GtkButton">
+ <object class="GtkButton"
id="anastasis_gtk_recovery_button">
<property name="label"
translatable="yes">_Restore a secret</property>
<property
name="visible">True</property>
<property
name="can_focus">True</property>
@@ -387,6 +403,7 @@ Author: Christian Grothoff, Dennis Neufeld
<property
name="image">restore_image</property>
<property
name="use_underline">True</property>
<property
name="always_show_image">True</property>
+ <signal name="clicked"
handler="anastasis_gtk_recovery_button_clicked_cb" swapped="no"/>
</object>
<packing>
<property
name="expand">False</property>
@@ -396,7 +413,7 @@ Author: Christian Grothoff, Dennis Neufeld
</packing>
</child>
<child>
- <object class="GtkButton">
+ <object class="GtkButton"
id="anastasis_gtk_open_state">
<property name="label">_Open a saved
action</property>
<property
name="visible">True</property>
<property
name="can_focus">True</property>
@@ -405,6 +422,7 @@ Author: Christian Grothoff, Dennis Neufeld
<property
name="image">open_image</property>
<property
name="use_underline">True</property>
<property
name="always_show_image">True</property>
+ <signal name="clicked"
handler="anastasis_gtk_open_state_clicked_cb" swapped="no"/>
</object>
<packing>
<property
name="expand">False</property>
@@ -988,6 +1006,7 @@ Author: Christian Grothoff, Dennis Neufeld
<property
name="visible">True</property>
<property
name="can_focus">True</property>
<property
name="receives_default">True</property>
+ <property
name="image">email_image</property>
<signal name="clicked"
handler="anastasis_gtk_btn_add_auth_email_clicked_cb" swapped="no"/>
</object>
<packing>
@@ -1030,9 +1049,11 @@ Author: Christian Grothoff, Dennis Neufeld
</child>
<child>
<object class="GtkButton"
id="anastasis_gtk_btn_add_auth_video">
- <property name="label"
translatable="yes">Video</property>
+ <property name="label"
translatable="yes">_Video</property>
<property
name="can_focus">True</property>
<property
name="receives_default">True</property>
+ <property
name="image">video_image</property>
+ <property
name="use_underline">True</property>
<signal name="clicked"
handler="anastasis_gtk_btn_add_auth_video_clicked_cb" swapped="no"/>
</object>
<packing>
@@ -1154,11 +1175,13 @@ Author: Christian Grothoff, Dennis Neufeld
<property
name="orientation">vertical</property>
<child>
<object class="GtkButton"
id="anastasis_gtk_edit_provider_list">
- <property name="label"
translatable="yes">Add provider</property>
+ <property name="label"
translatable="yes">_Add provider</property>
<property
name="visible">True</property>
<property
name="can_focus">True</property>
<property
name="receives_default">True</property>
<property
name="image">add_image</property>
+ <property
name="use_underline">True</property>
+ <property
name="always_show_image">True</property>
<signal name="clicked"
handler="anastasis_gtk_edit_provider_list_clicked_cb" swapped="no"/>
</object>
<packing>
@@ -1176,6 +1199,7 @@ Author: Christian Grothoff, Dennis Neufeld
<property
name="can_focus">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_authentication_method_delete_button_clicked_cb"
swapped="no"/>
</object>
<packing>
@@ -1838,6 +1862,7 @@ Author: Christian Grothoff, Dennis Neufeld
<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_enter_secret_open_button_clicked_cb" swapped="no"/>
</object>
<packing>
@@ -2194,6 +2219,7 @@ Author: Christian Grothoff, Dennis Neufeld
<property
name="receives_default">True</property>
<property
name="tooltip_text" translatable="yes">Copy secret to clipboard</property>
<property
name="use_stock">True</property>
+ <property
name="always_show_image">True</property>
<signal name="clicked"
handler="anastasis_gtk_secret_copy_button_clicked_cb" swapped="no"/>
</object>
<packing>
@@ -2211,6 +2237,7 @@ Author: Christian Grothoff, Dennis Neufeld
<property
name="receives_default">True</property>
<property
name="tooltip_text" translatable="yes">Save secret to file</property>
<property
name="use_stock">True</property>
+ <property
name="always_show_image">True</property>
<signal name="clicked"
handler="anastasis_gtk_secret_save_as_button_clicked_cb" swapped="no"/>
</object>
<packing>
@@ -2451,6 +2478,7 @@ Author: Christian Grothoff, Dennis Neufeld
<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_back_clicked" swapped="no"/>
</object>
<packing>
@@ -2479,6 +2507,7 @@ Author: Christian Grothoff, Dennis Neufeld
<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>
@@ -2488,6 +2517,23 @@ Author: Christian Grothoff, Dennis Neufeld
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="anastasis_gtk_restart_button">
+ <property name="label" translatable="yes">_Restart</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Go back to
the beginning.</property>
+ <property name="image">restart_image</property>
+ <property name="use_underline">True</property>
+ <property name="always_show_image">True</property>
+ <signal name="clicked"
handler="anastasis_gtk_restart_button_clicked_cb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
<child>
<object class="GtkButton"
id="anastasis_gtk_main_window_quit_button">
<property name="label">gtk-quit</property>
@@ -2495,6 +2541,7 @@ Author: Christian Grothoff, Dennis Neufeld
<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_quit_button_clicked_cb" swapped="no"/>
</object>
<packing>
@@ -2525,6 +2572,7 @@ Author: Christian Grothoff, Dennis Neufeld
<property name="has_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_forward_clicked" swapped="no"/>
</object>
<packing>
diff --git a/src/anastasis/anastasis-gtk_action.c
b/src/anastasis/anastasis-gtk_action.c
index b829a0a..8654678 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -54,8 +54,6 @@ action_continent_selecting (void)
AG_hide_all_frames ();
gtk_list_store_clear (country_liststore);
- AG_insensitive ("anastasis_gtk_main_window_prev_button");
- AG_insensitive ("anastasis_gtk_main_window_forward_button");
{
GtkListStore *continent_liststore;
json_t *continents;
@@ -107,9 +105,9 @@ action_continent_selecting (void)
}
}
- AG_insensitive ("anastasis_gtk_main_window_prev_button");
+ AG_sensitive ("anastasis_gtk_main_window_prev_button");
AG_insensitive ("anastasis_gtk_main_window_forward_button");
- AG_hide ("anastasis_gtk_main_window_prev_button");
+ AG_show ("anastasis_gtk_main_window_prev_button");
AG_show ("anastasis_gtk_main_window_forward_button");
AG_show ("anastasis_gtk_main_control_vbox");
AG_show ("anastasis_gtk_continent_frame");
@@ -189,10 +187,10 @@ action_country_selecting (void)
}
}
- AG_insensitive ("anastasis_gtk_main_window_prev_button");
+ AG_sensitive ("anastasis_gtk_main_window_prev_button");
AG_insensitive ("anastasis_gtk_main_window_forward_button");
AG_show ("anastasis_gtk_main_control_vbox");
- AG_hide ("anastasis_gtk_main_window_prev_button");
+ AG_show ("anastasis_gtk_main_window_prev_button");
AG_show ("anastasis_gtk_main_window_forward_button");
AG_show ("anastasis_gtk_country_selection_image");
AG_show ("anastasis_gtk_continent_frame");
@@ -1341,6 +1339,7 @@ action_backup_finished (void)
AG_show ("anastasis_gtk_completed_image");
AG_show ("anastasis_gtk_main_control_vbox");
AG_hide ("anastasis_gtk_main_window_save_as_button");
+ AG_show ("anastasis_gtk_restart_button");
AG_show ("anastasis_gtk_main_window_quit_button");
AG_hide ("anastasis_gtk_main_window_prev_button");
AG_hide ("anastasis_gtk_main_window_forward_button");
@@ -2521,6 +2520,7 @@ action_recovery_finished (void)
AG_show ("anastasis_gtk_completed_image");
AG_show ("anastasis_gtk_main_control_vbox");
AG_hide ("anastasis_gtk_main_window_save_as_button");
+ AG_show ("anastasis_gtk_restart_button");
AG_show ("anastasis_gtk_main_window_quit_button");
AG_hide ("anastasis_gtk_main_window_prev_button");
AG_hide ("anastasis_gtk_main_window_forward_button");
diff --git a/src/anastasis/anastasis-gtk_handle-backup-button-clicked.c
b/src/anastasis/anastasis-gtk_handle-backup-button-clicked.c
index ac58cfb..487d6d5 100644
--- a/src/anastasis/anastasis-gtk_handle-backup-button-clicked.c
+++ b/src/anastasis/anastasis-gtk_handle-backup-button-clicked.c
@@ -38,8 +38,8 @@
* @param user_data unused
*/
void
-anastasis_gtk_backup_button_clicked (GObject *object,
- gpointer user_data)
+anastasis_gtk_backup_button_clicked_cb (GObject *object,
+ gpointer user_data)
{
json_t *j;
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 a9e028d..a3be93c 100644
--- a/src/anastasis/anastasis-gtk_handle-main-window-back-clicked.c
+++ b/src/anastasis/anastasis-gtk_handle-main-window-back-clicked.c
@@ -32,7 +32,22 @@
/**
- * Callback invoked if the the "back"-button is clicked.
+ * Start interaction from the beginning.
+ */
+static void
+fresh_start (void)
+{
+ AG_hide_all_frames ();
+ json_decref (AG_redux_state);
+ AG_redux_state = NULL;
+ AG_hide ("anastasis_gtk_restart_button");
+ AG_hide ("anastasis_gtk_main_control_vbox");
+ AG_show ("anastasis_gtk_start_frame");
+}
+
+
+/**
+ * Callback invoked if the "back"-button is clicked.
*
* @param object
* @param user_data unused
@@ -41,12 +56,34 @@ void
anastasis_gtk_main_window_back_clicked (GObject *object,
gpointer user_data)
{
+ const char *state;
+
+ (void) object;
+ (void) user_data;
if (NULL != AG_ra)
{
/* This happens if we were long polling for payment */
ANASTASIS_redux_action_cancel (AG_ra);
AG_ra = NULL;
}
+ state = json_string_value (json_object_get (AG_redux_state,
+ "recovery_state"));
+ if (NULL == state)
+ state = json_string_value (json_object_get (AG_redux_state,
+ "backup_state"));
+
+ if ( (0 == strcasecmp (state,
+ "CONTINENT_SELECTING")) ||
+ (0 == strcasecmp (state,
+ "COUNTRY_SELECTING")) )
+ {
+ AG_hide ("anastasis_gtk_country_selection_image");
+ AG_hide ("anastasis_gtk_continent_frame");
+ AG_hide ("anastasis_gtk_continent_selection_image");
+ AG_hide ("anastasis_gtk_country_selection_image");
+ fresh_start ();
+ return;
+ }
AG_freeze ();
AG_ra = ANASTASIS_redux_action (AG_redux_state,
"back",
@@ -54,3 +91,20 @@ anastasis_gtk_main_window_back_clicked (GObject *object,
&AG_action_cb,
NULL);
}
+
+
+/**
+ * Callback invoked if the "restart"-button is clicked.
+ *
+ * @param object
+ * @param user_data unused
+ */
+void
+anastasis_gtk_restart_button_clicked_cb (GObject *object,
+ gpointer user_data)
+{
+ (void) object;
+ (void) user_data;
+ AG_hide ("anastasis_gtk_restart_button");
+ fresh_start ();
+}
diff --git a/src/anastasis/anastasis-gtk_handle-recovery-button-clicked.c
b/src/anastasis/anastasis-gtk_handle-recovery-button-clicked.c
index 0f7f036..1a05f02 100644
--- a/src/anastasis/anastasis-gtk_handle-recovery-button-clicked.c
+++ b/src/anastasis/anastasis-gtk_handle-recovery-button-clicked.c
@@ -38,8 +38,8 @@
* @param user_data unused
*/
void
-anastasis_gtk_recovery_button_clicked (GObject *object,
- gpointer user_data)
+anastasis_gtk_recovery_button_clicked_cb (GObject *object,
+ gpointer user_data)
{
json_t *j;
--
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: add back actions suggested by Belen,
gnunet <=