mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
refactor: AModule
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "IModule.hpp"
|
||||
#include "AModule.hpp"
|
||||
#include "bar.hpp"
|
||||
#include "modules/sni/host.hpp"
|
||||
#include "modules/sni/watcher.hpp"
|
||||
@ -9,19 +9,17 @@
|
||||
|
||||
namespace waybar::modules::SNI {
|
||||
|
||||
class Tray : public IModule {
|
||||
class Tray : public AModule {
|
||||
public:
|
||||
Tray(const std::string&, const Bar&, const Json::Value&);
|
||||
~Tray() = default;
|
||||
auto update() -> void;
|
||||
operator Gtk::Widget&();
|
||||
|
||||
private:
|
||||
void onAdd(std::unique_ptr<Item>& item);
|
||||
void onRemove(std::unique_ptr<Item>& item);
|
||||
|
||||
static inline std::size_t nb_hosts_ = 0;
|
||||
const Json::Value& config_;
|
||||
Gtk::Box box_;
|
||||
SNI::Watcher watcher_;
|
||||
SNI::Host host_;
|
||||
|
Reference in New Issue
Block a user