[pygtk] 'gtk.gdk.DragContext' object has no attribute 'get_source_widget'
Néstor
nestorac at gmail.com
Thu Feb 19 08:44:11 WST 2009
If you look at all the posts, then it says that some versions have it
and others don't. I would try with another version, if possible, to
test. It seems that only version 2.12.1-2 is affected by this bug. May
it be fixed in the following version?
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.12/pygtk-2.12.1-3.win32-py2.6.exe
On Wed, Feb 18, 2009 at 11:08 PM, Stephen George
<steve_geo at optusnet.com.au> wrote:
>
> I using a code base, that works fine on linux and produces the following
> error on windows.
>
> File "C:\Program Files\gramps\DataViews\GrampletView.py", line 1306,
> in drop_widget
> button = context.get_source_widget()
> AttributeError: 'gtk.gdk.DragContext' object has no attribute
> 'get_source_widget'
>
> I looked at the documentation for pyGTK under DragContext, and
> get_source_widget() is listed.
>
> however when doing a dir on DragContext it is not listed.
>
> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
> (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import gtk
> >>> dir( gtk.gdk.DragContext)
> ['__class__', '__cmp__', '__delattr__', '__dict__', '__doc__',
> '__gdoc__', '__getattribute__', '__gobject_init__', '__gr
> efcount__', '__gtype__', '__hash__', '__init__', '__module__',
> '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__
> setattr__', '__str__', 'action', 'actions', 'chain', 'connect',
> 'connect_after', 'connect_object', 'connect_object_after
> ', 'dest_window', 'disconnect', 'disconnect_by_func', 'drag_abort',
> 'drag_drop', 'drag_drop_succeeded', 'drag_find_windo
> w', 'drag_find_window_for_screen', 'drag_get_selection', 'drag_motion',
> 'drag_status', 'drop_finish', 'drop_reply', 'emi
> t', 'emit_stop_by_name', 'finish', 'freeze_notify', 'get_data',
> 'get_properties', 'get_property', 'handler_block', 'hand
> ler_block_by_func', 'handler_disconnect', 'handler_is_connected',
> 'handler_unblock', 'handler_unblock_by_func', 'is_sour
> ce', 'notify', 'props', 'protocol', 'set_data', 'set_icon_default',
> 'set_icon_name', 'set_icon_pixbuf', 'set_icon_pixmap
> ', 'set_icon_stock', 'set_properties', 'set_property', 'source_window',
> 'start_time', 'stop_emission', 'suggested_action
> ', 'targets', 'thaw_notify', 'weak_ref']
> >>> gtk.gtk_version
> (2, 14, 7)
> >>> gtk.pygtk_version
> (2, 12, 1)
>
> I googled and saw a forum message from Feb 2007 along the same lines
>
> > since switching from pygtk-2.8 to pygtk-2.10, the method
>
>>"get_source_widget" is not available for gtk.gdk.DragContext objects. Why is this?
>>
>> I'm using pygtk 2.10.3 together witn gtk-2.10.7 on windows 2000."
>
>
> Can someone explain what I am doing wrong?
>
> Steve
>
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
--
Néstor
+34 687 96 74 81
nestorac at gmail.com
More information about the pygtk
mailing list