From 5cfe79b4e496b1123865017612e9c421dda99435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Sat, 4 Nov 2023 17:54:11 +0200 Subject: [PATCH 1/1] Fixing the initial scope of a created identity --- src/app.c | 2 +- src/ui/util.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.c b/src/app.c index 3486c89b..e17d78fd 100644 --- a/src/app.c +++ b/src/app.c @@ -3337,7 +3337,7 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) { organization, country); /* Use in the chosen scope. */ { - int selScope = 2; + int selScope = 0; const char *scopeCmd = selectedDropdownCommand_LabelWidget(findChild_Widget(dlg, "ident.scope")); if (startsWith_CStr(scopeCmd, "ident.scope arg:")) { diff --git a/src/ui/util.c b/src/ui/util.c index 5e9bcfa9..af31f02e 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -1829,7 +1829,7 @@ static const iString *replaceNewlinesWithDash_(const iString *str) { return collect_String(mod); } -iWidget *dropdownMenu_Widget(iWidget *dropButton) { +iWidget *dropdownMenu_Widget(const iWidget *dropButton) { if (!dropButton) { return NULL; } @@ -1891,7 +1891,7 @@ const char *selectedDropdownCommand_LabelWidget(const iLabelWidget *dropButton) if (!dropButton) { return ""; } - iWidget *menu = findChild_Widget(constAs_Widget(dropButton), "menu"); + iWidget *menu = dropdownMenu_Widget(constAs_Widget(dropButton)); if (flags_Widget(menu) & nativeMenu_WidgetFlag) { iConstForEach(Array, i, userData_Object(menu)) { const iMenuItem *item = i.value; -- 2.34.1