diff --git a/TODO.txt b/TODO.txt index 1c3b883..2819d51 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,13 +1,15 @@ -* Feeds list - * Update when feeds are edited * Store feeds in kEnqueueFeeds/etc messages as paths? hmm - * This way, if the user edits the feed after it is enqueued, the changes - will be applied. + * This way, if the user edits the feed after it is enqueued but before + processing, the changes will be applied. * Support for clearing queue * Revamp configuration * Fix saving, etc. * Show progress * With progress bar + * Ran into a slight problem when trying to set the maxValue and + value when in MainWindow::MessageReceived (kProgress)-- it would + crash every time, without fail. Even with float constants that + work when used in MainWindow::_InitInterface. Weird, idk * With indicator in the feeds list * Configurations * Remove unnecessary `new`-- make sure to delete everything @@ -24,3 +26,6 @@ up as necessary, and kill when everything's done. * That'd require a proper queue system, instead of just spamming data to the download thread lol + * Using a proper queue list would give faster + results to Notifer about how many feeds are + enqueued (so things *feel* faster) diff --git a/src/FeedEditWindow.h b/src/FeedEditWindow.h new file mode 100644 index 0000000..9acea6b --- /dev/null +++ b/src/FeedEditWindow.h @@ -0,0 +1,53 @@ +/* + * Copyright 2021, Jaidyn Levesque + * All rights reserved. Distributed under the terms of the MIT license. + */ +#ifndef FEEDEDIT_H +#define FEEDEDIT_H + +#include + +class BButton; +class BStringView; +class BTextControl; +class Feed; +class FeedListItem; + + +enum +{ + kSaveButton = 'esav', + kDeleteButton = 'edel' +}; + + +class FeedEditWindow : public BWindow { +public: + FeedEditWindow(); + FeedEditWindow(BEntry feedEntry); + FeedEditWindow(FeedListItem* feedItem); + + void MessageReceived(BMessage* msg); + +private: + void _InitInterface(); + + void _SaveFeed(); + void _DeleteFeed(); + + BString fFeedPath; + Feed* fFeed; + + BStringView* fFeedNameLabel; + BTextControl* fFeedNameText; + BStringView* fFeedUrlLabel; + BTextControl* fFeedUrlText; + + BButton* fSaveButton; + BButton* fDeleteButton; + +}; + + +#endif // FEEDEDIT_H +