From d1ed75e18db28d3ce7365ce1a8c4f244bfefdb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Sat, 4 Nov 2023 18:35:56 +0200 Subject: [PATCH] Fixed activating pinned identity via Bookmarks menu --- res/about/version.gmi | 1 + src/ui/window.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/res/about/version.gmi b/res/about/version.gmi index ce10ccf9..d69da0ed 100644 --- a/res/about/version.gmi +++ b/res/about/version.gmi @@ -7,6 +7,7 @@ # Release notes ## 1.17.3 +* Fixed activating a pinned identity when opening a bookmark via the Bookmarks menu. * Fixed initial scope of a created identity when using the default selection. * Fixed issues with dropdown menus when the menu appears as a popup window. * Fixed clearing the pinned identity of a bookmark. diff --git a/src/ui/window.c b/src/ui/window.c index a14c02db..afb040c6 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -2370,6 +2370,11 @@ const iArray *updateBookmarksMenu_Widget(iWidget *menu) { } #endif } + iString *setIdentArg = NULL; + if (!isEmpty_String(&bm->identity)) { + setIdentArg = copy_String(&bm->identity); + prependCStr_String(setIdentArg, " setident:"); + } pushBack_Array( dest, &(iMenuItem){ format_CStr("%s %s", cstr_String(&iconStr), cstr_String(title)), @@ -2377,7 +2382,10 @@ const iArray *updateBookmarksMenu_Widget(iWidget *menu) { 0, isFolder_Bookmark(bm) ? format_CStr("submenu id:bfmenu.%d", id_Bookmark(bm)) - : format_CStr("!open url:%s", cstr_String(&bm->url)) }); + : format_CStr("!open%s url:%s", + setIdentArg ? cstr_String(setIdentArg) : "", + cstr_String(&bm->url)) }); + delete_String(setIdentArg); deinit_String(&iconStr); } /* Create folder menus. */