summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-11 08:41:40 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-11 08:41:40 +0300
commit28330d7b3468b8adafe8a1fc3caa33f43779ad39 (patch)
tree98e6928ae92719987a15fcde3a04deab9c5e4b3d
parente08bf8f56c078ba0e5c2aa363c43ea5db3561aa2 (diff)
Added a "Clear Selection" string
-rw-r--r--po/en.po3
-rw-r--r--src/ui/documentwidget.c4
-rw-r--r--src/ui/window.c1
3 files changed, 6 insertions, 2 deletions
diff --git a/po/en.po b/po/en.po
index 91c2f20c..53068c89 100644
--- a/po/en.po
+++ b/po/en.po
@@ -232,6 +232,9 @@ msgstr "Copy"
232msgid "menu.paste" 232msgid "menu.paste"
233msgstr "Paste" 233msgstr "Paste"
234 234
235msgid "menu.select.clear"
236msgstr "Clear Selection"
237
235msgid "menu.copy.pagelink" 238msgid "menu.copy.pagelink"
236msgstr "Copy Link to Page" 239msgstr "Copy Link to Page"
237 240
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 105a7158..99767584 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -2947,7 +2947,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
2947 d->copyMenu = makeMenu_Widget(w, (iMenuItem[]){ 2947 d->copyMenu = makeMenu_Widget(w, (iMenuItem[]){
2948 { clipCopy_Icon " ${menu.copy}", 0, 0, "copy" }, 2948 { clipCopy_Icon " ${menu.copy}", 0, 0, "copy" },
2949 { "---", 0, 0, NULL }, 2949 { "---", 0, 0, NULL },
2950 { close_Icon " Clear Selection", 0, 0, "document.select arg:0" }, 2950 { close_Icon " ${menu.select.clear}", 0, 0, "document.select arg:0" },
2951 }, 3); 2951 }, 3);
2952 setFlags_Widget(d->copyMenu, noFadeBackground_WidgetFlag, iTrue); 2952 setFlags_Widget(d->copyMenu, noFadeBackground_WidgetFlag, iTrue);
2953 openMenu_Widget(d->copyMenu, pos_Click(&d->click)); 2953 openMenu_Widget(d->copyMenu, pos_Click(&d->click));
@@ -3756,7 +3756,7 @@ static void draw_DocumentWidget_(const iDocumentWidget *d) {
3756 if (flags_Widget(w) & touchDrag_WidgetFlag) { 3756 if (flags_Widget(w) & touchDrag_WidgetFlag) {
3757 iString msg; 3757 iString msg;
3758 init_String(&msg); 3758 init_String(&msg);
3759 format_String(&msg, "Selecting: drag and tap"); 3759 format_String(&msg, "Selecting: drag and tap"); /* TODO: Needed? (N bytes selected?) */
3760 fillRect_Paint(&ctx.paint, (iRect){ topLeft_Rect(bounds), 3760 fillRect_Paint(&ctx.paint, (iRect){ topLeft_Rect(bounds),
3761 init_I2(width_Rect(bounds), lineHeight_Text(uiLabelBold_FontId))}, 3761 init_I2(width_Rect(bounds), lineHeight_Text(uiLabelBold_FontId))},
3762 uiTextAction_ColorId); 3762 uiTextAction_ColorId);
diff --git a/src/ui/window.c b/src/ui/window.c
index 0a5bab6f..716c1d05 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1078,6 +1078,7 @@ static void setupUserInterface_Window(iWindow *d) {
1078 { "${menu.page.copysource}", 'c', KMOD_PRIMARY, "copy" }, 1078 { "${menu.page.copysource}", 'c', KMOD_PRIMARY, "copy" },
1079 { download_Icon " " saveToDownloads_Label, SDLK_s, KMOD_PRIMARY, "document.save" } }, 1079 { download_Icon " " saveToDownloads_Label, SDLK_s, KMOD_PRIMARY, "document.save" } },
1080 14); 1080 14);
1081 setAlignVisually_LabelWidget((iLabelWidget *) reload, iTrue);
1081 } 1082 }
1082 setId_Widget(as_Widget(reload), "reload"); 1083 setId_Widget(as_Widget(reload), "reload");
1083 addChildFlags_Widget(as_Widget(url), iClob(reload), embedFlags | moveToParentRightEdge_WidgetFlag); 1084 addChildFlags_Widget(as_Widget(url), iClob(reload), embedFlags | moveToParentRightEdge_WidgetFlag);