1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

[Fix] Fixed restoring multiple windows + added global defines header

- also added tests directory with html files to test QupZilla behaviour
- it only contain opening links test, more tests will come
This commit is contained in:
nowrep 2012-01-21 23:19:38 +01:00
parent bd9cead2c2
commit 195288c83b
51 changed files with 511 additions and 230 deletions

Binary file not shown.

View File

@ -22,6 +22,7 @@ Comment[sr]=Брз и сигуран веб прегледач
Comment[sr@ijekavian]=Брз и сигуран веб прегледач
Comment[sr@ijekavianlatin]=Brz i siguran veb pregledač
Comment[sr@latin]=Brz i siguran veb pregledač
Comment[sv]=En snabb och säker webbläsare
GenericName=Web Browser
GenericName[cs]=Webový prohlížeč
GenericName[de]=Web Browser
@ -38,7 +39,7 @@ GenericName[sr]=Веб прегледач
GenericName[sr@ijekavian]=Веб прегледач
GenericName[sr@ijekavianlatin]=Veb pregledač
GenericName[sr@latin]=Veb pregledač
GenericName[sv]=Webbläsare
Exec=qupzilla %u
MimeType=text/html;application/xhtml+xml;
Terminal=false
@ -61,6 +62,7 @@ Name[sr]=Отвори у новом језичку
Name[sr@ijekavian]=Отвори у новом језичку
Name[sr@ijekavianlatin]=Otvori u novom jezičku
Name[sr@latin]=Otvori u novom jezičku
Name[sv]=Öppna ny flik
Exec=qupzilla --new-tab
TargetEnvironment=Unity
@ -82,6 +84,7 @@ Name[sr]=Отвори у новом прозору
Name[sr@ijekavian]=Отвори у новом прозору
Name[sr@ijekavianlatin]=Otvori u novom prozoru
Name[sr@latin]=Otvori u novom prozoru
Name[sv]=Öppna nytt fönster
Exec=qupzilla --new-window
TargetEnvironment=Unity
@ -102,5 +105,6 @@ Name[sr]=Покрени приватно прегледање
Name[sr@ijekavian]=Покрени приватно прегледање
Name[sr@ijekavianlatin]=Pokreni privatno pregledanje
Name[sr@latin]=Pokreni privatno pregledanje
Name[sv]=Starta privat surfning
Exec=qupzilla --private-browsing
TargetEnvironment=Unity

View File

@ -19,6 +19,8 @@
#include "adblockmanager.h"
#include "qupzilla.h"
#include "webpage.h"
#include "tabbedwebview.h"
#include "tabwidget.h"
AdBlockIcon::AdBlockIcon(QupZilla* mainClass, QWidget* parent)
: ClickableLabel(parent)
@ -57,7 +59,7 @@ void AdBlockIcon::showMenu(const QPoint &pos)
void AdBlockIcon::learnAboutRules()
{
p_QupZilla->tabWidget()->addView(QUrl("http://adblockplus.org/en/filters"), TabWidget::NewSelectedTab);
p_QupZilla->tabWidget()->addView(QUrl("http://adblockplus.org/en/filters"), Qz::NT_SelectedTab);
}
void AdBlockIcon::setEnabled(bool enabled)

View File

@ -80,7 +80,7 @@ void AdBlockManager::setEnabled(bool enabled)
}
m_enabled = enabled;
emit rulesChanged();
mApp->sendMessages(MainApplication::SetAdBlockIconEnabled, enabled);
mApp->sendMessages(Qz::AM_SetAdBlockIconEnabled, enabled);
}
AdBlockNetwork* AdBlockManager::network()

View File

@ -25,6 +25,11 @@ CommandLineOptions::CommandLineOptions(int &argc, char** argv)
parseActions();
}
CommandLineOptions::ActionPairList CommandLineOptions::getActions()
{
return m_actions;
}
void CommandLineOptions::showHelp()
{
using namespace std;
@ -64,7 +69,7 @@ void CommandLineOptions::parseActions()
if (arg == "-h" || arg == "--help") {
showHelp();
ActionPair pair;
pair.action = ExitAction;
pair.action = Qz::CL_ExitAction;
m_actions.append(pair);
break;
}
@ -73,7 +78,7 @@ void CommandLineOptions::parseActions()
cout << "QupZilla authors: " << endl;
cout << " nowrep <nowrep@gmail.com>" << endl;
ActionPair pair;
pair.action = ExitAction;
pair.action = Qz::CL_ExitAction;
m_actions.append(pair);
break;
}
@ -86,7 +91,7 @@ void CommandLineOptions::parseActions()
<< "(build " << QupZilla::BUILDTIME.toUtf8().data() << ")"
<< endl;
ActionPair pair;
pair.action = ExitAction;
pair.action = Qz::CL_ExitAction;
m_actions.append(pair);
break;
}
@ -96,42 +101,42 @@ void CommandLineOptions::parseActions()
arg.remove("--profile=");
cout << "starting with profile " << arg.toUtf8().data() << endl;
ActionPair pair;
pair.action = StartWithProfile;
pair.action = Qz::CL_StartWithProfile;
pair.text = arg;
m_actions.append(pair);
}
if (arg.startsWith("-np") || arg.startsWith("--no-plugins")) {
ActionPair pair;
pair.action = StartWithoutAddons;
pair.action = Qz::CL_StartWithoutAddons;
pair.text = "";
m_actions.append(pair);
}
if (arg.startsWith("-nt") || arg.startsWith("--new-tab")) {
ActionPair pair;
pair.action = NewTab;
pair.action = Qz::CL_NewTab;
pair.text = "";
m_actions.append(pair);
}
if (arg.startsWith("-nw") || arg.startsWith("--new-window")) {
ActionPair pair;
pair.action = NewWindow;
pair.action = Qz::CL_NewWindow;
pair.text = "";
m_actions.append(pair);
}
if (arg.startsWith("-dm") || arg.startsWith("--download-manager")) {
ActionPair pair;
pair.action = ShowDownloadManager;
pair.action = Qz::CL_ShowDownloadManager;
pair.text = "";
m_actions.append(pair);
}
if (arg.startsWith("-pb") || arg.startsWith("--private-browsing")) {
ActionPair pair;
pair.action = StartPrivateBrowsing;
pair.action = Qz::CL_StartPrivateBrowsing;
pair.text = "";
m_actions.append(pair);
}
@ -141,7 +146,7 @@ void CommandLineOptions::parseActions()
if (m_argc > 1 && !url.isEmpty() && !url.startsWith("-")) {
cout << "starting with url " << url.toUtf8().data() << endl;
ActionPair pair;
pair.action = OpenUrl;
pair.action = Qz::CL_OpenUrl;
pair.text = url;
m_actions.append(pair);
}

View File

@ -21,21 +21,20 @@
#include <QPair>
#include <iostream>
#include "qz_namespace.h"
class CommandLineOptions
{
public:
enum Action { NoAction, OpenUrl, StartWithProfile, StartWithoutAddons,
NewTab, NewWindow, ShowDownloadManager, StartPrivateBrowsing,
ExitAction
};
struct ActionPair {
Action action;
Qz::CommandLineAction action;
QString text;
};
typedef QList<ActionPair> ActionPairList;
explicit CommandLineOptions(int &argc, char** argv);
QList<ActionPair> getActions() { return m_actions; }
ActionPairList getActions();
private:
void showHelp();
@ -43,7 +42,7 @@ private:
int m_argc;
char** m_argv;
QList<ActionPair> m_actions;
ActionPairList m_actions;
};
#endif // COMMANDLINEOPTIONS_H

View File

@ -122,28 +122,28 @@ MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cm
if (argc > 1) {
foreach(CommandLineOptions::ActionPair pair, cmdActions) {
switch (pair.action) {
case CommandLineOptions::StartWithoutAddons:
case Qz::CL_StartWithoutAddons:
noAddons = true;
break;
case CommandLineOptions::StartWithProfile:
case Qz::CL_StartWithProfile:
startProfile = pair.text;
break;
case CommandLineOptions::NewTab:
case Qz::CL_NewTab:
messages.append("ACTION:NewTab");
m_postLaunchActions.append(OpenNewTab);
break;
case CommandLineOptions::NewWindow:
case Qz::CL_NewWindow:
messages.append("ACTION:NewWindow");
break;
case CommandLineOptions::ShowDownloadManager:
case Qz::CL_ShowDownloadManager:
messages.append("ACTION:ShowDownloadManager");
m_postLaunchActions.append(OpenDownloadManager);
break;
case CommandLineOptions::StartPrivateBrowsing:
case Qz::CL_StartPrivateBrowsing:
messages.append("ACTION:StartPrivateBrowsing");
m_postLaunchActions.append(PrivateBrowsing);
break;
case CommandLineOptions::OpenUrl:
case Qz::CL_OpenUrl:
startUrl = pair.text;
messages.append("URL:" + startUrl.toString());
break;
@ -214,9 +214,9 @@ MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cm
translateApp();
QWebHistoryInterface::setDefaultInterface(new WebHistoryInterface(this));
QupZilla* qupzilla = new QupZilla(QupZilla::FirstAppWindow, startUrl);
QupZilla* qupzilla = new QupZilla(Qz::BW_FirstAppWindow, startUrl);
m_mainWindows.append(qupzilla);
connect(qupzilla, SIGNAL(message(MainApplication::MessageType, bool)), this, SLOT(sendMessages(MainApplication::MessageType, bool)));
connect(qupzilla, SIGNAL(message(Qz::AppMessageType, bool)), this, SLOT(sendMessages(Qz::AppMessageType, bool)));
qupzilla->show();
AutoSaver* saver = new AutoSaver();
@ -375,7 +375,7 @@ void MainApplication::loadSettings()
void MainApplication::reloadSettings()
{
loadSettings();
emit message(ReloadSettings, true);
emit message(Qz::AM_ReloadSettings, true);
}
void MainApplication::restoreCursor()
@ -402,7 +402,7 @@ QupZilla* MainApplication::getWindow()
void MainApplication::setStateChanged()
{
m_isStateChanged = true;
sendMessages(HistoryStateChanged, true);
sendMessages(Qz::AM_HistoryStateChanged, true);
}
bool MainApplication::isStateChanged()
@ -420,10 +420,10 @@ void MainApplication::togglePrivateBrowsingMode(bool state)
history()->setSaving(!state);
cookieJar()->turnPrivateJar(state);
emit message(MainApplication::CheckPrivateBrowsing, state);
emit message(Qz::AM_CheckPrivateBrowsing, state);
}
void MainApplication::sendMessages(MainApplication::MessageType mes, bool state)
void MainApplication::sendMessages(Qz::AppMessageType mes, bool state)
{
emit message(mes, state);
}
@ -443,20 +443,20 @@ void MainApplication::receiveAppMessage(QString message)
actWin = getWindow();
}
else if (text == "NewWindow") {
actWin = makeNewWindow(false);
actWin = makeNewWindow(Qz::BW_NewWindow);
}
else if (text == "ShowDownloadManager") {
downManager()->show();
actWin = downManager();
}
else if (text == "StartPrivateBrowsing") {
sendMessages(StartPrivateBrowsing, true);
sendMessages(Qz::AM_StartPrivateBrowsing, true);
actWin = getWindow();
}
}
if (!actWin && !isClosing()) { // It can only occur if download manager window was still open
makeNewWindow(true);
makeNewWindow(Qz::BW_NewWindow);
return;
}
@ -474,22 +474,13 @@ void MainApplication::addNewTab(const QUrl &url)
getWindow()->tabWidget()->addView(url);
}
QupZilla* MainApplication::makeNewWindow(bool tryRestore, const QUrl &startUrl)
QupZilla* MainApplication::makeNewWindow(Qz::BrowserWindow type, const QUrl &startUrl)
{
QupZilla::StartBehaviour behaviour;
if (tryRestore) {
behaviour = QupZilla::OtherRestoredWindow;
}
else {
behaviour = QupZilla::NewWindow;
}
if (m_mainWindows.count() == 0) {
behaviour = QupZilla::FirstAppWindow;
type = Qz::BW_FirstAppWindow;
}
QupZilla* newWindow = new QupZilla(behaviour, startUrl);
connect(newWindow, SIGNAL(message(MainApplication::MessageType, bool)), this, SLOT(sendMessages(MainApplication::MessageType, bool)));
QupZilla* newWindow = new QupZilla(type, startUrl);
m_mainWindows.append(newWindow);
newWindow->show();
@ -849,16 +840,14 @@ bool MainApplication::restoreStateSlot(QupZilla* window)
stream >> tabState;
stream >> qMainWindowState;
QupZilla* window = new QupZilla(QupZilla::OtherRestoredWindow);
QupZilla* window = new QupZilla(Qz::BW_OtherRestoredWindow);
m_mainWindows.append(window);
connect(window, SIGNAL(message(MainApplication::MessageType, bool)), this, SLOT(sendMessages(MainApplication::MessageType, bool)));
QEventLoop eLoop;
connect(window, SIGNAL(startingCompleted()), &eLoop, SLOT(quit()));
eLoop.exec();
window->tabWidget()->restoreState(tabState);
window->restoreState(qMainWindowState);
// window->tabWidget()->closeTab(0);
window->show();
}
}

View File

@ -31,6 +31,8 @@
#include "qtsingleapplication.h"
#include "commandlineoptions.h"
#include "qz_namespace.h"
class QupZilla;
class CookieManager;
class BrowsingLibrary;
@ -58,17 +60,13 @@ public:
QString TRANSLATIONSDIR;
QString THEMESDIR;
explicit MainApplication(const QList<CommandLineOptions::ActionPair> &cmdActions, int &argc, char** argv);
enum MessageType { SetAdBlockIconEnabled, CheckPrivateBrowsing, ReloadSettings,
HistoryStateChanged, BookmarksChanged, StartPrivateBrowsing
};
explicit MainApplication(const CommandLineOptions::ActionPairList &cmdActions, int &argc, char** argv);
void connectDatabase();
void loadSettings();
void reloadSettings();
bool restoreStateSlot(QupZilla* window);
QupZilla* makeNewWindow(bool tryRestore, const QUrl &startUrl = QUrl());
QupZilla* makeNewWindow(Qz::BrowserWindow type, const QUrl &startUrl = QUrl());
void aboutToCloseWindow(QupZilla* window);
bool isStateChanged();
@ -109,13 +107,13 @@ public:
public slots:
bool saveStateSlot();
void quitApplication();
void sendMessages(MainApplication::MessageType mes, bool state);
void sendMessages(Qz::AppMessageType mes, bool state);
void receiveAppMessage(QString message);
void setStateChanged();
void addNewTab(const QUrl &url = QUrl());
signals:
void message(MainApplication::MessageType mes, bool state);
void message(Qz::AppMessageType mes, bool state);
private slots:
void postLaunch();

View File

@ -62,6 +62,7 @@
#include "webhistorywrapper.h"
#include "enhancedmenu.h"
#include "settings.h"
#include "webtab.h"
const QString QupZilla::VERSION = "1.1.5";
const QString QupZilla::BUILDTIME = __DATE__" "__TIME__;
@ -83,13 +84,13 @@ const QIcon QupZilla::qupzillaIcon()
return i;
}
QupZilla::QupZilla(StartBehaviour behaviour, QUrl startUrl)
QupZilla::QupZilla(Qz::BrowserWindow type, QUrl startUrl)
: QMainWindow(0)
, m_historyMenuChanged(true)
, m_bookmarksMenuChanged(true)
, m_isClosing(false)
, m_startingUrl(startUrl)
, m_startBehaviour(behaviour)
, m_startBehaviour(type)
, m_menuBookmarksAction(0)
#ifdef Q_WS_MAC
, m_macMenuBar(new QMenuBar())
@ -110,14 +111,14 @@ QupZilla::QupZilla(StartBehaviour behaviour, QUrl startUrl)
setupMenu();
QTimer::singleShot(0, this, SLOT(postLaunch()));
connect(mApp, SIGNAL(message(MainApplication::MessageType, bool)), this, SLOT(receiveMessage(MainApplication::MessageType, bool)));
connect(mApp, SIGNAL(message(Qz::AppMessageType, bool)), this, SLOT(receiveMessage(Qz::AppMessageType, bool)));
}
void QupZilla::postLaunch()
{
loadSettings();
if (m_startBehaviour == FirstAppWindow) {
if (m_startBehaviour == Qz::BW_FirstAppWindow) {
m_tabWidget->restorePinnedTabs();
}
@ -160,17 +161,17 @@ void QupZilla::postLaunch()
}
switch (m_startBehaviour) {
case FirstAppWindow:
case Qz::BW_FirstAppWindow:
if (startingAfterCrash || (addTab && afterLaunch == 3)) {
addTab = !mApp->restoreStateSlot(this);
}
break;
case NewWindow:
case Qz::BW_NewWindow:
addTab = true;
break;
case OtherRestoredWindow:
case Qz::BW_OtherRestoredWindow:
addTab = false;
break;
}
@ -181,7 +182,7 @@ void QupZilla::postLaunch()
}
if (addTab) {
int index = m_tabWidget->addView(startUrl, TabWidget::CleanPage);
int index = m_tabWidget->addView(startUrl, Qz::NT_CleanSelectedTab);
m_tabWidget->setCurrentIndex(index);
if (startUrl.isEmpty() || startUrl.toString() == "qupzilla:speeddial") {
@ -189,7 +190,9 @@ void QupZilla::postLaunch()
}
}
if (m_tabWidget->getTabBar()->normalTabsCount() <= 0) { //Something went really wrong .. add one tab
if (m_tabWidget->getTabBar()->normalTabsCount() <= 0 &&
m_startBehaviour != Qz::BW_OtherRestoredWindow) {
//Something went really wrong .. add one tab
m_tabWidget->addView(m_homepage);
}
@ -202,6 +205,16 @@ void QupZilla::postLaunch()
emit startingCompleted();
}
void QupZilla::goNext()
{
weView()->forward();
}
void QupZilla::goBack()
{
weView()->back();
}
void QupZilla::setupUi()
{
int locationBarWidth;
@ -215,7 +228,7 @@ void QupZilla::setupUi()
}
else {
setGeometry(settings.value("WindowGeometry", QRect(20, 20, 800, 550)).toRect());
if (m_startBehaviour == NewWindow) {
if (m_startBehaviour == Qz::BW_NewWindow) {
// Moving window +40 x,y to be visible that this is new window
QPoint p = pos();
p.setX(p.x() + 40);
@ -276,6 +289,26 @@ QMenuBar* QupZilla::menuBar() const
#endif
}
TabbedWebView* QupZilla::weView() const
{
return weView(m_tabWidget->currentIndex());
}
TabbedWebView* QupZilla::weView(int index) const
{
WebTab* webTab = qobject_cast<WebTab*>(m_tabWidget->widget(index));
if (!webTab) {
return 0;
}
return webTab->view();
}
LocationBar* QupZilla::locationBar() const
{
return qobject_cast<LocationBar*>(m_tabWidget->locationBars()->currentWidget());
}
void QupZilla::setupMenu()
{
// Standard actions - needed on Mac to be placed correctly in "application" menu
@ -561,34 +594,34 @@ void QupZilla::setWindowTitle(const QString &t)
}
}
void QupZilla::receiveMessage(MainApplication::MessageType mes, bool state)
void QupZilla::receiveMessage(Qz::AppMessageType mes, bool state)
{
switch (mes) {
case MainApplication::SetAdBlockIconEnabled:
case Qz::AM_SetAdBlockIconEnabled:
m_adblockIcon->setEnabled(state);
break;
case MainApplication::CheckPrivateBrowsing:
case Qz::AM_CheckPrivateBrowsing:
m_privateBrowsing->setVisible(state);
m_actionPrivateBrowsing->setChecked(state);
weView()->titleChanged();
break;
case MainApplication::ReloadSettings:
case Qz::AM_ReloadSettings:
loadSettings();
m_tabWidget->loadSettings();
LocationBarSettings::instance()->loadSettings();
break;
case MainApplication::HistoryStateChanged:
case Qz::AM_HistoryStateChanged:
m_historyMenuChanged = true;
break;
case MainApplication::BookmarksChanged:
case Qz::AM_BookmarksChanged:
m_bookmarksMenuChanged = true;
break;
case MainApplication::StartPrivateBrowsing:
case Qz::AM_StartPrivateBrowsing:
startPrivate(state);
break;
@ -965,6 +998,11 @@ void QupZilla::bookmarkAllTabs()
mApp->browsingLibrary()->bookmarksManager()->insertAllTabs();
}
void QupZilla::newWindow()
{
mApp->makeNewWindow(Qz::BW_NewWindow);
}
void QupZilla::goHome()
{
loadAddress(m_homepage);
@ -977,9 +1015,44 @@ void QupZilla::copy()
}
}
void QupZilla::selectAll()
{
weView()->selectAll();
}
void QupZilla::zoomIn()
{
weView()->zoomIn();
}
void QupZilla::zoomOut()
{
weView()->zoomOut();
}
void QupZilla::zoomReset()
{
weView()->zoomReset();
}
void QupZilla::goHomeInNewTab()
{
m_tabWidget->addView(m_homepage, TabWidget::NewSelectedTab);
m_tabWidget->addView(m_homepage, Qz::NT_SelectedTab);
}
void QupZilla::stop()
{
weView()->stop();
}
void QupZilla::reload()
{
weView()->reload();
}
void QupZilla::reloadByPassCache()
{
weView()->triggerPageAction(QWebPage::ReloadAndBypassCache);
}
void QupZilla::loadActionUrl()
@ -999,7 +1072,7 @@ void QupZilla::loadActionUrlInNewTab()
void QupZilla::loadActionUrlInNewNotSelectedTab()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
m_tabWidget->addView(action->data().toUrl(), TabWidget::NewNotSelectedTab);
m_tabWidget->addView(action->data().toUrl(), Qz::NT_NotSelectedTab);
}
}
@ -1011,7 +1084,7 @@ void QupZilla::loadFolderBookmarks(Menu* menu)
}
foreach(Bookmark b, mApp->bookmarksModel()->folderBookmarks(folder)) {
tabWidget()->addView(b.url, b.title, TabWidget::NewNotSelectedTab);
tabWidget()->addView(b.url, b.title, Qz::NT_NotSelectedTab);
}
}
@ -1251,6 +1324,11 @@ void QupZilla::aboutQupZilla()
about.exec();
}
void QupZilla::addTab()
{
m_tabWidget->addView(QUrl(), Qz::NT_SelectedTab, true);
}
void QupZilla::webSearch()
{
m_navigationBar->searchLine()->setFocus();

View File

@ -41,14 +41,12 @@
#include <QToolButton>
#include <QWebInspector>
#include <QWeakPointer>
#include <QVBoxLayout>
#include "qwebkitversion.h"
#include "webtab.h"
#include "tabbedwebview.h"
#include "tabwidget.h"
#include "mainapplication.h"
#include "locationbar.h"
#include "qz_namespace.h"
class Menu;
class TabWidget;
class TabbedWebView;
class LineEdit;
@ -64,7 +62,7 @@ class StatusBarMessage;
class NavigationBar;
class ClickableLabel;
class WebInspectorDockWidget;
class Menu;
class LocationBar;
class QupZilla : public QMainWindow
{
Q_OBJECT
@ -80,8 +78,7 @@ public:
static const QIcon qupzillaIcon();
enum StartBehaviour { FirstAppWindow, OtherRestoredWindow, NewWindow };
explicit QupZilla(StartBehaviour behaviour = FirstAppWindow, QUrl startUrl = QUrl());
explicit QupZilla(Qz::BrowserWindow type, QUrl startUrl = QUrl());
~QupZilla();
void refreshAddressBar();
@ -98,9 +95,9 @@ public:
virtual QMenuBar* menuBar() const;
inline TabbedWebView* weView() const { WebTab* webTab = qobject_cast<WebTab*>(m_tabWidget->widget(m_tabWidget->currentIndex())); if (!webTab) return 0; return webTab->view(); }
inline TabbedWebView* weView(int index) const { WebTab* webTab = qobject_cast<WebTab*>(m_tabWidget->widget(index)); if (!webTab) return 0; return webTab->view(); }
inline LocationBar* locationBar() { return qobject_cast<LocationBar*>(m_tabWidget->locationBars()->currentWidget()); }
TabbedWebView* weView() const;
TabbedWebView* weView(int index) const;
LocationBar* locationBar() const;
inline TabWidget* tabWidget() { return m_tabWidget; }
inline BookmarksToolbar* bookmarksToolbar() { return m_bookmarksToolbar; }
inline StatusBarMessage* statusBarMessage() { return m_statusBarMessage; }
@ -122,7 +119,7 @@ public:
signals:
void loadHistory();
void startingCompleted();
void message(MainApplication::MessageType mes, bool state);
void message(Qz::AppMessageType mes, bool state);
void setWebViewMouseTracking(bool state);
public slots:
@ -140,19 +137,19 @@ public slots:
void showSource(QWebFrame* frame = 0, const QString &selectedHtml = "");
void printPage(QWebFrame* frame = 0);
void showPageInfo();
void receiveMessage(MainApplication::MessageType mes, bool state);
void receiveMessage(Qz::AppMessageType mes, bool state);
private slots:
void postLaunch();
void goNext() { weView()->forward(); }
void goBack() { weView()->back(); }
void goNext();
void goBack();
void goHome();
void goHomeInNewTab();
void stop() { weView()->stop(); }
void reload() { weView()->reload(); }
void reloadByPassCache() { weView()->page()->triggerAction(QWebPage::ReloadAndBypassCache); }
void stop();
void reload();
void reloadByPassCache();
void aboutQupZilla();
void addTab() { m_tabWidget->addView(QUrl(), TabWidget::NewTab, true); }
void addTab();
void savePageScreen();
void aboutToShowFileMenu();
@ -186,7 +183,7 @@ private slots:
void refreshHistory();
void bookmarkAllTabs();
void newWindow() { mApp->makeNewWindow(false); }
void newWindow();
void openLocation();
void openFile();
@ -195,11 +192,11 @@ private slots:
void webSearch();
void copy();
void selectAll() { weView()->selectAll(); }
void selectAll();
void zoomIn() { weView()->zoomIn(); }
void zoomOut() { weView()->zoomOut(); }
void zoomReset() { weView()->zoomReset(); }
void zoomIn();
void zoomOut();
void zoomReset();
void fullScreen(bool make);
void startPrivate(bool state);
void changeEncoding();
@ -223,7 +220,7 @@ private:
QUrl m_startingUrl;
QUrl m_newtab;
QUrl m_homepage;
StartBehaviour m_startBehaviour;
Qz::BrowserWindow m_startBehaviour;
QVBoxLayout* m_mainLayout;
QSplitter* m_mainSplitter;

50
src/app/qz_namespace.h Normal file
View File

@ -0,0 +1,50 @@
#ifndef QZ_NAMESPACE_H
#define QZ_NAMESPACE_H
#include <QFlags>
namespace Qz
{
enum AppMessageType {
AM_SetAdBlockIconEnabled,
AM_CheckPrivateBrowsing,
AM_ReloadSettings,
AM_HistoryStateChanged,
AM_BookmarksChanged,
AM_StartPrivateBrowsing
};
enum BrowserWindow {
BW_FirstAppWindow,
BW_OtherRestoredWindow,
BW_NewWindow
};
enum CommandLineAction {
CL_NoAction,
CL_OpenUrl,
CL_StartWithProfile,
CL_StartWithoutAddons,
CL_NewTab,
CL_NewWindow,
CL_ShowDownloadManager,
CL_StartPrivateBrowsing,
CL_ExitAction
};
enum NewTabPositionFlag {
NT_SelectedTab = 1,
NT_NotSelectedTab = 2,
NT_CleanTab = 4,
NT_CleanSelectedTab = NT_CleanTab | NT_SelectedTab,
NT_CleanNotSelectedTab = NT_CleanTab | NT_NotSelectedTab
};
Q_DECLARE_FLAGS(NewTabPositionFlags, NewTabPositionFlag)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qz::NewTabPositionFlags)
}
#endif // QZ_NAMESPACE_H

View File

@ -18,6 +18,8 @@
#include "bookmarkicon.h"
#include "mainapplication.h"
#include "qupzilla.h"
#include "tabbedwebview.h"
#include "locationbar.h"
#include "bookmarksmodel.h"
#include "bookmarkswidget.h"

View File

@ -27,6 +27,7 @@
#include "browsinglibrary.h"
#include "globalfunctions.h"
#include "bookmarksimportdialog.h"
#include "webtab.h"
BookmarksManager::BookmarksManager(QupZilla* mainClass, QWidget* parent)
: QWidget(parent)
@ -168,7 +169,7 @@ void BookmarksManager::itemControlClicked(QTreeWidgetItem* item)
void BookmarksManager::loadInNewTab()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
getQupZilla()->tabWidget()->addView(action->data().toUrl(), TabWidget::NewNotSelectedTab);
getQupZilla()->tabWidget()->addView(action->data().toUrl(), Qz::NT_NotSelectedTab);
}
}

View File

@ -150,7 +150,7 @@ bool BookmarksModel::saveBookmark(const QUrl &url, const QString &title, const Q
bookmark.inSubfolder = isSubfolder(bookmark.folder);
emit bookmarkAdded(bookmark);
mApp->sendMessages(MainApplication::BookmarksChanged, true);
mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true;
}
@ -182,7 +182,7 @@ bool BookmarksModel::removeBookmark(int id)
}
emit bookmarkDeleted(bookmark);
mApp->sendMessages(MainApplication::BookmarksChanged, true);
mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true;
}
@ -255,7 +255,7 @@ bool BookmarksModel::editBookmark(int id, const QString &title, const QUrl &url,
}
emit bookmarkEdited(before, after);
mApp->sendMessages(MainApplication::BookmarksChanged, true);
mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true;
}
@ -276,7 +276,7 @@ bool BookmarksModel::createFolder(const QString &name)
}
emit folderAdded(name);
mApp->sendMessages(MainApplication::BookmarksChanged, true);
mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true;
}
@ -309,7 +309,7 @@ bool BookmarksModel::removeFolder(const QString &name)
}
emit folderDeleted(name);
mApp->sendMessages(MainApplication::BookmarksChanged, true);
mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true;
}
@ -381,7 +381,7 @@ bool BookmarksModel::createSubfolder(const QString &name)
}
emit subfolderAdded(name);
mApp->sendMessages(MainApplication::BookmarksChanged, true);
mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true;
}

View File

@ -17,12 +17,14 @@
* ============================================================ */
#include "bookmarkstoolbar.h"
#include "qupzilla.h"
#include "mainapplication.h"
#include "bookmarksmodel.h"
#include "iconprovider.h"
#include "historymodel.h"
#include "toolbutton.h"
#include "databasewriter.h"
#include "enhancedmenu.h"
#include "tabwidget.h"
BookmarksToolbar::BookmarksToolbar(QupZilla* mainClass, QWidget* parent)
: QWidget(parent)
@ -281,7 +283,7 @@ void BookmarksToolbar::loadFolderBookmarksInTabs()
}
foreach(Bookmark b, m_bookmarksModel->folderBookmarks(folder)) {
p_QupZilla->tabWidget()->addView(b.url, b.title, TabWidget::NewNotSelectedTab);
p_QupZilla->tabWidget()->addView(b.url, b.title, Qz::NT_NotSelectedTab);
}
}

View File

@ -24,6 +24,8 @@
#include <QFormLayout>
#include <QDialogButtonBox>
#include <QDropEvent>
#include <QLabel>
#include <QLineEdit>
#include "bookmarksmodel.h"

View File

@ -17,6 +17,7 @@
* ============================================================ */
#include "cookiejar.h"
#include "qupzilla.h"
#include "mainapplication.h"
#include "settings.h"
//#define COOKIE_DEBUG

View File

@ -332,16 +332,16 @@ void DownloadItem::goToDownloadPage()
QupZilla* qz = mApp->getWindow();
if (qz) {
qz->tabWidget()->addView(m_downloadPage, TabWidget::NewSelectedTab);
qz->tabWidget()->addView(m_downloadPage, Qz::NT_SelectedTab);
}
else {
mApp->makeNewWindow(true, m_downloadPage);
mApp->makeNewWindow(Qz::BW_NewWindow, m_downloadPage);
}
}
void DownloadItem::copyDownloadLink()
{
qApp->clipboard()->setText(m_downUrl.toString());
QApplication::clipboard()->setText(m_downUrl.toString());
}
void DownloadItem::clear()

View File

@ -32,6 +32,7 @@
#include <QListWidgetItem>
#include <QMenu>
#include <QMessageBox>
#include <QClipboard>
namespace Ui
{

View File

@ -18,6 +18,7 @@
#include "downloadmanager.h"
#include "ui_downloadmanager.h"
#include "qupzilla.h"
#include "mainapplication.h"
#include "downloadoptionsdialog.h"
#include "downloaditem.h"
#include "ecwin7.h"

View File

@ -18,10 +18,12 @@
#include "historymanager.h"
#include "ui_historymanager.h"
#include "qupzilla.h"
#include "mainapplication.h"
#include "historymodel.h"
#include "iconprovider.h"
#include "browsinglibrary.h"
#include "globalfunctions.h"
#include "tabwidget.h"
HistoryManager::HistoryManager(QupZilla* mainClass, QWidget* parent)
: QWidget(parent)
@ -81,7 +83,7 @@ void HistoryManager::itemDoubleClicked(QTreeWidgetItem* item)
void HistoryManager::loadInNewTab()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
getQupZilla()->tabWidget()->addView(action->data().toUrl(), TabWidget::NewNotSelectedTab);
getQupZilla()->tabWidget()->addView(action->data().toUrl(), Qz::NT_NotSelectedTab);
}
}

View File

@ -21,6 +21,7 @@
#include <QWidget>
#include <QTreeWidgetItem>
#include <QWeakPointer>
#include <QClipboard>
#include "historymodel.h"

View File

@ -41,7 +41,7 @@ int main(int argc, char* argv[])
cmdActions = cmd.getActions();
foreach(CommandLineOptions::ActionPair pair, cmdActions) {
switch (pair.action) {
case CommandLineOptions::ExitAction:
case Qz::CL_ExitAction:
return 0;
break;
default:

View File

@ -25,6 +25,7 @@
#include "siteinfowidget.h"
#include "rsswidget.h"
#include "webpage.h"
#include "tabwidget.h"
#include "bookmarkicon.h"
#include "progressbar.h"
#include "statusbarmessage.h"
@ -392,7 +393,7 @@ void LocationBar::keyPressEvent(QKeyEvent* event)
break;
case Qt::AltModifier:
p_QupZilla->tabWidget()->addView(createUrl(), TabWidget::NewNotSelectedTab);
p_QupZilla->tabWidget()->addView(createUrl(), Qz::NT_NotSelectedTab);
break;
default:

View File

@ -18,11 +18,14 @@
#include "navigationbar.h"
#include "toolbutton.h"
#include "qupzilla.h"
#include "mainapplication.h"
#include "iconprovider.h"
#include "websearchbar.h"
#include "reloadstopbutton.h"
#include "webhistorywrapper.h"
#include "enhancedmenu.h"
#include "tabwidget.h"
#include "tabbedwebview.h"
QString titleForUrl(QString title, const QUrl &url)
{

View File

@ -17,8 +17,10 @@
* ============================================================ */
#include "websearchbar.h"
#include "qupzilla.h"
#include "mainapplication.h"
#include "tabbedwebview.h"
#include "webpage.h"
#include "tabwidget.h"
#include "clickablelabel.h"
#include "buttonwithmenu.h"
#include "searchenginesmanager.h"
@ -145,7 +147,7 @@ void WebSearchBar::search()
void WebSearchBar::searchInNewTab()
{
p_QupZilla->weView()->setFocus();
p_QupZilla->tabWidget()->addView(m_searchManager->searchUrl(m_activeEngine, text()), TabWidget::NewNotSelectedTab);
p_QupZilla->tabWidget()->addView(m_searchManager->searchUrl(m_activeEngine, text()), Qz::NT_NotSelectedTab);
}
void WebSearchBar::completeMenuWithAvailableEngines(QMenu* menu)

View File

@ -24,6 +24,7 @@
#include <QBuffer>
#include <QTimer>
#include <QTextStream>
#include <QTextDocument>
class QupZillaSchemeHandler
{

View File

@ -18,6 +18,7 @@
#include "aboutdialog.h"
#include "ui_aboutdialog.h"
#include "qupzilla.h"
#include "mainapplication.h"
#include "tabbedwebview.h"
#include "webpage.h"
#include "qtwin.h"

View File

@ -17,6 +17,7 @@
* ============================================================ */
#include "clearprivatedata.h"
#include "qupzilla.h"
#include "tabwidget.h"
#include "cookiejar.h"
#include "mainapplication.h"
#include "networkmanager.h"

View File

@ -17,6 +17,8 @@
* ============================================================ */
#include "statusbarmessage.h"
#include "qupzilla.h"
#include "tabwidget.h"
#include "tabbedwebview.h"
#include "squeezelabelv1.h"
TipLabel::TipLabel(QupZilla* parent)

View File

@ -17,9 +17,9 @@
* ============================================================ */
#include "updater.h"
#include "qupzilla.h"
#include "mainapplication.h"
#include "tabwidget.h"
#include "desktopnotificationsfactory.h"
#include <QDebug>
Updater::Updater(QupZilla* mainClass, QObject* parent)
: QObject(parent)
@ -118,7 +118,7 @@ void Updater::downCompleted(QNetworkReply* reply)
void Updater::downloadNewVersion()
{
p_QupZilla->tabWidget()->addView(QUrl(QupZilla::WWWADDRESS + "/download"), tr("Update"), TabWidget::NewSelectedTab);
p_QupZilla->tabWidget()->addView(QUrl(QupZilla::WWWADDRESS + "/download"), tr("Update"), Qz::NT_NotSelectedTab);
}
Updater::~Updater()

View File

@ -48,6 +48,7 @@
#include "webpage.h"
#include "globalfunctions.h"
#include "qupzilla.h"
#include "tabbedwebview.h"
QUrl ClickToFlash::acceptedUrl;
QStringList ClickToFlash::acceptedArgNames;

View File

@ -19,6 +19,8 @@
#include "popupwebview.h"
#include "popupwindow.h"
#include "qupzilla.h"
#include "tabwidget.h"
#include "tabbedwebview.h"
// Wrapper class to detect whether window is opened from JavaScript window.open method
// It has to be done this way, because QtWebKit has really bad API when it comes to opening
@ -118,7 +120,7 @@ void PopupWebPage::checkBehaviour()
disconnect(this, SIGNAL(loadFinished(bool)), this, SLOT(slotLoadFinished(bool)));
}
else {
int index = p_QupZilla->tabWidget()->addView(QUrl(), TabWidget::CleanSelectedPage);
int index = p_QupZilla->tabWidget()->addView(QUrl(), Qz::NT_CleanSelectedTab);
TabbedWebView* view = p_QupZilla->weView(index);
view->setWebPage(this);
if (m_isLoading) {

View File

@ -40,6 +40,7 @@
#include "globalfunctions.h"
#include "autofillmodel.h"
#include "settings.h"
#include "tabbedwebview.h"
#ifdef Q_WS_WIN
#define DEFAULT_CHECK_UPDATES true

View File

@ -259,13 +259,13 @@ void RSSManager::controlLoadFeed(QTreeWidgetItem* item)
if (item->whatsThis(0).isEmpty()) {
return;
}
getQupZilla()->tabWidget()->addView(QUrl(item->whatsThis(0)), TabWidget::NewNotSelectedTab);
getQupZilla()->tabWidget()->addView(QUrl(item->whatsThis(0)), Qz::NT_NotSelectedTab);
}
void RSSManager::loadFeedInNewTab()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
getQupZilla()->tabWidget()->addView(action->data().toUrl(), TabWidget::NewNotSelectedTab);
getQupZilla()->tabWidget()->addView(action->data().toUrl(), Qz::NT_NotSelectedTab);
}
}

View File

@ -74,7 +74,7 @@ void BookmarksSideBar::itemDoubleClicked(QTreeWidgetItem* item)
void BookmarksSideBar::loadInNewTab()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
p_QupZilla->tabWidget()->addView(action->data().toUrl(), TabWidget::NewNotSelectedTab);
p_QupZilla->tabWidget()->addView(action->data().toUrl(), Qz::NT_NotSelectedTab);
}
}

View File

@ -18,6 +18,8 @@
#include "historysidebar.h"
#include "ui_historysidebar.h"
#include "qupzilla.h"
#include "tabwidget.h"
#include "mainapplication.h"
#include "historymodel.h"
#include "iconprovider.h"
@ -61,13 +63,13 @@ void HistorySideBar::itemControlClicked(QTreeWidgetItem* item)
}
QUrl url = QUrl::fromEncoded(item->text(1).toUtf8());
p_QupZilla->tabWidget()->addView(url, item->text(0));
p_QupZilla->tabWidget()->addView(url, item->text(0), Qz::NT_NotSelectedTab);
}
void HistorySideBar::loadInNewTab()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
p_QupZilla->tabWidget()->addView(action->data().toUrl(), TabWidget::NewNotSelectedTab);
p_QupZilla->tabWidget()->addView(action->data().toUrl(), Qz::NT_NotSelectedTab);
}
}

View File

@ -21,6 +21,7 @@
#include <QWidget>
#include <QTreeWidgetItem>
#include <QShortcut>
#include <QClipboard>
#include "historymodel.h"

View File

@ -323,7 +323,8 @@ HEADERS += \
popupwindow/popupwindow.h \
popupwindow/popuplocationbar.h \
webview/tabbedwebview.h \
webview/webview.h
webview/webview.h \
app/qz_namespace.h
FORMS += \
preferences/autofillmanager.ui \

View File

@ -45,7 +45,7 @@ void PopupWebView::closeView()
parentWidget()->close();
}
void PopupWebView::contextMenuEvent(QContextMenuEvent *event)
void PopupWebView::contextMenuEvent(QContextMenuEvent* event)
{
m_menu->clear();
m_clickedFrame = 0;

View File

@ -19,6 +19,7 @@
#include "ui_siteinfowidget.h"
#include "qupzilla.h"
#include "webpage.h"
#include "tabbedwebview.h"
SiteInfoWidget::SiteInfoWidget(QupZilla* mainClass, QWidget* parent)
: QMenu(parent)

View File

@ -341,7 +341,7 @@ void TabBar::mouseMoveEvent(QMouseEvent* event)
void TabBar::mouseDoubleClickEvent(QMouseEvent* event)
{
if (event->button() == Qt::LeftButton && tabAt(event->pos()) == -1) {
m_tabWidget->addView(QUrl(), TabWidget::NewSelectedTab, true);
m_tabWidget->addView(QUrl(), Qz::NT_SelectedTab, true);
return;
}
@ -365,7 +365,7 @@ void TabBar::mouseReleaseEvent(QMouseEvent* event)
return;
}
if (id == -1 && event->button() == Qt::MiddleButton) {
m_tabWidget->addView(QUrl(), TabWidget::NewSelectedTab, true);
m_tabWidget->addView(QUrl(), Qz::NT_SelectedTab, true);
return;
}

View File

@ -24,6 +24,7 @@
#include <QMenu>
#include <QMouseEvent>
#include <QStyle>
#include <QApplication>
class QupZilla;
class TabWidget;

View File

@ -465,14 +465,14 @@ void TabbedWebView::stop()
void TabbedWebView::openUrlInNewTab()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
m_tabWidget->addView(action->data().toUrl(), TabWidget::NewBackgroundTab);
m_tabWidget->addView(action->data().toUrl(), Qz::NT_NotSelectedTab);
}
}
void TabbedWebView::searchSelectedText()
{
SearchEngine engine = mApp->searchEnginesManager()->activeEngine();
m_tabWidget->addView(engine.url.replace("%s", selectedText()), TabWidget::NewBackgroundTab);
m_tabWidget->addView(engine.url.replace("%s", selectedText()), Qz::NT_NotSelectedTab);
}
void TabbedWebView::bookmarkLink()
@ -578,7 +578,7 @@ void TabbedWebView::mousePressEvent(QMouseEvent* event)
switch (event->button()) {
case Qt::MiddleButton:
if (isUrlValid(QUrl(m_hoveredLink))) {
m_tabWidget->addView(QUrl::fromEncoded(m_hoveredLink.toUtf8()), TabWidget::NewBackgroundTab);
m_tabWidget->addView(QUrl::fromEncoded(m_hoveredLink.toUtf8()), Qz::NT_NotSelectedTab);
event->accept();
return;
}
@ -592,7 +592,7 @@ void TabbedWebView::mousePressEvent(QMouseEvent* event)
case Qt::LeftButton:
if (event->modifiers() == Qt::ControlModifier && isUrlValid(QUrl(m_hoveredLink))) {
m_tabWidget->addView(QUrl::fromEncoded(m_hoveredLink.toUtf8()), TabWidget::NewBackgroundTab);
m_tabWidget->addView(QUrl::fromEncoded(m_hoveredLink.toUtf8()), Qz::NT_NotSelectedTab);
event->accept();
return;
}

View File

@ -171,6 +171,22 @@ void TabWidget::resizeEvent(QResizeEvent* e)
QTabWidget::resizeEvent(e);
}
TabbedWebView *TabWidget::weView()
{
return weView(currentIndex());
}
TabbedWebView *TabWidget::weView(int index)
{
WebTab* webTab = qobject_cast<WebTab*>(widget(index));
if (!webTab) {
return 0;
}
return webTab->view();
}
void TabWidget::createKeyPressEvent(QKeyEvent* event)
{
QTabWidget::keyPressEvent(event);
@ -246,20 +262,20 @@ void TabWidget::actionChangeIndex()
}
}
int TabWidget::addView(const QUrl &url, OpenUrlIn openIn, bool selectLine)
int TabWidget::addView(const QUrl &url, const Qz::NewTabPositionFlags &openFlags, bool selectLine)
{
return addView(url, tr("New tab"), openIn, selectLine);
return addView(url, tr("New tab"), openFlags, selectLine);
}
int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool selectLine, int position)
int TabWidget::addView(QUrl url, const QString &title, const Qz::NewTabPositionFlags &openFlags, bool selectLine, int position)
{
m_lastTabIndex = currentIndex();
if (url.isEmpty() && openIn != CleanPage && openIn != CleanSelectedPage) {
if (url.isEmpty() && !(openFlags & Qz::NT_CleanTab)) {
url = m_urlOnNewTab;
}
if (openIn == NewBackgroundTab) {
if (openFlags & Qz::NT_NotSelectedTab) {
// If we are opening newBgTab from pinned tab, make sure it won't be
// opened between other pinned tabs
position = qMax(currentIndex() + 1, m_tabBar->pinnedTabsCount());
@ -283,7 +299,7 @@ int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool se
webView->animationLoading(index, true)->movie()->stop();
webView->animationLoading(index, false)->setPixmap(_iconForUrl(url).pixmap(16, 16));
if (openIn == NewSelectedTab || openIn == CleanSelectedPage) {
if (openFlags & Qz::NT_SelectedTab) {
setCurrentIndex(index);
}
@ -306,7 +322,7 @@ int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool se
p_QupZilla->locationBar()->setFocus();
}
if (openIn == NewSelectedTab || openIn == CleanSelectedPage) {
if (openFlags & Qz::NT_SelectedTab) {
m_isClosingToLastTabIndex = true;
m_locationBars->setCurrentWidget(locBar);
}
@ -380,6 +396,11 @@ void TabWidget::closeTab(int index)
webTab->deleteLater();
}
void TabWidget::reloadTab(int index)
{
weView(index)->reload();
}
void TabWidget::showTabBar()
{
if (count() == 1 && m_hideTabBarWithOneTab) {
@ -422,6 +443,21 @@ void TabWidget::reloadAllTabs()
}
}
void TabWidget::stopTab(int index)
{
weView(index)->stop();
}
void TabWidget::backTab(int index)
{
weView(index)->back();
}
void TabWidget::forwardTab(int index)
{
weView(index)->forward();
}
void TabWidget::closeAllButCurrent(int index)
{
WebTab* akt = qobject_cast<WebTab*>(widget(index));
@ -441,7 +477,7 @@ int TabWidget::duplicateTab(int index)
QDataStream tabHistoryStream(&history, QIODevice::WriteOnly);
tabHistoryStream << *weView(index)->history();
int id = addView(url, tabText(index), TabWidget::NewNotSelectedTab);
int id = addView(url, tabText(index), Qz::NT_CleanNotSelectedTab);
QDataStream historyStream(history);
historyStream >> *weView(id)->history();
@ -464,7 +500,7 @@ void TabWidget::restoreClosedTab()
tab = m_closedTabsManager->getFirstClosedTab();
}
int index = addView(QUrl(), tab.title, TabWidget::NewSelectedTab, false, tab.position);
int index = addView(QUrl(), tab.title, Qz::NT_CleanSelectedTab, false, tab.position);
QDataStream historyStream(tab.history);
historyStream >> *weView(index)->history();
@ -479,7 +515,7 @@ void TabWidget::restoreAllClosedTabs()
QList<ClosedTabsManager::Tab> closedTabs = m_closedTabsManager->allClosedTabs();
foreach(ClosedTabsManager::Tab tab, closedTabs) {
int index = addView(QUrl(), tab.title);
int index = addView(QUrl(), tab.title, Qz::NT_CleanNotSelectedTab);
QDataStream historyStream(tab.history);
historyStream >> *weView(index)->history();
@ -572,7 +608,7 @@ void TabWidget::restorePinnedTabs()
QByteArray historyState = tabHistory.value(i);
int addedIndex;
if (!historyState.isEmpty()) {
addedIndex = addView(QUrl(), CleanPage);
addedIndex = addView(QUrl(), Qz::NT_CleanNotSelectedTab);
QDataStream historyStream(historyState);
historyStream >> *weView(addedIndex)->history();
weView(addedIndex)->load(url);
@ -648,7 +684,7 @@ bool TabWidget::restoreState(const QByteArray &state)
QByteArray historyState = tabHistory.value(i);
if (!historyState.isEmpty()) {
int index = addView(QUrl(), CleanPage);
int index = addView(QUrl(), Qz::NT_CleanNotSelectedTab);
QDataStream historyStream(historyState);
historyStream >> *weView(index)->history();
weView(index)->load(url);

View File

@ -25,9 +25,9 @@
#include <QStylePainter>
#include <QStackedWidget>
#include <QTextDocument>
#include <QUrl>
#include "tabbedwebview.h"
#include "webtab.h"
#include "qz_namespace.h"
class QupZilla;
class TabbedWebView;
@ -43,7 +43,6 @@ class TabWidget : public QTabWidget
public:
explicit TabWidget(QupZilla* mainclass, QWidget* parent = 0);
~TabWidget();
enum OpenUrlIn { CurrentTab, NewSelectedTab, NewNotSelectedTab, NewTab = NewSelectedTab, NewBackgroundTab = NewNotSelectedTab, CleanPage, CleanSelectedPage };
QByteArray saveState();
bool restoreState(const QByteArray &state);
@ -71,16 +70,16 @@ signals:
void pinnedTabAdded();
public slots:
int addView(const QUrl &url, OpenUrlIn openIn, bool selectLine = false);
int addView(QUrl url = QUrl(), const QString &title = tr("New tab"), OpenUrlIn openIn = NewTab, bool selectLine = false, int position = -1);
int addView(const QUrl &url, const Qz::NewTabPositionFlags &openFlags, bool selectLine = false);
int addView(QUrl url = QUrl(), const QString &title = tr("New tab"), const Qz::NewTabPositionFlags &openFlags = Qz::NT_SelectedTab, bool selectLine = false, int position = -1);
int duplicateTab(int index);
void closeTab(int index = -1);
void reloadTab(int index) { weView(index)->reload(); }
void reloadTab(int index);
void reloadAllTabs();
void stopTab(int index) { weView(index)->stop(); }
void backTab(int index) { weView(index)->back(); }
void forwardTab(int index) { weView(index)->forward(); }
void stopTab(int index);
void backTab(int index);
void forwardTab(int index);
void closeAllButCurrent(int index);
void restoreClosedTab();
void restoreAllClosedTabs();
@ -98,8 +97,8 @@ private slots:
private:
void resizeEvent(QResizeEvent* e);
inline TabbedWebView* weView() { WebTab* webTab = qobject_cast<WebTab*>(widget(currentIndex())); if (!webTab) return 0; return webTab->view(); }
inline TabbedWebView* weView(int index) { WebTab* webTab = qobject_cast<WebTab*>(widget(index)); if (!webTab) return 0; return webTab->view(); }
inline TabbedWebView* weView();
inline TabbedWebView* weView(int index);
bool m_hideTabBarWithOneTab;
bool m_dontQuitWithOneTab;

View File

@ -20,6 +20,7 @@
#include "tabbedwebview.h"
#include "webpage.h"
#include "tabbar.h"
#include "tabwidget.h"
#include "locationbar.h"
WebTab::WebTab(QupZilla* mainClass, LocationBar* locationBar)

View File

@ -282,7 +282,7 @@ void WebView::slotIconChanged()
void WebView::openUrlInNewWindow()
{
if (QAction* action = qobject_cast<QAction*>(sender())) {
mApp->makeNewWindow(false, action->data().toUrl());
mApp->makeNewWindow(Qz::BW_NewWindow, action->data().toUrl());
}
}

17
tests/forms/form.html Normal file
View File

@ -0,0 +1,17 @@
<html>
<head>
<title>Form completion test</title>
</head>
<body>
<h2>Form completion test</h2>
<form action="http://www.qupzilla.com/" method="post">
Username: <input type="text" name="user" /><br/>
Password: <input type="password" name="pass" />
<input type="submit" value="Send" />
</form>
<p>
<input type="button" onclick="window.close()" value="Close window"/>
<input type="button" onclick="window.print()" value="Print window"/>
</body>
</html>

63
tests/link_tests.html Normal file
View File

@ -0,0 +1,63 @@
<html>
<head>
<title>Link Tests</title>
</head>
<!--
Original file used from kWebKitPart (https://projects.kde.org/projects/extragear/base/kwebkitpart)
-->
<body>
<h2>MAILTO Link Tests</h2>
<a href="mailto:joe@xyz.com&amp;CC=bob@xyz.com&amp;BCC=bob@xyz.com&amp;attach=%2Fetc%2Fpasswd&amp;subject=hello&amp;body=hello">Email link #1</a>
<br/>
<a href="mailto:joe@xyz.com">Email link #2</a>
<br/>
<!--
<h2>FTP Link Tests</h2>
<a href="ftp://ftp.kde.org" target="top">FTP link #1 (new window)</a>
<br/>
<a href="ftp://ftp.kde.org/pub" target="top">FTP link #2 (new window)</a>
<br/>
<a href="ftp://upload.kde.org">FTP link #3</a>
<br/>
<a href="ftp://ftp.kde.org/pub/kde/README_UPLOAD">Text File Link</a>
<br/>
-->
<h2>HTTP Link Tests</h2>
<a href="http://www.kde.org" target="_blank">Web site link (new window)</a>
<br/>
<a href="http://foo@www.kde.org">Web site link with bogus username</a>
<br/>
<a href="http://bar@www.kde.org">Web site link with different bogus username</a>
<br/>
<a href="http://ev.kde.org/reports/ev-quarterly-2009Q1.pdf">PDF link</a>
<br/>
<a href="http://ev.kde.org/reports/ev-quarterly-2009Q1.pdf" target="_blank">PDF link (new window)</a>
<br/>
<a href="http://blip.tv/file/get/Sebasje-WindowManagingFeaturesInKDEPlasma44222.ogg">Movie link</a>
<br/>
<a href="http://blip.tv/file/get/Sebasje-WindowManagingFeaturesInKDEPlasma44222.ogg" target="_blank">Movie link (new window)</a>
<br/>
<a href="http://www.ietf.org/rfc/rfc2344.txt">Text Document Link</a>
<br/>
<a href="http://www.microsoft.com%26item%3Dq209354rexsddiuyjkiuylkuryt2583453453fsesfsdfsfasfdfdsf@www.kde.org/">Bogus link</a>
<br/>
<h2>Javascript Link Tests</h2>
<a href="javascript:window.open('http://www.qupzilla.com','dialog', 'width=600,height=600,statusbar=no,toolbar=no')">Open dialog like window link #1</a>
<br/>
<a href="javascript:window.open('http://www.kde.org')">Open new window link #2 (might be opened as Tab)</a>
<br/>
<a href="javascript:window.open('http://ev.kde.org/reports/ev-quarterly-2009Q1.pdf', '_blank', 'width=600,height=600,statusbar=no,toolbar=no')">Open PDF Document (new window)</a>
<br/>
<a href="javascript:window.open('forms/form.html', '_blank', 'width=600,height=600,statusbar=no,toolbar=no')">Open form test (new window)</a>
<br/>
<a href="javascript:window.close()">Close window</a>
<br/>
<h2>Form Tests</h2>
<form action="mailto:someone@example.com?CC='bob@example.com&amp;attach=%2fetc%2fpasswd&amp;body=" method="post" enctype="application/x-www-form-urlencoded">
Choose file to upload:<br />
<input type="file" name="upload_file" size="20" /><br/>
<input type="submit" value="Send" />
<input type="reset" value="Reset" />
</form>
</body>
</html>

View File

@ -17,7 +17,7 @@
<location filename="../src/other/aboutdialog.cpp" line="45"/>
<location filename="../src/other/aboutdialog.cpp" line="55"/>
<source>Authors and Contributors</source>
<translation>Utvecklare och bidragande</translation>
<translation>Utvecklare och bidragare</translation>
</message>
<message>
<location filename="../src/other/aboutdialog.cpp" line="48"/>
@ -33,7 +33,7 @@
<message>
<location filename="../src/other/aboutdialog.cpp" line="63"/>
<source>&lt;b&gt;WebKit version %1&lt;/b&gt;&lt;/p&gt;</source>
<translation>&lt;b&gt;Webkitversion %1&lt;/b&gt;&lt;/p&gt;</translation>
<translation>&lt;b&gt;Webkit-version %1&lt;/b&gt;&lt;/p&gt;</translation>
</message>
<message>
<location filename="../src/other/aboutdialog.cpp" line="64"/>
@ -105,7 +105,7 @@
<message>
<location filename="../src/adblock/adblockdialog.ui" line="20"/>
<source>Enable AdBlock</source>
<translation>Aktivera AdBlock</translation>
<translation>Aktivera reklamblockering</translation>
</message>
<message>
<location filename="../src/adblock/adblockdialog.ui" line="39"/>
@ -174,7 +174,7 @@
<message>
<location filename="../src/adblock/adblockicon.cpp" line="39"/>
<source>Show AdBlock &amp;Settings</source>
<translation>Visa AdBlock &amp; Inställningar</translation>
<translation>Visa AdBlock &amp;inställningar</translation>
</message>
<message>
<location filename="../src/adblock/adblockicon.cpp" line="43"/>
@ -216,7 +216,7 @@
<message>
<location filename="../src/preferences/addacceptlanguage.ui" line="32"/>
<source>Personal definition:</source>
<translation type="unfinished"></translation>
<translation>Egen definition:</translation>
</message>
</context>
<context>
@ -875,12 +875,12 @@
<message>
<location filename="../src/tools/certificateinfowidget.ui" line="92"/>
<source>&lt;b&gt;Issued By&lt;/b&gt;</source>
<translation type="unfinished"></translation>
<translation>&lt;b&gt;Utfärdat av&lt;/b&gt;</translation>
</message>
<message>
<location filename="../src/tools/certificateinfowidget.ui" line="150"/>
<source>&lt;b&gt;Validity&lt;/b&gt;</source>
<translation type="unfinished"></translation>
<translation>&lt;b&gt;Validitet&lt;/b&gt;</translation>
</message>
<message>
<location filename="../src/tools/certificateinfowidget.ui" line="157"/>
@ -1106,7 +1106,7 @@
<location filename="../src/cookies/cookiemanager.cpp" line="116"/>
<location filename="../src/cookies/cookiemanager.cpp" line="117"/>
<source>&lt;cookie not selected&gt;</source>
<translation type="unfinished"></translation>
<translation>&lt;ingen kaka vald&gt;</translation>
</message>
<message>
<location filename="../src/cookies/cookiemanager.ui" line="213"/>
@ -1152,7 +1152,7 @@
<message>
<location filename="../src/cookies/cookiemanager.cpp" line="137"/>
<source>Session cookie</source>
<translation type="unfinished"></translation>
<translation>Sessionskaka</translation>
</message>
</context>
<context>
@ -1427,7 +1427,7 @@
<message>
<location filename="../src/opensearch/editsearchengine.ui" line="58"/>
<source>&lt;b&gt;Note: &lt;/b&gt;%s in url represent searched string</source>
<translation type="unfinished"></translation>
<translation>&lt;b&gt;Observera: &lt;/b&gt;%s iurl&apos;en representerar söksträngen </translation>
</message>
<message>
<location filename="../src/opensearch/editsearchengine.ui" line="97"/>
@ -1802,7 +1802,7 @@
<message>
<location filename="../src/network/networkmanager.cpp" line="205"/>
<source>Authorization required</source>
<translation type="unfinished"></translation>
<translation>Autentisering krävs</translation>
</message>
<message>
<location filename="../src/network/networkmanager.cpp" line="212"/>
@ -1829,7 +1829,7 @@
<message>
<location filename="../src/network/networkmanager.cpp" line="263"/>
<source>Proxy authorization required</source>
<translation type="unfinished"></translation>
<translation>Proxyautentisering krävs</translation>
</message>
<message>
<location filename="../src/network/networkmanager.cpp" line="283"/>
@ -1995,7 +1995,7 @@
<location filename="../src/webview/popupwebview.cpp" line="106"/>
<location filename="../src/webview/popupwebview.cpp" line="116"/>
<source>&amp;Reload</source>
<translation type="unfinished"></translation>
<translation type="unfinished">&amp;Hämta om</translation>
</message>
<message>
<location filename="../src/webview/popupwebview.cpp" line="107"/>
@ -2060,7 +2060,7 @@
<message>
<location filename="../src/webview/popupwebview.cpp" line="134"/>
<source>Select &amp;all</source>
<translation type="unfinished">Välj &amp;allt</translation>
<translation type="unfinished">Markera &amp;allt</translation>
</message>
<message>
<location filename="../src/webview/popupwebview.cpp" line="136"/>
@ -2116,12 +2116,12 @@
<message>
<location filename="../src/preferences/preferences.ui" line="192"/>
<source>&lt;b&gt;Launching&lt;/b&gt;</source>
<translation>&lt;b&gt;Startar&lt;/b&gt;</translation>
<translation>&lt;b&gt;Uppstart&lt;/b&gt;</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="215"/>
<source>After launch: </source>
<translation>Efter start:</translation>
<translation>Vid start:</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="223"/>
@ -2195,7 +2195,7 @@
<location filename="../src/preferences/preferences.ui" line="429"/>
<location filename="../src/preferences/preferences.cpp" line="620"/>
<source>Note: You cannot delete active profile.</source>
<translation>Obs: Du kan inte ta bort aktiv profil.</translation>
<translation>Observera: Du kan inte ta bort aktiv profil.</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="439"/>
@ -2230,7 +2230,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="526"/>
<source>Show Navigation ToolBar on start</source>
<translation>Visa Navigeringsverktygsraden vid start</translation>
<translation>Visa navigeringsverktygsraden vid start</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="548"/>
@ -2310,7 +2310,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="744"/>
<source>Web Configuration</source>
<translation type="unfinished"></translation>
<translation>Webbinställningar</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="752"/>
@ -2394,7 +2394,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="883"/>
<source>lines on page</source>
<translation type="unfinished"></translation>
<translation>rader sidan</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="894"/>
@ -2409,7 +2409,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="953"/>
<source>Local Storage</source>
<translation type="unfinished"></translation>
<translation>Lokal lagring</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="961"/>
@ -2424,7 +2424,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="1021"/>
<source>Allow storing network cache on disk</source>
<translation type="unfinished"></translation>
<translation>Tillåt att nätverkscache lagras hårddisken</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="1031"/>
@ -2439,12 +2439,12 @@
<message>
<location filename="../src/preferences/preferences.ui" line="1065"/>
<source>Allow storing web icons</source>
<translation type="unfinished"></translation>
<translation>Tillåt att webbikoner lagras</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="1072"/>
<source>Allow saving history</source>
<translation type="unfinished"></translation>
<translation>Tillåt att historik sparas</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="1079"/>
@ -2494,7 +2494,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="1224"/>
<source>System proxy configuration</source>
<translation type="unfinished"></translation>
<translation>Global proxyinställning</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="1231"/>
@ -2559,7 +2559,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="1438"/>
<source>Ask everytime for download location</source>
<translation>Fråga varje gång för nedladdningsdestination</translation>
<translation>Fråga efter nedladdningsdestination varje gång</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="1445"/>
@ -2597,7 +2597,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="1541"/>
<source>Allow saving passwords from sites</source>
<translation type="unfinished"></translation>
<translation>Tillåt att lösenord lagras sidor</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="1611"/>
@ -2612,7 +2612,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="1625"/>
<source>Allow storing of cookies</source>
<translation type="unfinished"></translation>
<translation>Tillåt lagring av kakor</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="1632"/>
@ -2672,7 +2672,7 @@
<message>
<location filename="../src/preferences/preferences.ui" line="1827"/>
<source>&lt;b&gt;Note: &lt;/b&gt;You can change position of OSD Notification by dragging it on the screen.</source>
<translation>&lt;b&gt;Obs:&lt;/b&gt;Du kan ändra notifikationernas placering genom att dra runt dem på skärmen.</translation>
<translation>&lt;b&gt;Observera:&lt;/b&gt;Du kan ändra notifikationernas placering genom att dra runt dem på skärmen.</translation>
</message>
<message>
<location filename="../src/preferences/preferences.ui" line="1876"/>
@ -2808,7 +2808,7 @@
<message>
<location filename="../src/preferences/preferences.cpp" line="591"/>
<source>Cannot create profile directory!</source>
<translation type="unfinished"></translation>
<translation>Kan inte skapa profilensökväg!</translation>
</message>
<message>
<location filename="../src/preferences/preferences.cpp" line="605"/>
@ -2828,16 +2828,16 @@
<source>The file is not an OpenSearch 1.1 file.</source>
<translation>Denna fil är inte en OpenSearch1.1 fil.</translation>
</message>
<message>
<location filename="../src/tools/certificateinfowidget.cpp" line="286"/>
<source>&lt;not set in certificate&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/desktopnotifications/desktopnotificationsfactory.cpp" line="101"/>
<source>Native System Notification</source>
<translation type="unfinished">Systemets egna notifikationer</translation>
</message>
<message>
<location filename="../src/tools/certificateinfowidget.cpp" line="286"/>
<source>&lt;not set in certificate&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QtWin</name>
@ -2881,7 +2881,7 @@
<message>
<location filename="../src/app/qupzilla.cpp" line="258"/>
<source>Private Browsing Enabled</source>
<translation>Privat surf aktiverat</translation>
<translation>Privat surfning aktiverat</translation>
</message>
<message>
<location filename="../src/app/qupzilla.cpp" line="262"/>
@ -3066,12 +3066,12 @@
<message>
<location filename="../src/app/qupzilla.cpp" line="374"/>
<source>&amp;Reload</source>
<translation>&amp;Läs om</translation>
<translation>&amp;Hämta om</translation>
</message>
<message>
<location filename="../src/app/qupzilla.cpp" line="377"/>
<source>Character &amp;Encoding</source>
<translation type="unfinished"></translation>
<translation>&amp;Teckenkodning</translation>
</message>
<message>
<location filename="../src/app/qupzilla.cpp" line="382"/>
@ -3126,7 +3126,7 @@
<message>
<location filename="../src/app/qupzilla.cpp" line="557"/>
<source> (Private Browsing)</source>
<translation>(Privat surf)</translation>
<translation>(Privat surfning)</translation>
</message>
<message>
<location filename="../src/app/qupzilla.cpp" line="622"/>
@ -3212,7 +3212,7 @@
<message>
<location filename="../src/app/qupzilla.cpp" line="808"/>
<source>Page &amp;Info</source>
<translation>Sidoinfo</translation>
<translation>Sidinformation</translation>
</message>
<message>
<location filename="../src/app/qupzilla.cpp" line="810"/>
@ -3242,7 +3242,7 @@
<message>
<location filename="../src/app/qupzilla.cpp" line="815"/>
<source>&amp;Private Browsing</source>
<translation>&amp;Privat surf</translation>
<translation>&amp;Privat surfning</translation>
</message>
<message>
<location filename="../src/app/qupzilla.cpp" line="889"/>
@ -3272,7 +3272,7 @@
<message>
<location filename="../src/app/qupzilla.cpp" line="1390"/>
<source>When private browsing is turned on, some actions concerning your privacy will be disabled:</source>
<translation>När privat surf aktiveras stängs vissa integritetsrelaterade funktioner av:</translation>
<translation>När privat surfning aktiveras stängs vissa integritetsrelaterade funktioner av:</translation>
</message>
<message>
<location filename="../src/app/qupzilla.cpp" line="1393"/>
@ -3297,7 +3297,7 @@
<message>
<location filename="../src/app/qupzilla.cpp" line="1402"/>
<source>Start Private Browsing</source>
<translation>Aktivera privat surf</translation>
<translation>Aktivera privat surfning</translation>
</message>
<message>
<location filename="../src/app/qupzilla.cpp" line="1565"/>
@ -3382,7 +3382,7 @@
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="186"/>
<source>Paths</source>
<translation type="unfinished"></translation>
<translation>Sökvägar</translation>
</message>
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="187"/>
@ -3552,7 +3552,7 @@
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="140"/>
<source>E-mail is optional&lt;br/&gt;&lt;b&gt;Note: &lt;/b&gt;Please use English language only.</source>
<translation>E-post är valfritt&lt;br/&gt;&lt;b&gt;Obs:&lt;/b&gt;Använd endast Engelska.</translation>
<translation>E-post är valfritt&lt;br/&gt;&lt;b&gt;Observera:&lt;/b&gt;Använd endast Engelska.</translation>
</message>
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="134"/>
@ -3572,7 +3572,7 @@
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="255"/>
<source>Reload</source>
<translation>Ladda om</translation>
<translation>Hämta om</translation>
</message>
<message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="260"/>
@ -3606,7 +3606,7 @@
<message>
<location filename="../src/rss/rssmanager.cpp" line="43"/>
<source>Reload</source>
<translation>Ladda om</translation>
<translation>Hämta om</translation>
</message>
<message>
<location filename="../src/rss/rssmanager.ui" line="54"/>
@ -3643,8 +3643,8 @@
<location filename="../src/rss/rssmanager.cpp" line="118"/>
<source>You don&apos;t have any RSS Feeds.&lt;br/&gt;
Please add some with RSS icon in navigation bar on site which offers feeds.</source>
<translation>Du har inga RSS-flöden.-br/&gt;
Lägg till flöden med RSS-ikonen i navigeringsraden sidor som tillhandahåller flöden.</translation>
<translation>Du har inga RSS-flöden.&lt;br/&gt;
Lägg till flöden med RSS-ikonen i navigeringsraden från sidor som tillhandahåller flöden.</translation>
</message>
<message>
<location filename="../src/rss/rssmanager.cpp" line="140"/>
@ -3664,12 +3664,12 @@ Lägg till flöden med RSS-ikonen i navigeringsraden på sidor som tillhandahål
<message>
<location filename="../src/rss/rssmanager.cpp" line="183"/>
<source>Fill title and URL of a feed: </source>
<translation type="unfinished"></translation>
<translation>Fyll i titel och url för ett flöde:</translation>
</message>
<message>
<location filename="../src/rss/rssmanager.cpp" line="185"/>
<source>Feed title: </source>
<translation type="unfinished">Flödets titel:</translation>
<translation>Flödets titel:</translation>
</message>
<message>
<location filename="../src/rss/rssmanager.cpp" line="186"/>
@ -3749,7 +3749,7 @@ Lägg till flöden med RSS-ikonen i navigeringsraden på sidor som tillhandahål
</message>
<message>
<source>Reload</source>
<translation type="obsolete">Ladda om</translation>
<translation type="obsolete">Hämta om</translation>
</message>
</context>
<context>
@ -3773,7 +3773,7 @@ Lägg till flöden med RSS-ikonen i navigeringsraden på sidor som tillhandahål
<message>
<location filename="../src/preferences/sslmanager.ui" line="57"/>
<source>This is a list of CA Authorities Certificates stored in the standard system path and in user specified paths.</source>
<translation type="unfinished"></translation>
<translation>Detta är en lista CA Authorities-certifikat lagrade i systemets standardsökväg och användarspecificerade sökvägar.</translation>
</message>
<message>
<location filename="../src/preferences/sslmanager.ui" line="68"/>
@ -3789,7 +3789,7 @@ Lägg till flöden med RSS-ikonen i navigeringsraden på sidor som tillhandahål
<message>
<location filename="../src/preferences/sslmanager.ui" line="108"/>
<source>This is a list of Local Certificates stored in your user profile. It also contains all certificates, that have received an exception.</source>
<translation type="unfinished"></translation>
<translation>Detta är en lista lokala certifikat lagrade i din användarprofil. Den innehåller också alla certifikat som erhållit ett undantag.</translation>
</message>
<message>
<location filename="../src/preferences/sslmanager.ui" line="119"/>
@ -3804,12 +3804,12 @@ Lägg till flöden med RSS-ikonen i navigeringsraden på sidor som tillhandahål
<message>
<location filename="../src/preferences/sslmanager.ui" line="159"/>
<source>If CA Authorities Certificates were not automatically loaded from the system, you can specify paths manually where the certificates are stored.</source>
<translation type="unfinished"></translation>
<translation>Om CA Authorities-certifikat inte laddades automatiskt kan du manuellt ställa in var certifikaten finns lagrade.</translation>
</message>
<message>
<location filename="../src/preferences/sslmanager.ui" line="171"/>
<source>&lt;b&gt;NOTE:&lt;/b&gt; Setting this option is a high security risk!</source>
<translation>&lt;b&gt;Obs:&lt;/b&gt;Denna inställningen är en hög säkerhetsrisk!</translation>
<translation>&lt;b&gt;Observera:&lt;/b&gt; Denna inställningen är en hög säkerhetsrisk!</translation>
</message>
<message>
<location filename="../src/preferences/sslmanager.ui" line="210"/>
@ -3820,7 +3820,8 @@ Lägg till flöden med RSS-ikonen i navigeringsraden på sidor som tillhandahål
<location filename="../src/preferences/sslmanager.ui" line="232"/>
<source>All certificates must have .crt suffix.
After adding or removing certificate paths, it is neccessary to restart QupZilla in order to take effect the changes.</source>
<translation type="unfinished"></translation>
<translation>Alla certifikat måste ha .crt-suffix.
Efter att ha lagt till eller tagit bort certifikats sökvägar måste QupZilla startas om för att ändringarna ska ha effekt.</translation>
</message>
<message>
<location filename="../src/preferences/sslmanager.cpp" line="55"/>
@ -3975,7 +3976,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message>
<location filename="../src/webview/siteinfo.ui" line="14"/>
<source>Site Info</source>
<translation>Sidinfo</translation>
<translation>Sidinformation</translation>
</message>
<message>
<location filename="../src/webview/siteinfo.ui" line="80"/>
@ -4070,7 +4071,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message>
<location filename="../src/webview/siteinfo.cpp" line="129"/>
<source>&lt;b&gt;Your connection to this page is not secured!&lt;/b&gt;</source>
<translation>&lt;b&gt;Din anslutning till denna sidan är osäkrad!&lt;/b&gt;</translation>
<translation>&lt;b&gt;Din anslutning till denna sidan är osäker!&lt;/b&gt;</translation>
</message>
<message>
<location filename="../src/webview/siteinfo.cpp" line="147"/>
@ -4218,7 +4219,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message>
<location filename="../src/other/sourceviewer.cpp" line="72"/>
<source>Select All</source>
<translation>Välj allt</translation>
<translation>Markera allt</translation>
</message>
<message>
<location filename="../src/other/sourceviewer.cpp" line="73"/>
@ -4239,7 +4240,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message>
<location filename="../src/other/sourceviewer.cpp" line="79"/>
<source>Reload</source>
<translation>Ladda om</translation>
<translation>Hämta om</translation>
</message>
<message>
<location filename="../src/other/sourceviewer.cpp" line="81"/>
@ -4525,7 +4526,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<location filename="../src/webview/tabbedwebview.cpp" line="364"/>
<location filename="../src/webview/tabbedwebview.cpp" line="375"/>
<source>&amp;Reload</source>
<translation type="unfinished"></translation>
<translation type="unfinished">&amp;Hämta om</translation>
</message>
<message>
<location filename="../src/webview/tabbedwebview.cpp" line="365"/>
@ -4600,12 +4601,12 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message>
<location filename="../src/webview/tabbedwebview.cpp" line="394"/>
<source>Select &amp;all</source>
<translation type="unfinished">Välj &amp;allt</translation>
<translation type="unfinished">Markera &amp;allt</translation>
</message>
<message>
<location filename="../src/webview/tabbedwebview.cpp" line="399"/>
<source>Validate page</source>
<translation type="unfinished"></translation>
<translation type="unfinished">Validera sida</translation>
</message>
<message>
<location filename="../src/webview/tabbedwebview.cpp" line="402"/>
@ -4615,7 +4616,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message>
<location filename="../src/webview/tabbedwebview.cpp" line="403"/>
<source>Show Web &amp;Inspector</source>
<translation type="unfinished"></translation>
<translation type="unfinished">Visa webbinspektören</translation>
</message>
<message>
<location filename="../src/webview/tabbedwebview.cpp" line="405"/>
@ -4673,7 +4674,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message>
<location filename="../src/preferences/thememanager.cpp" line="79"/>
<source>License Viewer</source>
<translation type="unfinished"></translation>
<translation>Licensvisare</translation>
</message>
</context>
<context>
@ -4686,7 +4687,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message>
<location filename="../src/navigation/reloadstopbutton.cpp" line="36"/>
<source>Reload</source>
<translation type="unfinished">Ladda om</translation>
<translation type="unfinished">Hämta om</translation>
</message>
</context>
<context>
@ -4713,7 +4714,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<location filename="../src/webview/webinspectordockwidget.cpp" line="29"/>
<location filename="../src/webview/webinspectordockwidget.cpp" line="32"/>
<source>Web Inspector</source>
<translation type="unfinished"></translation>
<translation>Webinspektör</translation>
</message>
</context>
<context>
@ -4786,7 +4787,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message>
<location filename="../src/webview/webpage.cpp" line="401"/>
<source>Proxy authentication required</source>
<translation type="unfinished"></translation>
<translation>Proxyautentisering krävs</translation>
</message>
<message>
<location filename="../src/webview/webpage.cpp" line="404"/>
@ -4894,6 +4895,10 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<source>&amp;Print page</source>
<translation type="obsolete">&amp;Skriv ut sida</translation>
</message>
<message>
<source>Validate page</source>
<translation type="obsolete">Validera sida</translation>
</message>
<message>
<source>Send text...</source>
<translation type="obsolete">Skicka text...</translation>
@ -5016,7 +5021,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
</message>
<message>
<source>Select &amp;all</source>
<translation type="obsolete">Välj &amp;allt</translation>
<translation type="obsolete">Markera &amp;allt</translation>
</message>
<message>
<source>Show so&amp;urce code</source>
@ -5026,6 +5031,10 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<source>Show info ab&amp;out site</source>
<translation type="obsolete">Visa &amp;information om denna sida</translation>
</message>
<message>
<source>Show Web &amp;Inspector</source>
<translation type="obsolete">Visa webbinspektören</translation>
</message>
<message>
<source>Search &quot;%1 ..&quot; with %2</source>
<translation type="obsolete">Sök efter&quot;%1 ..&quot; %2 </translation>