summaryrefslogtreecommitdiff
path: root/src/anastasis/anastasis-gtk_action.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/anastasis/anastasis-gtk_action.c')
-rw-r--r--src/anastasis/anastasis-gtk_action.c50
1 files changed, 7 insertions, 43 deletions
diff --git a/src/anastasis/anastasis-gtk_action.c b/src/anastasis/anastasis-gtk_action.c
index 823f5f6..8ad386f 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -392,6 +392,11 @@ create_attribute_widget (const struct GNUNET_HashCode *uh,
"changed",
G_CALLBACK (&AG_identity_changed),
NULL));
+ GNUNET_assert (0 <
+ g_signal_connect (w,
+ "style-updated",
+ G_CALLBACK (&gtk_widget_queue_draw),
+ NULL));
gtk_widget_set_tooltip_text (w,
tooltip);
gtk_box_pack_start (box, /* parent */
@@ -460,47 +465,6 @@ create_attribute_widget (const struct GNUNET_HashCode *uh,
/**
- * Expand base @a name of a widget based on the @a type to
- * create the name of the widget with the data.
- *
- * @param name base name of the widget
- * @param type type of the widget
- * @return NULL on error
- */
-static char *
-expand_name (const char *name,
- const char *type)
-{
- static struct
- {
- const char *type;
- const char *suffix;
- } type_map [] = {
- { .type = "string",
- .suffix = "entry" },
- { .type = "date",
- .suffix = "cal" },
- { .type = NULL,
- .suffix = NULL }
- };
- char *data_widget;
-
- for (unsigned int i = 0; NULL != type_map[i].type; i++)
- {
- if (0 != strcmp (type_map[i].type,
- type))
- continue;
- GNUNET_asprintf (&data_widget,
- "%s_%s",
- name,
- type_map[i].suffix);
- return data_widget;
- }
- return NULL;
-}
-
-
-/**
* Update GtkLabel @a name, setting text to @a value.
*
* @param name Glade-name of widget to update
@@ -585,8 +549,8 @@ action_user_attributes_collecting (void)
{
char *data_name;
- data_name = expand_name (widget_name,
- attr_type);
+ data_name = AG_expand_name (widget_name,
+ attr_type);
w = GTK_WIDGET (GCG_get_main_window_object (data_name));
if (NULL == w)
{