feat(Tray): handle item unregister

This commit is contained in:
Alexis
2018-09-04 23:50:08 +02:00
parent fc6e42d748
commit 20ff2cab9e
12 changed files with 127 additions and 107 deletions

View File

@ -7,8 +7,12 @@ namespace waybar::modules::SNI {
class Item {
public:
Item(std::string, std::string, Glib::Dispatcher&);
~Item();
Item(std::string, std::string, Glib::Dispatcher*);
std::string bus_name;
std::string object_path;
Gtk::EventBox event_box;
int icon_size;
int effective_icon_size;
Gtk::Image* image;
@ -31,9 +35,7 @@ class Item {
void updateImage();
Glib::RefPtr<Gdk::Pixbuf> getIconByName(std::string name, int size);
std::string bus_name_;
std::string object_path_;
Glib::Dispatcher& dp_;
Glib::Dispatcher* dp_;
GCancellable* cancellable_ = nullptr;
SnOrgKdeStatusNotifierItem* proxy_ = nullptr;
};