From c658fb20aaaae8fbe30a24cf3a9d727c6220cfc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi
Date: Thu, 13 May 2021 22:27:53 +0300
Subject: [PATCH 1/1] SidebarWidget: No actions in empty Identities
src/ui/sidebarwidget.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 3d785e0a..1eddd6b7 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -374,10 +374,6 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
break;
}
case identities_SidebarMode: {
/* Actions. */ {
addActionButton_SidebarWidget_(d, add_Icon " ${sidebar.action.ident.new}", "ident.new", 0);
addActionButton_SidebarWidget_(d, "${sidebar.action.ident.import}", "ident.import", 0);
}
const iString *tabUrl = url_DocumentWidget(document_App());
isEmpty = iTrue;
iConstForEach(PtrArray, i, identities_GmCerts(certs_App())) {
@@ -414,6 +410,11 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
iRelease(item);
isEmpty = iFalse;
}
/* Actions. */
if (!isEmpty) {
addActionButton_SidebarWidget_(d, add_Icon " ${sidebar.action.ident.new}", "ident.new", 0);
addActionButton_SidebarWidget_(d, "${sidebar.action.ident.import}", "ident.import", 0);
}
const iMenuItem menuItems[] = {
{ person_Icon " ${ident.use}", 0, 0, "ident.use arg:1" },
{ close_Icon " ${ident.stopuse}", 0, 0, "ident.use arg:0" },
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).