[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis-gtk] branch master updated: -work on #6841 and related
From: |
gnunet |
Subject: |
[taler-anastasis-gtk] branch master updated: -work on #6841 and related bugs' |
Date: |
Mon, 12 Jul 2021 10:33:43 +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 8cee1ab -work on #6841 and related bugs'
8cee1ab is described below
commit 8cee1ab114969213c75e3402089f8824c8031bc8
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jul 12 10:33:41 2021 +0200
-work on #6841 and related bugs'
---
contrib/anastasis_gtk_main_window.glade | 156 +++++++++------------
src/anastasis/Makefile.am | 11 +-
src/anastasis/anastasis-gtk.c | 7 +-
src/anastasis/anastasis-gtk_about.c | 2 +-
src/anastasis/anastasis-gtk_action.c | 59 +++-----
.../anastasis-gtk_handle-core-secret-changed.c | 1 +
.../anastasis-gtk_handle-expiration-change.c | 3 +-
7 files changed, 103 insertions(+), 136 deletions(-)
diff --git a/contrib/anastasis_gtk_main_window.glade
b/contrib/anastasis_gtk_main_window.glade
index 7516b70..92fb46d 100644
--- a/contrib/anastasis_gtk_main_window.glade
+++ b/contrib/anastasis_gtk_main_window.glade
@@ -1696,51 +1696,28 @@ Author: Christian Grothoff, Dennis Neufeld
</packing>
</child>
<child>
- <object class="GtkEventBox"
id="how_encryption_event_box">
+ <object class="GtkLabel"
id="encrypt_label">
<property
name="visible">True</property>
<property
name="can-focus">False</property>
- <child>
- <object class="GtkLabel"
id="encrypt_label">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <property
name="margin-left">40</property>
- <property name="label"
translatable="yes">How Anastasis encrypts your data</property>
- <attributes>
- <attribute
name="underline" value="True"/>
- <attribute
name="foreground" value="#34346565a4a4"/>
- </attributes>
- <signal
name="button-press-event" handler="encrypt_label_button_press_event_cb"
swapped="no"/>
- </object>
- </child>
+ <property name="label"
translatable="yes"><a
href="https://taler.net/papers/thesis-anastasis-2020.pdf">How Anastasis
encrypts your data</a></property>
+ <property
name="use-markup">True</property>
</object>
<packing>
<property
name="expand">False</property>
- <property
name="fill">False</property>
- <property
name="padding">2</property>
+ <property
name="fill">True</property>
<property
name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkEventBox"
id="free_software_event_box">
+ <object class="GtkLabel"
id="free_software_label">
<property
name="visible">True</property>
<property
name="can-focus">False</property>
- <signal
name="button-press-event"
handler="free_software_event_box_button_press_event_cb" swapped="no"/>
- <child>
- <object class="GtkLabel"
id="free_software_label">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <property name="label"
translatable="yes">Anastasis is Free Software</property>
- <attributes>
- <attribute
name="underline" value="True"/>
- <attribute
name="foreground" value="#34346565a4a4"/>
- </attributes>
- </object>
- </child>
+ <property name="label"
translatable="yes">Anastasis is <a
href="https://www.gnu.org/philosophy/free-sw.html">Free
Software</a></property>
+ <property
name="use-markup">True</property>
</object>
<packing>
<property
name="expand">False</property>
- <property
name="fill">False</property>
- <property
name="padding">2</property>
+ <property
name="fill">True</property>
<property
name="position">3</property>
</packing>
</child>
@@ -1749,8 +1726,8 @@ Author: Christian Grothoff, Dennis Neufeld
<property
name="visible">True</property>
<property
name="can-focus">False</property>
<property
name="margin-top">10</property>
- <property name="label"
translatable="yes">Anastasis is developed by privacy advocates
-with funding from the European Commission.</property>
+ <property name="label"
translatable="yes">Anastasis is developed by <a
href="https://anastasis.lu/en/about.html#team">privacy advocates</a>
+with <a href="https://www.ngi.eu/ngi-projects/ledger/">funding</a>
from the European Commission.</property>
<property
name="use-markup">True</property>
<property
name="justify">center</property>
</object>
@@ -2688,6 +2665,62 @@ with funding from the European Commission.</property>
<property
name="orientation">vertical</property>
<property
name="spacing">5</property>
<property
name="baseline-position">top</property>
+ <child>
+ <object class="GtkBox"
id="secret_name_vbox">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="orientation">vertical</property>
+ <property
name="spacing">5</property>
+ <child>
+ <object class="GtkLabel">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="halign">start</property>
+ <property
name="valign">start</property>
+ <property name="label"
translatable="yes">Secret's name</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="padding">5</property>
+ <property
name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry"
id="anastasis_gtk_secret_name_entry">
+ <property
name="visible">True</property>
+ <property
name="can-focus">True</property>
+ </object>
+ <packing>
+ <property
name="expand">True</property>
+ <property
name="fill">True</property>
+ <property
name="padding">5</property>
+ <property
name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel"
id="secret_name_explanation_label">
+ <property
name="visible">True</property>
+ <property
name="can-focus">False</property>
+ <property
name="halign">start</property>
+ <property name="label"
translatable="yes">Names should be unique, so that you can easily
+identify your secret later.</property>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="padding">5</property>
+ <property
name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property
name="expand">False</property>
+ <property
name="fill">True</property>
+ <property
name="padding">20</property>
+ <property
name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkBox"
id="secret_entry_vbox">
<property
name="visible">True</property>
@@ -2780,63 +2813,6 @@ with funding from the European Commission.</property>
<property
name="expand">True</property>
<property
name="fill">True</property>
<property
name="padding">20</property>
- <property
name="pack-type">end</property>
- <property
name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox"
id="secret_name_vbox">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <property
name="orientation">vertical</property>
- <property
name="spacing">5</property>
- <child>
- <object class="GtkLabel">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <property
name="halign">start</property>
- <property
name="valign">start</property>
- <property name="label"
translatable="yes">Secret's name</property>
- </object>
- <packing>
- <property
name="expand">False</property>
- <property
name="fill">True</property>
- <property
name="padding">5</property>
- <property
name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry"
id="anastasis_gtk_secret_name_entry">
- <property
name="visible">True</property>
- <property
name="can-focus">True</property>
- </object>
- <packing>
- <property
name="expand">True</property>
- <property
name="fill">True</property>
- <property
name="padding">5</property>
- <property
name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel"
id="secret_name_explanation_label">
- <property
name="visible">True</property>
- <property
name="can-focus">False</property>
- <property
name="halign">start</property>
- <property name="label"
translatable="yes">Names should be unique, so that you can easily
-identify your secret later.</property>
- </object>
- <packing>
- <property
name="expand">False</property>
- <property
name="fill">True</property>
- <property
name="padding">5</property>
- <property
name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property
name="expand">False</property>
- <property
name="fill">True</property>
- <property
name="padding">20</property>
<property
name="position">1</property>
</packing>
</child>
diff --git a/src/anastasis/Makefile.am b/src/anastasis/Makefile.am
index b2f1029..4759923 100644
--- a/src/anastasis/Makefile.am
+++ b/src/anastasis/Makefile.am
@@ -31,7 +31,7 @@ anastasis_gtk_SOURCES = \
anastasis-gtk_handle-expiration-change.c \
anastasis-gtk_handle-expiration-change.h \
anastasis-gtk_handle-identity-changed.c \
- anastasis-gtk_handle-identity-changed.h \
+ anastasis-gtk_handle-identity-changed.h \
anastasis-gtk_handle-recovery-button-clicked.c \
anastasis-gtk_handle-secret-buttons.c \
anastasis-gtk_handle-main-window-forward-clicked.c \
@@ -59,15 +59,16 @@ anastasis_gtk_LDADD = \
@GTK_LIBS@ \
@GLADE_LIBS@ @GNUNET_LIBS@ \
@QR_LIBS@ \
+ -lanastasisrest \
+ -lanastasisredux \
+ -lanastasisutil \
+ -ltalerjson \
+ -ltalerutil \
-lgnunetgtk \
-lgnunetutil \
-lgnunetcurl \
-lgnunetjson \
-ljansson \
- -ltalerjson \
- -ltalerutil \
- -lanastasisrest \
- -lanastasisredux \
-lmicrohttpd \
-lmagic \
$(INTLLIBS)
diff --git a/src/anastasis/anastasis-gtk.c b/src/anastasis/anastasis-gtk.c
index 0294db6..0bbcfc7 100644
--- a/src/anastasis/anastasis-gtk.c
+++ b/src/anastasis/anastasis-gtk.c
@@ -1,6 +1,6 @@
/*
This file is part of anastasis-gtk.
- Copyright (C) 2020 Anastasis SARL
+ Copyright (C) 2020, 2021 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
@@ -248,13 +248,14 @@ run (void *cls)
AG_ml = cls;
AG_entry_attributes = GNUNET_CONTAINER_multihashmap_create (16,
GNUNET_NO);
+ GNUNET_GTK_set_icon_search_path ();
+ GNUNET_OS_init (ANASTASIS_project_data_default ());
+ GNUNET_GTK_setup_nls ();
if (GNUNET_OK !=
GNUNET_GTK_main_loop_build_window (AG_ml,
NULL))
return;
AG_cfg = GNUNET_GTK_main_loop_get_configuration (AG_ml);
- GNUNET_GTK_set_icon_search_path ();
- GNUNET_GTK_setup_nls ();
GNUNET_GTK_main_loop_get_args (AG_ml,
&argc,
&argv);
diff --git a/src/anastasis/anastasis-gtk_about.c
b/src/anastasis/anastasis-gtk_about.c
index 454ead5..b090324 100644
--- a/src/anastasis/anastasis-gtk_about.c
+++ b/src/anastasis/anastasis-gtk_about.c
@@ -1,6 +1,6 @@
/*
This file is part of Anastasis-gtk
- Copyright (C) 2005-2013 Anastasis SARL
+ Copyright (C) 2005-2013, 2021 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
diff --git a/src/anastasis/anastasis-gtk_action.c
b/src/anastasis/anastasis-gtk_action.c
index 528f81f..e54ec5e 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -837,15 +837,12 @@ action_policies_reviewing (void)
size_t pindex;
json_t *policy;
GtkTreeStore *ts;
- json_t *aps;
AG_hide_all_frames ();
ts = GTK_TREE_STORE (GCG_get_main_window_object ("policy_review_treestore"));
gtk_tree_store_clear (ts);
policies = json_object_get (AG_redux_state,
"policies");
- aps = json_object_get (AG_redux_state,
- "authentication_providers");
GNUNET_assert (NULL != policies);
json_array_foreach (policies, pindex, policy)
{
@@ -859,7 +856,6 @@ action_policies_reviewing (void)
size_t mindex;
json_t *method;
char *summary;
- struct GNUNET_TIME_Relative min_lt = GNUNET_TIME_UNIT_FOREVER_REL;
if (GNUNET_OK !=
GNUNET_JSON_parse (policy,
@@ -889,13 +885,6 @@ action_policies_reviewing (void)
};
json_t *jmethods;
json_t *jmethod;
- json_t *ap;
- struct GNUNET_TIME_Relative lt;
- struct GNUNET_JSON_Specification cspec[] = {
- GNUNET_JSON_spec_relative_time ("truth_lifetime",
- <),
- GNUNET_JSON_spec_end ()
- };
if (GNUNET_OK !=
GNUNET_JSON_parse (method,
@@ -908,17 +897,6 @@ action_policies_reviewing (void)
GNUNET_break (0);
continue;
}
- ap = json_object_get (aps,
- provider);
- if (GNUNET_OK !=
- GNUNET_JSON_parse (ap,
- cspec,
- NULL, NULL))
- {
- GNUNET_break_op (0);
- AG_error ("State did not parse correctly");
- return;
- }
jmethods = json_object_get (AG_redux_state,
"authentication_methods");
jmethod = json_array_get (jmethods,
@@ -966,9 +944,7 @@ action_policies_reviewing (void)
AG_PRMC_PROVIDER_URL,
provider,
AG_PRMC_EXPIRATION_TIME_STR,
- GNUNET_STRINGS_absolute_time_to_string (
- GNUNET_TIME_relative_to_absolute (
- lt)),
+ "N/A",
AG_PRMC_POLICY_INDEX,
(guint) pindex,
AG_PRMC_IS_CHALLENGE,
@@ -976,8 +952,6 @@ action_policies_reviewing (void)
AG_PRMC_METHOD_INDEX,
(guint) mindex,
-1);
- min_lt = GNUNET_TIME_relative_min (lt,
- min_lt);
if (NULL == summary)
{
summary = GNUNET_strdup (type);
@@ -1002,9 +976,7 @@ action_policies_reviewing (void)
&piter,
AG_PRMC_POLICY_NAME, summary,
AG_PRMC_EXPIRATION_TIME_STR,
- GNUNET_STRINGS_absolute_time_to_string (
- GNUNET_TIME_relative_to_absolute (
- min_lt)),
+ "N/A",
AG_PRMC_POLICY_INDEX,
(guint) pindex,
AG_PRMC_IS_CHALLENGE,
@@ -1106,6 +1078,9 @@ action_secret_editing (void)
NULL, NULL))
{
GNUNET_break (0);
+ json_dumpf (fees,
+ stderr,
+ JSON_INDENT (2));
continue;
}
@@ -1159,10 +1134,12 @@ action_secret_editing (void)
{
GtkEntry *entry;
const char *name = "";
- const char *secret;
+ void *secret;
+ size_t secret_size;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_string ("core_secret",
- &secret),
+ GNUNET_JSON_spec_varsize ("core_secret",
+ &secret,
+ &secret_size),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("secret_name",
&name)),
@@ -1177,8 +1154,18 @@ action_secret_editing (void)
NULL, NULL)) &&
(0 < strlen (secret)) )
{
- gtk_entry_set_text (entry,
- secret);
+ const char *old = gtk_entry_get_text (entry);
+
+ if (0 != strcmp (old,
+ secret))
+ {
+ fprintf (stderr,
+ "Changing secret from\n%s to\n%s\n",
+ old,
+ secret);
+ gtk_entry_set_text (entry,
+ secret);
+ }
AG_sensitive ("anastasis_gtk_main_window_forward_button");
}
else
@@ -1902,8 +1889,8 @@ action_challenge_selecting (void)
AG_hide_all_frames ();
{
- GtkComboBoxText *bt;
json_t *aps;
+ GtkComboBoxText *bt;
const json_t *ap;
const char *provider_url;
diff --git a/src/anastasis/anastasis-gtk_handle-core-secret-changed.c
b/src/anastasis/anastasis-gtk_handle-core-secret-changed.c
index 5634c9f..daf3e7b 100644
--- a/src/anastasis/anastasis-gtk_handle-core-secret-changed.c
+++ b/src/anastasis/anastasis-gtk_handle-core-secret-changed.c
@@ -42,6 +42,7 @@ anastasis_gtk_enter_secret_entry_changed_cb (GtkEditable
*entry,
"anastasis_gtk_secret_name_entry"));
const char *name = gtk_entry_get_text (ne);
+ if (! AG_in_action)
{
json_t *arguments;
struct GNUNET_TIME_Absolute expiration;
diff --git a/src/anastasis/anastasis-gtk_handle-expiration-change.c
b/src/anastasis/anastasis-gtk_handle-expiration-change.c
index ebbe167..99b5412 100644
--- a/src/anastasis/anastasis-gtk_handle-expiration-change.c
+++ b/src/anastasis/anastasis-gtk_handle-expiration-change.c
@@ -93,7 +93,8 @@ expiration_year_spin_button_value_changed_cb (
expiration = AG_get_desired_expiration ();
if (0 == expiration.abs_value_us)
return; /* failured */
- arg = json_pack ("s:o",
+ (void) GNUNET_TIME_round_abs (&expiration);
+ arg = json_pack ("{s:o}",
"expiration",
GNUNET_JSON_from_time_abs (expiration));
GNUNET_assert (NULL != arg);
--
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: -work on #6841 and related bugs',
gnunet <=