mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
feat: warn user about stopped endless custom module
This commit is contained in:
parent
691fb88057
commit
1d96d57b75
@ -12,7 +12,7 @@ namespace waybar::modules::SNI {
|
||||
|
||||
class Tray : public IModule {
|
||||
public:
|
||||
Tray(const Bar& bar, const Json::Value&);
|
||||
Tray(const Json::Value&);
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget &();
|
||||
private:
|
||||
|
@ -33,7 +33,7 @@ waybar::IModule* waybar::Factory::makeModule(const std::string &name) const
|
||||
}
|
||||
#ifdef HAVE_DBUSMENU
|
||||
if (ref == "tray") {
|
||||
return new waybar::modules::SNI::Tray(bar_, config_[name]);
|
||||
return new waybar::modules::SNI::Tray(config_[name]);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_LIBNL
|
||||
|
@ -49,6 +49,7 @@ void waybar::modules::Custom::continuousWorker()
|
||||
pclose(fp);
|
||||
thread_.stop();
|
||||
output_ = { 1, "" };
|
||||
std::cerr << name_ " just stopped, is it endless?" << std::endl;
|
||||
dp.emit();
|
||||
return;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
waybar::modules::SNI::Tray::Tray(const Bar& bar, const Json::Value &config)
|
||||
waybar::modules::SNI::Tray::Tray(const Json::Value &config)
|
||||
: config_(config), watcher_(), host_(nb_hosts_, config,
|
||||
std::bind(&Tray::onAdd, this, std::placeholders::_1),
|
||||
std::bind(&Tray::onRemove, this, std::placeholders::_1))
|
||||
|
Loading…
Reference in New Issue
Block a user