aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4146e8a..050384b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -71,7 +71,7 @@ MainWindow::MainWindow(QWidget *parent) :
// tabToolBar: main menu and tab list
tabToolBar->setMovable(browser->settings()->value("window.ui.tabtoolbarMovable").toBool());
tabToolBar->addWidget(menuBar);
- tabToolBar->addWidget(tabBar);
+ //tabToolBar->addWidget(tabBar);
this->addToolBar(Qt::TopToolBarArea, tabToolBar);
this->addToolBarBreak(Qt::TopToolBarArea);
@@ -79,7 +79,6 @@ MainWindow::MainWindow(QWidget *parent) :
navigationToolBar->setMovable(browser->settings()->value("window.ui.navtoolbarMovable").toBool());
// page actions
-m:
m_backButton = new NavigationButton(NavigationButton::BackButton, this);
m_forwardButton = new NavigationButton(NavigationButton::ForwardButton, this);
@@ -116,6 +115,8 @@ m:
// Load profile
tabBar->setProfile(browser->profile(browser->settings()->value("browser.profile.default").toString()));
+ // Adding a tab here, because otherwise tabs won't show up
+ //newTab();
// loading bar
ui->statusBar->addPermanentWidget(m_progressBar);
@@ -157,11 +158,11 @@ void MainWindow::addTabbedDock(Qt::DockWidgetArea area, QDockWidget *widget)
void MainWindow::newTab(const QUrl &url)
{
- if(!url.isEmpty()) {
- tabBar->addTab(url);
- } else {
- tabBar->addTab(tabBar->profile()->newtab());
+ if(!m_tabBarAdded) {
+ m_tabBarAdded = true;
+ tabToolBar->addWidget(tabBar);
}
+ tabBar->addTab(url);
}
void MainWindow::focusAddress()
@@ -228,7 +229,6 @@ void MainWindow::handleTabChanged(WebView *view)
setCentralWidget(view);
// connect signals
-m:
m_backButton->setView(view);
m_forwardButton->setView(view);
m_reloadButton->setView(view);