[Sugar-devel] [PATCH Get Books] Port to Gtk3 SL #3681

Gonzalo Odiard gonzalo at laptop.org
Wed Jun 20 01:10:09 EDT 2012


On Tue, Jun 19, 2012 at 4:22 PM, Manuel Kaufmann <humitos at gmail.com> wrote:

> On Tue, Jun 19, 2012 at 3:56 PM, Gonzalo Odiard <gonzalo at laptop.org>
> wrote:
> > The short version is: please, don't add more changes to the needed by the
> > port.
> > If you find a bug, or anything wrong with the code, is very good, but is
> > better include it
> > in another patch. We can decide if have sense apply in the old branch
> too.
>
> Ok, some of them have an explanation. They are not added just because.
> I will explain this below.
>
> > Also, pleeeease :) don't change spaces if not needed. In particular, the
> > second line,
> > when continue after the 80 chars, I prefer use 8 chars indentation. I am
> not
> > sure if there are a agreed way here, but if not, better keep the code as
> is.
>
> About spaces. There is a convention[1] used that says we should use 4
> chars for indentation (in Python Code): PEP8
>
>
Yeah, I know that, Mr Humitos :)
I am not talking about the indentation used to identify code structures
(probably I should not use the word indentation) I am talking about the
spaces used in a second line, when the code does not fit in 80 cols.
Example:


>         self.queryresults = opds.RemoteQueryResult(catalog_config,
> -                '', query_language)
> +                                                   '', query_language)
>

You are aligning the second row with the "(". Please use 8 chars in the
second row.



> >> [1] http://wiki.sugarlabs.org/go/User:Humitos/PortingGetBooks
> > The wiki page looks outdated in parts. Please update it.
>
> What are the things that are outdated?
>
>
There are a few notes about issues as pending, and probably were resolved
later.


 * [IMPORTANT] I'm not sure what is org.freedesktop.UDisks.Device for?
I don't understand it very well but I had to remove it because it was
failing

UDisk is used to identify when a pendrive is connected to the xo. I am 99%
sure is falling because you are using "import dbus" instead of "from
gi.repository import DBus" (see below)



> The fixs that you mentioned above are not present in the gtk2 version
> of the Activity. I mean, I didn't fix an old bug here, in fact, I
> fixed the bugs that appeared after the migration. I tried to get the
> same behaviour on both version without adding and removing anything. I
> think this is related on how are the signals emitted between gtk2 and
> Gtk3 and that is why I wrote that comment.
>
>



> > Probably the problem in devicemanager.py is you are using
> >
> > import dbus
> > and not
> > from gi.repository import DBus
>
> OK. I will take a look at this. Do you have an example about how to use
> this?
>
> from gi.repository import DBus
>
>
It's like in all the other port :)


>
> > Testing the Gtk3 version, I have found the following error:
> > When I click in a book title in the listview, the information about the
> book
> > should be displayed in the textview at the botton of the screen. In the
> Gtk3
> > version, nothing is displayed. In the log I see:
>
> Yes. This is working on the English version of the Activity. I will
> take a look a this, but I didn't change anything related with this.
>
>
I know is not your fault. Probably gtk3 is returning differently the
strings as gtk2.

Gonzalo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120620/d71c0404/attachment.html>


More information about the Sugar-devel mailing list