diff src/browser/libervia_main.py @ 659:8e7d4de56e75 frontends_multi_profiles

browser_side: allow to drop a widget in the "+" tab
author souliane <souliane@mailoo.org>
date Fri, 27 Feb 2015 16:05:28 +0100
parents 476d8d9973d3
children ebb602d8b3f2
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Fri Feb 27 02:42:44 2015 +0100
+++ b/src/browser/libervia_main.py	Fri Feb 27 16:05:28 2015 +0100
@@ -426,7 +426,7 @@
             # TODO: use the bare instead of node when all blogs can be retrieved
             node = jid.JID(data['public_blog']).node
             # FIXME: "/blog/{}" won't work with unicode nodes
-            self.displayWidget(widget.WebWidget, "/blog/{}".format(node), show_url=False, new_tab="{}'s blog".format(unicode(node)))
+            self.displayWidget(widget.WebWidget, "/blog/{}".format(node), show_url=False, new_tab=_(u"{}'s blog").format(unicode(node)))
         else:
             dialog.InfoDialog("Error",
                               "Unmanaged action result", Width="400px").center()
@@ -621,7 +621,7 @@
             kwargs['on_existing_widget'] = C.WIDGET_RECREATE
             wid = self.widgets.getOrCreateWidget(class_, target, *args, **kwargs)
             self.tab_panel.addWidgetsTab(new_tab)
-            self.addWidget(wid)
+            self.addWidget(wid, tab_index=self.tab_panel.getWidgetCount() - 1)
             return wid
 
         kwargs['on_existing_widget'] = C.WIDGET_RAISE