[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis-gtk] branch master updated: update auth providers
From: |
gnunet |
Subject: |
[taler-anastasis-gtk] branch master updated: update auth providers |
Date: |
Tue, 09 Mar 2021 21:35:34 +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 809f6f9 update auth providers
809f6f9 is described below
commit 809f6f91b1f293a0992f114adc5fd357ea29f8ee
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Mar 9 21:35:32 2021 +0100
update auth providers
---
contrib/anastasis_gtk_open_file_dialog.glade | 75 +++++++++++++++++
contrib/anastasis_gtk_save_file_dialog.glade | 93 ++++++++++++++++++++++
...astasis-gtk_handle-auth-edit-provider-clicked.c | 74 ++---------------
3 files changed, 175 insertions(+), 67 deletions(-)
diff --git a/contrib/anastasis_gtk_open_file_dialog.glade
b/contrib/anastasis_gtk_open_file_dialog.glade
new file mode 100644
index 0000000..69fd8af
--- /dev/null
+++ b/contrib/anastasis_gtk_open_file_dialog.glade
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkFileFilter" id="anastasis_file_filter">
+ <patterns>
+ <pattern>*.ana</pattern>
+ </patterns>
+ </object>
+ <object class="GtkFileChooserDialog" id="open_file_dialog">
+ <property name="can-focus">False</property>
+ <property name="can-default">True</property>
+ <property name="modal">True</property>
+ <property name="window-position">center</property>
+ <property name="destroy-with-parent">True</property>
+ <property name="type-hint">dialog</property>
+ <property name="filter">anastasis_file_filter</property>
+ <signal name="response" handler="open_directory_dialog_response_cb"
swapped="no"/>
+ <child internal-child="vbox">
+ <object class="GtkBox">
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox">
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="label">gtk-open</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">button2</action-widget>
+ <action-widget response="-5">button1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/contrib/anastasis_gtk_save_file_dialog.glade
b/contrib/anastasis_gtk_save_file_dialog.glade
new file mode 100644
index 0000000..086496c
--- /dev/null
+++ b/contrib/anastasis_gtk_save_file_dialog.glade
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2
+
+Copyright (C)
+
+This file is part of .
+
+ 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 of the License, or
+(at your option) any later version.
+
+ 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 . If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-license-type gplv3 -->
+ <object class="GtkFileFilter" id="anastasis_file_filter">
+ <patterns>
+ <pattern>*.ana</pattern>
+ </patterns>
+ </object>
+ <object class="GtkFileChooserDialog" id="save_file_dialog">
+ <property name="can-focus">False</property>
+ <property name="window-position">center</property>
+ <property name="type-hint">dialog</property>
+ <property name="filter">anastasis_file_filter</property>
+ <property name="action">save</property>
+ <signal name="response" handler="save_directory_dialog_response_cb"
swapped="no"/>
+ <child internal-child="vbox">
+ <object class="GtkBox">
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox">
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label">gtk-save</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">button1</action-widget>
+ <action-widget response="-3">button2</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
b/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
index f76b11f..12c225e 100644
--- a/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
+++ b/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
@@ -78,62 +78,6 @@ url_entry_changed_cb (GtkEntry *entry,
}
-/**
- * Function called with the results of "back" action.
- *
- * @param cls json array with arguments to apply to the action
- * @param error_code Error code
- * @param response new state as result or config information of provider
- */
-static void
-added_providers (void *cls,
- enum TALER_ErrorCode error_code,
- json_t *response)
-{
- if (TALER_EC_NONE != error_code)
- {
- AG_error ("Unexpected result from 'add_providers' operation");
- return;
- }
- /* simulate forward click */
- fprintf (stderr,
- "Added providers\n");
- json_decref (redux_state);
- redux_state = json_incref (response);
- AG_forward_user_attributes_collecting ();
-}
-
-
-/**
- * Function called with the results of "back" action.
- *
- * @param cls json array with arguments to apply to the action
- * @param error_code Error code
- * @param response new state as result or config information of provider
- */
-static void
-add_providers (void *cls,
- enum TALER_ErrorCode error_code,
- json_t *response)
-{
- json_t *args = cls;
-
- if (TALER_EC_NONE != error_code)
- {
- AG_error ("Unexpected result from 'back' operation");
- json_decref (args);
- return;
- }
- GNUNET_assert (NULL ==
- ANASTASIS_redux_action (response,
- "add_provider",
- args,
- &added_providers,
- NULL));
- json_decref (args);
-}
-
-
/**
* Function called from the edit-provider dialog upon completion.
*
@@ -180,9 +124,6 @@ edit_provider_dialog_response_cb (GtkDialog *dialog,
if (NULL == json_object_get (providers,
url))
{
- fprintf (stderr,
- "Adding %s\n",
- url);
GNUNET_assert (0 ==
json_array_append_new (urls,
json_string (url)));
@@ -196,8 +137,6 @@ edit_provider_dialog_response_cb (GtkDialog *dialog,
if (0 == json_array_size (urls))
{
json_decref (urls);
- fprintf (stderr,
- "no new URLs\n");
return;
}
{
@@ -206,12 +145,13 @@ edit_provider_dialog_response_cb (GtkDialog *dialog,
args = json_pack ("{s:o}",
"urls",
urls);
- GNUNET_assert (NULL ==
- ANASTASIS_redux_action (redux_state,
- "back",
- NULL,
- &add_providers,
- args));
+ AG_freeze ();
+ ra = ANASTASIS_redux_action (redux_state,
+ "add_provider",
+ args,
+ &AG_action_cb,
+ NULL);
+ json_decref (args);
}
}
--
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: update auth providers,
gnunet <=