refactor: proper modules destruction

This commit is contained in:
Alexis
2018-12-26 11:13:36 +01:00
parent 8af813c2f1
commit 399f61df98
25 changed files with 284 additions and 216 deletions

View File

@ -1,7 +1,6 @@
#pragma once
#include <fmt/format.h>
#include <thread>
#include "bar.hpp"
#include "util/json.hpp"
#include "IModule.hpp"
@ -13,6 +12,7 @@ namespace waybar::modules::SNI {
class Tray : public IModule {
public:
Tray(const std::string&, const Json::Value&);
~Tray() = default;
auto update() -> void;
operator Gtk::Widget &();
private:
@ -20,7 +20,6 @@ class Tray : public IModule {
void onRemove(std::unique_ptr<Item>& item);
static inline std::size_t nb_hosts_ = 0;
std::thread thread_;
const Json::Value& config_;
Gtk::Box box_;
SNI::Watcher watcher_ ;