10 Commits

Author SHA1 Message Date
justforlxz
2e7a4e6fa9
refactor(power): use onBattery to replace batteryState to check is used battery 2019-06-13 15:08:24 +08:00
justforlxz
4ff0cfba0d
refactor(power): use systemDaemon replace upower dbus interface 2019-05-17 16:18:20 +08:00
justforlxz
6725976464
update ts add add refresh tips data 2019-05-17 16:18:20 +08:00
Carlo Alberto Barbano
4dfd6cabc4 Fix battery icon not updating when charging
Use property BatteryState instead of OnBattery which does not update
when the battery is plugged into a power source (tried on a Matebook D
14).
Battery is considered charging if BatteryState is 1 (charging) or
4 (fully charged).

Change-Id: I5a0cf7bf8ee4cd313af885322d1edb67868c555a
2019-05-06 12:19:28 +02:00
Carlo Alberto Barbano
b6fa4335eb Add remaining time to battery indicator
Add a QDBusConnection to org.freedesktop.UPower to DBusPower in
dbuspower.cpp.

Add a QDBusInterface (m_uPowerInter) to PowerPlugin in powerplugin.h to
retrieve the correct battery device (calling 'EnumerateDevices'). Add a
QDBusInterface (m_uBatteryDeviceInter) to PowerPlugin in powerplugin.h
to gather battery time to empty and to fully recharged, and display it
in the power widget tip.

Add BatteryState enum in powerplugin.h to replace BATTERY_DISCHARED and
BATTERY_FULL macros, and add support for all the battery states provided
by UPower.

Change-Id: Ia4677298a1d13cab1e1a03035dbe4a2e660f994b
2019-05-06 12:19:28 +02:00
listenerri
8ae30ec2d1 feat: update all plugins to support take effect in time for Deepin-Sync
Change-Id: I6fec9ab494eede8a4b0f35e62ccd6f4c749ded09
2019-01-30 18:02:18 +08:00
listenerri
7a5501e53d feat: update plugin API version
Note:

1. add a new function in PluginProxyInterface for set applet widget
visible from  a plugin.

2. remove requestContextMenu function from PluginProxyInterface,
cause's the context menu should be handled in Dock, it is enough for
a plugin to simply provide menu data and handle callbacks with
functions itemContextMenu and invokedMenuItem in PluginsItemInterface

https://github.com/linuxdeepin/internal-discussion/issues/646

Change-Id: Ic4af4eee138e87911ff5b18ccbbb0c3f7187ac4d
2018-12-18 11:28:36 +08:00
listenerri
16f10b665c fix: tray icon do not change after system icon theme has changed
https://tower.im/projects/e4ae1ad0b5d5497fb4b7c14fe2d2efbf/todos/d9725c7eddce0c87e5ef5f1939d1964a/

Change-Id: Id094f51c7426f321a1628fdd5e3128d6356c9353
2018-12-07 16:59:06 +08:00
listenerri
8105f8b9f3 refactor: plugins default sort order
Change-Id: I5ab49d88c970bd66c63a6fe6d82cab08d2f4606a
2018-11-21 18:22:22 +08:00
listenerri
b689dbece2 refactor: tray plugin
- tray plugin support load dock plugin as system trays
- move network,sound,power plugins out of tray plugin, keepin them still be plugins

Change-Id: I03463ef55a9abc9823c1b9f7d9c95b00158e63ed
2018-11-15 17:37:05 +08:00