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 618476 - Add UIManager and ActionGroup overrides
Add UIManager and ActionGroup overrides
Status: RESOLVED FIXED
Product: pygi
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: 0.6
Assigned To: pygi-maint
pygi-maint
Depends on:
Blocks:
 
 
Reported: 2010-05-12 18:29 UTC by johnp
Modified: 2010-05-19 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] add GtkUIManager and GtkActionGroup overrides (8.02 KB, patch)
2010-05-12 18:30 UTC, johnp
reviewed Details | Review

Description johnp 2010-05-12 18:29:58 UTC
ActionGroup overrides allow for passing tuples of arguments instead of creating GtkAction objects (objects are created in the override)

UIManager override allows loading a UI definition from a python string without having to pass in the length of the string.
Comment 1 johnp 2010-05-12 18:30:27 UTC
Created attachment 160922 [details] [review]
[PATCH] add GtkUIManager and GtkActionGroup overrides

 gi/overrides/Gtk.py |  163 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 162 insertions(+), 1 deletions(-)
Comment 2 Johan (not receiving bugmail) Dahlin 2010-05-12 18:36:25 UTC
Review of attachment 160922 [details] [review]:

Looks great!

These are easily testable, should we require tests for all overrides?
Comment 3 Zach Goldberg 2010-05-13 04:42:50 UTC
Review of attachment 160922 [details] [review]:

I agree with Johan, I would really like to see tests for the overrides.  J5, would you mind giving that a stab?  If it turns out to be a PITA we can skip it but I like Johan's idea of always requiring tests (assuming thats not an unreasonable burden).
Comment 4 Zach Goldberg 2010-05-13 04:43:21 UTC
Review of attachment 160922 [details] [review]:

p.s. I love the detail in the comments.
Comment 5 johnp 2010-05-13 15:17:48 UTC
Review of attachment 160922 [details] [review]:

I will write the tests.  The comments come directly from PyGTK so thank Johan or whoever git blame tells you is the author ;)
Comment 6 johnp 2010-05-19 20:07:34 UTC
Pushed with tests along with a little fixup to join groups of radio actions with the new binding friendly API gtk_radio_action_join_group I just checked in[1]  We only use it if it is present.  Matthias said he could get it into GTK+ 2.21.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=618571