Merge pull request #1799 from Keloran/upower-click

This commit is contained in:
Alex 2022-11-25 09:04:31 +01:00 committed by GitHub
commit d2b4076ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -47,6 +47,10 @@ compatible devices in the tooltip.
default: 4 ++
Defines the spacing between the tooltip window edge and the tooltip content.
*on-click*: ++
typeof: string ++
Command to execute when clicked on the module.
# FORMAT REPLACEMENTS
*{percentage}*: The battery capacity in percentage

View File

@ -252,8 +252,7 @@ const std::string UPower::getDeviceStatus(UpDeviceState& state) {
bool UPower::handleToggle(GdkEventButton* const& event) {
std::lock_guard<std::mutex> guard(m_Mutex);
showAltText = !showAltText;
dp.emit();
return true;
return AModule::handleToggle(event);
}
std::string UPower::timeToString(gint64 time) {