[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis-gtk] 07/07: start with identity attributes
From: |
gnunet |
Subject: |
[taler-anastasis-gtk] 07/07: start with identity attributes |
Date: |
Tue, 15 Sep 2020 19:27:17 +0200 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis-gtk.
commit 560ddb0ed92054ad4d6c0bcaff90f358e5228602
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Tue Sep 15 19:26:55 2020 +0200
start with identity attributes
---
contrib/anastasis_gtk_main_window.glade | 133 +++++++++++++++++++++++++++++++-
src/anastasis/anastasis-gtk_helper.c | 22 +++++-
src/include/anastasis-gtk_helper.h | 17 +++-
3 files changed, 164 insertions(+), 8 deletions(-)
diff --git a/contrib/anastasis_gtk_main_window.glade
b/contrib/anastasis_gtk_main_window.glade
index 0156671..ee59fa3 100644
--- a/contrib/anastasis_gtk_main_window.glade
+++ b/contrib/anastasis_gtk_main_window.glade
@@ -283,7 +283,138 @@
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <placeholder/>
+ <object class="GtkAlignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox"
id="anastasis_gtk_identity_vbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="orientation">vertical</property>
+ <child>
+ <object class="GtkBox"
id="anastasis_gtk_id_attr_full_name">
+ <property
name="name">anastasis_gtk_id_attr_full_name</property>
+ <property
name="visible">True</property>
+ <property
name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel"
id="label_id_attr_full_name">
+ <property
name="visible">True</property>
+ <property
name="can_focus">False</property>
+ <property
name="halign">start</property>
+ <property
name="valign">center</property>
+ <property
name="margin_start">10</property>
+ <property
name="hexpand">True</property>
+ <property name="label"
translatable="yes">Full name:</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry">
+ <property
name="visible">True</property>
+ <property
name="can_focus">True</property>
+ <property
name="hexpand">True</property>
+ <property name="placeholder_text"
translatable="yes">Max Mustermann</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property
name="visible">True</property>
+ <property
name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel">
+ <property
name="visible">True</property>
+ <property
name="can_focus">False</property>
+ <property
name="halign">start</property>
+ <property
name="valign">center</property>
+ <property
name="margin_start">10</property>
+ <property
name="hexpand">True</property>
+ <property name="label"
translatable="yes">AHV number:</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry">
+ <property
name="visible">True</property>
+ <property
name="can_focus">True</property>
+ <property
name="hexpand">True</property>
+ <property name="placeholder_text"
translatable="yes">123456789</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property
name="visible">True</property>
+ <property
name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel">
+ <property
name="visible">True</property>
+ <property
name="can_focus">False</property>
+ <property
name="halign">start</property>
+ <property
name="valign">center</property>
+ <property
name="margin_start">10</property>
+ <property
name="hexpand">True</property>
+ <property name="label"
translatable="yes">Social security number:</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry">
+ <property
name="visible">True</property>
+ <property
name="can_focus">True</property>
+ <property
name="hexpand">True</property>
+ <property name="placeholder_text"
translatable="yes">123456789</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
</child>
<child type="label">
<object class="GtkLabel">
diff --git a/src/anastasis/anastasis-gtk_helper.c
b/src/anastasis/anastasis-gtk_helper.c
index 219ff5d..ddd0f01 100644
--- a/src/anastasis/anastasis-gtk_helper.c
+++ b/src/anastasis/anastasis-gtk_helper.c
@@ -167,11 +167,11 @@ init_continent_list (json_t *init_state)
/**
* Initialize the country list in dependence of selected continent.
*
- * @param continent_selected_state the state to get the countries from
- * @param continent name of the selected country
+ * @param state the state to get the countries from
+ * @param continent name of the selected continent
*/
void
-init_country_list (json_t *continent_selected_state,
+init_country_list (json_t *state,
const char *continent)
{
GtkTreeView *tree_view;
@@ -179,7 +179,7 @@ init_country_list (json_t *continent_selected_state,
GtkTreeIter iter;
json_t *country;
size_t index;
- json_t *countries = json_object_get (continent_selected_state,
"countries");
+ json_t *countries = json_object_get (state, "countries");
country_liststore = GTK_LIST_STORE (
GCG_get_main_window_object ("country_liststore"));
@@ -197,6 +197,20 @@ init_country_list (json_t *continent_selected_state,
}
+/**
+ * Initialize the identity attributes in dependence of selected country.
+ *
+ * @param state the state to get the attributes from
+ * @param country name of the selected country
+ */
+void
+init_id_attr (json_t *state,
+ const char *country)
+{
+ json_t *id_attributes = json_object_get (state, "required_attributes");
+}
+
+
/**
* Callback invoked if a continent is selected (row-activated signal).
*
diff --git a/src/include/anastasis-gtk_helper.h
b/src/include/anastasis-gtk_helper.h
index 5d8d4a0..d2e1aab 100644
--- a/src/include/anastasis-gtk_helper.h
+++ b/src/include/anastasis-gtk_helper.h
@@ -100,14 +100,25 @@ init_continent_list (json_t *init_state);
/**
* Initialize the country list in dependence of selected continent.
*
- * @param init_state the initial state to get the countries from
- * @param continent name of the selected country
+ * @param state the state to get the countries from
+ * @param continent name of the selected continent
*/
void
-init_country_list (json_t *init_state,
+init_country_list (json_t *tate,
const char *continent);
+/**
+ * Initialize the identity attributes in dependence of selected country.
+ *
+ * @param state the state to get the attributes from
+ * @param country name of the selected country
+ */
+void
+init_id_attr (json_t *state,
+ const char *country);
+
+
/**
* Callback invoked if the the "back"-button is clicked.
*
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-anastasis-gtk] branch master updated (9ca91ba -> 560ddb0), gnunet, 2020/09/15
- [taler-anastasis-gtk] 04/07: fix country list, gnunet, 2020/09/15
- [taler-anastasis-gtk] 01/07: show continent list, gnunet, 2020/09/15
- [taler-anastasis-gtk] 03/07: fix continent selection, gnunet, 2020/09/15
- [taler-anastasis-gtk] 02/07: worked on select country, gnunet, 2020/09/15
- [taler-anastasis-gtk] 07/07: start with identity attributes,
gnunet <=
- [taler-anastasis-gtk] 06/07: fix country selection, gnunet, 2020/09/15
- [taler-anastasis-gtk] 05/07: add prev-/forward-button functionality, gnunet, 2020/09/15