After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739933 - Make initActions better.
Make initActions better.
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2014-11-10 23:35 UTC by Mattias Bengtsson
Modified: 2014-11-11 06:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Utils: Simplify initActions (6.08 KB, patch)
2014-11-10 23:35 UTC, Mattias Bengtsson
committed Details | Review
Utils: Move accel setup into addActions (3.05 KB, patch)
2014-11-10 23:35 UTC, Mattias Bengtsson
committed Details | Review

Description Mattias Bengtsson 2014-11-10 23:35:07 UTC
This patchset reworks initActions a bit (and renames it to addActions)
and adds support for setting accelerators to actions.

Overall this is how I would have written it back when if I had
known what I know now.
Comment 1 Mattias Bengtsson 2014-11-10 23:35:12 UTC
Created attachment 290389 [details] [review]
Utils: Simplify initActions

Rename initActions to addActions (showing that the util calls add_action
in the end) and make it less boilerplaty to use.
Comment 2 Mattias Bengtsson 2014-11-10 23:35:24 UTC
Created attachment 290390 [details] [review]
Utils: Move accel setup into addActions

Setting upp accelerators (keybindings) inside addActions feels more
natural since you're already working with setting up the actions there
to begin with.
Comment 3 Jonas Danielsson 2014-11-11 06:33:44 UTC
Review of attachment 290389 [details] [review]:

Looks neat.
Comment 4 Jonas Danielsson 2014-11-11 06:34:00 UTC
Review of attachment 290390 [details] [review]:

Agreed!
Comment 5 Jonas Danielsson 2014-11-11 06:36:02 UTC
Comment on attachment 290389 [details] [review]
Utils: Simplify initActions

Pushed (o/
Comment 6 Jonas Danielsson 2014-11-11 06:36:22 UTC
Comment on attachment 290390 [details] [review]
Utils: Move accel setup into addActions

Pushed \o)