Hide the tabs bar when there is only one toolbar.
Fix sugar.Browser
This commit is contained in:
parent
9e1e851884
commit
c84e21aa9e
@ -1,30 +1,30 @@
|
|||||||
SUBDIRS = components
|
SUBDIRS = components
|
||||||
|
|
||||||
libsugarbrowser_la_CPPFLAGS = \
|
libsugarbrowser_la_CPPFLAGS = \
|
||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
$(LIB_CFLAGS) \
|
$(LIB_CFLAGS) \
|
||||||
$(GECKO_CFLAGS) \
|
$(GECKO_CFLAGS) \
|
||||||
$(NSPR_CFLAGS) \
|
$(NSPR_CFLAGS) \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/chrome \
|
-I$(MOZILLA_INCLUDE_DIR)/chrome \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/commandhandler \
|
-I$(MOZILLA_INCLUDE_DIR)/commandhandler \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/content \
|
-I$(MOZILLA_INCLUDE_DIR)/content \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/dom \
|
-I$(MOZILLA_INCLUDE_DIR)/dom \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/docshell \
|
-I$(MOZILLA_INCLUDE_DIR)/docshell \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/exthandler \
|
-I$(MOZILLA_INCLUDE_DIR)/exthandler \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \
|
-I$(MOZILLA_INCLUDE_DIR)/gtkembedmoz \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/imglib2 \
|
-I$(MOZILLA_INCLUDE_DIR)/imglib2 \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/mimetype \
|
-I$(MOZILLA_INCLUDE_DIR)/mimetype \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/necko \
|
-I$(MOZILLA_INCLUDE_DIR)/necko \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/pref \
|
-I$(MOZILLA_INCLUDE_DIR)/pref \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/shistory \
|
-I$(MOZILLA_INCLUDE_DIR)/shistory \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/uriloader \
|
-I$(MOZILLA_INCLUDE_DIR)/uriloader \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/webbrwsr \
|
-I$(MOZILLA_INCLUDE_DIR)/webbrwsr \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/webbrowserpersist \
|
-I$(MOZILLA_INCLUDE_DIR)/webbrowserpersist \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/widget \
|
-I$(MOZILLA_INCLUDE_DIR)/widget \
|
||||||
-I$(MOZILLA_INCLUDE_DIR)/xpcom \
|
-I$(MOZILLA_INCLUDE_DIR)/xpcom \
|
||||||
-I$(srcdir)/components/sessionstore \
|
-I$(top_builddir)/browser/components/sessionstore \
|
||||||
-I$(srcdir)/components/browserhelper \
|
-I$(top_builddir)/browser/components/browserhelper \
|
||||||
-DPLUGIN_DIR=\"$(libdir)/mozilla/plugins\" \
|
-DPLUGIN_DIR=\"$(libdir)/mozilla/plugins\" \
|
||||||
-DSHARE_DIR=\"$(pkgdatadir)\"
|
-DSHARE_DIR=\"$(pkgdatadir)\"
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libsugarbrowser.la
|
noinst_LTLIBRARIES = libsugarbrowser.la
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
VERSION=0.63
|
VERSION=0.63
|
||||||
DATE=`date +%Y%m%d`
|
DATE=`date +%Y%m%d`
|
||||||
RELEASE=2.78
|
RELEASE=2.79
|
||||||
TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2
|
TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2
|
||||||
|
|
||||||
rm sugar-$VERSION.tar.bz2
|
rm sugar-$VERSION.tar.bz2
|
||||||
|
@ -5,13 +5,14 @@ XUL Runner and gtkmozembed and is produced by the PyGTK
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from sugar.browser._sugarbrowser import startup, shutdown
|
|
||||||
from sugar.browser import _sugarbrowser
|
from sugar.browser import _sugarbrowser
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from sugar import ltihooks
|
from sugar import ltihooks
|
||||||
from sugar.browser._sugarbrowser import startup, shutdown
|
|
||||||
from sugar.browser import _sugarbrowser
|
from sugar.browser import _sugarbrowser
|
||||||
|
|
||||||
|
from _sugarbrowser import AddressEntry
|
||||||
|
from _sugarbrowser import startup, shutdown, get_download_manager
|
||||||
|
|
||||||
class Browser(_sugarbrowser.Browser):
|
class Browser(_sugarbrowser.Browser):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
_sugarbrowser.Browser.__init__(self)
|
_sugarbrowser.Browser.__init__(self)
|
||||||
|
@ -31,6 +31,7 @@ class Toolbox(gtk.VBox):
|
|||||||
self._notebook = gtk.Notebook()
|
self._notebook = gtk.Notebook()
|
||||||
self._notebook.set_tab_pos(gtk.POS_BOTTOM)
|
self._notebook.set_tab_pos(gtk.POS_BOTTOM)
|
||||||
self._notebook.set_show_border(False)
|
self._notebook.set_show_border(False)
|
||||||
|
self._notebook.set_show_tabs(False)
|
||||||
self.pack_start(self._notebook)
|
self.pack_start(self._notebook)
|
||||||
self._notebook.show()
|
self._notebook.show()
|
||||||
|
|
||||||
@ -44,6 +45,12 @@ class Toolbox(gtk.VBox):
|
|||||||
|
|
||||||
self._notebook.append_page(toolbar_box, label)
|
self._notebook.append_page(toolbar_box, label)
|
||||||
toolbar_box.show()
|
toolbar_box.show()
|
||||||
|
|
||||||
|
if self._notebook.get_n_pages() > 1:
|
||||||
|
self._notebook.set_show_tabs(True)
|
||||||
|
|
||||||
def remove_toolbar(self, index):
|
def remove_toolbar(self, index):
|
||||||
self._notebook.remove_page(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