From 82a9a3078ad7caea56ec057b54b5d16baa3525e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi
Date: Sun, 13 Oct 2024 19:41:18 +0300
Subject: [PATCH 1/1] TUI: UI fixes
Fixes issues with shortcut keys and New Identity dialog layout.
res/about/version.gmi | 4 +++-
src/ui/certlistwidget.c | 7 +++++++
src/ui/documentwidget.c | 4 +---
src/ui/keys.h | 2 ++
src/ui/util.c | 2 +-
5 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/res/about/version.gmi b/res/about/version.gmi
index a5dcacb3..b21e0c85 100644
--- a/res/about/version.gmi
+++ b/res/about/version.gmi
@@ -12,9 +12,11 @@
+* TUI: Fixed Identities sidebar not responding to the context menu action.
-* TUI: Fixed keyboard shortcut for trusting the server certificate.
+* TUI: Fixed footer button shortcut keys for trusting the server certificate and showing Identities sidebar.
+* TUI: Fixed dimensions of the New Identity dialog.
diff --git a/src/ui/certlistwidget.c b/src/ui/certlistwidget.c
index f208b0cf..2a752ebd 100644
--- a/src/ui/certlistwidget.c
+++ b/src/ui/certlistwidget.c
@@ -260,6 +260,13 @@ static iBool processEvent_CertListWidget_(iCertListWidget *d, const SDL_Event *e
}
return iTrue;
}
else if (isCommand_UserEvent(ev, "contextkey") && isFocused_Widget(w)) {
const size_t cursor = d->list.cursorItem;
if (cursor != iInvalidPos) {
itemClicked_CertListWidget_(d, item_ListWidget(&d->list, cursor), cursor);
}
return iTrue;
}
else if (isCommand_Widget(w, ev, "ident.setnotes")) {
iGmIdentity *ident = pointerLabel_Command(cmd, "ident");
if (ident) {
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 3e2ef3cb..572fbd60 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1045,9 +1045,7 @@ static void showErrorPage_DocumentWidget_(iDocumentWidget *d, enum iGmStatusCode
(iMenuItem[]){
{ person_Icon " ${menu.identity.newdomain}", SDLK_n, 0, "ident.new scope:1" },
{ person_Icon " ${menu.identity.new}", newIdentity_KeyShortcut, "ident.new" },
{ leftHalf_Icon " ${menu.show.identities}",
'4',
KMOD_PRIMARY,
{ leftHalf_Icon " ${menu.show.identities}", showIdentities_KeyShortcut,
deviceType_App() == desktop_AppDeviceType ? "sidebar.mode arg:3 show:1"
: "preferences idents:1" } },
3);
diff --git a/src/ui/keys.h b/src/ui/keys.h
index f6cfed3b..1022c871 100644
--- a/src/ui/keys.h
+++ b/src/ui/keys.h
@@ -111,6 +111,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#endif
+#define showIdentities_KeyShortcut SDLK_4, leftSidebarTab_KeyModifier
#define builtIn_BindingId 1000 /* not user-configurable */
iDeclareType(Binding)
diff --git a/src/ui/util.c b/src/ui/util.c
index 966e0148..08aa0837 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -4764,7 +4764,7 @@ iWidget *makeIdentityCreation_Widget(void) {
addDialogInputWithHeadingAndFlags_(headings, values, "${dlg.newident.country}", "ident.country", iClob(inputs[5] = newHint_InputWidget(0, "${hint.newident.optional}")), collapse_WidgetFlag | hidden_WidgetFlag);
arrange_Widget(dlg);
for (size_t i = 0; i < iElemCount(inputs); ++i) {
as_Widget(inputs[i])->rect.size.x = 100 * gap_UI - headings->rect.size.x;
as_Widget(inputs[i])->rect.size.x = 100 * gap_UI * aspect_UI - headings->rect.size.x;
}
addChild_Widget(dlg, iClob(makeDialogButtons_Widget(actions, iElemCount(actions))));
addChild_Widget(get_Root()->widget, iClob(dlg));
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).