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 672081 - Add more default arguments
Add more default arguments
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-14 16:33 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2012-03-16 19:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a default argument to Pango.Context.get_metrics() (895 bytes, patch)
2012-03-14 16:33 UTC, Johan (not receiving bugmail) Dahlin
committed Details | Review
Add a default argument to Gtk.TreeView.set_cursor (997 bytes, patch)
2012-03-14 16:33 UTC, Johan (not receiving bugmail) Dahlin
none Details | Review
Add a default argument to TreeModelFilter.set_visible_func() (1014 bytes, patch)
2012-03-14 16:33 UTC, Johan (not receiving bugmail) Dahlin
committed Details | Review
Add a default argument to Gtk.TreeView.set_cursor (1.84 KB, patch)
2012-03-15 13:32 UTC, Johan (not receiving bugmail) Dahlin
committed Details | Review

Description Johan (not receiving bugmail) Dahlin 2012-03-14 16:33:37 UTC
This is to improve the compatibility with PyGTK, and make sense in general.
There should probably move into gtk+ proper when gobject-introspection
supports default arguments.
Comment 1 Johan (not receiving bugmail) Dahlin 2012-03-14 16:33:39 UTC
Created attachment 209749 [details] [review]
Add a default argument to Pango.Context.get_metrics()
Comment 2 Johan (not receiving bugmail) Dahlin 2012-03-14 16:33:43 UTC
Created attachment 209750 [details] [review]
Add a default argument to Gtk.TreeView.set_cursor

And also make sure that the path is a Gtk.TreePath.
Comment 3 Johan (not receiving bugmail) Dahlin 2012-03-14 16:33:46 UTC
Created attachment 209751 [details] [review]
Add a default argument to TreeModelFilter.set_visible_func()
Comment 4 Paolo Borelli 2012-03-14 22:23:52 UTC
All three looks good to me (thanks!) but some unit test would be nice, especially for the second one that add more logic than plain default values
Comment 5 Martin Pitt 2012-03-14 22:31:08 UTC
Comment on attachment 209749 [details] [review]
Add a default argument to Pango.Context.get_metrics()

First and third look obvious enough. +1 for test-case'ing the second one.

Thanks!
Comment 6 Johan (not receiving bugmail) Dahlin 2012-03-15 13:32:56 UTC
Created attachment 209835 [details] [review]
Add a default argument to Gtk.TreeView.set_cursor

And also make sure that the path is a Gtk.TreePath.
Comment 7 Paolo Borelli 2012-03-15 22:48:56 UTC
Review of attachment 209835 [details] [review]:

looks good to me but...

::: tests/test_overrides.py
@@ +1419,3 @@
+        view = Gtk.TreeView()
+        # We can't easily call get_cursor() to make sure this works as
+        # exepcted as works as we need to realize and focus the column

...since I am really a PITA, there is a typo in the comment :P
Comment 8 Johan (not receiving bugmail) Dahlin 2012-03-16 19:37:45 UTC
Attachment 209751 [details] pushed as a7b08cb - Add a default argument to TreeModelFilter.set_visible_func()