Merge lp:~julien-spautz/switchboard-plug-power/code-cleanup into lp:~elementary-apps/switchboard-plug-power/trunk
Proposed by
Julien Spautz
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 53 | ||||||||||||
Proposed branch: | lp:~julien-spautz/switchboard-plug-power/code-cleanup | ||||||||||||
Merge into: | lp:~elementary-apps/switchboard-plug-power/trunk | ||||||||||||
Diff against target: |
456 lines (+132/-319) 1 file modified
src/power.vala (+132/-319) |
||||||||||||
To merge this branch: | bzr merge lp:~julien-spautz/switchboard-plug-power/code-cleanup | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Cody Garver (community) | Approve | ||
David Gomes (community) | Needs Fixing | ||
Review via email: mp+147555@code.launchpad.net |
Description of the change
src/power.vala has been mostly rewritten to avoid redundancy, following other changes have been made:
- a string has been changed to "When battery power is critically low:" (bug-fix)
- the comboboxes support all possible gsettings values (bug-fix)
- everything is in the same grid for better alignment (bug-fix)
- external changes (e.g. from dconf-editor) are monitored and changed in the plug accordingly
- suspend and hibernate buttons are now supported
To post a comment you must log in.
Code style stuff: inactive- "+type+ "-timeout" ;", space out the plus signs - "var scale_settings = "sleep-inactive-" + type + "-timeout";" and maybe format the string.
-> Don't align stuff like on diff's 420 and 378, and 437-438 and 442-443 (there are others I think).
-> Don't add an empty newline like on diff's 339, 371 and 451 (but there are others).
-> Like 375 and 376, those aligned lines, fix them (there are others).
-> Line 392 - "var scale_settings = "sleep-
Basically, most of what is wrong is aligning stuff.
It's "Needs Fixing" for now because of the code.
I tested the plug and it looks alright, but I can't run a full test because I don't use elementary OS.