Merge pull request #4316 from erikeah/master

This commit is contained in:
Alexis Rouillard
2025-07-23 08:31:48 +02:00
committed by GitHub

View File

@ -10,7 +10,6 @@ UPower::UPower(const std::string &id, const Json::Value &config)
: AIconLabel(config, "upower", id, "{percentage}", 0, true, true, true), sleeping_{false} { : AIconLabel(config, "upower", id, "{percentage}", 0, true, true, true), sleeping_{false} {
box_.set_name(name_); box_.set_name(name_);
box_.set_spacing(0); box_.set_spacing(0);
box_.set_has_tooltip(AModule::tooltipEnabled());
// Tooltip box // Tooltip box
contentBox_.set_orientation((box_.get_orientation() == Gtk::ORIENTATION_HORIZONTAL) contentBox_.set_orientation((box_.get_orientation() == Gtk::ORIENTATION_HORIZONTAL)
? Gtk::ORIENTATION_VERTICAL ? Gtk::ORIENTATION_VERTICAL
@ -70,8 +69,10 @@ UPower::UPower(const std::string &id, const Json::Value &config)
g_signal_connect(upClient_, "device-removed", G_CALLBACK(deviceRemoved_cb), this); g_signal_connect(upClient_, "device-removed", G_CALLBACK(deviceRemoved_cb), this);
// Subscribe tooltip query events // Subscribe tooltip query events
box_.set_has_tooltip(); box_.set_has_tooltip(AModule::tooltipEnabled());
box_.signal_query_tooltip().connect(sigc::mem_fun(*this, &UPower::queryTooltipCb), false); if (AModule::tooltipEnabled()) {
box_.signal_query_tooltip().connect(sigc::mem_fun(*this, &UPower::queryTooltipCb), false);
}
resetDevices(); resetDevices();
setDisplayDevice(); setDisplayDevice();