-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110431/#review32544
-----------------------------------------------------------


"I didn't know how to do this when it's inside a model"

This should really be done inside the model. The visualization should remain 
just that: a visualization, and the model should do all the data manipulation.

- Aaron J. Seigo


On May 14, 2013, 9:50 p.m., Kai Uwe Broulik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110431/
> -----------------------------------------------------------
> 
> (Updated May 14, 2013, 9:50 p.m.)
> 
> 
> Review request for Plasma and Viranch Mehta.
> 
> 
> Description
> -------
> 
> This patch improves the situation with multiple batteries in the battery 
> monitor by:
>  - Showing the device name instead of just "Battery", ie. your Mouse, if it 
> has a name, will say "Your awesome bluetooth mouse"
>  - Not adding non-powersupply-batteries (eg. mice and others) to the total 
> percentage
> 
> Non-power-supply don't get the "(charging)" suffix as, according to the spec, 
> the chargeState property is not available for such devices and they're always 
> considered discharging, eliminating the usefulness of this label.
> I removed the "Battery 1", "Battery 2" naming from the Popup since it didn't 
> work in the first place (only showed "Battery" here) and I wanted to make it 
> as smart as the tooltip, which, if there is only one battery without a name, 
> it says "Battery" instead of "Battery 1" and if there are, it doesn't just 
> show "Battery $index" but "Battery 1", "Battery 2", but I didn't know how to 
> do this when it's inside a model. Can I have a variable there in QML, like:
> Repeater {
>     …
>     batteryNumer: model["Name"] ? batteryNumber++ : batteryNumber
> }
> so I can skip the named ones and don't end up with Battery 1, My mouse 
> battery, Battery 3?
> 
> I'm also not sure about the "Show battery percentage for each individual 
> battery" setting. Not showing non-powersupply-batteries if unchecked is 
> certainly not an option, but if you just collapse powersupply batteries, you 
> will still end up with more than one battery in the popup, despite its name. 
> So maybe we should drop it altogether and always show all batteries in the 
> popup but only show one icon (that is the sum of all powersupply batteries) 
> on the icon? It shows multiple icons (ie. one for each battery) when placed 
> on the desktop anyway …
> 
> 
> Diffs
> -----
> 
>   plasma/generic/applets/batterymonitor/contents/code/logic.js 974694a 
>   plasma/generic/applets/batterymonitor/contents/config/main.xml fc31b3e 
>   plasma/generic/applets/batterymonitor/contents/ui/PopupDialog.qml 3ffb15f 
>   plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml 
> c69c3a5 
> 
> Diff: http://git.reviewboard.kde.org/r/110431/diff/
> 
> 
> Testing
> -------
> 
> I only have a notebook with a bluetooth mouse, so I couldn't test how it 
> behaves on a desktop machine that doesn't have an internal battery but just a 
> mouse battery attached, or how it behaves with more than one primary battery. 
> More testing is needed.
> 
> 
> File Attachments
> ----------------
> 
> Popup Dialog
>   
> http://git.reviewboard.kde.org/media/uploaded/files/2013/05/14/bluetoothmouse4.png
> 
> 
> Thanks,
> 
> Kai Uwe Broulik
> 
>

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to