gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis-gtk] branch master updated: fix secret editing logic


From: gnunet
Subject: [taler-anastasis-gtk] branch master updated: fix secret editing logic
Date: Tue, 13 Jul 2021 20:08: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 bb302bb  fix secret editing logic
bb302bb is described below

commit bb302bbe146a3b4484e559c57334e15c37f85ebb
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jul 13 20:08:03 2021 +0200

    fix secret editing logic
---
 src/anastasis/anastasis-gtk_action.c | 17 +++++++++++++++--
 src/anastasis/anastasis-gtk_io.c     | 22 ----------------------
 2 files changed, 15 insertions(+), 24 deletions(-)

diff --git a/src/anastasis/anastasis-gtk_action.c 
b/src/anastasis/anastasis-gtk_action.c
index b30c0fa..5441478 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -1954,7 +1954,6 @@ show_challenge_feedback (void)
       found = challenge_ls_has_uuid (GTK_TREE_MODEL (ls),
                                      uuid,
                                      &iter);
-      GNUNET_break (found);
       if (found)
         gtk_list_store_set (
           ls,
@@ -2845,17 +2844,31 @@ action_recovery_finished (void)
     /* images and text can be copied */
     AG_show ("anastasis_gtk_secret_copy_button");
   }
-  if (NULL != data)
+  pb = NULL;
+  if (NULL != text)
+  {
+    pb = setup_qrcode ("anastasis_gtk_secret_qr_image",
+                       text,
+                       strlen (text));
+  }
+  else
   {
     pb = setup_qrcode ("anastasis_gtk_secret_qr_image",
                        data,
                        data_size);
+  }
+  if (NULL != pb)
+  {
     img = GTK_IMAGE (GCG_get_main_window_object (
                        "anastasis_gtk_secret_qr_image"));
     gtk_image_set_from_pixbuf (img,
                                pb);
     g_object_unref (pb);
   }
+  else
+  {
+    AG_hide ("anastasis_gtk_secret_qr_image");
+  }
   GNUNET_JSON_parse_free (spec);
   AG_hide ("anastassis_gtk_progress_vbox");
   AG_hide ("anastasis_gtk_recovery_progress_scrolled_window");
diff --git a/src/anastasis/anastasis-gtk_io.c b/src/anastasis/anastasis-gtk_io.c
index e682aca..95f702e 100644
--- a/src/anastasis/anastasis-gtk_io.c
+++ b/src/anastasis/anastasis-gtk_io.c
@@ -116,26 +116,6 @@ save_user_attributes_collecting (void)
 }
 
 
-/**
- * Serialize state of currently shown secret editing frame to JSON.
- */
-static void
-save_secret_editing (void)
-{
-  GtkEntry *entry;
-  const char *str;
-
-  entry = GTK_ENTRY (GCG_get_main_window_object (
-                       "anastasis_gtk_enter_secret_entry"));
-  str = gtk_entry_get_text (entry);
-  GNUNET_assert (0 ==
-                 json_object_set_new (AG_redux_state,
-                                      "core_secret",
-                                      GNUNET_JSON_from_data (str,
-                                                             strlen (str))));
-}
-
-
 /**
  * Function called from the open-directory dialog upon completion.
  *
@@ -151,8 +131,6 @@ save_directory_dialog_response_cb (GtkDialog *dialog,
   static const struct DispatchItem save_state[] = {
     { .state = "USER_ATTRIBUTES_COLLECTING",
       .action = &save_user_attributes_collecting },
-    { .state = "SECRET_EDITING",
-      .action = &save_secret_editing },
     { .state = NULL,
       .action = NULL }
   };

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