From 885ba86ad16d23d885e172e9ece571563aca98ed Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 26 Aug 2020 07:42:28 +0300 Subject: SidebarWidget: Working on identity commands --- src/ui/sidebarwidget.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src') diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 8b0792c8..3e97437e 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c @@ -576,6 +576,39 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) else if (equal_Command(cmd, "idents.changed") && d->mode == identities_SidebarMode) { updateItems_SidebarWidget_(d); } + else if (isCommand_Widget(w, ev, "ident.use")) { + return iTrue; + } + else if (isCommand_Widget(w, ev, "ident.showuse")) { + return iTrue; + } + else if (isCommand_Widget(w, ev, "ident.edit")) { + return iTrue; + } + else if (isCommand_Widget(w, ev, "ident.pickicon")) { + return iTrue; + } + else if (isCommand_Widget(w, ev, "ident.reveal")) { + return iTrue; + } + else if (isCommand_Widget(w, ev, "ident.delete")) { + iSidebarItem *item = hoverItem_SidebarWidget_(d); + if (argLabel_Command(cmd, "confirm")) { + makeQuestion_Widget(uiTextCaution_ColorEscape "DELETE IDENTITY", + format_CStr("Do you really want to delete the identity\n" + uiTextAction_ColorEscape "%s\n" + uiText_ColorEscape + "including its certificate and private key files?", + cstr_String(&item->label)), + (const char *[]){ "Cancel", + uiTextCaution_ColorEscape + "Delete Identity and Files" }, + (const char *[]){ "cancel", "ident.delete confirm:0" }, + 2); + return iTrue; + } + return iTrue; + } else if (equal_Command(cmd, "history.delete")) { const iSidebarItem *item = hoverItem_SidebarWidget_(d); if (item && !isEmpty_String(&item->url)) { -- cgit v1.2.3