refactor and shizz
This commit is contained in:
@@ -16,15 +16,16 @@
|
||||
#include <string>
|
||||
|
||||
#include "services/tray.hpp"
|
||||
#include "components/base/button.hpp"
|
||||
|
||||
class TrayIconWidget : public Gtk::Button {
|
||||
class TrayIconWidget : public Button {
|
||||
public:
|
||||
TrayIconWidget(TrayService &service, std::string id);
|
||||
TrayIconWidget(std::string id);
|
||||
|
||||
void update(const TrayService::Item &item);
|
||||
|
||||
private:
|
||||
TrayService &service;
|
||||
TrayService &service = *TrayService::getInstance();
|
||||
std::string id;
|
||||
Gtk::Box container;
|
||||
Gtk::Picture picture;
|
||||
@@ -53,11 +54,11 @@ class TrayIconWidget : public Gtk::Button {
|
||||
|
||||
class TrayWidget : public Gtk::Box {
|
||||
public:
|
||||
explicit TrayWidget(TrayService &service);
|
||||
explicit TrayWidget();
|
||||
~TrayWidget() override;
|
||||
|
||||
private:
|
||||
TrayService &service;
|
||||
TrayService *service = TrayService::getInstance();
|
||||
std::map<std::string, std::unique_ptr<TrayIconWidget>> icons;
|
||||
|
||||
sigc::connection addConnection;
|
||||
|
||||
Reference in New Issue
Block a user