1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

[Fix] Fixed "Hide tabs when there is only one tab" option. Closes #121

- also edited spanish translation in desktop launcher
This commit is contained in:
nowrep 2012-01-04 16:00:59 +01:00
parent 86d6f0cae0
commit ab5555d913
4 changed files with 16 additions and 7 deletions

View File

@ -52,7 +52,7 @@ Name=Open new window
Name[cs]=Otevřít nové okno Name[cs]=Otevřít nové okno
Name[de]=Neues Fenster öffnen Name[de]=Neues Fenster öffnen
Name[el]=Άνοιγμα νέου παράθυρου Name[el]=Άνοιγμα νέου παράθυρου
Name[es]=Abrir una ventana nueva Name[es]=Abrir nueva ventana
Name[fr]=Ouvrir une nouvelle fenêtre Name[fr]=Ouvrir une nouvelle fenêtre
Name[it]=Apri una nuova finestra Name[it]=Apri una nuova finestra
Name[nl]=Nieuw venster openen Name[nl]=Nieuw venster openen

View File

@ -1254,6 +1254,7 @@ void QupZilla::fullScreen(bool make)
statusBar()->hide(); statusBar()->hide();
bookmarksToolbar()->hide(); bookmarksToolbar()->hide();
m_navigationBar->hide(); m_navigationBar->hide();
m_tabWidget->getTabBar()->hide();
} }
else { else {
setWindowState(windowState() & ~Qt::WindowFullScreen); setWindowState(windowState() & ~Qt::WindowFullScreen);
@ -1262,11 +1263,11 @@ void QupZilla::fullScreen(bool make)
statusBar()->setVisible(m_statusBarVisible); statusBar()->setVisible(m_statusBarVisible);
m_bookmarksToolbar->setVisible(m_bookmarksToolBarVisible); m_bookmarksToolbar->setVisible(m_bookmarksToolBarVisible);
m_navigationBar->setVisible(m_navigationVisible); m_navigationBar->setVisible(m_navigationVisible);
m_tabWidget->showTabBar();
} }
m_actionShowFullScreen->setChecked(make); m_actionShowFullScreen->setChecked(make);
m_navigationBar->buttonExitFullscreen()->setVisible(make); m_navigationBar->buttonExitFullscreen()->setVisible(make);
m_tabWidget->getTabBar()->setVisible(!make);
emit setWebViewMouseTracking(make); emit setWebViewMouseTracking(make);
} }

View File

@ -344,14 +344,21 @@ void TabWidget::closeTab(int index)
setCurrentIndex(m_lastTabIndex); setCurrentIndex(m_lastTabIndex);
} }
widget(index)->deleteLater(); if (count() == 2 && m_hideTabBarWithOneTab) {
if (count() == 1 && m_hideTabBarWithOneTab) {
tabBar()->setVisible(false); tabBar()->setVisible(false);
} }
// if (count() < 1) widget(index)->deleteLater();
// p_QupZilla->close(); }
void TabWidget::showTabBar()
{
if (count() == 1 && m_hideTabBarWithOneTab) {
tabBar()->hide();
}
else {
tabBar()->show();
}
} }
void TabWidget::tabMoved(int before, int after) void TabWidget::tabMoved(int before, int after)

View File

@ -62,6 +62,7 @@ public:
ToolButton* buttonAddTab() { return m_buttonAddTab; } ToolButton* buttonAddTab() { return m_buttonAddTab; }
void createKeyPressEvent(QKeyEvent* event); void createKeyPressEvent(QKeyEvent* event);
void showTabBar();
signals: signals:
void pinnedTabClosed(); void pinnedTabClosed();