mirror of
https://github.com/rad4day/Waybar.git
synced 2025-09-18 16:32:32 +02:00
refactor(modules): prefer sigc::mem_fun
This commit is contained in:
@@ -6,9 +6,7 @@ waybar::modules::Memory::Memory(Json::Value config)
|
||||
_label.get_style_context()->add_class("memory");
|
||||
int interval = _config["interval"] ? _config["inveral"].asInt() : 30;
|
||||
_thread = [this, interval] {
|
||||
Glib::signal_idle().connect_once([this] {
|
||||
update();
|
||||
});
|
||||
Glib::signal_idle().connect_once(sigc::mem_fun(*this, &Memory::update));
|
||||
_thread.sleep_for(chrono::seconds(interval));
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user