[Bugs] #4414 sugar UNSP: Object Chooser of an activity gets over other activities (was: TypeError opening the object-chooser)

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Wed Feb 6 14:44:03 EST 2013


#4414: Object Chooser of an activity gets over other activities
------------------------------------------+---------------------------------
    Reporter:  manuq                      |          Owner:  manuq      
        Type:  defect                     |         Status:  new        
    Priority:  Unspecified by Maintainer  |      Milestone:  1.0        
   Component:  sugar                      |        Version:  Unspecified
    Severity:  Unspecified                |       Keywords:             
Distribution:  Unspecified                |   Status_field:  Unconfirmed
------------------------------------------+---------------------------------

Old description:

> TestCase
> - open imageviewer from scratch
> - click the + button in the center of the canvas
> - check the logs
>
> Traceback:
> {{{
> Traceback (most recent call last):
>   File "/home/manuq/sugar-build/install/lib/python2.7/site-
> packages/jarabe/journal/objectchooser.py", line 103,
>     self.set_transient_for(parent)
>   File "/usr/lib64/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
> }}}

New description:

 TestCase
 - open imageviewer from scratch
 - click the + button in the center of the canvas
 - Switch to other activities

 The Object Chooser should be tied to the activity that opens it, as a
 dialog window.

 This traceback appears in the log:
 {{{
 Traceback (most recent call last):
   File "/home/manuq/sugar-build/install/lib/python2.7/site-
 packages/jarabe/journal/objectchooser.py", line 103,
     self.set_transient_for(parent)
   File "/usr/lib64/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
 }}}

--

Comment(by manuq):

 The consequence of set_transient_for() failing with a TypeError is that
 the Object Chooser of an activity is displayed over other activities and
 also over the Journal.

 It fails because the Gtk.Window is passed from toolkit to the shell
 through DBUS as an integer, the XID of the X11Window (GdkWindow).  It is
 sent in toolkit's ObjectChooser and catched in shell's
 JournalActivityDBusService .  So at the other side we have a GdkWindow.

 So I've found that calling the method with the same name in the Gdk.Window
 fixes the issue.  There is no error in the log, and the Object Chooser
 acts as a dialog, attached to the activity Window.
 http://developer.gnome.org/gdk/stable/gdk-Windows.html#gdk-window-set-
 transient-for

 Patch attached.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/4414#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list