[Sugar-devel] [PATCH Terminal 2/2] The same tabs as the Browse Activity

Manuel Kaufmann humitos at gmail.com
Tue May 15 10:09:19 EDT 2012


Hello,

On Mon, May 14, 2012 at 4:32 PM, Agustin Zubiaga <aguz at sugarlabs.org> wrote:
> diff --git a/terminal.py b/terminal.py
> index 160b35d..59b4940 100644

> +from widgets import BrowserNotebook, TabLabel

Please, use one line per import here.

> -        self._notebook = Notebook()
> +        self._notebook = BrowserNotebook()
> +        self._notebook.connect("tab-added", self.__open_tab_cb)

Just asking: Is it OK using the name BrowseNotebook for this class?

> +        tablabel = TabLabel()
> +        tablabel.connect('tab-close', self.__close_tab_cb)
> +        box.label = tablabel
> +
> +        index = self._notebook.append_page(box, tablabel)
> +        tablabel.show_all()

I would use: tab_label as variable name :)

> diff --git a/widgets.py b/widgets.py
> new file mode 100644
> index 0000000..93d7dc0
> +        self.set_name('browse-tab-add')

This line comes from Browse that is why this has "browse" inside the
string. Is it OK?

> +        button.set_name('browse-tab-close')

The same happens here.


THANKS a lot for your patch!

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/


More information about the Sugar-devel mailing list