! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Power manager notification: Shows for all battery types
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description haarp 2020-04-12 19:38:26 CEST
xfce4-power-manager handles all batteries managed by upower, which also includes attached devices such as wireless mice. When the state of such a device changes, it shows a notification such as "Your Battery is discharging". This can be confusing. One can assume that the laptop charger just broke or the cable is faulty, when in fact it was juwt the mouse :)

Power Manager should probably only show notifications for devices with the PowerSupply flag set to true. Or alternatively, include the device name in the notification so the user can distinguish power events.

Thanks!
Comment 1 Fabian Baumanis 2020-04-18 22:58:19 CEST
Created attachment 9751 
Proposed patch
Comment 2 Fabian Baumanis 2020-04-18 22:59:30 CEST
Hi,

i created a patch for this issue. Now xfce4-powre-manager shows also the battery vendor and battery model in the notification.
Comment 3 Fabian Baumanis 2020-04-19 17:08:11 CEST
I've got some feedback on the patch and corrected the behavior. Now the power manager shows the device type in the notification when it's not a display_device.

Before attaching a new patch here, i would like to know where the notification should be.

I suggest that we are placing the device type in brackets next to the bold font heading. What do you think about it?
Comment 4 haarp 2020-04-21 15:51:39 CEST
Thanks, Fabian. Looks like you forgot a comma:

xfpm-battery.c:132:86: error: expected ‘)’ before ‘battery’
  132 |             msg =  g_strdup_printf (_("%s %s\nYour %s is discharging"), vendor, model battery->priv->battery_name);
      |                                                                                      ^~~~~~~~
      |                                                                                      )

I added the comma and tested it. I also noticed that the discharging notification shows the battery name twice, because it is added in the "is discharging" line and again in the "Estimated time left is" line. Other than that it works.

Cheers!
Comment 5 Simon Steinbeiss editbugs 2020-04-22 08:17:22 CEST
I would suggest we create a mockup - can also be text-based - for what notifications should look like.

Example:

| Icon | Power Manager                   |
| Icon | Your battery is discharging |

Furthermore I would consider to replace the (slightly redundant) "Power Manager" subject of the notification. e.g. 

| Icon | Low Power |
| Icon | 14% of Battery remaining |

Or:

| Icon | Battery Time Remaining |
| Icon | You have xx minutes of battery time remaining. |


A few of the current texts are super-obvious and redundant, everybody knows they have to connect to a charger to avoid power running out...
So if you wanna spend some time on good suggestions that would be appreciated. Ideally also include your suggestions with respect to mentioning the device type.
Comment 6 Fabian Baumanis 2020-04-22 19:27:24 CEST
Okay, here are some mockups. (Device type is shown as DevType and first line == heading)

(Dis)Charging:
| Icon | DevType |
| Icon | Battery of DevType is (dis)charging |
| Icon | Estimated time (left/until fully charged): $timestring |

Full charged:
|Icon|DevType|
|Icon|DevType is fully charged|

Low power:
|Icon|Low power|
|Icon|14% remaining for DevType|

Empty battery:
|Icon|DevType|
|Icon|Battery of DevType empty|
Comment 7 Simon Steinbeiss editbugs 2020-04-28 01:16:03 CEST
I think I like all of them, they're quite simple.

Any reason to have two body lines in the first one? Or did you propose this for consistency because the whole notification text in the later proposals (full, low, empty) could also be shown in a single line?
Comment 8 Simon Steinbeiss editbugs 2020-04-28 01:20:22 CEST
I would also suggest comparing a few operating systems or DEs to get close to widespread conventions that are easily understood by everyone (I think the current proposals are fairly close to iOS).
Comment 9 Git Bot editbugs 2020-05-27 01:49:08 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/79.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #16683

Reported by:
haarp
Reported on: 2020-04-12
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
4 users

Version

Attachments

Proposed patch (3.39 KB, patch)
2020-04-18 22:58 CEST , Fabian Baumanis
no flags

Additional information