Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Settings Settings
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 912
    • Issues 912
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 66
    • Merge requests 66
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • SettingsSettings
  • Merge requests
  • !845

power: Refactor battery row code into a `CcBatteryRow` type

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ian Douglas Scott requested to merge ids1024/gnome-control-center:CcBatteryRow into master Sep 22, 2020
  • Overview 10
  • Commits 4
  • Pipelines 7
  • Changes 7

set_primary() and add_primary() had a lot of redundant code. This unifies them, and moves them to a custom widget called CcBatteryRow. This also decreases the somewhat excessive size of cc-power-panel.c, and makes it easier to see the layout of widgets, now that it's specified in xml.

Before this, warning-battery-offset was set to 0.03 for a "primary" battery, and 0.05 otherwise. I expect this is a bug, so I've changed both to 0.03.

No other style or behavior change is intended.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: CcBatteryRow