Changes

Jump to navigation Jump to search
7,243 bytes added ,  08:02, 2 September 2012
Line 1: Line 1: −
Daniel Drake started an effort to port the shell to the GTK3 sugar-toolkit. These are the biggest issues identified so far:
+
Manuq started the port of the shell branching the hippo removal. The main issues were identified by Daniel Drake some months ago and fortunately most of them are fixed at this point.
   −
==Open==
+
Daniel Narvaez set up a sugar-build branch to make the port. To test:
   −
=== gconf_client_get_list not introspectable ===
+
git clone git://git.sugarlabs.org/~dnarvaez/sugar-build/manuqs-shell-port.git
opened an upstream bug: https://bugzilla.gnome.org/show_bug.cgi?id=681433
     −
similar boxed types fix: https://bugzilla.gnome.org/show_bug.cgi?id=613247
+
That is sugar-build with this sugar components branched:
   −
=== Custom tree model for journal ===
+
http://git.sugarlabs.org/~manuq/sugar/manuqs-erikos-shell-port 
 +
http://git.sugarlabs.org/~manuq/sugar-toolkit-gtk3/manuqs-sugar-toolkit-gtk3
   −
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html
+
==Open==
   −
=== Custom Icon cell renderer ===
+
===foreach/forall===
 +
Using gtk_container_foreach or [http://developer.gnome.org/gtk3/3.4/GtkContainer.html#gtk-container-foreach  gtk_container_forall] does expect the callback data to be passed in Python, it does work in a subclassed container due to Carlos [http://git.gnome.org/browse/gtk+/commit/?id=db569cbee7e3842d802c5f1d53e28d0dde98ffeb  fix in the GtkCallback annotations].
   −
sugar3.graphics.icon.CellRendererIcon is based on pygtks GenericCellRenderer - needs to be ported
+
===gtk_clipboard_set_with_data not introspected===
 +
In the [http://git.gnome.org/browse/gtk+/tree/gtk/gtkclipboard.c#n655 annotations] it is marked as non-introspectable.
   −
===gtk_clipboard_set_with_data not introspected===
   
http://www.daa.com.au/pipermail/pygtk/2011-July/019940.html
 
http://www.daa.com.au/pipermail/pygtk/2011-July/019940.html
    
- check with pygobject devs if the above statement is still the case
 
- check with pygobject devs if the above statement is still the case
   −
=== libxklavier ===
+
It seems like functions with multiple callbacks are still unsupported in pygi. I opened https://bugzilla.gnome.org/show_bug.cgi?id=682604 but unless someone suggest a way to not break API perhaps we should just add our own sugar_clipboard_set_data using closures for now --dnarvaez
   −
python-xklavier is based on pygtk codegen, we can probably just drop the link to pygtk, but failing that, we will need introspection bindings.
+
=== gdk_property_change ===
 +
Is [http://git.gnome.org/browse/gtk+/tree/gdk/gdkwindow.c#n11332 marked as non-introspectable] in the annotations.
 +
<pre>
 +
>>> from gi.repository import Gdk
 +
>>> Gdk.property_change
 +
Traceback (most recent call last):
 +
  File "<stdin>", line 1, in <module>
 +
  File "/home/erikos/sources/manuqs-shell-port/install/lib/python2.7/site-packages/gi/module.py", line 266, in __getattr__
 +
    return getattr(self._introspection_module, name)
 +
  File "/home/erikos/sources/manuqs-shell-port/install/lib/python2.7/site-packages/gi/module.py", line 115, in __getattr__
 +
    self.__name__, name))
 +
AttributeError: 'gi.repository.Gdk' object has no attribute 'property_change'
 +
</pre>
   −
[http://git.fedorahosted.org/cgit/anaconda.git/tree/pyanaconda/keyboard.py This is] how [http://fedoraproject.org/wiki/Anaconda Anaconda] is using [http://cgit.freedesktop.org/libxklavier/libxklaview libxklavier] in Python (found when coming across [https://bugzilla.redhat.com/show_bug.cgi?id=772664 this bug], Colin [https://mail.gnome.org/archives/commits-list/2012-May/msg00247.html enabled introspection for libxklavier]).
+
We have a wrapper for this in sugar-toolkit-gtk3 --dnarvaez
    
=== gdk_property_get ===
 
=== gdk_property_get ===
Line 45: Line 58:  
  TypeError: Could not caller allocate argument 6 of callable property_get
 
  TypeError: Could not caller allocate argument 6 of callable property_get
   −
=== gdk_property_change ===
+
Maybe add to gdkwrapper in sugar-toolkit-gtk3? --dnarvaez
Is [http://git.gnome.org/browse/gtk+/tree/gdk/gdkwindow.c#n11332 marked as non-introspectable] in the annotations.
+
 
<pre>
+
===Palettes===
>>> from gi.repository import Gdk
+
* Palettes in Views do popup/popdown in a loop: [http://git.sugarlabs.org/~manuq/sugar-toolkit-gtk3/manuqs-sugar-toolkit-gtk3/commit/f751ec4761934a4d7193c7b4de1ab48fba8e619a fix in sugar-toolkit-gtk3/port]
>>> Gdk.property_change
+
* FavoritePalette: wrong order of items: [http://git.sugarlabs.org/~manuq/sugar/manuqs-erikos-shell-port/commit/1b1ea09f09dc4001698503d14c5b067636e62471 fix in sugar/port]
Traceback (most recent call last):
+
* when you switch views always the owner Palette comes up
  File "<stdin>", line 1, in <module>
+
* Home View: when a Palette is up, the search entry is de-focused
  File "/home/erikos/sources/manuqs-shell-port/install/lib/python2.7/site-packages/gi/module.py", line 266, in __getattr__
+
* Palette label: 1) icon has gray background and 2) the positioning is not at the left, 3) there is no separation line below the label
    return getattr(self._introspection_module, name)
+
* Journal ListView entry Palette: "AttributeError: 'CellRendererActivityIcon' object has no attribute 'get_display'"
  File "/home/erikos/sources/manuqs-shell-port/install/lib/python2.7/site-packages/gi/module.py", line 115, in __getattr__
+
* Frame, friend Palette draws not at the correct position
    self.__name__, name))
+
* Mix Menus and Widgets: Palettes can not mix both Menus and Widgets. Gonzalo has implemented a [http://git.sugarlabs.org/read/mainline/blobs/master/sugarmenuitem.py SugarMenuItem] which can be used instead.
AttributeError: 'gi.repository.Gdk' object has no attribute 'property_change'
+
 
</pre>
+
===Icon/EventIcon: badge is not drawn at the correct position===
 +
Filed as [http://bugs.sugarlabs.org/ticket/3835 SL #3835]
 +
 
 +
===Artwork===
 +
Changes in the theme to adopt to:
 +
* [http://bugs.sugarlabs.org/ticket/3836 Palette Icon: background]
 +
* [http://lists.sugarlabs.org/archive/sugar-devel/2012-August/039359.html GtkLabel: background]
 +
* [http://bugs.sugarlabs.org/ticket/3837 Browse: Notebook label: background]
    
=== Port hardcoded styles to the CSS stylesheet ===
 
=== Port hardcoded styles to the CSS stylesheet ===
Line 167: Line 187:  
or change the api to make the first container (where is the menu today) useful for other type of widgets.
 
or change the api to make the first container (where is the menu today) useful for other type of widgets.
   −
=== Can't call gdk_window_set_user_data() ===
+
In Manuq branch, palettes are blinking when mouse is over the icon.
   −
http://mail.gnome.org/archives/python-hackers-list/2011-September/msg00006.html
+
AssertionError:
 +
 
 +
  Traceback (most recent call last):
 +
    File "/home/manuq/prog/manuqs-shell-port/install/lib/python2.7/site-packages/sugar3/graphics/palette.py", line
 +
      or isinstance(self._widget, _PaletteWindowWidget)
 +
  AssertionError
    
=== A handful of NMClient issues ===
 
=== A handful of NMClient issues ===
Line 175: Line 200:  
See http://mail.gnome.org/archives/python-hackers-list/2011-August/msg00003.html and the other posts in the thread. Some problems resolved, some probably still pending.
 
See http://mail.gnome.org/archives/python-hackers-list/2011-August/msg00003.html and the other posts in the thread. Some problems resolved, some probably still pending.
    +
===Drag-and-drop in home view, random layout===
 +
Partially done in [http://git.sugarlabs.org/sugar/manuqs-erikos-shell-port/commit/204899e21435d12114747127feee2122e6c3efe3 commit 204899e2].  Pending issue: the activity icon is not being displayed while dragging.
 +
 +
  (sugar-session:13647): Gtk-CRITICAL **: gtk_drag_source_set_icon_pixbuf: assertion `site != NULL' failed
 +
 +
===Other issues===
 +
* activity launch icon in the frame does not stop fading in and out, like loading
 +
* widgets like icons and texts have grey background instead of black (toolbar-grey) - this is because of a change in gtk (seen in Browse too)
    
==Done==
 
==Done==
 +
 +
=== Custom tree model for journal ===
 +
<span style="color:#2ce713;"> Fix from: Manuel Quiñones, Simon Schampijer, Gonzalo Odiard </span>
 +
 +
Custom tree model sample: http://dev.laptop.org/~manuq/shell-port/test_custom_treemodel-gtk3.py
 +
 +
Having trouble reimplementing this. See http://mail.gnome.org/archives/python-hackers-list/2011-December/msg00010.html [https://bugzilla.gnome.org/show_bug.cgi?id=680812 this bug] might be related see 8f31e85db1392eb7222593fc0d05144c2bca06a3 in pygobject.
 +
 +
Gonzalo provided an initial patch, and Manuq worked over it.
 +
 +
===key grabber===
 +
<span style="color:#2ce713;"> Fix from: Simon Schampijer </span>
 +
- grab_keys needs to be introspectable, [http://lists.sugarlabs.org/archive/sugar-devel/2012-August/039190.html patch]
 +
- is_modifier does not allow to pass no mask anymore, has to be something like "is_modifier(keycode, mask=Gdk.ModifierType.MOD1_MASK)"
 +
 +
=== Xkl.ConfigRec does not have set_model() method ===
 +
<span style="color:#2ce713;"> Fix from: Manuel Quiñones, Sergey V. Udaltsov </span>
 +
 +
This should be called in the setup keyboard at the startup. setup_keyboard_cb in sugar/bin/sugar-session .  Reported in pygobject as: https://bugzilla.gnome.org/show_bug.cgi?id=681566
 +
 +
Seems that libxklavier needs a setter.  Reported to libxklavier as https://bugzilla.freedesktop.org/show_bug.cgi?id=53547
 +
 +
===Owner icon allocation issue===
 +
<span style="color:#2ce713;"> Fix from: Simon Schampijer </span> in commit cd29d065.
 +
 +
=== Port the gstreamer code to pygi ===
 +
<span style="color:#2ce713;"> Fix from: Daniel Narvaez </span> in commit f74489e6 .
 +
 +
=== Remove resize grips ===
 +
<span style="color:#2ce713;"> Fix from: Manuel Quiñones </span>
 +
 +
Resize grip has been moved from GtkStatusbar to GtkWindow.  See "Resize grip" section of the [http://developer.gnome.org/gtk3/3.1/ch25s02.html GTK+2 > GTK+3 porting guide].
 +
 +
Done in [http://git.sugarlabs.org/sugar/manuqs-erikos-shell-port/commit/3efb87f349f56e4167010ac020ad31521e2533a2 commit 3efb87f3].
 +
 +
=== Custom Icon cell renderer ===
 +
<span style="color:#2ce713;"> Fix from: Manuel Quiñones </span>
 +
 +
sugar3.graphics.icon.CellRendererIcon is based on pygtks GenericCellRenderer - needs to be ported
 +
 +
=== gconf_client_get_list not introspectable ===
 +
<span style="color:#2ce713;"> Workaround from: Daniel Drake </span>
 +
 +
The [http://git.gnome.org/browse/gconf/tree/gconf/gconf-client.c#n1838 annotations] mark it as non-introspectale.
 +
 +
opened an upstream bug: https://bugzilla.gnome.org/show_bug.cgi?id=681433
 +
 +
similar boxed types fix: https://bugzilla.gnome.org/show_bug.cgi?id=613247
 +
 +
The keyboard is not set up yet because of this as is being called in setup_keyboard_cb in sugar/bin/sugar-session .
 +
 +
Needs:
 +
* http://git.sugarlabs.org/~manuq/sugar/manuqs-erikos-shell-port/commit/74c77ed68912ec9253f509ba25ff05cebb4fba97
 +
* http://git.sugarlabs.org/~manuq/sugar/manuqs-erikos-shell-port/commit/be519897a1cbd759e4feca640a95317804bedbc0
 +
 +
=== Custom TreeModelSort for home list view ===
 +
<span style="color:#2ce713;"> Fix from: Simon Feltman, Manuel Quiñones </span>
 +
 +
Can't inherit GtkTreeModelSort and pass a model to the parent constructor.  Filed as: https://bugzilla.gnome.org/show_bug.cgi?id=681477
 +
 +
Working testcase for pygtk: http://dev.laptop.org/~manuq/test_listmodel2_gtk2.py
 +
 +
Testcase that shows the issue in PyGi: http://dev.laptop.org/~manuq/test_listmodel2_gtk3.py
 +
 +
Needs:
 +
* can be made to work by passing keyword arguments e.g. "Gtk.TreeModelSort.__init__(self, model=self._model_filter)"
 +
 +
=== can't call gdk_window_set_user_data() ===
 +
In the latest implementation we don't use set_user_data anymore AFAIK.
 +
http://mail.gnome.org/archives/python-hackers-list/2011-September/msg00006.html
    
=== do_forall not working in pygobject ===
 
=== do_forall not working in pygobject ===
 +
<span style="color:#2ce713;"> Fix from: Tomeu Vizoso, John Palmieri, Carlos Garnacho </span>
 +
 
Needs:
 
Needs:
 
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection was merged 2012-07-13
 
* https://bugzilla.gnome.org/show_bug.cgi?id=663052 gobject-introspection was merged 2012-07-13
Line 185: Line 290:     
=== cant call gdkwindow.raise() ===
 
=== cant call gdkwindow.raise() ===
 +
<span style="color:#2ce713;"> Fix from: Martin Pitt </span>
 +
 
Needs:
 
Needs:
 
* https://bugzilla.gnome.org/show_bug.cgi?id=676746 fix landed in pygobject
 
* https://bugzilla.gnome.org/show_bug.cgi?id=676746 fix landed in pygobject
Line 190: Line 297:     
=== can not listen to signals in subclassed subclasses ===
 
=== can not listen to signals in subclassed subclasses ===
 +
<span style="color:#2ce713;"> Fix from: Carlos Garnacho </span>
 +
 
ActivityIcon.do_draw never called, see http://bugs.sugarlabs.org/ticket/3386
 
ActivityIcon.do_draw never called, see http://bugs.sugarlabs.org/ticket/3386
   Line 196: Line 305:     
=== set_data/get_data not available anymore===
 
=== set_data/get_data not available anymore===
 +
<span style="color:#2ce713;"> Fix in toolkit-gtk3 from: Simon Schampijer </span>
 +
 
More background info in: https://bugzilla.gnome.org/show_bug.cgi?id=641944
 
More background info in: https://bugzilla.gnome.org/show_bug.cgi?id=641944
    
Needs:
 
Needs:
 
* http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/commit/af320f91f800ed9a46e84f12e9aa1ae3b95493b4 we can use python attributes here
 
* http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/commit/af320f91f800ed9a46e84f12e9aa1ae3b95493b4 we can use python attributes here
 +
 +
=== libxklavier ===
 +
<span style="color:#2ce713;"> Fix from: Manuel Quiñones</span>
 +
 +
[http://git.fedorahosted.org/cgit/anaconda.git/tree/pyanaconda/keyboard.py This is] how [http://fedoraproject.org/wiki/Anaconda Anaconda] is using [http://cgit.freedesktop.org/libxklavier/libxklaview libxklavier] in Python (found when coming across [https://bugzilla.redhat.com/show_bug.cgi?id=772664 this bug], Colin [https://mail.gnome.org/archives/commits-list/2012-May/msg00247.html enabled introspection for libxklavier]).
 +
 +
You have to use Xkl.Engine.get_instance(display) [https://bugzilla.gnome.org/show_bug.cgi?id=680202 instead of the constructor]. Manuq made sure the API we use is there.  [http://cgit.freedesktop.org/libxklavier/tree/tests/test_gi.py This testcase] was useful.
3,267

edits

Navigation menu