diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-27 09:46:17 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-27 09:46:17 +0200 |
commit | e78b773a4c58c016025fa4e5f5d9ee6f5070fa4d (patch) | |
tree | 6af77b5a38afbfc9975a36c3ce30339ed5d27042 /src/ui | |
parent | de350bd1bfd51ee62a866b8f4a980b5cc4a9eeb9 (diff) |
Subscribing via menu; cleanup after unsubscribe
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/sidebarwidget.c | 4 | ||||
-rw-r--r-- | src/ui/window.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index d856f9f8..2edd28a9 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -668,6 +668,9 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
668 | iBookmark *bm = get_Bookmarks(bookmarks_App(), item->id); | 668 | iBookmark *bm = get_Bookmarks(bookmarks_App(), item->id); |
669 | if (hasTag_Bookmark(bm, tag)) { | 669 | if (hasTag_Bookmark(bm, tag)) { |
670 | removeTag_Bookmark(bm, tag); | 670 | removeTag_Bookmark(bm, tag); |
671 | if (!iCmpStr(tag, "subscribed")) { | ||
672 | removeEntries_Feeds(item->id); | ||
673 | } | ||
671 | } | 674 | } |
672 | else { | 675 | else { |
673 | addTag_Bookmark(bm, tag); | 676 | addTag_Bookmark(bm, tag); |
@@ -679,6 +682,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
679 | else if (equal_Command(cmd, "bookmark.delete")) { | 682 | else if (equal_Command(cmd, "bookmark.delete")) { |
680 | const iSidebarItem *item = d->contextItem; | 683 | const iSidebarItem *item = d->contextItem; |
681 | if (d->mode == bookmarks_SidebarMode && item && remove_Bookmarks(bookmarks_App(), item->id)) { | 684 | if (d->mode == bookmarks_SidebarMode && item && remove_Bookmarks(bookmarks_App(), item->id)) { |
685 | removeEntries_Feeds(item->id); | ||
682 | postCommand_App("bookmarks.changed"); | 686 | postCommand_App("bookmarks.changed"); |
683 | } | 687 | } |
684 | return iTrue; | 688 | return iTrue; |
diff --git a/src/ui/window.c b/src/ui/window.c index 637018a9..6e91d644 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -155,7 +155,7 @@ static const iMenuItem viewMenuItems_[] = { | |||
155 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, | 155 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, |
156 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, | 156 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, |
157 | { "---", 0, 0, NULL }, | 157 | { "---", 0, 0, NULL }, |
158 | { "Wrap Preformatted", 0, 0, "forcewrap.toggle" } | 158 | { "Wrap Preformatted", 0, 0, "forcewrap.toggle" } /* TODO: remove this; should scroll preformatted */ |
159 | }; | 159 | }; |
160 | 160 | ||
161 | static iMenuItem bookmarksMenuItems_[] = { | 161 | static iMenuItem bookmarksMenuItems_[] = { |