Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webtoolbar.py
diff options
context:
space:
mode:
authorManuel QuiƱones <manuq@laptop.org>2011-09-09 02:42:35 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-09-10 06:45:49 (GMT)
commit959f86e0406914267047dc10302f98a059b6ba21 (patch)
treed5a5582f52e5af4b3bd2b95beeff604492049eff /webtoolbar.py
parent370dfc1c167934eb4784b0444b28a493c4cc6cec (diff)
Browse: tabs usability improved
The Add Tab button has been relocated next to the tab labels, allowing more space for the URL entry. Tabs are always shown. There is at least one tab. In that case, it cannot be closed. We prevent the closing by hiding the 'X' button. Also, the close image was sugarized. There is now a fixed width for tabs. The label text does ellipsize. The width depends on the amount of tabs. There is a maximum size that is used when there is extra space. There is a minimum size to prevent hiding the information. When a new tab is opened, it now shows an empty page, not the default page. In the future, we will add a hint in this empty page, similar to what we have for an empty Journal. Added the option to "follow link in new tab" in the link's palette. Added an icon for this item, and also the icon for "follow link" is also updated. When a new tab is opened via the '+' button, the focus goes to the URL entry in the toolbar. Signed-off-by: Manuel QuiƱones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'webtoolbar.py')
-rw-r--r--webtoolbar.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/webtoolbar.py b/webtoolbar.py
index c0e097d..a4623be 100644
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -228,15 +228,12 @@ class PrimaryToolbar(ToolbarBase):
'add-link': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE,
([])),
- 'add-tab': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([])),
'go-home': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE,
([])),
}
- def __init__(self, tabbed_view, act, disable_multiple_tabs):
+ def __init__(self, tabbed_view, act):
ToolbarBase.__init__(self)
self._activity = act
@@ -286,14 +283,6 @@ class PrimaryToolbar(ToolbarBase):
toolbar.insert(self._forward, -1)
self._forward.show()
- if not disable_multiple_tabs:
- self._add_tab = ToolButton('tab-add')
- self._add_tab.set_tooltip(_('Add a tab'))
- self._add_tab.props.sensitive = True
- self._add_tab.connect('clicked', self._add_tab_cb)
- toolbar.insert(self._add_tab, -1)
- self._add_tab.show()
-
self._link_add = ToolButton('emblem-favorite')
self._link_add.set_tooltip(_('Bookmark'))
self._link_add.connect('clicked', self._link_add_clicked_cb)
@@ -417,9 +406,6 @@ class PrimaryToolbar(ToolbarBase):
browser.load_uri(entry.props.text)
browser.grab_focus()
- def _add_tab_cb(self, button):
- self.emit('add-tab')
-
def _go_home_cb(self, button):
self.emit('go-home')