summaryrefslogtreecommitdiff
path: root/src/ui/sidebarwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-13 22:27:53 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-13 22:27:53 +0300
commita6f255c4f14b253f251f167d3f6bfff0dc5d168b (patch)
treebfe2b532c27892d72175eddc97353a7d2be84e10 /src/ui/sidebarwidget.c
parente7b0704d3f2828c14ab51c663c2479c6d82fe567 (diff)
SidebarWidget: No actions in empty Identities
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r--src/ui/sidebarwidget.c9
1 files 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) {
374 break; 374 break;
375 } 375 }
376 case identities_SidebarMode: { 376 case identities_SidebarMode: {
377 /* Actions. */ {
378 addActionButton_SidebarWidget_(d, add_Icon " ${sidebar.action.ident.new}", "ident.new", 0);
379 addActionButton_SidebarWidget_(d, "${sidebar.action.ident.import}", "ident.import", 0);
380 }
381 const iString *tabUrl = url_DocumentWidget(document_App()); 377 const iString *tabUrl = url_DocumentWidget(document_App());
382 isEmpty = iTrue; 378 isEmpty = iTrue;
383 iConstForEach(PtrArray, i, identities_GmCerts(certs_App())) { 379 iConstForEach(PtrArray, i, identities_GmCerts(certs_App())) {
@@ -414,6 +410,11 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
414 iRelease(item); 410 iRelease(item);
415 isEmpty = iFalse; 411 isEmpty = iFalse;
416 } 412 }
413 /* Actions. */
414 if (!isEmpty) {
415 addActionButton_SidebarWidget_(d, add_Icon " ${sidebar.action.ident.new}", "ident.new", 0);
416 addActionButton_SidebarWidget_(d, "${sidebar.action.ident.import}", "ident.import", 0);
417 }
417 const iMenuItem menuItems[] = { 418 const iMenuItem menuItems[] = {
418 { person_Icon " ${ident.use}", 0, 0, "ident.use arg:1" }, 419 { person_Icon " ${ident.use}", 0, 0, "ident.use arg:1" },
419 { close_Icon " ${ident.stopuse}", 0, 0, "ident.use arg:0" }, 420 { close_Icon " ${ident.stopuse}", 0, 0, "ident.use arg:0" },