summaryrefslogtreecommitdiff
path: root/src/ui/sidebarwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-22 22:24:13 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-22 22:24:13 +0300
commitfd94d906676b0dcef2b783c992f75254a61ae025 (patch)
treea117549152c70d3105b7f94d910ba1333368b2af /src/ui/sidebarwidget.c
parent4108d5b0154775e2bf2c3af5003cf840675d789a (diff)
Document footer buttons
In some situations, e.g., when a client certificate is required but not active, make available action buttons that offer related shortcuts. Selecting or deselecting an identity for use will automatically reload the current page for convenience. Animate closing sidebars with Escape key.
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r--src/ui/sidebarwidget.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index f9bdbf67..950db596 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -1249,9 +1249,11 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
1249 } 1249 }
1250 else if (arg_Command(cmd)) { 1250 else if (arg_Command(cmd)) {
1251 signIn_GmCerts(certs_App(), ident, tabUrl); 1251 signIn_GmCerts(certs_App(), ident, tabUrl);
1252 postCommand_App("navigate.reload");
1252 } 1253 }
1253 else { 1254 else {
1254 signOut_GmCerts(certs_App(), tabUrl); 1255 signOut_GmCerts(certs_App(), tabUrl);
1256 postCommand_App("navigate.reload");
1255 } 1257 }
1256 saveIdentities_GmCerts(certs_App()); 1258 saveIdentities_GmCerts(certs_App());
1257 updateItems_SidebarWidget_(d); 1259 updateItems_SidebarWidget_(d);
@@ -1491,10 +1493,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
1491 const int kmods = keyMods_Sym(ev->key.keysym.mod); 1493 const int kmods = keyMods_Sym(ev->key.keysym.mod);
1492 /* Hide the sidebar when Escape is pressed. */ 1494 /* Hide the sidebar when Escape is pressed. */
1493 if (kmods == 0 && key == SDLK_ESCAPE && isVisible_Widget(d)) { 1495 if (kmods == 0 && key == SDLK_ESCAPE && isVisible_Widget(d)) {
1494 setFlags_Widget(w, hidden_WidgetFlag, iTrue); 1496 postCommand_Widget(d, "%s.toggle", cstr_String(id_Widget(w)));
1495 arrange_Widget(w->parent);
1496 updateSize_DocumentWidget(document_App());
1497 refresh_Widget(w->parent);
1498 return iTrue; 1497 return iTrue;
1499 } 1498 }
1500 } 1499 }