gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis-gtk] branch master updated: -remove dead video auth cod


From: gnunet
Subject: [taler-anastasis-gtk] branch master updated: -remove dead video auth code
Date: Sun, 30 Jan 2022 11:42:04 +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 527f3e1  -remove dead video auth code
527f3e1 is described below

commit 527f3e1ca1440785ab63012667197a61efff3c57
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jan 30 11:42:01 2022 +0100

    -remove dead video auth code
---
 src/anastasis/anastasis-gtk_backup.c              | 140 ----------------------
 src/anastasis/anastasis-gtk_handle-method-video.c | 128 --------------------
 2 files changed, 268 deletions(-)

diff --git a/src/anastasis/anastasis-gtk_backup.c 
b/src/anastasis/anastasis-gtk_backup.c
deleted file mode 100644
index 7296387..0000000
--- a/src/anastasis/anastasis-gtk_backup.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
-     This file is part of anastasis-gtk.
-     Copyright (C) 2020 Anastasis SARL
-
-     Anastasis is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 3, or (at your
-     option) any later version.
-
-     Anastasis is distributed in the hope that it will be useful, but
-     WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     General Public License for more details.
-
-     You should have received a copy of the GNU General Public License
-     along with Anastasis; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-     Boston, MA 02110-1301, USA.
-*/
-
-/**
- * @file src/anastasis/anastasis-gtk_backup.c
- * @brief Main function of anastasis-gtk
- * @author Christian Grothoff
- * @author Dennis Neufeld
- */
-#include <gnunet/platform.h>
-#include <gnunet/gnunet_util_lib.h>
-#include "anastasis-gtk_action.h"
-#include "anastasis-gtk_helper.h"
-#include <jansson.h>
-
-
-/**
- * Callback invoked if the the "video OK"-button is clicked.
- *
- * @param object
- * @param user_data unused
- */
-void
-anastasis_gtk_b_video_dialog_btn_ok_clicked_cb (GObject *object,
-                                                gpointer user_data)
-{
-  GtkHBox *hbox;
-  GtkBox *vbox = GTK_BOX (GCG_get_main_window_object (
-                            "anastasis_gtk_b_authentication_vbox"));
-
-  bool is_box = GTK_IS_BOX (user_data);
-  if (is_box)
-  {
-    hbox = (GtkHBox *) user_data;
-    // if is_box is true, we are editing and have to delete the old method
-    delete_auth_method (user_data);
-  }
-  else
-    hbox = (GtkHBox *) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-  // set labels
-  GtkLabel *label_prefix = (GtkLabel *) gtk_label_new ("VIDEO: ");
-  const gchar *photo_path = gtk_entry_get_text (
-    GTK_ENTRY (GCG_get_main_window_object (
-                 "anastasis_gtk_b_video_dialog_photo_path_entry")));
-  GtkLabel *label_photo_path = (GtkLabel *) gtk_label_new (photo_path);
-  {
-    // build json arguments for reducer
-    json_t *arguments = json_object ();
-    json_t *auth_method = json_object ();
-    json_t *method_data = json_object ();
-
-    json_object_set_new (auth_method, "method", json_string ("video"));
-    json_object_set_new (method_data, "picture", json_string (photo_path));    
   // FIXME: load photo, not only path
-    json_object_set_new (auth_method, "data", method_data);
-    json_object_set_new (arguments, "authentication_method", method_data);
-
-    ra = ANASTASIS_redux_action (AG_redux_state,
-                                 "add_authentication",
-                                 arguments,
-                                 &AG_action_cb,
-                                 NULL);
-  }
-
-  // set buttons
-  GtkHButtonBox *buttons = (GtkHButtonBox *) gtk_box_new (1, 0);
-  GtkButton  *edit_btn = (GtkButton *) gtk_button_new_from_icon_name (
-    "gtk-edit", GTK_ICON_SIZE_BUTTON);
-  g_signal_connect (edit_btn,
-                    "clicked",
-                    G_CALLBACK (
-                      anastasis_gtk_b_auth_method_btn_edit_clicked_cb),
-                    hbox);
-  GtkButton  *delete_btn = (GtkButton *) gtk_button_new_from_icon_name (
-    "gtk-delete", GTK_ICON_SIZE_BUTTON);
-  g_signal_connect (delete_btn,
-                    "clicked",
-                    G_CALLBACK (
-                      anastasis_gtk_b_auth_method_btn_delete_clicked_cb),
-                    hbox);
-  gtk_box_pack_start (GTK_BOX (buttons), GTK_WIDGET (edit_btn), 0, 0, 0);
-  gtk_box_pack_start (GTK_BOX (buttons), GTK_WIDGET (delete_btn), 0, 0, 0);
-
-  gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (label_prefix), 0, 0, 0);
-  gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (label_photo_path), 0, 0, 0);
-  gtk_box_pack_end (GTK_BOX (hbox), GTK_WIDGET (buttons), 0, 0, 0);
-
-  if (! is_box)
-  {
-    gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (hbox), 0, 0, 0);
-  }
-
-  gtk_widget_show (GTK_WIDGET (hbox));
-  gtk_widget_show (GTK_WIDGET (label_prefix));
-  gtk_widget_show (GTK_WIDGET (label_photo_path));
-  gtk_widget_show (GTK_WIDGET (buttons));
-  gtk_widget_show (GTK_WIDGET (edit_btn));
-  gtk_widget_show (GTK_WIDGET (delete_btn));
-
-  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);
-}
-
-
-/**
- * Callback invoked if the the "video"-button is clicked.
- *
- * @param object
- * @param user_data unused
- */
-void
-anastasis_gtk_btn_add_auth_video_clicked_cb (GObject *object,
-                                             gpointer user_data)
-{
-  gtk_widget_show (GTK_WIDGET (GCG_get_main_window_object (
-                                 "anastasis_gtk_b_video_dialog")));
-}
diff --git a/src/anastasis/anastasis-gtk_handle-method-video.c 
b/src/anastasis/anastasis-gtk_handle-method-video.c
deleted file mode 100644
index a0a6053..0000000
--- a/src/anastasis/anastasis-gtk_handle-method-video.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-     This file is part of anastasis-gtk.
-     Copyright (C) 2020 Anastasis SARL
-
-     Anastasis is free software; you can redistribute it and/or modify
-     it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 3, or (at your
-     option) any later version.
-
-     Anastasis is distributed in the hope that it will be useful, but
-     WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     General Public License for more details.
-
-     You should have received a copy of the GNU General Public License
-     along with Anastasis; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-     Boston, MA 02110-1301, USA.
-*/
-
-/**
- * @file src/anastasis/anastasis-gtk_handle-method-video.c
- * @brief Handle dialogs for video authentication
- * @author Christian Grothoff
- *
- * FIXME: This implementation is far from complete.
- */
-#include <gnunet/platform.h>
-#include <gnunet/gnunet_util_lib.h>
-#include "anastasis-gtk_action.h"
-#include "anastasis-gtk_helper.h"
-#include "anastasis-gtk_handle-identity-changed.h"
-#include <jansson.h>
-
-
-/**
- * Function called from the security-question dialog upon completion.
- *
- * @param dialog the pseudonym selection dialog
- * @param response_id response code from the dialog
- * @param user_data the builder of the dialog
- */
-void
-anastasis_gtk_b_video_dialog_response_cb (GtkDialog *dialog,
-                                          gint response_id,
-                                          gpointer user_data)
-{
-  GtkBuilder *builder = GTK_BUILDER (user_data);
-  json_t *args;
-
-  if (GTK_RESPONSE_OK != response_id)
-  {
-    gtk_widget_destroy (GTK_WIDGET (dialog));
-    g_object_unref (G_OBJECT (builder));
-    return;
-  }
-  args = json_pack ("{ s:{s:s, s:o, s:s}}",
-                    "authentication_method",
-                    "type",
-                    "video",
-                    "challenge",
-                    GNUNET_JSON_from_data ("DATA",
-                                           strlen ("DATA")),
-                    "instructions",
-                    qs);
-  gtk_widget_destroy (GTK_WIDGET (dialog));
-  g_object_unref (G_OBJECT (builder));
-  AG_freeze ();
-  ra = ANASTASIS_redux_action (AG_redux_state,
-                               "add_authentication",
-                               args,
-                               &AG_action_cb,
-                               NULL);
-  json_decref (args);
-}
-
-
-static void
-update_sensitivity (GtkBuilder *builder)
-{
-  gtk_widget_set_sensitive (
-    GTK_WIDGET (gtk_builder_get_object (builder,
-                                        
"anastasis_gtk_b_video_dialog_btn_ok")),
-    FALSE);
-}
-
-
-void
-anastasis_gtk_b_video_dialog_video_entry_changed_cb (GtkEntry *entry,
-                                                     gpointer user_data)
-{
-  GtkBuilder *builder = GTK_BUILDER (user_data);
-
-  update_sensitivity (builder);
-}
-
-
-/**
- * Callback invoked if the the "secure video"-button is clicked.
- *
- * @param object
- * @param user_data unused
- */
-void
-anastasis_gtk_btn_add_auth_video_clicked_cb (GObject *object,
-                                             gpointer user_data)
-{
-  GtkWidget *ad;
-  GtkBuilder *builder;
-
-  builder = GNUNET_GTK_get_new_builder ("anastasis_gtk_auth_add_video.glade",
-                                        NULL);
-  if (NULL == builder)
-  {
-    GNUNET_break (0);
-    return;
-  }
-  ad = GTK_WIDGET (gtk_builder_get_object (builder,
-                                           "anastasis_gtk_b_video_dialog"));
-  {
-    GtkWidget *toplevel;
-
-    toplevel = gtk_widget_get_toplevel (GTK_WIDGET (object));
-    gtk_window_set_transient_for (GTK_WINDOW (ad),
-                                  GTK_WINDOW (toplevel));
-    gtk_window_present (GTK_WINDOW (ad));
-  }
-}

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