summaryrefslogtreecommitdiff
path: root/src/ui/root.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/root.c')
-rw-r--r--src/ui/root.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/ui/root.c b/src/ui/root.c
index 9ed62711..15548e74 100644
--- a/src/ui/root.c
+++ b/src/ui/root.c
@@ -128,7 +128,7 @@ static const iMenuItem phoneNavMenuItems_[] = {
128static const iMenuItem identityButtonMenuItems_[] = { 128static const iMenuItem identityButtonMenuItems_[] = {
129 { "${menu.identity.notactive}", 0, 0, "ident.showactive" }, 129 { "${menu.identity.notactive}", 0, 0, "ident.showactive" },
130 { "---", 0, 0, NULL }, 130 { "---", 0, 0, NULL },
131 { add_Icon " ${menu.identity.new}", SDLK_n, KMOD_PRIMARY | KMOD_SHIFT, "ident.new" }, 131 { add_Icon " ${menu.identity.new}", newIdentity_KeyShortcut, "ident.new" },
132 { "${menu.identity.import}", SDLK_i, KMOD_PRIMARY | KMOD_SHIFT, "ident.import" }, 132 { "${menu.identity.import}", SDLK_i, KMOD_PRIMARY | KMOD_SHIFT, "ident.import" },
133 { "---", 0, 0, NULL }, 133 { "---", 0, 0, NULL },
134 { person_Icon " ${menu.show.identities}", 0, 0, "toolbar.showident" }, 134 { person_Icon " ${menu.show.identities}", 0, 0, "toolbar.showident" },
@@ -138,7 +138,7 @@ static const iMenuItem identityButtonMenuItems_[] = {
138 { "${menu.identity.notactive}", 0, 0, "ident.showactive" }, 138 { "${menu.identity.notactive}", 0, 0, "ident.showactive" },
139 { "---", 0, 0, NULL }, 139 { "---", 0, 0, NULL },
140# if !defined (iPlatformAppleDesktop) 140# if !defined (iPlatformAppleDesktop)
141 { add_Icon " ${menu.identity.new}", SDLK_n, KMOD_PRIMARY | KMOD_SHIFT, "ident.new" }, 141 { add_Icon " ${menu.identity.new}", newIdentity_KeyShortcut, "ident.new" },
142 { "${menu.identity.import}", SDLK_i, KMOD_PRIMARY | KMOD_SHIFT, "ident.import" }, 142 { "${menu.identity.import}", SDLK_i, KMOD_PRIMARY | KMOD_SHIFT, "ident.import" },
143 { "---", 0, 0, NULL }, 143 { "---", 0, 0, NULL },
144 { person_Icon " ${menu.show.identities}", '4', KMOD_PRIMARY, "sidebar.mode arg:3 show:1" }, 144 { person_Icon " ${menu.show.identities}", '4', KMOD_PRIMARY, "sidebar.mode arg:3 show:1" },
@@ -156,10 +156,10 @@ static const char *pageMenuCStr_ = midEllipsis_Icon;
156/* TODO: A preference for these, maybe? */ 156/* TODO: A preference for these, maybe? */
157static const char *stopSeqCStr_[] = { 157static const char *stopSeqCStr_[] = {
158 /* Corners */ 158 /* Corners */
159 uiTextCaution_ColorEscape "\U0000230c", 159 uiTextCaution_ColorEscape "\U0000231c",
160 uiTextCaution_ColorEscape "\U0000230d", 160 uiTextCaution_ColorEscape "\U0000231d",
161 uiTextCaution_ColorEscape "\U0000230f", 161 uiTextCaution_ColorEscape "\U0000231f",
162 uiTextCaution_ColorEscape "\U0000230e", 162 uiTextCaution_ColorEscape "\U0000231e",
163#if 0 163#if 0
164 /* Rotating arrow */ 164 /* Rotating arrow */
165 uiTextCaution_ColorEscape "\U00002b62", 165 uiTextCaution_ColorEscape "\U00002b62",
@@ -276,6 +276,9 @@ void destroyPending_Root(iRoot *d) {
276 if (!isFinished_Anim(&widget->visualOffset)) { 276 if (!isFinished_Anim(&widget->visualOffset)) {
277 continue; 277 continue;
278 } 278 }
279 if (widget->flags & keepOnTop_WidgetFlag) {
280 removeOne_PtrArray(onTop_Root(widget->root), widget);
281 }
279 if (widget->parent) { 282 if (widget->parent) {
280 removeChild_Widget(widget->parent, widget); 283 removeChild_Widget(widget->parent, widget);
281 } 284 }
@@ -435,11 +438,11 @@ static void updateNavBarIdentity_(iWidget *navBar) {
435 setFlags_Widget(tool, selected_WidgetFlag, ident != NULL); 438 setFlags_Widget(tool, selected_WidgetFlag, ident != NULL);
436 /* Update menu. */ 439 /* Update menu. */
437 iLabelWidget *idItem = child_Widget(findChild_Widget(button, "menu"), 0); 440 iLabelWidget *idItem = child_Widget(findChild_Widget(button, "menu"), 0);
441 const iString *subjectName = ident ? name_GmIdentity(ident) : NULL;
438 setTextCStr_LabelWidget( 442 setTextCStr_LabelWidget(
439 idItem, 443 idItem,
440 ident ? format_CStr(uiTextAction_ColorEscape "%s", 444 subjectName ? format_CStr(uiTextAction_ColorEscape "%s", cstr_String(subjectName))
441 cstrCollect_String(subject_TlsCertificate(ident->cert))) 445 : "${menu.identity.notactive}");
442 : "${menu.identity.notactive}");
443 setFlags_Widget(as_Widget(idItem), disabled_WidgetFlag, !ident); 446 setFlags_Widget(as_Widget(idItem), disabled_WidgetFlag, !ident);
444} 447}
445 448
@@ -1046,7 +1049,7 @@ void createUserInterface_Root(iRoot *d) {
1046 moveToParentRightEdge_WidgetFlag); 1049 moveToParentRightEdge_WidgetFlag);
1047 /* Feeds refresh indicator is inside the input field. */ { 1050 /* Feeds refresh indicator is inside the input field. */ {
1048 iLabelWidget *queryInd = 1051 iLabelWidget *queryInd =
1049 new_LabelWidget(uiTextAction_ColorEscape "${status.query} \u21a9", NULL); 1052 new_LabelWidget(uiTextAction_ColorEscape "${status.query} " return_Icon, NULL);
1050 setId_Widget(as_Widget(queryInd), "input.indicator.search"); 1053 setId_Widget(as_Widget(queryInd), "input.indicator.search");
1051 setBackgroundColor_Widget(as_Widget(queryInd), uiBackground_ColorId); 1054 setBackgroundColor_Widget(as_Widget(queryInd), uiBackground_ColorId);
1052 setFrameColor_Widget(as_Widget(queryInd), uiTextAction_ColorId); 1055 setFrameColor_Widget(as_Widget(queryInd), uiTextAction_ColorId);
@@ -1305,11 +1308,11 @@ void createUserInterface_Root(iRoot *d) {
1305 { "${menu.split.merge}", '1', 0, "ui.split arg:0" }, 1308 { "${menu.split.merge}", '1', 0, "ui.split arg:0" },
1306 { "${menu.split.swap}", SDLK_x, 0, "ui.split swap:1" }, 1309 { "${menu.split.swap}", SDLK_x, 0, "ui.split swap:1" },
1307 { "---", 0, 0, NULL }, 1310 { "---", 0, 0, NULL },
1308 { "${menu.split.horizontal}", '2', 0, "ui.split arg:3 axis:0" }, 1311 { "${menu.split.horizontal}", '3', 0, "ui.split arg:3 axis:0" },
1309 { "${menu.split.horizontal} 1:2", SDLK_d, 0, "ui.split arg:1 axis:0" }, 1312 { "${menu.split.horizontal} 1:2", SDLK_d, 0, "ui.split arg:1 axis:0" },
1310 { "${menu.split.horizontal} 2:1", SDLK_e, 0, "ui.split arg:2 axis:0" }, 1313 { "${menu.split.horizontal} 2:1", SDLK_e, 0, "ui.split arg:2 axis:0" },
1311 { "---", 0, 0, NULL }, 1314 { "---", 0, 0, NULL },
1312 { "${menu.split.vertical}", '3', 0, "ui.split arg:3 axis:1" }, 1315 { "${menu.split.vertical}", '2', 0, "ui.split arg:3 axis:1" },
1313 { "${menu.split.vertical} 1:2", SDLK_f, 0, "ui.split arg:1 axis:1" }, 1316 { "${menu.split.vertical} 1:2", SDLK_f, 0, "ui.split arg:1 axis:1" },
1314 { "${menu.split.vertical} 2:1", SDLK_r, 0, "ui.split arg:2 axis:1" }, 1317 { "${menu.split.vertical} 2:1", SDLK_r, 0, "ui.split arg:2 axis:1" },
1315 }, 10); 1318 }, 10);