Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Settings Settings
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 922
    • Issues 922
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 78
    • Merge requests 78
  • 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
  • !772

keyboard: remove shortcuts_model

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ian Douglas Scott requested to merge ids1024/gnome-control-center:shortcuts_model into master Jun 26, 2020
  • Overview 2
  • Commits 3
  • Pipelines 3
  • Changes 5

This appears to be largely vestigial code from a time when a GtkTreeView was used here. It is very confusing, because someone reading the code expects this to be critical to what's displayed on the screen, but it isn't.

If I understand correctly, the only place this was still useful for something was in cc_keyboard_manager_remove_custom_shortcut(), to check that the CcKeyboardItem is valid. If I understand, this is a sanity check that should never fail, so this seems unnecessary, and I've removed it.

If that check is actually important, it would be better to have a GHashTable of custom shortcuts, which should be simpler and clearer.

sections_store should similarly be removed/replaced. It seems to only be needed in add_shortcuts(). But that seems like it can't just be removed, so I haven't changed that yet.

Edited Jun 29, 2020 by Ian Douglas Scott
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: shortcuts_model