Changes

Jump to navigation Jump to search
→‎Tools: moving pygi-enumerate example from User:Humitos/PortingGetBooks
Line 95: Line 95:  
There are tools to help you do the porting. There is a script in the pygobject repository for porting called [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh pygi-convert.sh], more info about the script can be found in [http://live.gnome.org/PyGObject/IntrospectionPorting the PyGObject Introspection Porting guide].  
 
There are tools to help you do the porting. There is a script in the pygobject repository for porting called [http://git.gnome.org/browse/pygobject/tree/pygi-convert.sh pygi-convert.sh], more info about the script can be found in [http://live.gnome.org/PyGObject/IntrospectionPorting the PyGObject Introspection Porting guide].  
   −
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants).
+
If you are having trouble finding how a particular GTK class/method/constant has been named in PyGI, run [http://dev.laptop.org/~dsd/20110806/pygi-enumerate.py pygi-enumerate.py] and grep the output. (this app lists all identified methods and constants). Usage example:
 +
 
 +
<pre>
 +
$ python pygi-enumerate.py | grep get_selection
 +
Gtk.AccelLabel.get_selection_bounds() (instance method)
 +
Gtk.Editable.get_selection_bounds() (instance method)
 +
Gtk.Entry.get_selection_bounds() (instance method)
 +
Gtk.IconView.get_selection_mode() (instance method)
 +
Gtk.Label.get_selection_bounds() (instance method)
 +
Gtk.SelectionData.get_selection() (instance method)
 +
Gtk.SpinButton.get_selection_bounds() (instance method)
 +
Gtk.TextBuffer.get_selection_bound() (instance method)
 +
Gtk.TextBuffer.get_selection_bounds() (instance method)
 +
Gtk.TreeView.get_selection() (instance method)
 +
</pre>
    
=== Constructor considerations ===
 
=== Constructor considerations ===
296

edits

Navigation menu