[pygtk] gtk.Action.connect_proxy

kani . jkani4 at gmail.com
Fri Mar 14 11:30:47 WST 2008


Hi,

Have you ever read following tutorial?
If not yet, I hope that it help you.

Regards.
----
Kani

2008/3/14, Geoff Bache <geoff.bache �� jeppesen.com>:
>
>  Hi all,
>
>  I can't persuade this to work as described unfortunately. The docs say
>
>  "This method synchronizes various properties of the |gtk.Action|
>  <http://www.pygtk.org/docs/pygtk/class-gtkaction.html> with the widget
>  (such as label text, icon, tooltip, etc), and attaches a callback so
>  that the |gtk.Action|
>  <http://www.pygtk.org/docs/pygtk/class-gtkaction.html> is activated when
>  /|proxy|/ is."
>
>  As far as I can tell, when connecting a simple button as a proxy, all
>  that gets transferred is the label text. The stock icon and tooltip at
>  least are not transferred.
>  Is this to be expected?
>
>  Regards,
>  Geoff Bache
>
>  P.S. Here's my code:
>
>  #!/usr/bin/env python
>
>  import gtk
>
>  def buttonClicked(action, *args):
>     print action
>
>  window = gtk.Window(gtk.WINDOW_TOPLEVEL)
>  window.connect("delete_event", gtk.main_quit)
>  action = gtk.Action("The Action", "The Action", "Some tooltip",
>  "gtk-refresh")
>  action.connect("activate", buttonClicked)
>  actionGroup = gtk.ActionGroup("The Action Group")
>  actionGroup.add_action(action)
>  button = gtk.Button()
>  action.connect_proxy(button) # button appears saying "The Action" but
>  without an icon or a tooltip...
>  window.add(button)
>  window.show_all()
>  window.resize(100, 100)
>  gtk.main()
>
>
>  _______________________________________________
>  pygtk mailing list   pygtk �� daa.com.au
>  http://www.daa.com.au/mailman/listinfo/pygtk
>  Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>


More information about the pygtk mailing list