[Bugs] #4101 sugar NORM: Source View: Trace when we try to 'set_parent_tansient_for'

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Fri Oct 26 06:47:47 EDT 2012


#4101: Source View: Trace when we try to 'set_parent_tansient_for'
-----------------------+----------------------------------------------------
    Reporter:  erikos  |          Owner:  erikos  
        Type:  defect  |         Status:  new     
    Priority:  Normal  |      Milestone:  0.98    
   Component:  sugar   |        Version:  0.97.x  
    Severity:  Major   |       Keywords:          
Distribution:  OLPC    |   Status_field:  Assigned
-----------------------+----------------------------------------------------
 Trace:

 {{{
 Traceback (most recent call last):
   File "/home/erikos/sugar-build/install/lib/python2.7/site-
 packages/jarabe/view/viewsource.py", line 208, in __realize_cb
     self.set_transient_for(parent)
   File "/home/erikos/sugar-build/install/lib/python2.7/site-
 packages/gi/types.py", line 47, in function
     return info.invoke(*args, **kwargs)
 TypeError: argument parent: Expected Gtk.Window, but got
 gi.repository.GdkX11.X11Window
 }}}

 Previously we did:

 {{{
 >>> import gtk
 >>> w = gtk.Window()
 >>> gtk.gdk.window_foreign_new(w.window.xid)
 <gtk.gdk.Window object at 0xb7699a7c (GdkWindow at 0x8608b10)>
 }}}

 Now we do:
 {{{
 >>> from gi.repository import GdkX11
 >>> from gi.repository import Gdk
 >>> display = Gdk.Display.get_default()
 >>> GdkX11.X11Window.foreign_new_for_display(display, 39845891L)
 <X11Window object at 0xb7660a04 (GdkX11Window at 0x8c511f8)>
 }}}

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/4101>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list