mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
revert(ALabel): ref on format
This commit is contained in:
parent
aaaa17d94f
commit
8db94f7efd
@ -7,7 +7,7 @@ namespace waybar {
|
|||||||
|
|
||||||
class ALabel : public IModule {
|
class ALabel : public IModule {
|
||||||
public:
|
public:
|
||||||
ALabel(const Json::Value&, const std::string& format);
|
ALabel(const Json::Value&, const std::string format);
|
||||||
virtual ~ALabel() = default;
|
virtual ~ALabel() = default;
|
||||||
virtual auto update() -> void;
|
virtual auto update() -> void;
|
||||||
virtual std::string getIcon(uint16_t, const std::string& alt = "");
|
virtual std::string getIcon(uint16_t, const std::string& alt = "");
|
||||||
@ -24,7 +24,7 @@ class ALabel : public IModule {
|
|||||||
bool handleToggle(GdkEventButton* const& ev);
|
bool handleToggle(GdkEventButton* const& ev);
|
||||||
bool handleScroll(GdkEventScroll*);
|
bool handleScroll(GdkEventScroll*);
|
||||||
bool alt = false;
|
bool alt = false;
|
||||||
const std::string& default_format_;
|
const std::string default_format_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace waybar
|
} // namespace waybar
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
waybar::ALabel::ALabel(const Json::Value& config, const std::string& format)
|
waybar::ALabel::ALabel(const Json::Value& config, const std::string format)
|
||||||
: config_(config),
|
: config_(config),
|
||||||
format_(config_["format"].isString() ? config_["format"].asString() : format),
|
format_(config_["format"].isString() ? config_["format"].asString() : format),
|
||||||
default_format_(format_)
|
default_format_(format_)
|
||||||
|
Loading…
Reference in New Issue
Block a user