mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
parent
3cdb4c26df
commit
c1c1b4130e
@ -290,7 +290,7 @@ void MainApplication::postLaunch()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_postLaunchActions.contains(OpenNewTab)) {
|
if (m_postLaunchActions.contains(OpenNewTab)) {
|
||||||
getWindow()->tabWidget()->addView(QUrl(), Qz::NT_SelectedTabAtTheEnd);
|
getWindow()->tabWidget()->addView(QUrl(), Qz::NT_SelectedNewEmptyTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoSaver* saver = new AutoSaver();
|
AutoSaver* saver = new AutoSaver();
|
||||||
@ -550,7 +550,8 @@ void MainApplication::addNewTab(const QUrl &url)
|
|||||||
if (!getWindow()) {
|
if (!getWindow()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
getWindow()->tabWidget()->addView(url, Qz::NT_SelectedTabAtTheEnd);
|
|
||||||
|
getWindow()->tabWidget()->addView(url, url.isEmpty() ? Qz::NT_SelectedNewEmptyTab : Qz::NT_SelectedTabAtTheEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
QupZilla* MainApplication::makeNewWindow(Qz::BrowserWindow type, const QUrl &startUrl)
|
QupZilla* MainApplication::makeNewWindow(Qz::BrowserWindow type, const QUrl &startUrl)
|
||||||
|
@ -1477,7 +1477,7 @@ void QupZilla::aboutQupZilla()
|
|||||||
|
|
||||||
void QupZilla::addTab()
|
void QupZilla::addTab()
|
||||||
{
|
{
|
||||||
m_tabWidget->addView(QUrl(), Qz::NT_SelectedTabAtTheEnd, true);
|
m_tabWidget->addView(QUrl(), Qz::NT_SelectedNewEmptyTab, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QupZilla::webSearch()
|
void QupZilla::webSearch()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -75,7 +75,9 @@ enum NewTabPositionFlag {
|
|||||||
NT_NotSelectedTab = 2,
|
NT_NotSelectedTab = 2,
|
||||||
NT_CleanTab = 4,
|
NT_CleanTab = 4,
|
||||||
NT_TabAtTheEnd = 8,
|
NT_TabAtTheEnd = 8,
|
||||||
|
NT_NewEmptyTab = 16,
|
||||||
|
|
||||||
|
NT_SelectedNewEmptyTab = NT_SelectedTab | NT_TabAtTheEnd | NT_NewEmptyTab,
|
||||||
NT_SelectedTabAtTheEnd = NT_SelectedTab | NT_TabAtTheEnd,
|
NT_SelectedTabAtTheEnd = NT_SelectedTab | NT_TabAtTheEnd,
|
||||||
NT_NotSelectedTabAtTheEnd = NT_NotSelectedTab | NT_TabAtTheEnd,
|
NT_NotSelectedTabAtTheEnd = NT_NotSelectedTab | NT_TabAtTheEnd,
|
||||||
NT_CleanSelectedTabAtTheEnd = NT_SelectedTab | NT_TabAtTheEnd | NT_CleanTab,
|
NT_CleanSelectedTabAtTheEnd = NT_SelectedTab | NT_TabAtTheEnd | NT_CleanTab,
|
||||||
|
@ -202,6 +202,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
|||||||
ui->hideTabsOnTab->setChecked(settings.value("hideTabsWithOneTab", false).toBool());
|
ui->hideTabsOnTab->setChecked(settings.value("hideTabsWithOneTab", false).toBool());
|
||||||
ui->activateLastTab->setChecked(settings.value("ActivateLastTabWhenClosingActual", false).toBool());
|
ui->activateLastTab->setChecked(settings.value("ActivateLastTabWhenClosingActual", false).toBool());
|
||||||
ui->openNewTabAfterActive->setChecked(settings.value("newTabAfterActive", true).toBool());
|
ui->openNewTabAfterActive->setChecked(settings.value("newTabAfterActive", true).toBool());
|
||||||
|
ui->openNewEmptyTabAfterActive->setChecked(settings.value("newEmptyTabAfterActive", false).toBool());
|
||||||
ui->switchToNewTabs->setChecked(settings.value("OpenNewTabsSelected", false).toBool());
|
ui->switchToNewTabs->setChecked(settings.value("OpenNewTabsSelected", false).toBool());
|
||||||
ui->dontQuitOnTab->setChecked(settings.value("dontQuitWithOneTab", false).toBool());
|
ui->dontQuitOnTab->setChecked(settings.value("dontQuitWithOneTab", false).toBool());
|
||||||
ui->askWhenClosingMultipleTabs->setChecked(settings.value("AskOnClosing", false).toBool());
|
ui->askWhenClosingMultipleTabs->setChecked(settings.value("AskOnClosing", false).toBool());
|
||||||
@ -824,6 +825,7 @@ void Preferences::saveSettings()
|
|||||||
settings.setValue("hideTabsWithOneTab", ui->hideTabsOnTab->isChecked());
|
settings.setValue("hideTabsWithOneTab", ui->hideTabsOnTab->isChecked());
|
||||||
settings.setValue("ActivateLastTabWhenClosingActual", ui->activateLastTab->isChecked());
|
settings.setValue("ActivateLastTabWhenClosingActual", ui->activateLastTab->isChecked());
|
||||||
settings.setValue("newTabAfterActive", ui->openNewTabAfterActive->isChecked());
|
settings.setValue("newTabAfterActive", ui->openNewTabAfterActive->isChecked());
|
||||||
|
settings.setValue("newEmptyTabAfterActive", ui->openNewEmptyTabAfterActive->isChecked());
|
||||||
settings.setValue("OpenNewTabsSelected", ui->switchToNewTabs->isChecked());
|
settings.setValue("OpenNewTabsSelected", ui->switchToNewTabs->isChecked());
|
||||||
settings.setValue("dontQuitWithOneTab", ui->dontQuitOnTab->isChecked());
|
settings.setValue("dontQuitWithOneTab", ui->dontQuitOnTab->isChecked());
|
||||||
settings.setValue("AskOnClosing", ui->askWhenClosingMultipleTabs->isChecked());
|
settings.setValue("AskOnClosing", ui->askWhenClosingMultipleTabs->isChecked());
|
||||||
|
@ -727,6 +727,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="openNewEmptyTabAfterActive">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open new empty tabs after active tab</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="switchToNewTabs">
|
<widget class="QCheckBox" name="switchToNewTabs">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -64,7 +64,7 @@ void AddTabButton::mouseReleaseEvent(QMouseEvent* event)
|
|||||||
QUrl guessedUrl = WebView::guessUrlFromString(selectionClipboard);
|
QUrl guessedUrl = WebView::guessUrlFromString(selectionClipboard);
|
||||||
|
|
||||||
if (!guessedUrl.isEmpty()) {
|
if (!guessedUrl.isEmpty()) {
|
||||||
m_tabWidget->addView(guessedUrl, Qz::NT_SelectedTabAtTheEnd);
|
m_tabWidget->addView(guessedUrl, Qz::NT_SelectedNewEmptyTab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ void AddTabButton::dropEvent(QDropEvent* event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach(const QUrl & url, mime->urls()) {
|
foreach(const QUrl & url, mime->urls()) {
|
||||||
m_tabWidget->addView(url, Qz::NT_SelectedTabAtTheEnd);
|
m_tabWidget->addView(url, Qz::NT_SelectedNewEmptyTab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,6 +151,7 @@ void TabWidget::loadSettings()
|
|||||||
m_dontQuitWithOneTab = settings.value("dontQuitWithOneTab", false).toBool();
|
m_dontQuitWithOneTab = settings.value("dontQuitWithOneTab", false).toBool();
|
||||||
m_closedInsteadOpened = settings.value("closedInsteadOpenedTabs", false).toBool();
|
m_closedInsteadOpened = settings.value("closedInsteadOpenedTabs", false).toBool();
|
||||||
m_newTabAfterActive = settings.value("newTabAfterActive", true).toBool();
|
m_newTabAfterActive = settings.value("newTabAfterActive", true).toBool();
|
||||||
|
m_newEmptyTabAfterActive = settings.value("newEmptyTabAfterActive", false).toBool();
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
settings.beginGroup("Web-URL-Settings");
|
settings.beginGroup("Web-URL-Settings");
|
||||||
@ -288,7 +289,13 @@ int TabWidget::addView(QNetworkRequest req, const QString &title, const Qz::NewT
|
|||||||
url = m_urlOnNewTab;
|
url = m_urlOnNewTab;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (position == -1 && m_newTabAfterActive && !(openFlags & Qz::NT_TabAtTheEnd)) {
|
bool openAfterActive = m_newTabAfterActive && !(openFlags & Qz::NT_TabAtTheEnd);
|
||||||
|
|
||||||
|
if (openFlags == Qz::NT_SelectedNewEmptyTab && m_newEmptyTabAfterActive) {
|
||||||
|
openAfterActive = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (openAfterActive && position == -1) {
|
||||||
// If we are opening newBgTab from pinned tab, make sure it won't be
|
// If we are opening newBgTab from pinned tab, make sure it won't be
|
||||||
// opened between other pinned tabs
|
// opened between other pinned tabs
|
||||||
if (openFlags & Qz::NT_NotSelectedTab && m_lastBackgroundTabIndex != -1) {
|
if (openFlags & Qz::NT_NotSelectedTab && m_lastBackgroundTabIndex != -1) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -140,6 +140,7 @@ private:
|
|||||||
bool m_dontQuitWithOneTab;
|
bool m_dontQuitWithOneTab;
|
||||||
bool m_closedInsteadOpened;
|
bool m_closedInsteadOpened;
|
||||||
bool m_newTabAfterActive;
|
bool m_newTabAfterActive;
|
||||||
|
bool m_newEmptyTabAfterActive;
|
||||||
QUrl m_urlOnNewTab;
|
QUrl m_urlOnNewTab;
|
||||||
QupZilla* p_QupZilla;
|
QupZilla* p_QupZilla;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* Mouse Gestures plugin for QupZilla
|
* Mouse Gestures plugin for QupZilla
|
||||||
* Copyright (C) 2012 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2013 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -135,7 +135,7 @@ void MouseGestures::downGestured()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_view.data()->openUrlInNewTab(QUrl(), Qz::NT_SelectedTabAtTheEnd);
|
m_view.data()->openUrlInNewTab(QUrl(), Qz::NT_SelectedNewEmptyTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MouseGestures::leftGestured()
|
void MouseGestures::leftGestured()
|
||||||
|
Loading…
Reference in New Issue
Block a user