Commit graph

12 commits

Author SHA1 Message Date
George Bișoc
28b277aa42
[STOBJECT] Display the estimated battery time when hovering the battery icon
We do have IDS_PWR_HOURS_REMAINING and IDS_PWR_MINUTES_REMAINING string resources but they're never used programmatically.
Display the estimated battery time ONLY if the returned time is not unknown.

CORE-18969
CORE-19452
2024-12-17 14:34:30 +01:00
George Bișoc
07a76b3dec
[STOBJECT] Do not report the remaining battery capacity if it is unknown
Support for system batteries in ReactOS is really minimal to the point of non-existing. We are detecting the presence of any upcoming battery but since there's lacking in critical code that deals with communication
between PO and the battery class driver as the battery systray icon uses GetSystemPowerStatus to gather battery info which in turn inquires the power manager via NtPowerInformation(SystemBatteryState), we have
to report to the user that the remaining capacity is unknown rather than returning a pseudo capacity value.

Technically this so called "pesudo" value is just a construct denoted as BATTERY_PERCENTAGE_UNKNOWN. Not reporting the actual remaining capacity makes sense, as there could be a scenario where the battery may not
properly report its real datum, therefore it's best to be honest to the user what's really going on.

CORE-19452
CORE-18969
2024-08-13 14:17:04 +02:00
Hermès Bélusca-Maïto
9393fc320e
[FORMATTING] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
2021-09-13 03:52:22 +02:00
Eric Kohl
8c30fdab1c [STOBJECT] Store the "Show x icon in the taskbar" setting for the hotplug, power and volume icons.
CORE-12365
CORE-12972
CORE-15234
2019-04-23 00:12:23 +02:00
Eric Kohl
754a35b210 [STOBJECT] Mark hotplug, power and volume context menu default items 2019-04-22 10:36:17 +02:00
Eric Kohl
453e5bc2af [STOBJECT] Improvements to the power notification icon
- Use GetSystemPowerStatus() instead of querying each battery.
- Add an ugly AC power icon. Should be fixed or replaced.
- Display AC power, battery charging, battery depleting and error cases. The AC power case was missing.
- Update some strings because we are no longer using float for the charge percentage.

@Turkish translators: Please check and update the translation of IDS_PWR_CHARGING!
2019-04-19 21:54:37 +02:00
Eric Kohl
282b4397e0 [STOBJECT] Use double click time for the single click timers instead of a fixed timeout. 2018-03-06 20:43:04 +01:00
Eric Kohl
2baafa61c6 [STOBJECT] Use timers to distinguish between single and double clicks
- Volume, Power and Hotplug icon: Use timers to distinguish between single and double clicks.
- Volume icon: Show the tray volume dialog on a single click.
2018-02-28 20:29:29 +01:00
Amine Khaldi
e15874b491 [STOBJECT] Improve the existing PCH and make use of it. 2017-12-08 23:15:31 +01:00
Giannis Adamopoulos
a4576f5509 [STOBJECT] Fix build on linux 2017-10-16 18:21:02 +03:00
Shriraj Sawant
7fbc5f4230 [STOBJECT] Implement the hotplug and the power icons in the system tray 2017-10-16 17:51:19 +03:00
Colin Finck
c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Renamed from reactos/dll/shellext/stobject/power.cpp (Browse further)