From eecbc352c4a19327e3cd1dbcf2bd75d5830bf560 Mon Sep 17 00:00:00 2001 From: Oliver Gerlich Date: Sat, 23 Mar 2013 13:02:00 +0100 Subject: [PATCH] Added option to open another private window from private window. Closes #776 Closes #772 --- CHANGELOG | 1 + src/lib/app/mainapplication.cpp | 4 +++- src/lib/app/qupzilla.cpp | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 927a35a75..3b35b94df 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ Version 1.5.0 * development version + * added option to open another private window from private window * added delete action in edit context menu on page Version 1.4.1 diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 578b8d25c..0e2826551 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -927,7 +927,9 @@ void MainApplication::startPrivateBrowsing() { QStringList args; foreach (const QString &arg, arguments()) { - if (arg.startsWith(QLatin1Char('-'))) { + if (arg.startsWith(QLatin1Char('-')) && + arg != QLatin1String("--private-browsing") && + arg != QLatin1String("-pb")) { args.append(arg); } } diff --git a/src/lib/app/qupzilla.cpp b/src/lib/app/qupzilla.cpp index 41e1e503f..524207a14 100644 --- a/src/lib/app/qupzilla.cpp +++ b/src/lib/app/qupzilla.cpp @@ -549,9 +549,8 @@ void QupZilla::setupMenu() m_menuTools->addAction(QIcon(":/icons/menu/rss.png"), tr("RSS &Reader"), MENU_RECEIVER, SLOT(showRSSManager())); m_menuTools->addAction(tr("Web In&spector"), MENU_RECEIVER, SLOT(showWebInspector()))->setShortcut(QKeySequence("Ctrl+Shift+I")); m_menuTools->addAction(QIcon::fromTheme("edit-clear"), tr("Clear Recent &History"), MENU_RECEIVER, SLOT(showClearPrivateData()))->setShortcut(QKeySequence("Ctrl+Shift+Del")); - m_actionPrivateBrowsing = new QAction(tr("&Private Browsing"), MENU_RECEIVER); + m_actionPrivateBrowsing = new QAction(mApp->isPrivateSession() ? tr("New &Private Browsing Window") : tr("&Private Browsing"), MENU_RECEIVER); m_actionPrivateBrowsing->setShortcut(QKeySequence("Ctrl+Shift+P")); - m_actionPrivateBrowsing->setVisible(!mApp->isPrivateSession()); connect(m_actionPrivateBrowsing, SIGNAL(triggered(bool)), mApp, SLOT(startPrivateBrowsing())); m_menuTools->addAction(m_actionPrivateBrowsing); m_menuTools->addSeparator();