[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis-gtk] branch master updated: fix policy editing issues
From: |
gnunet |
Subject: |
[taler-anastasis-gtk] branch master updated: fix policy editing issues |
Date: |
Sun, 04 Jul 2021 22:21:21 +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 366ce2d fix policy editing issues
366ce2d is described below
commit 366ce2d98e0a9a9066b37b926befdfd3730c3ad0
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sun Jul 4 22:21:18 2021 +0200
fix policy editing issues
---
contrib/anastasis_gtk_edit_policy.glade | 43 ++++++++++++++++++++++++++--
src/anastasis/anastasis-gtk_pe-edit-policy.c | 38 +++++++++++++-----------
2 files changed, 63 insertions(+), 18 deletions(-)
diff --git a/contrib/anastasis_gtk_edit_policy.glade
b/contrib/anastasis_gtk_edit_policy.glade
index 38c681a..93e5561 100644
--- a/contrib/anastasis_gtk_edit_policy.glade
+++ b/contrib/anastasis_gtk_edit_policy.glade
@@ -10,6 +10,8 @@
<object class="GtkBox" id="edit_dialog_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="edit_frame_label">
@@ -32,24 +34,59 @@
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<child>
<object class="GtkGrid" id="policy_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="margin_left">5</property>
+ <property name="margin_right">5</property>
+ <property name="margin_top">5</property>
+ <property name="margin_bottom">5</property>
<property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="row_spacing">10</property>
<property name="column_spacing">5</property>
<property name="row_homogeneous">True</property>
<child>
- <placeholder/>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">5</property>
+ <property name="margin_right">5</property>
+ <property name="label"
translatable="yes">Authentication method</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">5</property>
+ <property name="margin_right">5</property>
+ <property name="label" translatable="yes">Anastasis
provider</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
</child>
</object>
</child>
@@ -70,11 +107,13 @@
</action-widgets>
<child internal-child="vbox">
<object class="GtkBox">
+ <property name="visible">True</property>
<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="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
diff --git a/src/anastasis/anastasis-gtk_pe-edit-policy.c
b/src/anastasis/anastasis-gtk_pe-edit-policy.c
index d2ca761..d4cb064 100644
--- a/src/anastasis/anastasis-gtk_pe-edit-policy.c
+++ b/src/anastasis/anastasis-gtk_pe-edit-policy.c
@@ -218,33 +218,31 @@ combo_box_changed_cb (
GtkComboBox *widget,
gpointer user_data)
{
- struct EditDialogContext *edc = user_data;
+ struct LineContext *lc = user_data;
+ struct EditDialogContext *edc = lc->edc;
/* Update our line context's on/off flag */
- for (struct LineContext *lctx = edc->lc_head;
- NULL != lctx;
- lctx = lctx->next)
{
GtkTreeIter iter;
- gchar *url;
- if (lctx->cb != widget)
- continue;
- if (! gtk_combo_box_get_active_iter (lctx->cb,
+ if (! gtk_combo_box_get_active_iter (lc->cb,
&iter))
{
GNUNET_break (0);
- continue;
}
- gtk_tree_model_get (lctx->model,
- &iter,
- 0, &url,
- -1);
- lctx->on = (0 !=
+ else
+ {
+ gchar *url;
+
+ gtk_tree_model_get (lc->model,
+ &iter,
+ 0, &url,
+ -1);
+ lc->on = (0 !=
strcmp (_("<off>"),
url));
- g_free (url);
- break;
+ g_free (url);
+ }
}
/* finally, update "OK" button sensitivity */
{
@@ -496,12 +494,20 @@ AG_edit_policy (guint pindex)
lctx);
gtk_grid_insert_row (grid,
row);
+ gtk_widget_show (label);
gtk_grid_attach (grid,
label,
0,
row,
1,
1);
+ g_object_set (cb,
+ "expand",
+ TRUE,
+ "entry-text-column",
+ 0,
+ NULL);
+ gtk_widget_show (cb);
gtk_grid_attach (grid,
cb,
1,
--
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: fix policy editing issues,
gnunet <=