diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-02-19 11:55:28 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-02-19 11:55:28 (GMT) |
commit | 588c206289a84bfc939ac27dacba991d9b6d0793 (patch) | |
tree | 0de656a445e236de1846e8f40e6635077b9d3f19 /src/gui/panels | |
parent | 1898c6ea16d0eee8ecc5ab9ebb26ac91ad7314b4 (diff) |
Created client/server certificates on demand for a given identity.
Diffstat (limited to 'src/gui/panels')
-rw-r--r-- | src/gui/panels/regedit.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gui/panels/regedit.c b/src/gui/panels/regedit.c index 579c60b..501bd2f 100644 --- a/src/gui/panels/regedit.c +++ b/src/gui/panels/regedit.c @@ -458,6 +458,10 @@ static void reload_config_into_treeview(GRegeditPanel *panel, GGenConfig *config type_desc = _("Integer"); break; + case CPT_ULONG: + type_desc = _("Unsigned long"); + break; + case CPT_STRING: type_desc = _("String"); break; @@ -547,6 +551,8 @@ static void update_config_param_value(GtkTreeStore *store, GtkTreeIter *iter) bool boolean; /* Valeur booléenne */ int integer; /* Valeur entière */ char int_val[sizeof(XSTR(INT_MIN)) + 1];/* Valeur en chaîne de carac. */ + unsigned long ulong; /* Valeur entière positive */ + char ul_val[sizeof(XSTR(ULONG_MAX)) + 1];/* Valeur en chaîne de carac. */ char *string; /* Chaîne de caractères */ char *desc; /* Description à afficher */ @@ -579,6 +585,12 @@ static void update_config_param_value(GtkTreeStore *store, GtkTreeIter *iter) desc = int_val; break; + case CPT_ULONG: + g_config_param_get_value(param, &ulong); + snprintf(ul_val, sizeof(ul_val), "%lu", ulong); + desc = ul_val; + break; + case CPT_STRING: g_config_param_get_value(param, &string); desc = (string != NULL ? string : ""); @@ -720,6 +732,7 @@ static void on_param_value_edited(GtkCellRendererText *renderer, gchar *path, gc GCfgParam *param; /* Paramètre à actualiser */ bool boolean; /* Valeur booléenne */ int integer; /* Valeur entière */ + int ulong; /* Valeur entière positive */ char *end; /* Pointeur vers '\0' final ? */ tree_path = gtk_tree_path_new_from_string(path); @@ -751,6 +764,15 @@ static void on_param_value_edited(GtkCellRendererText *renderer, gchar *path, gc break; + case CPT_ULONG: + + ulong = strtoul(new, &end, 10); + if (*end != '\0') goto opve_bad_value; + + g_config_param_set_value(param, ulong); + + break; + case CPT_STRING: g_config_param_set_value(param, new); break; |