refactor(modules): Move setup to constructor

This commit is contained in:
Michael Carlberg 2016-12-21 08:00:09 +01:00
parent 81e6fb062f
commit c01f111e34
52 changed files with 100 additions and 149 deletions
include/modules

View file

@ -5,20 +5,20 @@
POLYBAR_NS
namespace modules {
struct menu_tree_item {
string exec;
label_t label;
};
struct menu_tree {
vector<unique_ptr<menu_tree_item>> items;
};
class menu_module : public static_module<menu_module> {
public:
using static_module::static_module;
struct menu_tree_item {
string exec;
label_t label;
};
struct menu_tree {
vector<unique_ptr<menu_tree_item>> items;
};
public:
explicit menu_module(const bar_settings&, string);
void setup();
bool build(builder* builder, const string& tag) const;
bool handle_event(string cmd);
bool receive_events() const;