blob: 27f89d2011d5bc98433168b2a4649650a9c52ece (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef NEWSBOAT_DIRBROWSERFORMACTION_H
#define NEWSBOAT_DIRBROWSERFORMACTION_H
#include <sys/stat.h>
#include <grp.h>
#include "configcontainer.h"
#include "filesystembrowser.h"
#include "formaction.h"
#include "listformatter.h"
#include "listwidget.h"
namespace newsboat {
class DirBrowserFormAction : public FormAction {
public:
DirBrowserFormAction(View*, std::string formstr, ConfigContainer* cfg);
~DirBrowserFormAction() override;
void prepare() override;
void init() override;
const std::vector<KeyMapHintEntry>& get_keymap_hint() const override;
std::string id() const override
{
return "dirbrowser";
}
std::string title() override;
private:
bool process_operation(Operation op,
bool automatic = false,
std::vector<std::string>* args = nullptr) override;
void update_title(const std::string& working_directory);
void add_directory(ListFormatter& listfmt,
std::vector<FileSystemBrowser::FileSystemEntry>& id_at_position,
std::string dirname);
std::vector<FileSystemBrowser::FileSystemEntry> id_at_position;
std::string get_formatted_dirname(std::string dirname, mode_t mode);
std::string cwd;
ListWidget files_list;
};
} // namespace newsboat
#endif //NEWSBOAT_DIRBROWSERFORMACTION_H
|