[Sugar-devel] [PATCH] Browse: tabs usability improved

manuel quiñones manuq at laptop.org
Wed Sep 7 21:37:46 EDT 2011


Hi Simon,

Thank you very much for your insightful review, I welcome the changes
you proposed.  I did almost all of them, I'm still working in the
error that appear in the logs.  I fixed the one that raised "maximum
recursion depth exceeded", but I'm following the others.

El día 7 de septiembre de 2011 10:52, Simon Schampijer
<simon at schampijer.de> escribió:
> On 09/07/2011 03:37 PM, Simon Schampijer wrote:
>>
>> On 09/07/2011 03:03 PM, Simon Schampijer wrote:
>>>
>>> Hi Manuel,
>>
>> [..]
>>
>> There are as well two errors in the logs we need to address:
>>
>> "1315401901.466328 DEBUG web-activity: Starting the web activity
>> Traceback (most recent call last):
>> File "/home/erikos/Activities/Browse.activity/widgets.py", line 73, in
>> __on_switch_page
>> self.set_current_page(-1)
>> File "/home/erikos/Activities/Browse.activity/widgets.py", line 88, in
>> set_current_page
>> return Notebook.set_current_page(self, number)
>> RuntimeError: maximum recursion depth exceeded while calling a Python
>> object"
>>
>> and
>>
>> "RuntimeError: maximum recursion depth exceeded
>> RuntimeError: maximum recursion depth exceeded
>> Traceback (most recent call last):
>> File "/home/erikos/Activities/Browse.activity/browser.py", line 192, in
>> __page_removed_cb
>> self._update_closing_buttons()
>> File "/home/erikos/Activities/Browse.activity/browser.py", line 258, in
>> _update_closing_buttons
>> first_label.show_close_button()
>> AttributeError: 'TabAdd' object has no attribute 'show_close_button'
>> "
>>
>> Regards,
>> Simon
>
> Two more issues:
>
> * the focus-url-entry does only work when we use the 'add-tab' button but
> not when we use the keyboard shortcut 'ctrl+t'
>
> Seems to work with the following:
>
> diff --git a/browser.py b/browser.py
> index a387df3..dec7d1d 100644
> --- a/browser.py
> +++ b/browser.py
> @@ -198,6 +198,7 @@ class TabbedView(BrowserNotebook):
>             self._insert_tab_next(browser)
>         else:
>             self._append_tab(browser)
> +        self.emit('focus-url-entry')
>         return browser
>
>     def _insert_tab_next(self, browser):
> @@ -218,7 +219,6 @@ class TabbedView(BrowserNotebook):
>
>     def on_add_tab(self, gobject):
>         self.add_tab()
> -        self.emit('focus-url-entry')
>
> * when you resume a session that contains an empty tab we get an error,
> steps to reproduce:
>   - open a new Browse session
>   - add one tab
>   - without typing in an url close the session
>   - resume it
>
> you will get the following error:
>
> 1315403227.280123 DEBUG root: nsIEmbeddingSiteWindow.get_visibility: False
> 1315403227.284243 DEBUG root: OnHistoryGotoIndex: 0
> file:///home/erikos/Activities/Browse.activity/data/index.html
> Traceback (most recent call last):
>  File
> "/home/erikos/sugar-jhbuild/install/lib/python2.7/site-packages/sugar/activity/activity.py",
> line 506, in __canvas_map_cb
>    self.read_file(self._jobject.file_path)
>  File "/home/erikos/Activities/Browse.activity/webactivity.py", line 452, in
> read_file
>    browser.set_history_index(tab['history_index'])
>  File "/home/erikos/Activities/Browse.activity/browser.py", line 461, in
> set_history_index
>    self.web_navigation.gotoIndex(index)
>  File "<XPCOMObject method 'gotoIndex'>", line 3, in gotoIndex
> xpcom.Exception: -2147467259 (NS_ERROR_FAILURE)
> 1315403227.291903 DEBUG root: ActivityService.set_active: 1.
> 1315403227.305870 DEBUG root: nsIEmbeddingSiteWindow.get_visibility: False
>
> Regards,
>   Simon
>



-- 
.. manuq ..


More information about the Sugar-devel mailing list