Hide the tabs bar when there is only one toolbar.
Fix sugar.Browser
This commit is contained in:
parent
9e1e851884
commit
c84e21aa9e
@ -22,8 +22,8 @@ libsugarbrowser_la_CPPFLAGS = \
|
||||
-I$(MOZILLA_INCLUDE_DIR)/webbrowserpersist \
|
||||
-I$(MOZILLA_INCLUDE_DIR)/widget \
|
||||
-I$(MOZILLA_INCLUDE_DIR)/xpcom \
|
||||
-I$(srcdir)/components/sessionstore \
|
||||
-I$(srcdir)/components/browserhelper \
|
||||
-I$(top_builddir)/browser/components/sessionstore \
|
||||
-I$(top_builddir)/browser/components/browserhelper \
|
||||
-DPLUGIN_DIR=\"$(libdir)/mozilla/plugins\" \
|
||||
-DSHARE_DIR=\"$(pkgdatadir)\"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
VERSION=0.63
|
||||
DATE=`date +%Y%m%d`
|
||||
RELEASE=2.78
|
||||
RELEASE=2.79
|
||||
TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2
|
||||
|
||||
rm sugar-$VERSION.tar.bz2
|
||||
|
@ -5,13 +5,14 @@ XUL Runner and gtkmozembed and is produced by the PyGTK
|
||||
"""
|
||||
|
||||
try:
|
||||
from sugar.browser._sugarbrowser import startup, shutdown
|
||||
from sugar.browser import _sugarbrowser
|
||||
except ImportError:
|
||||
from sugar import ltihooks
|
||||
from sugar.browser._sugarbrowser import startup, shutdown
|
||||
from sugar.browser import _sugarbrowser
|
||||
|
||||
from _sugarbrowser import AddressEntry
|
||||
from _sugarbrowser import startup, shutdown, get_download_manager
|
||||
|
||||
class Browser(_sugarbrowser.Browser):
|
||||
def __init__(self):
|
||||
_sugarbrowser.Browser.__init__(self)
|
||||
|
@ -31,6 +31,7 @@ class Toolbox(gtk.VBox):
|
||||
self._notebook = gtk.Notebook()
|
||||
self._notebook.set_tab_pos(gtk.POS_BOTTOM)
|
||||
self._notebook.set_show_border(False)
|
||||
self._notebook.set_show_tabs(False)
|
||||
self.pack_start(self._notebook)
|
||||
self._notebook.show()
|
||||
|
||||
@ -45,5 +46,11 @@ class Toolbox(gtk.VBox):
|
||||
self._notebook.append_page(toolbar_box, label)
|
||||
toolbar_box.show()
|
||||
|
||||
if self._notebook.get_n_pages() > 1:
|
||||
self._notebook.set_show_tabs(True)
|
||||
|
||||
def remove_toolbar(self, index):
|
||||
self._notebook.remove_page(index)
|
||||
|
||||
if self._notebook.get_n_pages() < 2:
|
||||
self._notebook.set_show_tabs(False)
|
||||
|
Loading…
Reference in New Issue
Block a user