This page is being performed while I'm porting Jukebox Activity to Gtk3.
There is a ticket with some useful information that I'm using on the porting and to keep tracking this port. Besides, this wiki page will be useful to write some code snippets about what are the difficulties that I'm having on the port and maybe can be useful for someone else.
I will take this guide as reference on the Gtk3 porting.
self.hscale = gtk.HScale(self.adjustment)
self.hscale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=self.adjustment)
The way to access to the "window" attribute changed and the way to access to "xid" as well. So,
self.videowidget_xid = videowidget.window.xid
self.videowidget_xid = videowidget.get_window().get_xid()
NOTE: this is used to insert the animation window inside a widget instead opening a new window
Access to a particular row:
media_idx = path[COLUMNS['index']]
treeiter = model.get_iter(path) media_idx = model.get_value(treeiter, COLUMNS['index'])
index = sel_model.get_value(sel_model.get_iter(row), 0) self._playlist.pop(index)
The function that Gtk.TreeViewColumn.set_cell_data_func receives needs a new required argument: data
def _set_number(self, column, cell, model, it):
def _set_number(self, column, cell, model, it, data):
Some arguments are deprecated in the sugar-toolkit-gtk3 version
chooser = ObjectChooser(_('Choose document'), self, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, what_filter=mime.GENERIC_TYPE_AUDIO)
chooser = ObjectChooser(self, what_filter=mime.GENERIC_TYPE_AUDIO)
- There is something related with collaboration in jukeboxactivity.py but I didn't understand how it works. I thought this activity is not collaborative.
- The gtk2 version uses "gst" as "import gst" and "import pygst" but I found that there is a new way to do that using introspection: "from gi.repository import Gst". What's about this? Should we use this new way?
Missing / Problematic / Un-ported things
- The slider has a problem with the theme. Issue
- The Gtk3 version in XO 1.75 os18 shows the animation too slow