gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis-gtk] branch master updated (095cb09 -> 84b85a3)


From: gnunet
Subject: [taler-anastasis-gtk] branch master updated (095cb09 -> 84b85a3)
Date: Fri, 25 Sep 2020 19:22:20 +0200

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

dennis-neufeld pushed a change to branch master
in repository anastasis-gtk.

    from 095cb09  worked on authentication_frame, add methods, edit methods, 
delete methods
     new f5e9808  fix refactoring
     new 84b85a3  worked on authentication frames forward button

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/anastasis/anastasis-gtk.c        | 31 +++++++++++++++++--------------
 src/anastasis/anastasis-gtk_backup.c | 35 +++++++++++++++++++----------------
 src/anastasis/anastasis-gtk_helper.c | 13 ++++++++++---
 src/include/anastasis-gtk_helper.h   |  2 +-
 4 files changed, 47 insertions(+), 34 deletions(-)

diff --git a/src/anastasis/anastasis-gtk.c b/src/anastasis/anastasis-gtk.c
index 85d252b..470d557 100644
--- a/src/anastasis/anastasis-gtk.c
+++ b/src/anastasis/anastasis-gtk.c
@@ -241,7 +241,7 @@ anastasis_gtk_continent_activated (GtkTreeView *tree_view,
 
             if (check_state (redux_state, "ReduxContinentSelectedState"))
                 redux_state = ANASTASIS_backup_start (cfg);
-            ANASTASIS_backup_action (redux_state,
+            ANASTASIS_redux_action (redux_state,
                                      "selection_continent",
                                      arguments,
                                      &action_cb,
@@ -286,7 +286,7 @@ anastasis_gtk_country_activated (GtkTreeView *tree_view,
             json_object_set (arguments, "country_code", json_string 
(country_code));
 
             if (check_state (redux_state, "ReduxContinentSelectedState"))
-                ANASTASIS_backup_action (redux_state,
+                ANASTASIS_redux_action (redux_state,
                                         "selection_country",
                                         arguments,
                                         &action_cb,
@@ -296,7 +296,7 @@ anastasis_gtk_country_activated (GtkTreeView *tree_view,
                 if (! (0 == strcmp (country_name, json_string_value (
                     json_object_get (redux_state, "selected_country")))))
                 {
-                    ANASTASIS_backup_action (redux_state,
+                    ANASTASIS_redux_action (redux_state,
                                              "changing_country",
                                              arguments,
                                              &action_cb,
@@ -388,7 +388,7 @@ anastasis_gtk_main_window_forward_clicked (GObject *object,
                                         
"anastasis_gtk_user_attributes_image")));
     }
 
-    //show provider frame, hide identity frame
+    //show backup authentication methods frame, hide identity frame
     if (gtk_widget_is_visible (GTK_WIDGET (GCG_get_main_window_object (
                                         "anastasis_gtk_identity_frame"))) &&
                 check_attributes_fullfilled ())
@@ -453,28 +453,31 @@ anastasis_gtk_main_window_forward_clicked (GObject 
*object,
         json_object_set_new (arguments, "identity", attributes);
 
         if (check_state (redux_state, "ReduxCountrySelectedState"))
-            ANASTASIS_backup_action (redux_state,
+            ANASTASIS_redux_action (redux_state,
                                     "entering_user_attributes",
                                     arguments,
                                     &action_cb,
                                     NULL);
         else
-            ANASTASIS_backup_action (redux_state,
-                                     "editing_user_attributes",
-                                     arguments,
-                                     &action_cb,
-                                     NULL);
+            ANASTASIS_redux_action (redux_state,
+                                    "editing_user_attributes",
+                                    arguments,
+                                    &action_cb,
+                                    NULL);
 
         gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
                                         "anastasis_gtk_identity_frame")));
-        gtk_widget_show (GTK_WIDGET (GCG_get_main_window_object (
-                                        
"anastasis_gtk_b_authentication_frame")));
         gtk_widget_set_sensitive (GTK_WIDGET (GCG_get_main_window_object (
                                         
"anastasis_gtk_main_window_forward_button")), false);
         gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
                                         
"anastasis_gtk_user_attributes_image")));
-        gtk_widget_show (GTK_WIDGET (GCG_get_main_window_object (
-                                        
"anastasis_gtk_b_authentication_methods_image")));
+    }
+
+    //show backup policy frame, hide backup authentication methods frame
+    if (gtk_widget_is_visible (GTK_WIDGET (GCG_get_main_window_object (
+                                        
"anastasis_gtk_b_authentication_frame")))
+    {
+        
     }
 }
 
diff --git a/src/anastasis/anastasis-gtk_backup.c 
b/src/anastasis/anastasis-gtk_backup.c
index ad5f3b4..364e55c 100644
--- a/src/anastasis/anastasis-gtk_backup.c
+++ b/src/anastasis/anastasis-gtk_backup.c
@@ -100,7 +100,7 @@ guint g_signal_email;
 guint g_signal_post;
 guint g_signal_video;
 
-
+     
 /**
  * Callback invoked if the the "authentication methods edit"-button is clicked.
  *
@@ -151,7 +151,15 @@ void
 anastasis_gtk_b_auth_method_btn_delete_clicked_cb (GObject *object,
                                                    gpointer user_data)
 {
+     GList *children;
      gtk_widget_destroy (GTK_WIDGET (user_data));
+
+     children = gtk_container_get_children (GTK_CONTAINER 
(GCG_get_main_window_object (
+                                                                 
"anastasis_gtk_b_authentication_vbox")));
+     if (! children)
+          gtk_widget_set_sensitive (GTK_WIDGET (GCG_get_main_window_object (
+                                        
"anastasis_gtk_main_window_forward_button")), false);   
+     g_list_free (children);
 }
 
 
@@ -167,7 +175,6 @@ anastasis_gtk_b_question_dialog_btn_ok_clicked_cb (GObject 
*object,
 {
      GtkBox *vbox = GTK_BOX (GCG_get_main_window_object 
("anastasis_gtk_b_authentication_vbox"));
      GtkHBox *hbox;
-     GtkSeparator *separator = (GtkSeparator *) gtk_separator_new 
(GTK_ORIENTATION_HORIZONTAL);
 
      bool is_box = GTK_IS_BOX (user_data);
      if (is_box)
@@ -212,7 +219,6 @@ anastasis_gtk_b_question_dialog_btn_ok_clicked_cb (GObject 
*object,
      if (! is_box)
      {
           gtk_box_pack_start (vbox, hbox, 0, 0, 0);
-          gtk_box_pack_start (vbox, separator, 0, 0, 0);
      }
 
      gtk_widget_show (GTK_WIDGET (hbox));
@@ -222,7 +228,6 @@ anastasis_gtk_b_question_dialog_btn_ok_clicked_cb (GObject 
*object,
      gtk_widget_show (GTK_WIDGET (buttons));
      gtk_widget_show (GTK_WIDGET (edit_btn));
      gtk_widget_show (GTK_WIDGET (delete_btn));
-     gtk_widget_show (GTK_WIDGET (separator));
 
      gtk_entry_set_text ( GTK_ENTRY (
           GCG_get_main_window_object 
("anastasis_gtk_b_question_dialog_question_entry")), "");
@@ -230,6 +235,8 @@ anastasis_gtk_b_question_dialog_btn_ok_clicked_cb (GObject 
*object,
           GCG_get_main_window_object 
("anastasis_gtk_b_question_dialog_answer_entry")), "");
      gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
                                         "anastasis_gtk_b_question_dialog")));
+     gtk_widget_set_sensitive (GTK_WIDGET (GCG_get_main_window_object (
+                                        
"anastasis_gtk_main_window_forward_button")), true);
 }
 
 
@@ -287,7 +294,6 @@ anastasis_gtk_b_post_dialog_btn_ok_clicked_cb (GObject 
*object,
 {
      GtkHBox *hbox;
      GtkBox *vbox = GTK_BOX (GCG_get_main_window_object 
("anastasis_gtk_b_authentication_vbox"));
-     GtkSeparator *separator = (GtkSeparator *) gtk_separator_new 
(GTK_ORIENTATION_HORIZONTAL);
 
      bool is_box = GTK_IS_BOX (user_data);
      if (is_box)
@@ -344,7 +350,6 @@ anastasis_gtk_b_post_dialog_btn_ok_clicked_cb (GObject 
*object,
      if (! is_box)
      {
           gtk_box_pack_start (vbox, hbox, 0, 0, 0);
-          gtk_box_pack_start (vbox, separator, 0, 0, 0);
      }
 
      gtk_widget_show (GTK_WIDGET (hbox));
@@ -357,7 +362,6 @@ anastasis_gtk_b_post_dialog_btn_ok_clicked_cb (GObject 
*object,
      gtk_widget_show (GTK_WIDGET (buttons));
      gtk_widget_show (GTK_WIDGET (edit_btn));
      gtk_widget_show (GTK_WIDGET (delete_btn));
-     gtk_widget_show (GTK_WIDGET (separator));
 
      gtk_entry_set_text ( GTK_ENTRY (
           GCG_get_main_window_object 
("anastasis_gtk_b_post_dialog_full_name_entry")), "");
@@ -371,6 +375,8 @@ anastasis_gtk_b_post_dialog_btn_ok_clicked_cb (GObject 
*object,
           GCG_get_main_window_object 
("anastasis_gtk_b_post_dialog_country_entry")), "");
      gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
                                         "anastasis_gtk_b_post_dialog")));
+     gtk_widget_set_sensitive (GTK_WIDGET (GCG_get_main_window_object (
+                                        
"anastasis_gtk_main_window_forward_button")), true);
 }
 
 
@@ -434,7 +440,6 @@ anastasis_gtk_b_video_dialog_btn_ok_clicked_cb (GObject 
*object,
 {
      GtkHBox *hbox;
      GtkBox *vbox = GTK_BOX (GCG_get_main_window_object 
("anastasis_gtk_b_authentication_vbox"));
-     GtkSeparator *separator = (GtkSeparator *) gtk_separator_new 
(GTK_ORIENTATION_HORIZONTAL);
 
      bool is_box = GTK_IS_BOX (user_data);
      if (is_box)
@@ -475,7 +480,6 @@ anastasis_gtk_b_video_dialog_btn_ok_clicked_cb (GObject 
*object,
      if (! is_box)
      {
           gtk_box_pack_start (vbox, hbox, 0, 0, 0);
-          gtk_box_pack_start (vbox, separator, 0, 0, 0);
      }
 
      gtk_widget_show (GTK_WIDGET (hbox));
@@ -484,12 +488,13 @@ anastasis_gtk_b_video_dialog_btn_ok_clicked_cb (GObject 
*object,
      gtk_widget_show (GTK_WIDGET (buttons));
      gtk_widget_show (GTK_WIDGET (edit_btn));
      gtk_widget_show (GTK_WIDGET (delete_btn));
-     gtk_widget_show (GTK_WIDGET (separator));
 
      gtk_entry_set_text ( GTK_ENTRY (
           GCG_get_main_window_object 
("anastasis_gtk_b_video_dialog_photo_path_entry")), "");
      gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
                                         "anastasis_gtk_b_video_dialog")));
+     gtk_widget_set_sensitive (GTK_WIDGET (GCG_get_main_window_object (
+                                        
"anastasis_gtk_main_window_forward_button")), true);
 }
 
 
@@ -545,7 +550,6 @@ anastasis_gtk_b_sms_dialog_btn_ok_clicked_cb (GObject 
*object,
 {
      GtkHBox *hbox;
      GtkBox *vbox = GTK_BOX (GCG_get_main_window_object 
("anastasis_gtk_b_authentication_vbox"));
-     GtkSeparator *separator = (GtkSeparator *) gtk_separator_new 
(GTK_ORIENTATION_HORIZONTAL);
 
      bool is_box = GTK_IS_BOX (user_data);
      if (is_box)
@@ -586,7 +590,6 @@ anastasis_gtk_b_sms_dialog_btn_ok_clicked_cb (GObject 
*object,
      if (! is_box)
      {
           gtk_box_pack_start (vbox, hbox, 0, 0, 0);
-          gtk_box_pack_start (vbox, separator, 0, 0, 0);
      }
 
      gtk_widget_show (GTK_WIDGET (hbox));
@@ -595,12 +598,13 @@ anastasis_gtk_b_sms_dialog_btn_ok_clicked_cb (GObject 
*object,
      gtk_widget_show (GTK_WIDGET (buttons));
      gtk_widget_show (GTK_WIDGET (edit_btn));
      gtk_widget_show (GTK_WIDGET (delete_btn));
-     gtk_widget_show (GTK_WIDGET (separator));
 
      gtk_entry_set_text ( GTK_ENTRY (
           GCG_get_main_window_object 
("anastasis_gtk_b_sms_dialog_phonenumber_entry")), "");
      gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
                                         "anastasis_gtk_b_sms_dialog")));
+     gtk_widget_set_sensitive (GTK_WIDGET (GCG_get_main_window_object (
+                                        
"anastasis_gtk_main_window_forward_button")), true);
 }
 
 
@@ -656,7 +660,6 @@ anastasis_gtk_b_email_dialog_btn_ok_clicked_cb (GObject 
*object,
 {
      GtkHBox *hbox;
      GtkBox *vbox = GTK_BOX (GCG_get_main_window_object 
("anastasis_gtk_b_authentication_vbox"));
-     GtkSeparator *separator = (GtkSeparator *) gtk_separator_new 
(GTK_ORIENTATION_HORIZONTAL);
 
      bool is_box = GTK_IS_BOX (user_data);
      if (is_box)
@@ -697,7 +700,6 @@ anastasis_gtk_b_email_dialog_btn_ok_clicked_cb (GObject 
*object,
      if (! is_box)
      {
           gtk_box_pack_start (vbox, hbox, 0, 0, 0);
-          gtk_box_pack_start (vbox, separator, 0, 0, 0);
      }
 
      gtk_widget_show (GTK_WIDGET (hbox));
@@ -706,12 +708,13 @@ anastasis_gtk_b_email_dialog_btn_ok_clicked_cb (GObject 
*object,
      gtk_widget_show (GTK_WIDGET (buttons));
      gtk_widget_show (GTK_WIDGET (edit_btn));
      gtk_widget_show (GTK_WIDGET (delete_btn));
-     gtk_widget_show (GTK_WIDGET (separator));
 
      gtk_entry_set_text ( GTK_ENTRY (
           GCG_get_main_window_object 
("anastasis_gtk_b_email_dialog_mailaddress_entry")), "");
      gtk_widget_hide (GTK_WIDGET (GCG_get_main_window_object (
                                         "anastasis_gtk_b_email_dialog")));
+     gtk_widget_set_sensitive (GTK_WIDGET (GCG_get_main_window_object (
+                                        
"anastasis_gtk_main_window_forward_button")), true);
 }
 
 
diff --git a/src/anastasis/anastasis-gtk_helper.c 
b/src/anastasis/anastasis-gtk_helper.c
index f0b94eb..4eb0788 100644
--- a/src/anastasis/anastasis-gtk_helper.c
+++ b/src/anastasis/anastasis-gtk_helper.c
@@ -154,7 +154,7 @@ persist_state (json_t *state)
 
 
 /**
- * Function called with the results of #ANASTASIS_backup_action
+ * Function called with the results of #ANASTASIS_redux_action
  * or #ANASTASIS_recovery_action.
  *
  * @param cls closure
@@ -185,9 +185,16 @@ action_cb (void *cls,
         }
         if (check_state (redux_state, "ReduxUserAttributesAddedState"))
         {
-            init_auth_methods (redux_state);
+            if (json_object_get (redux_state, "backup-state"))
+            {
+                init_auth_methods (redux_state);
+                gtk_widget_show (GTK_WIDGET (GCG_get_main_window_object (
+                                        
"anastasis_gtk_b_authentication_frame")));
+                gtk_widget_show (GTK_WIDGET (GCG_get_main_window_object (
+                                                
"anastasis_gtk_b_authentication_methods_image")));
+            }
         }
-        /** FIXME: Don't use this like this */
+        /** FIXME: Don't use this like this; now used to check if json state 
is build correctly */
         if (0 == persist_state (redux_state))
             return;
         else
diff --git a/src/include/anastasis-gtk_helper.h 
b/src/include/anastasis-gtk_helper.h
index 5ba4048..c1f384f 100644
--- a/src/include/anastasis-gtk_helper.h
+++ b/src/include/anastasis-gtk_helper.h
@@ -56,7 +56,7 @@ extern struct GNUNET_CURL_RescheduleContext *rc;
 
 
 /**
- * Function called with the results of #ANASTASIS_backup_action
+ * Function called with the results of #ANASTASIS_redux_action
  * or #ANASTASIS_recovery_action.
  *
  * @param cls closure

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