summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-11-23 12:19:30 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-11-23 12:19:30 +0200
commit785e057d7170243bf822912e4d669dab2bbe21de (patch)
treec643126ec44e6e08716540fad4916413ef6b6164
parent54f142bb093765e19fcee30cc5ffe9c63b67abd6 (diff)
SidebarWidget: Redesigned Feeds action toolbar
The action toolbar now has a button for marking all as read, and keyboard shortcuts for switching between Unread and All modes.
-rw-r--r--po/en.po3
-rw-r--r--res/lang/cs.binbin30731 -> 30757 bytes
-rw-r--r--res/lang/de.binbin29732 -> 29758 bytes
-rw-r--r--res/lang/en.binbin25846 -> 25872 bytes
-rw-r--r--res/lang/eo.binbin24795 -> 24821 bytes
-rw-r--r--res/lang/es.binbin29563 -> 29589 bytes
-rw-r--r--res/lang/es_MX.binbin26902 -> 26928 bytes
-rw-r--r--res/lang/fi.binbin29398 -> 29424 bytes
-rw-r--r--res/lang/fr.binbin29783 -> 29809 bytes
-rw-r--r--res/lang/gl.binbin28752 -> 28778 bytes
-rw-r--r--res/lang/hu.binbin30575 -> 30601 bytes
-rw-r--r--res/lang/ia.binbin27902 -> 27928 bytes
-rw-r--r--res/lang/ie.binbin28490 -> 28516 bytes
-rw-r--r--res/lang/isv.binbin24566 -> 24592 bytes
-rw-r--r--res/lang/pl.binbin29178 -> 29204 bytes
-rw-r--r--res/lang/ru.binbin43876 -> 43902 bytes
-rw-r--r--res/lang/sk.binbin24899 -> 24925 bytes
-rw-r--r--res/lang/sr.binbin43326 -> 43352 bytes
-rw-r--r--res/lang/tok.binbin26612 -> 26638 bytes
-rw-r--r--res/lang/uk.binbin43207 -> 43233 bytes
-rw-r--r--res/lang/zh_Hans.binbin24800 -> 24826 bytes
-rw-r--r--res/lang/zh_Hant.binbin24995 -> 25021 bytes
-rw-r--r--src/ui/labelwidget.c2
-rw-r--r--src/ui/sidebarwidget.c24
-rw-r--r--src/ui/util.c4
25 files changed, 25 insertions, 8 deletions
diff --git a/po/en.po b/po/en.po
index 8204afec..5066c847 100644
--- a/po/en.po
+++ b/po/en.po
@@ -406,6 +406,9 @@ msgstr "Identities"
406msgid "sidebar.outline" 406msgid "sidebar.outline"
407msgstr "Outline" 407msgstr "Outline"
408 408
409msgid "sidebar.action.show"
410msgstr "Show:"
411
409msgid "sidebar.action.feeds.showall" 412msgid "sidebar.action.feeds.showall"
410msgstr "All" 413msgstr "All"
411 414
diff --git a/res/lang/cs.bin b/res/lang/cs.bin
index ae978667..13a06323 100644
--- a/res/lang/cs.bin
+++ b/res/lang/cs.bin
Binary files differ
diff --git a/res/lang/de.bin b/res/lang/de.bin
index b1722d2b..55b390ce 100644
--- a/res/lang/de.bin
+++ b/res/lang/de.bin
Binary files differ
diff --git a/res/lang/en.bin b/res/lang/en.bin
index 344dfa6a..1c7dfcba 100644
--- a/res/lang/en.bin
+++ b/res/lang/en.bin
Binary files differ
diff --git a/res/lang/eo.bin b/res/lang/eo.bin
index 2e902f76..52235451 100644
--- a/res/lang/eo.bin
+++ b/res/lang/eo.bin
Binary files differ
diff --git a/res/lang/es.bin b/res/lang/es.bin
index cd5c0811..b793d5b9 100644
--- a/res/lang/es.bin
+++ b/res/lang/es.bin
Binary files differ
diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin
index 5cea30c9..06d38e55 100644
--- a/res/lang/es_MX.bin
+++ b/res/lang/es_MX.bin
Binary files differ
diff --git a/res/lang/fi.bin b/res/lang/fi.bin
index 3066e970..27ad7ba6 100644
--- a/res/lang/fi.bin
+++ b/res/lang/fi.bin
Binary files differ
diff --git a/res/lang/fr.bin b/res/lang/fr.bin
index 733db93c..141df204 100644
--- a/res/lang/fr.bin
+++ b/res/lang/fr.bin
Binary files differ
diff --git a/res/lang/gl.bin b/res/lang/gl.bin
index 3f7fca1d..b30684ab 100644
--- a/res/lang/gl.bin
+++ b/res/lang/gl.bin
Binary files differ
diff --git a/res/lang/hu.bin b/res/lang/hu.bin
index 95cb23a9..9d100d45 100644
--- a/res/lang/hu.bin
+++ b/res/lang/hu.bin
Binary files differ
diff --git a/res/lang/ia.bin b/res/lang/ia.bin
index 5307f916..ef621e77 100644
--- a/res/lang/ia.bin
+++ b/res/lang/ia.bin
Binary files differ
diff --git a/res/lang/ie.bin b/res/lang/ie.bin
index b89c350f..64e6b7bf 100644
--- a/res/lang/ie.bin
+++ b/res/lang/ie.bin
Binary files differ
diff --git a/res/lang/isv.bin b/res/lang/isv.bin
index 3bd7acc2..b9e88984 100644
--- a/res/lang/isv.bin
+++ b/res/lang/isv.bin
Binary files differ
diff --git a/res/lang/pl.bin b/res/lang/pl.bin
index b51ae42b..c58632ba 100644
--- a/res/lang/pl.bin
+++ b/res/lang/pl.bin
Binary files differ
diff --git a/res/lang/ru.bin b/res/lang/ru.bin
index a6df8daf..b0128aae 100644
--- a/res/lang/ru.bin
+++ b/res/lang/ru.bin
Binary files differ
diff --git a/res/lang/sk.bin b/res/lang/sk.bin
index a7ea4b57..714e0d4f 100644
--- a/res/lang/sk.bin
+++ b/res/lang/sk.bin
Binary files differ
diff --git a/res/lang/sr.bin b/res/lang/sr.bin
index 644dc759..7729cf9d 100644
--- a/res/lang/sr.bin
+++ b/res/lang/sr.bin
Binary files differ
diff --git a/res/lang/tok.bin b/res/lang/tok.bin
index 1fa86a8d..ff7538b0 100644
--- a/res/lang/tok.bin
+++ b/res/lang/tok.bin
Binary files differ
diff --git a/res/lang/uk.bin b/res/lang/uk.bin
index 4eb7acf6..a17c7aaa 100644
--- a/res/lang/uk.bin
+++ b/res/lang/uk.bin
Binary files differ
diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin
index 10a91560..66dbe965 100644
--- a/res/lang/zh_Hans.bin
+++ b/res/lang/zh_Hans.bin
Binary files differ
diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin
index 1f4bc3de..69d0afe2 100644
--- a/res/lang/zh_Hant.bin
+++ b/res/lang/zh_Hant.bin
Binary files differ
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c
index daca05d1..46bdc890 100644
--- a/src/ui/labelwidget.c
+++ b/src/ui/labelwidget.c
@@ -421,7 +421,7 @@ static void draw_LabelWidget_(const iLabelWidget *d) {
421 else { 421 else {
422 drawCenteredOutline_Text( 422 drawCenteredOutline_Text(
423 d->font, 423 d->font,
424 adjusted_Rect(bounds, add_I2(zero_I2(), init_I2(iconPad, 0)), neg_I2(zero_I2())), 424 adjusted_Rect(bounds, init_I2(iconPad * 1.5f, 0), init_I2(-iconPad, 0)),
425 d->flags.alignVisual, 425 d->flags.alignVisual,
426 d->flags.drawAsOutline ? fg : none_ColorId, 426 d->flags.drawAsOutline ? fg : none_ColorId,
427 d->flags.drawAsOutline ? d->widget.bgColor : fg, 427 d->flags.drawAsOutline ? d->widget.bgColor : fg,
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 5d627dda..581a7bb2 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -346,10 +346,24 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
346 } 346 }
347 } 347 }
348 /* Actions. */ { 348 /* Actions. */ {
349 addActionButton_SidebarWidget_(d, "${sidebar.action.feeds.showall}", "feeds.mode arg:0", 349 addActionButton_SidebarWidget_(
350 d->feedsMode == all_FeedsMode ? selected_WidgetFlag : 0); 350 d, check_Icon " ${feeds.markallread}", "feeds.markallread", expand_WidgetFlag);
351 addActionButton_SidebarWidget_(d, "${sidebar.action.feeds.showunread}", "feeds.mode arg:1", 351 addChild_Widget(d->actions, iClob(new_LabelWidget("${sidebar.action.show}", NULL)));
352 d->feedsMode == unread_FeedsMode ? selected_WidgetFlag : 0); 352 const iMenuItem items[] = {
353 { "${sidebar.action.feeds.showall}", SDLK_u, KMOD_SHIFT, "feeds.mode arg:0" },
354 { "${sidebar.action.feeds.showunread}", SDLK_u, 0, "feeds.mode arg:1" },
355 };
356 iWidget *dropButton = addChild_Widget(
357 d->actions,
358 iClob(makeMenuButton_LabelWidget(items[d->feedsMode].label, items, 2)));
359 setFixedSize_Widget(
360 dropButton,
361 init_I2(measure_Text(
362 default_FontId,
363 translateCStr_Lang(items[findWidestLabel_MenuItem(items, 2)].label))
364 .advance.x +
365 6 * gap_UI,
366 -1));
353 } 367 }
354 d->menu = makeMenu_Widget( 368 d->menu = makeMenu_Widget(
355 as_Widget(d), 369 as_Widget(d),
@@ -995,7 +1009,7 @@ iBool handleBookmarkEditorCommands_SidebarWidget_(iWidget *editor, const char *c
995 setBookmarkEditorFolder_Widget(editor, arg_Command(cmd)); 1009 setBookmarkEditorFolder_Widget(editor, arg_Command(cmd));
996 return iTrue; 1010 return iTrue;
997 } 1011 }
998 if (equal_Command(cmd, "bmed.accept") || equal_Command(cmd, "cancel")) { 1012 if (equal_Command(cmd, "bmed.accept") || equal_Command(cmd, "bmed.cancel")) {
999 iAssert(startsWith_String(id_Widget(editor), "bmed.")); 1013 iAssert(startsWith_String(id_Widget(editor), "bmed."));
1000 iSidebarWidget *d = findWidget_App(cstr_String(id_Widget(editor)) + 5); /* bmed.sidebar */ 1014 iSidebarWidget *d = findWidget_App(cstr_String(id_Widget(editor)) + 5); /* bmed.sidebar */
1001 if (equal_Command(cmd, "bmed.accept")) { 1015 if (equal_Command(cmd, "bmed.accept")) {
diff --git a/src/ui/util.c b/src/ui/util.c
index ba6a2538..e718631d 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -2811,7 +2811,7 @@ static const iArray *makeBookmarkFolderItems_(void) {
2811 2811
2812iWidget *makeBookmarkEditor_Widget(void) { 2812iWidget *makeBookmarkEditor_Widget(void) {
2813 const iMenuItem actions[] = { 2813 const iMenuItem actions[] = {
2814 { "${cancel}" }, 2814 { "${cancel}", 0, 0, "bmed.cancel" },
2815 { uiTextCaution_ColorEscape "${dlg.bookmark.save}", SDLK_RETURN, KMOD_PRIMARY, "bmed.accept" } 2815 { uiTextCaution_ColorEscape "${dlg.bookmark.save}", SDLK_RETURN, KMOD_PRIMARY, "bmed.accept" }
2816 }; 2816 };
2817 if (isUsingPanelLayout_Mobile()) { 2817 if (isUsingPanelLayout_Mobile()) {
@@ -2891,7 +2891,7 @@ static iBool handleBookmarkCreationCommands_SidebarWidget_(iWidget *editor, cons
2891 setBookmarkEditorFolder_Widget(editor, arg_Command(cmd)); 2891 setBookmarkEditorFolder_Widget(editor, arg_Command(cmd));
2892 return iTrue; 2892 return iTrue;
2893 } 2893 }
2894 if (equal_Command(cmd, "bmed.accept") || equal_Command(cmd, "cancel")) { 2894 if (equal_Command(cmd, "bmed.accept") || equal_Command(cmd, "bmed.cancel")) {
2895 if (equal_Command(cmd, "bmed.accept")) { 2895 if (equal_Command(cmd, "bmed.accept")) {
2896 const iString *title = text_InputWidget(findChild_Widget(editor, "bmed.title")); 2896 const iString *title = text_InputWidget(findChild_Widget(editor, "bmed.title"));
2897 const iString *url = text_InputWidget(findChild_Widget(editor, "bmed.url")); 2897 const iString *url = text_InputWidget(findChild_Widget(editor, "bmed.url"));