1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +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@ijekavian]=Брз и сигуран веб прегледач
Comment[sr@ijekavianlatin]=Brz i siguran veb pregledač Comment[sr@ijekavianlatin]=Brz i siguran veb pregledač
Comment[sr@latin]=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=Web Browser
GenericName[cs]=Webový prohlížeč GenericName[cs]=Webový prohlížeč
GenericName[de]=Web Browser GenericName[de]=Web Browser
@ -38,7 +39,7 @@ GenericName[sr]=Веб прегледач
GenericName[sr@ijekavian]=Веб прегледач GenericName[sr@ijekavian]=Веб прегледач
GenericName[sr@ijekavianlatin]=Veb pregledač GenericName[sr@ijekavianlatin]=Veb pregledač
GenericName[sr@latin]=Veb pregledač GenericName[sr@latin]=Veb pregledač
GenericName[sv]=Webbläsare
Exec=qupzilla %u Exec=qupzilla %u
MimeType=text/html;application/xhtml+xml; MimeType=text/html;application/xhtml+xml;
Terminal=false Terminal=false
@ -61,6 +62,7 @@ Name[sr]=Отвори у новом језичку
Name[sr@ijekavian]=Отвори у новом језичку Name[sr@ijekavian]=Отвори у новом језичку
Name[sr@ijekavianlatin]=Otvori u novom jezičku Name[sr@ijekavianlatin]=Otvori u novom jezičku
Name[sr@latin]=Otvori u novom jezičku Name[sr@latin]=Otvori u novom jezičku
Name[sv]=Öppna ny flik
Exec=qupzilla --new-tab Exec=qupzilla --new-tab
TargetEnvironment=Unity TargetEnvironment=Unity
@ -82,6 +84,7 @@ Name[sr]=Отвори у новом прозору
Name[sr@ijekavian]=Отвори у новом прозору Name[sr@ijekavian]=Отвори у новом прозору
Name[sr@ijekavianlatin]=Otvori u novom prozoru Name[sr@ijekavianlatin]=Otvori u novom prozoru
Name[sr@latin]=Otvori u novom prozoru Name[sr@latin]=Otvori u novom prozoru
Name[sv]=Öppna nytt fönster
Exec=qupzilla --new-window Exec=qupzilla --new-window
TargetEnvironment=Unity TargetEnvironment=Unity
@ -102,5 +105,6 @@ Name[sr]=Покрени приватно прегледање
Name[sr@ijekavian]=Покрени приватно прегледање Name[sr@ijekavian]=Покрени приватно прегледање
Name[sr@ijekavianlatin]=Pokreni privatno pregledanje Name[sr@ijekavianlatin]=Pokreni privatno pregledanje
Name[sr@latin]=Pokreni privatno pregledanje Name[sr@latin]=Pokreni privatno pregledanje
Name[sv]=Starta privat surfning
Exec=qupzilla --private-browsing Exec=qupzilla --private-browsing
TargetEnvironment=Unity TargetEnvironment=Unity

View File

@ -19,6 +19,8 @@
#include "adblockmanager.h" #include "adblockmanager.h"
#include "qupzilla.h" #include "qupzilla.h"
#include "webpage.h" #include "webpage.h"
#include "tabbedwebview.h"
#include "tabwidget.h"
AdBlockIcon::AdBlockIcon(QupZilla* mainClass, QWidget* parent) AdBlockIcon::AdBlockIcon(QupZilla* mainClass, QWidget* parent)
: ClickableLabel(parent) : ClickableLabel(parent)
@ -57,7 +59,7 @@ void AdBlockIcon::showMenu(const QPoint &pos)
void AdBlockIcon::learnAboutRules() 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) void AdBlockIcon::setEnabled(bool enabled)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -62,6 +62,7 @@
#include "webhistorywrapper.h" #include "webhistorywrapper.h"
#include "enhancedmenu.h" #include "enhancedmenu.h"
#include "settings.h" #include "settings.h"
#include "webtab.h"
const QString QupZilla::VERSION = "1.1.5"; const QString QupZilla::VERSION = "1.1.5";
const QString QupZilla::BUILDTIME = __DATE__" "__TIME__; const QString QupZilla::BUILDTIME = __DATE__" "__TIME__;
@ -83,13 +84,13 @@ const QIcon QupZilla::qupzillaIcon()
return i; return i;
} }
QupZilla::QupZilla(StartBehaviour behaviour, QUrl startUrl) QupZilla::QupZilla(Qz::BrowserWindow type, QUrl startUrl)
: QMainWindow(0) : QMainWindow(0)
, m_historyMenuChanged(true) , m_historyMenuChanged(true)
, m_bookmarksMenuChanged(true) , m_bookmarksMenuChanged(true)
, m_isClosing(false) , m_isClosing(false)
, m_startingUrl(startUrl) , m_startingUrl(startUrl)
, m_startBehaviour(behaviour) , m_startBehaviour(type)
, m_menuBookmarksAction(0) , m_menuBookmarksAction(0)
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
, m_macMenuBar(new QMenuBar()) , m_macMenuBar(new QMenuBar())
@ -110,14 +111,14 @@ QupZilla::QupZilla(StartBehaviour behaviour, QUrl startUrl)
setupMenu(); setupMenu();
QTimer::singleShot(0, this, SLOT(postLaunch())); 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() void QupZilla::postLaunch()
{ {
loadSettings(); loadSettings();
if (m_startBehaviour == FirstAppWindow) { if (m_startBehaviour == Qz::BW_FirstAppWindow) {
m_tabWidget->restorePinnedTabs(); m_tabWidget->restorePinnedTabs();
} }
@ -160,17 +161,17 @@ void QupZilla::postLaunch()
} }
switch (m_startBehaviour) { switch (m_startBehaviour) {
case FirstAppWindow: case Qz::BW_FirstAppWindow:
if (startingAfterCrash || (addTab && afterLaunch == 3)) { if (startingAfterCrash || (addTab && afterLaunch == 3)) {
addTab = !mApp->restoreStateSlot(this); addTab = !mApp->restoreStateSlot(this);
} }
break; break;
case NewWindow: case Qz::BW_NewWindow:
addTab = true; addTab = true;
break; break;
case OtherRestoredWindow: case Qz::BW_OtherRestoredWindow:
addTab = false; addTab = false;
break; break;
} }
@ -181,7 +182,7 @@ void QupZilla::postLaunch()
} }
if (addTab) { if (addTab) {
int index = m_tabWidget->addView(startUrl, TabWidget::CleanPage); int index = m_tabWidget->addView(startUrl, Qz::NT_CleanSelectedTab);
m_tabWidget->setCurrentIndex(index); m_tabWidget->setCurrentIndex(index);
if (startUrl.isEmpty() || startUrl.toString() == "qupzilla:speeddial") { 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); m_tabWidget->addView(m_homepage);
} }
@ -202,6 +205,16 @@ void QupZilla::postLaunch()
emit startingCompleted(); emit startingCompleted();
} }
void QupZilla::goNext()
{
weView()->forward();
}
void QupZilla::goBack()
{
weView()->back();
}
void QupZilla::setupUi() void QupZilla::setupUi()
{ {
int locationBarWidth; int locationBarWidth;
@ -215,7 +228,7 @@ void QupZilla::setupUi()
} }
else { else {
setGeometry(settings.value("WindowGeometry", QRect(20, 20, 800, 550)).toRect()); 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 // Moving window +40 x,y to be visible that this is new window
QPoint p = pos(); QPoint p = pos();
p.setX(p.x() + 40); p.setX(p.x() + 40);
@ -276,6 +289,26 @@ QMenuBar* QupZilla::menuBar() const
#endif #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() void QupZilla::setupMenu()
{ {
// Standard actions - needed on Mac to be placed correctly in "application" menu // 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) { switch (mes) {
case MainApplication::SetAdBlockIconEnabled: case Qz::AM_SetAdBlockIconEnabled:
m_adblockIcon->setEnabled(state); m_adblockIcon->setEnabled(state);
break; break;
case MainApplication::CheckPrivateBrowsing: case Qz::AM_CheckPrivateBrowsing:
m_privateBrowsing->setVisible(state); m_privateBrowsing->setVisible(state);
m_actionPrivateBrowsing->setChecked(state); m_actionPrivateBrowsing->setChecked(state);
weView()->titleChanged(); weView()->titleChanged();
break; break;
case MainApplication::ReloadSettings: case Qz::AM_ReloadSettings:
loadSettings(); loadSettings();
m_tabWidget->loadSettings(); m_tabWidget->loadSettings();
LocationBarSettings::instance()->loadSettings(); LocationBarSettings::instance()->loadSettings();
break; break;
case MainApplication::HistoryStateChanged: case Qz::AM_HistoryStateChanged:
m_historyMenuChanged = true; m_historyMenuChanged = true;
break; break;
case MainApplication::BookmarksChanged: case Qz::AM_BookmarksChanged:
m_bookmarksMenuChanged = true; m_bookmarksMenuChanged = true;
break; break;
case MainApplication::StartPrivateBrowsing: case Qz::AM_StartPrivateBrowsing:
startPrivate(state); startPrivate(state);
break; break;
@ -965,6 +998,11 @@ void QupZilla::bookmarkAllTabs()
mApp->browsingLibrary()->bookmarksManager()->insertAllTabs(); mApp->browsingLibrary()->bookmarksManager()->insertAllTabs();
} }
void QupZilla::newWindow()
{
mApp->makeNewWindow(Qz::BW_NewWindow);
}
void QupZilla::goHome() void QupZilla::goHome()
{ {
loadAddress(m_homepage); 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() 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() void QupZilla::loadActionUrl()
@ -999,7 +1072,7 @@ void QupZilla::loadActionUrlInNewTab()
void QupZilla::loadActionUrlInNewNotSelectedTab() void QupZilla::loadActionUrlInNewNotSelectedTab()
{ {
if (QAction* action = qobject_cast<QAction*>(sender())) { 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)) { 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(); about.exec();
} }
void QupZilla::addTab()
{
m_tabWidget->addView(QUrl(), Qz::NT_SelectedTab, true);
}
void QupZilla::webSearch() void QupZilla::webSearch()
{ {
m_navigationBar->searchLine()->setFocus(); m_navigationBar->searchLine()->setFocus();

View File

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

View File

@ -27,6 +27,7 @@
#include "browsinglibrary.h" #include "browsinglibrary.h"
#include "globalfunctions.h" #include "globalfunctions.h"
#include "bookmarksimportdialog.h" #include "bookmarksimportdialog.h"
#include "webtab.h"
BookmarksManager::BookmarksManager(QupZilla* mainClass, QWidget* parent) BookmarksManager::BookmarksManager(QupZilla* mainClass, QWidget* parent)
: QWidget(parent) : QWidget(parent)
@ -168,7 +169,7 @@ void BookmarksManager::itemControlClicked(QTreeWidgetItem* item)
void BookmarksManager::loadInNewTab() void BookmarksManager::loadInNewTab()
{ {
if (QAction* action = qobject_cast<QAction*>(sender())) { 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); bookmark.inSubfolder = isSubfolder(bookmark.folder);
emit bookmarkAdded(bookmark); emit bookmarkAdded(bookmark);
mApp->sendMessages(MainApplication::BookmarksChanged, true); mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true; return true;
} }
@ -182,7 +182,7 @@ bool BookmarksModel::removeBookmark(int id)
} }
emit bookmarkDeleted(bookmark); emit bookmarkDeleted(bookmark);
mApp->sendMessages(MainApplication::BookmarksChanged, true); mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true; return true;
} }
@ -255,7 +255,7 @@ bool BookmarksModel::editBookmark(int id, const QString &title, const QUrl &url,
} }
emit bookmarkEdited(before, after); emit bookmarkEdited(before, after);
mApp->sendMessages(MainApplication::BookmarksChanged, true); mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true; return true;
} }
@ -276,7 +276,7 @@ bool BookmarksModel::createFolder(const QString &name)
} }
emit folderAdded(name); emit folderAdded(name);
mApp->sendMessages(MainApplication::BookmarksChanged, true); mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true; return true;
} }
@ -309,7 +309,7 @@ bool BookmarksModel::removeFolder(const QString &name)
} }
emit folderDeleted(name); emit folderDeleted(name);
mApp->sendMessages(MainApplication::BookmarksChanged, true); mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true; return true;
} }
@ -381,7 +381,7 @@ bool BookmarksModel::createSubfolder(const QString &name)
} }
emit subfolderAdded(name); emit subfolderAdded(name);
mApp->sendMessages(MainApplication::BookmarksChanged, true); mApp->sendMessages(Qz::AM_BookmarksChanged, true);
return true; return true;
} }

View File

@ -17,12 +17,14 @@
* ============================================================ */ * ============================================================ */
#include "bookmarkstoolbar.h" #include "bookmarkstoolbar.h"
#include "qupzilla.h" #include "qupzilla.h"
#include "mainapplication.h"
#include "bookmarksmodel.h" #include "bookmarksmodel.h"
#include "iconprovider.h" #include "iconprovider.h"
#include "historymodel.h" #include "historymodel.h"
#include "toolbutton.h" #include "toolbutton.h"
#include "databasewriter.h" #include "databasewriter.h"
#include "enhancedmenu.h" #include "enhancedmenu.h"
#include "tabwidget.h"
BookmarksToolbar::BookmarksToolbar(QupZilla* mainClass, QWidget* parent) BookmarksToolbar::BookmarksToolbar(QupZilla* mainClass, QWidget* parent)
: QWidget(parent) : QWidget(parent)
@ -281,7 +283,7 @@ void BookmarksToolbar::loadFolderBookmarksInTabs()
} }
foreach(Bookmark b, m_bookmarksModel->folderBookmarks(folder)) { 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 <QFormLayout>
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QDropEvent> #include <QDropEvent>
#include <QLabel>
#include <QLineEdit>
#include "bookmarksmodel.h" #include "bookmarksmodel.h"

View File

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

View File

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

View File

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

View File

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

View File

@ -18,10 +18,12 @@
#include "historymanager.h" #include "historymanager.h"
#include "ui_historymanager.h" #include "ui_historymanager.h"
#include "qupzilla.h" #include "qupzilla.h"
#include "mainapplication.h"
#include "historymodel.h" #include "historymodel.h"
#include "iconprovider.h" #include "iconprovider.h"
#include "browsinglibrary.h" #include "browsinglibrary.h"
#include "globalfunctions.h" #include "globalfunctions.h"
#include "tabwidget.h"
HistoryManager::HistoryManager(QupZilla* mainClass, QWidget* parent) HistoryManager::HistoryManager(QupZilla* mainClass, QWidget* parent)
: QWidget(parent) : QWidget(parent)
@ -81,7 +83,7 @@ void HistoryManager::itemDoubleClicked(QTreeWidgetItem* item)
void HistoryManager::loadInNewTab() void HistoryManager::loadInNewTab()
{ {
if (QAction* action = qobject_cast<QAction*>(sender())) { 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 <QWidget>
#include <QTreeWidgetItem> #include <QTreeWidgetItem>
#include <QWeakPointer> #include <QWeakPointer>
#include <QClipboard>
#include "historymodel.h" #include "historymodel.h"

View File

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

View File

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

View File

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

View File

@ -17,8 +17,10 @@
* ============================================================ */ * ============================================================ */
#include "websearchbar.h" #include "websearchbar.h"
#include "qupzilla.h" #include "qupzilla.h"
#include "mainapplication.h"
#include "tabbedwebview.h" #include "tabbedwebview.h"
#include "webpage.h" #include "webpage.h"
#include "tabwidget.h"
#include "clickablelabel.h" #include "clickablelabel.h"
#include "buttonwithmenu.h" #include "buttonwithmenu.h"
#include "searchenginesmanager.h" #include "searchenginesmanager.h"
@ -145,7 +147,7 @@ void WebSearchBar::search()
void WebSearchBar::searchInNewTab() void WebSearchBar::searchInNewTab()
{ {
p_QupZilla->weView()->setFocus(); 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) void WebSearchBar::completeMenuWithAvailableEngines(QMenu* menu)

View File

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

View File

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

View File

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

View File

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

View File

@ -17,9 +17,9 @@
* ============================================================ */ * ============================================================ */
#include "updater.h" #include "updater.h"
#include "qupzilla.h" #include "qupzilla.h"
#include "mainapplication.h"
#include "tabwidget.h" #include "tabwidget.h"
#include "desktopnotificationsfactory.h" #include "desktopnotificationsfactory.h"
#include <QDebug>
Updater::Updater(QupZilla* mainClass, QObject* parent) Updater::Updater(QupZilla* mainClass, QObject* parent)
: QObject(parent) : QObject(parent)
@ -118,7 +118,7 @@ void Updater::downCompleted(QNetworkReply* reply)
void Updater::downloadNewVersion() 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() Updater::~Updater()

View File

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

View File

@ -19,6 +19,8 @@
#include "popupwebview.h" #include "popupwebview.h"
#include "popupwindow.h" #include "popupwindow.h"
#include "qupzilla.h" #include "qupzilla.h"
#include "tabwidget.h"
#include "tabbedwebview.h"
// Wrapper class to detect whether window is opened from JavaScript window.open method // 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 // 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))); disconnect(this, SIGNAL(loadFinished(bool)), this, SLOT(slotLoadFinished(bool)));
} }
else { 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); TabbedWebView* view = p_QupZilla->weView(index);
view->setWebPage(this); view->setWebPage(this);
if (m_isLoading) { if (m_isLoading) {

View File

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

View File

@ -259,13 +259,13 @@ void RSSManager::controlLoadFeed(QTreeWidgetItem* item)
if (item->whatsThis(0).isEmpty()) { if (item->whatsThis(0).isEmpty()) {
return; return;
} }
getQupZilla()->tabWidget()->addView(QUrl(item->whatsThis(0)), TabWidget::NewNotSelectedTab); getQupZilla()->tabWidget()->addView(QUrl(item->whatsThis(0)), Qz::NT_NotSelectedTab);
} }
void RSSManager::loadFeedInNewTab() void RSSManager::loadFeedInNewTab()
{ {
if (QAction* action = qobject_cast<QAction*>(sender())) { 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() void BookmarksSideBar::loadInNewTab()
{ {
if (QAction* action = qobject_cast<QAction*>(sender())) { 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 "historysidebar.h"
#include "ui_historysidebar.h" #include "ui_historysidebar.h"
#include "qupzilla.h" #include "qupzilla.h"
#include "tabwidget.h"
#include "mainapplication.h"
#include "historymodel.h" #include "historymodel.h"
#include "iconprovider.h" #include "iconprovider.h"
@ -61,13 +63,13 @@ void HistorySideBar::itemControlClicked(QTreeWidgetItem* item)
} }
QUrl url = QUrl::fromEncoded(item->text(1).toUtf8()); 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() void HistorySideBar::loadInNewTab()
{ {
if (QAction* action = qobject_cast<QAction*>(sender())) { 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 <QWidget>
#include <QTreeWidgetItem> #include <QTreeWidgetItem>
#include <QShortcut> #include <QShortcut>
#include <QClipboard>
#include "historymodel.h" #include "historymodel.h"

View File

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

View File

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

View File

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

View File

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

View File

@ -465,14 +465,14 @@ void TabbedWebView::stop()
void TabbedWebView::openUrlInNewTab() void TabbedWebView::openUrlInNewTab()
{ {
if (QAction* action = qobject_cast<QAction*>(sender())) { 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() void TabbedWebView::searchSelectedText()
{ {
SearchEngine engine = mApp->searchEnginesManager()->activeEngine(); 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() void TabbedWebView::bookmarkLink()
@ -578,7 +578,7 @@ void TabbedWebView::mousePressEvent(QMouseEvent* event)
switch (event->button()) { switch (event->button()) {
case Qt::MiddleButton: case Qt::MiddleButton:
if (isUrlValid(QUrl(m_hoveredLink))) { 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(); event->accept();
return; return;
} }
@ -592,7 +592,7 @@ void TabbedWebView::mousePressEvent(QMouseEvent* event)
case Qt::LeftButton: case Qt::LeftButton:
if (event->modifiers() == Qt::ControlModifier && isUrlValid(QUrl(m_hoveredLink))) { 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(); event->accept();
return; return;
} }

View File

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

View File

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

View File

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

View File

@ -282,7 +282,7 @@ void WebView::slotIconChanged()
void WebView::openUrlInNewWindow() void WebView::openUrlInNewWindow()
{ {
if (QAction* action = qobject_cast<QAction*>(sender())) { 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="45"/>
<location filename="../src/other/aboutdialog.cpp" line="55"/> <location filename="../src/other/aboutdialog.cpp" line="55"/>
<source>Authors and Contributors</source> <source>Authors and Contributors</source>
<translation>Utvecklare och bidragande</translation> <translation>Utvecklare och bidragare</translation>
</message> </message>
<message> <message>
<location filename="../src/other/aboutdialog.cpp" line="48"/> <location filename="../src/other/aboutdialog.cpp" line="48"/>
@ -33,7 +33,7 @@
<message> <message>
<location filename="../src/other/aboutdialog.cpp" line="63"/> <location filename="../src/other/aboutdialog.cpp" line="63"/>
<source>&lt;b&gt;WebKit version %1&lt;/b&gt;&lt;/p&gt;</source> <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>
<message> <message>
<location filename="../src/other/aboutdialog.cpp" line="64"/> <location filename="../src/other/aboutdialog.cpp" line="64"/>
@ -105,7 +105,7 @@
<message> <message>
<location filename="../src/adblock/adblockdialog.ui" line="20"/> <location filename="../src/adblock/adblockdialog.ui" line="20"/>
<source>Enable AdBlock</source> <source>Enable AdBlock</source>
<translation>Aktivera AdBlock</translation> <translation>Aktivera reklamblockering</translation>
</message> </message>
<message> <message>
<location filename="../src/adblock/adblockdialog.ui" line="39"/> <location filename="../src/adblock/adblockdialog.ui" line="39"/>
@ -174,7 +174,7 @@
<message> <message>
<location filename="../src/adblock/adblockicon.cpp" line="39"/> <location filename="../src/adblock/adblockicon.cpp" line="39"/>
<source>Show AdBlock &amp;Settings</source> <source>Show AdBlock &amp;Settings</source>
<translation>Visa AdBlock &amp; Inställningar</translation> <translation>Visa AdBlock &amp;inställningar</translation>
</message> </message>
<message> <message>
<location filename="../src/adblock/adblockicon.cpp" line="43"/> <location filename="../src/adblock/adblockicon.cpp" line="43"/>
@ -216,7 +216,7 @@
<message> <message>
<location filename="../src/preferences/addacceptlanguage.ui" line="32"/> <location filename="../src/preferences/addacceptlanguage.ui" line="32"/>
<source>Personal definition:</source> <source>Personal definition:</source>
<translation type="unfinished"></translation> <translation>Egen definition:</translation>
</message> </message>
</context> </context>
<context> <context>
@ -875,12 +875,12 @@
<message> <message>
<location filename="../src/tools/certificateinfowidget.ui" line="92"/> <location filename="../src/tools/certificateinfowidget.ui" line="92"/>
<source>&lt;b&gt;Issued By&lt;/b&gt;</source> <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>
<message> <message>
<location filename="../src/tools/certificateinfowidget.ui" line="150"/> <location filename="../src/tools/certificateinfowidget.ui" line="150"/>
<source>&lt;b&gt;Validity&lt;/b&gt;</source> <source>&lt;b&gt;Validity&lt;/b&gt;</source>
<translation type="unfinished"></translation> <translation>&lt;b&gt;Validitet&lt;/b&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/tools/certificateinfowidget.ui" line="157"/> <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="116"/>
<location filename="../src/cookies/cookiemanager.cpp" line="117"/> <location filename="../src/cookies/cookiemanager.cpp" line="117"/>
<source>&lt;cookie not selected&gt;</source> <source>&lt;cookie not selected&gt;</source>
<translation type="unfinished"></translation> <translation>&lt;ingen kaka vald&gt;</translation>
</message> </message>
<message> <message>
<location filename="../src/cookies/cookiemanager.ui" line="213"/> <location filename="../src/cookies/cookiemanager.ui" line="213"/>
@ -1152,7 +1152,7 @@
<message> <message>
<location filename="../src/cookies/cookiemanager.cpp" line="137"/> <location filename="../src/cookies/cookiemanager.cpp" line="137"/>
<source>Session cookie</source> <source>Session cookie</source>
<translation type="unfinished"></translation> <translation>Sessionskaka</translation>
</message> </message>
</context> </context>
<context> <context>
@ -1427,7 +1427,7 @@
<message> <message>
<location filename="../src/opensearch/editsearchengine.ui" line="58"/> <location filename="../src/opensearch/editsearchengine.ui" line="58"/>
<source>&lt;b&gt;Note: &lt;/b&gt;%s in url represent searched string</source> <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>
<message> <message>
<location filename="../src/opensearch/editsearchengine.ui" line="97"/> <location filename="../src/opensearch/editsearchengine.ui" line="97"/>
@ -1802,7 +1802,7 @@
<message> <message>
<location filename="../src/network/networkmanager.cpp" line="205"/> <location filename="../src/network/networkmanager.cpp" line="205"/>
<source>Authorization required</source> <source>Authorization required</source>
<translation type="unfinished"></translation> <translation>Autentisering krävs</translation>
</message> </message>
<message> <message>
<location filename="../src/network/networkmanager.cpp" line="212"/> <location filename="../src/network/networkmanager.cpp" line="212"/>
@ -1829,7 +1829,7 @@
<message> <message>
<location filename="../src/network/networkmanager.cpp" line="263"/> <location filename="../src/network/networkmanager.cpp" line="263"/>
<source>Proxy authorization required</source> <source>Proxy authorization required</source>
<translation type="unfinished"></translation> <translation>Proxyautentisering krävs</translation>
</message> </message>
<message> <message>
<location filename="../src/network/networkmanager.cpp" line="283"/> <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="106"/>
<location filename="../src/webview/popupwebview.cpp" line="116"/> <location filename="../src/webview/popupwebview.cpp" line="116"/>
<source>&amp;Reload</source> <source>&amp;Reload</source>
<translation type="unfinished"></translation> <translation type="unfinished">&amp;Hämta om</translation>
</message> </message>
<message> <message>
<location filename="../src/webview/popupwebview.cpp" line="107"/> <location filename="../src/webview/popupwebview.cpp" line="107"/>
@ -2060,7 +2060,7 @@
<message> <message>
<location filename="../src/webview/popupwebview.cpp" line="134"/> <location filename="../src/webview/popupwebview.cpp" line="134"/>
<source>Select &amp;all</source> <source>Select &amp;all</source>
<translation type="unfinished">Välj &amp;allt</translation> <translation type="unfinished">Markera &amp;allt</translation>
</message> </message>
<message> <message>
<location filename="../src/webview/popupwebview.cpp" line="136"/> <location filename="../src/webview/popupwebview.cpp" line="136"/>
@ -2116,12 +2116,12 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="192"/> <location filename="../src/preferences/preferences.ui" line="192"/>
<source>&lt;b&gt;Launching&lt;/b&gt;</source> <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>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="215"/> <location filename="../src/preferences/preferences.ui" line="215"/>
<source>After launch: </source> <source>After launch: </source>
<translation>Efter start:</translation> <translation>Vid start:</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="223"/> <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.ui" line="429"/>
<location filename="../src/preferences/preferences.cpp" line="620"/> <location filename="../src/preferences/preferences.cpp" line="620"/>
<source>Note: You cannot delete active profile.</source> <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>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="439"/> <location filename="../src/preferences/preferences.ui" line="439"/>
@ -2230,7 +2230,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="526"/> <location filename="../src/preferences/preferences.ui" line="526"/>
<source>Show Navigation ToolBar on start</source> <source>Show Navigation ToolBar on start</source>
<translation>Visa Navigeringsverktygsraden vid start</translation> <translation>Visa navigeringsverktygsraden vid start</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="548"/> <location filename="../src/preferences/preferences.ui" line="548"/>
@ -2310,7 +2310,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="744"/> <location filename="../src/preferences/preferences.ui" line="744"/>
<source>Web Configuration</source> <source>Web Configuration</source>
<translation type="unfinished"></translation> <translation>Webbinställningar</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="752"/> <location filename="../src/preferences/preferences.ui" line="752"/>
@ -2394,7 +2394,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="883"/> <location filename="../src/preferences/preferences.ui" line="883"/>
<source>lines on page</source> <source>lines on page</source>
<translation type="unfinished"></translation> <translation>rader sidan</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="894"/> <location filename="../src/preferences/preferences.ui" line="894"/>
@ -2409,7 +2409,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="953"/> <location filename="../src/preferences/preferences.ui" line="953"/>
<source>Local Storage</source> <source>Local Storage</source>
<translation type="unfinished"></translation> <translation>Lokal lagring</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="961"/> <location filename="../src/preferences/preferences.ui" line="961"/>
@ -2424,7 +2424,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1021"/> <location filename="../src/preferences/preferences.ui" line="1021"/>
<source>Allow storing network cache on disk</source> <source>Allow storing network cache on disk</source>
<translation type="unfinished"></translation> <translation>Tillåt att nätverkscache lagras hårddisken</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1031"/> <location filename="../src/preferences/preferences.ui" line="1031"/>
@ -2439,12 +2439,12 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1065"/> <location filename="../src/preferences/preferences.ui" line="1065"/>
<source>Allow storing web icons</source> <source>Allow storing web icons</source>
<translation type="unfinished"></translation> <translation>Tillåt att webbikoner lagras</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1072"/> <location filename="../src/preferences/preferences.ui" line="1072"/>
<source>Allow saving history</source> <source>Allow saving history</source>
<translation type="unfinished"></translation> <translation>Tillåt att historik sparas</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1079"/> <location filename="../src/preferences/preferences.ui" line="1079"/>
@ -2494,7 +2494,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1224"/> <location filename="../src/preferences/preferences.ui" line="1224"/>
<source>System proxy configuration</source> <source>System proxy configuration</source>
<translation type="unfinished"></translation> <translation>Global proxyinställning</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1231"/> <location filename="../src/preferences/preferences.ui" line="1231"/>
@ -2559,7 +2559,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1438"/> <location filename="../src/preferences/preferences.ui" line="1438"/>
<source>Ask everytime for download location</source> <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>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1445"/> <location filename="../src/preferences/preferences.ui" line="1445"/>
@ -2597,7 +2597,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1541"/> <location filename="../src/preferences/preferences.ui" line="1541"/>
<source>Allow saving passwords from sites</source> <source>Allow saving passwords from sites</source>
<translation type="unfinished"></translation> <translation>Tillåt att lösenord lagras sidor</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1611"/> <location filename="../src/preferences/preferences.ui" line="1611"/>
@ -2612,7 +2612,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1625"/> <location filename="../src/preferences/preferences.ui" line="1625"/>
<source>Allow storing of cookies</source> <source>Allow storing of cookies</source>
<translation type="unfinished"></translation> <translation>Tillåt lagring av kakor</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1632"/> <location filename="../src/preferences/preferences.ui" line="1632"/>
@ -2672,7 +2672,7 @@
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1827"/> <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> <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>
<message> <message>
<location filename="../src/preferences/preferences.ui" line="1876"/> <location filename="../src/preferences/preferences.ui" line="1876"/>
@ -2808,7 +2808,7 @@
<message> <message>
<location filename="../src/preferences/preferences.cpp" line="591"/> <location filename="../src/preferences/preferences.cpp" line="591"/>
<source>Cannot create profile directory!</source> <source>Cannot create profile directory!</source>
<translation type="unfinished"></translation> <translation>Kan inte skapa profilensökväg!</translation>
</message> </message>
<message> <message>
<location filename="../src/preferences/preferences.cpp" line="605"/> <location filename="../src/preferences/preferences.cpp" line="605"/>
@ -2828,16 +2828,16 @@
<source>The file is not an OpenSearch 1.1 file.</source> <source>The file is not an OpenSearch 1.1 file.</source>
<translation>Denna fil är inte en OpenSearch1.1 fil.</translation> <translation>Denna fil är inte en OpenSearch1.1 fil.</translation>
</message> </message>
<message>
<location filename="../src/tools/certificateinfowidget.cpp" line="286"/>
<source>&lt;not set in certificate&gt;</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../src/desktopnotifications/desktopnotificationsfactory.cpp" line="101"/> <location filename="../src/desktopnotifications/desktopnotificationsfactory.cpp" line="101"/>
<source>Native System Notification</source> <source>Native System Notification</source>
<translation type="unfinished">Systemets egna notifikationer</translation> <translation type="unfinished">Systemets egna notifikationer</translation>
</message> </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>
<context> <context>
<name>QtWin</name> <name>QtWin</name>
@ -2881,7 +2881,7 @@
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="258"/> <location filename="../src/app/qupzilla.cpp" line="258"/>
<source>Private Browsing Enabled</source> <source>Private Browsing Enabled</source>
<translation>Privat surf aktiverat</translation> <translation>Privat surfning aktiverat</translation>
</message> </message>
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="262"/> <location filename="../src/app/qupzilla.cpp" line="262"/>
@ -3066,12 +3066,12 @@
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="374"/> <location filename="../src/app/qupzilla.cpp" line="374"/>
<source>&amp;Reload</source> <source>&amp;Reload</source>
<translation>&amp;Läs om</translation> <translation>&amp;Hämta om</translation>
</message> </message>
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="377"/> <location filename="../src/app/qupzilla.cpp" line="377"/>
<source>Character &amp;Encoding</source> <source>Character &amp;Encoding</source>
<translation type="unfinished"></translation> <translation>&amp;Teckenkodning</translation>
</message> </message>
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="382"/> <location filename="../src/app/qupzilla.cpp" line="382"/>
@ -3126,7 +3126,7 @@
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="557"/> <location filename="../src/app/qupzilla.cpp" line="557"/>
<source> (Private Browsing)</source> <source> (Private Browsing)</source>
<translation>(Privat surf)</translation> <translation>(Privat surfning)</translation>
</message> </message>
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="622"/> <location filename="../src/app/qupzilla.cpp" line="622"/>
@ -3212,7 +3212,7 @@
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="808"/> <location filename="../src/app/qupzilla.cpp" line="808"/>
<source>Page &amp;Info</source> <source>Page &amp;Info</source>
<translation>Sidoinfo</translation> <translation>Sidinformation</translation>
</message> </message>
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="810"/> <location filename="../src/app/qupzilla.cpp" line="810"/>
@ -3242,7 +3242,7 @@
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="815"/> <location filename="../src/app/qupzilla.cpp" line="815"/>
<source>&amp;Private Browsing</source> <source>&amp;Private Browsing</source>
<translation>&amp;Privat surf</translation> <translation>&amp;Privat surfning</translation>
</message> </message>
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="889"/> <location filename="../src/app/qupzilla.cpp" line="889"/>
@ -3272,7 +3272,7 @@
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="1390"/> <location filename="../src/app/qupzilla.cpp" line="1390"/>
<source>When private browsing is turned on, some actions concerning your privacy will be disabled:</source> <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>
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="1393"/> <location filename="../src/app/qupzilla.cpp" line="1393"/>
@ -3297,7 +3297,7 @@
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="1402"/> <location filename="../src/app/qupzilla.cpp" line="1402"/>
<source>Start Private Browsing</source> <source>Start Private Browsing</source>
<translation>Aktivera privat surf</translation> <translation>Aktivera privat surfning</translation>
</message> </message>
<message> <message>
<location filename="../src/app/qupzilla.cpp" line="1565"/> <location filename="../src/app/qupzilla.cpp" line="1565"/>
@ -3382,7 +3382,7 @@
<message> <message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="186"/> <location filename="../src/network/qupzillaschemehandler.cpp" line="186"/>
<source>Paths</source> <source>Paths</source>
<translation type="unfinished"></translation> <translation>Sökvägar</translation>
</message> </message>
<message> <message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="187"/> <location filename="../src/network/qupzillaschemehandler.cpp" line="187"/>
@ -3552,7 +3552,7 @@
<message> <message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="140"/> <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> <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>
<message> <message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="134"/> <location filename="../src/network/qupzillaschemehandler.cpp" line="134"/>
@ -3572,7 +3572,7 @@
<message> <message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="255"/> <location filename="../src/network/qupzillaschemehandler.cpp" line="255"/>
<source>Reload</source> <source>Reload</source>
<translation>Ladda om</translation> <translation>Hämta om</translation>
</message> </message>
<message> <message>
<location filename="../src/network/qupzillaschemehandler.cpp" line="260"/> <location filename="../src/network/qupzillaschemehandler.cpp" line="260"/>
@ -3606,7 +3606,7 @@
<message> <message>
<location filename="../src/rss/rssmanager.cpp" line="43"/> <location filename="../src/rss/rssmanager.cpp" line="43"/>
<source>Reload</source> <source>Reload</source>
<translation>Ladda om</translation> <translation>Hämta om</translation>
</message> </message>
<message> <message>
<location filename="../src/rss/rssmanager.ui" line="54"/> <location filename="../src/rss/rssmanager.ui" line="54"/>
@ -3643,8 +3643,8 @@
<location filename="../src/rss/rssmanager.cpp" line="118"/> <location filename="../src/rss/rssmanager.cpp" line="118"/>
<source>You don&apos;t have any RSS Feeds.&lt;br/&gt; <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> Please add some with RSS icon in navigation bar on site which offers feeds.</source>
<translation>Du har inga RSS-flöden.-br/&gt; <translation>Du har inga RSS-flöden.&lt;br/&gt;
Lägg till flöden med RSS-ikonen i navigeringsraden sidor som tillhandahåller flöden.</translation> Lägg till flöden med RSS-ikonen i navigeringsraden från sidor som tillhandahåller flöden.</translation>
</message> </message>
<message> <message>
<location filename="../src/rss/rssmanager.cpp" line="140"/> <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> <message>
<location filename="../src/rss/rssmanager.cpp" line="183"/> <location filename="../src/rss/rssmanager.cpp" line="183"/>
<source>Fill title and URL of a feed: </source> <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>
<message> <message>
<location filename="../src/rss/rssmanager.cpp" line="185"/> <location filename="../src/rss/rssmanager.cpp" line="185"/>
<source>Feed title: </source> <source>Feed title: </source>
<translation type="unfinished">Flödets titel:</translation> <translation>Flödets titel:</translation>
</message> </message>
<message> <message>
<location filename="../src/rss/rssmanager.cpp" line="186"/> <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>
<message> <message>
<source>Reload</source> <source>Reload</source>
<translation type="obsolete">Ladda om</translation> <translation type="obsolete">Hämta om</translation>
</message> </message>
</context> </context>
<context> <context>
@ -3773,7 +3773,7 @@ Lägg till flöden med RSS-ikonen i navigeringsraden på sidor som tillhandahål
<message> <message>
<location filename="../src/preferences/sslmanager.ui" line="57"/> <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> <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>
<message> <message>
<location filename="../src/preferences/sslmanager.ui" line="68"/> <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> <message>
<location filename="../src/preferences/sslmanager.ui" line="108"/> <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> <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>
<message> <message>
<location filename="../src/preferences/sslmanager.ui" line="119"/> <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> <message>
<location filename="../src/preferences/sslmanager.ui" line="159"/> <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> <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>
<message> <message>
<location filename="../src/preferences/sslmanager.ui" line="171"/> <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> <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>
<message> <message>
<location filename="../src/preferences/sslmanager.ui" line="210"/> <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"/> <location filename="../src/preferences/sslmanager.ui" line="232"/>
<source>All certificates must have .crt suffix. <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> 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>
<message> <message>
<location filename="../src/preferences/sslmanager.cpp" line="55"/> <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> <message>
<location filename="../src/webview/siteinfo.ui" line="14"/> <location filename="../src/webview/siteinfo.ui" line="14"/>
<source>Site Info</source> <source>Site Info</source>
<translation>Sidinfo</translation> <translation>Sidinformation</translation>
</message> </message>
<message> <message>
<location filename="../src/webview/siteinfo.ui" line="80"/> <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> <message>
<location filename="../src/webview/siteinfo.cpp" line="129"/> <location filename="../src/webview/siteinfo.cpp" line="129"/>
<source>&lt;b&gt;Your connection to this page is not secured!&lt;/b&gt;</source> <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>
<message> <message>
<location filename="../src/webview/siteinfo.cpp" line="147"/> <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> <message>
<location filename="../src/other/sourceviewer.cpp" line="72"/> <location filename="../src/other/sourceviewer.cpp" line="72"/>
<source>Select All</source> <source>Select All</source>
<translation>Välj allt</translation> <translation>Markera allt</translation>
</message> </message>
<message> <message>
<location filename="../src/other/sourceviewer.cpp" line="73"/> <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> <message>
<location filename="../src/other/sourceviewer.cpp" line="79"/> <location filename="../src/other/sourceviewer.cpp" line="79"/>
<source>Reload</source> <source>Reload</source>
<translation>Ladda om</translation> <translation>Hämta om</translation>
</message> </message>
<message> <message>
<location filename="../src/other/sourceviewer.cpp" line="81"/> <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="364"/>
<location filename="../src/webview/tabbedwebview.cpp" line="375"/> <location filename="../src/webview/tabbedwebview.cpp" line="375"/>
<source>&amp;Reload</source> <source>&amp;Reload</source>
<translation type="unfinished"></translation> <translation type="unfinished">&amp;Hämta om</translation>
</message> </message>
<message> <message>
<location filename="../src/webview/tabbedwebview.cpp" line="365"/> <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> <message>
<location filename="../src/webview/tabbedwebview.cpp" line="394"/> <location filename="../src/webview/tabbedwebview.cpp" line="394"/>
<source>Select &amp;all</source> <source>Select &amp;all</source>
<translation type="unfinished">Välj &amp;allt</translation> <translation type="unfinished">Markera &amp;allt</translation>
</message> </message>
<message> <message>
<location filename="../src/webview/tabbedwebview.cpp" line="399"/> <location filename="../src/webview/tabbedwebview.cpp" line="399"/>
<source>Validate page</source> <source>Validate page</source>
<translation type="unfinished"></translation> <translation type="unfinished">Validera sida</translation>
</message> </message>
<message> <message>
<location filename="../src/webview/tabbedwebview.cpp" line="402"/> <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> <message>
<location filename="../src/webview/tabbedwebview.cpp" line="403"/> <location filename="../src/webview/tabbedwebview.cpp" line="403"/>
<source>Show Web &amp;Inspector</source> <source>Show Web &amp;Inspector</source>
<translation type="unfinished"></translation> <translation type="unfinished">Visa webbinspektören</translation>
</message> </message>
<message> <message>
<location filename="../src/webview/tabbedwebview.cpp" line="405"/> <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> <message>
<location filename="../src/preferences/thememanager.cpp" line="79"/> <location filename="../src/preferences/thememanager.cpp" line="79"/>
<source>License Viewer</source> <source>License Viewer</source>
<translation type="unfinished"></translation> <translation>Licensvisare</translation>
</message> </message>
</context> </context>
<context> <context>
@ -4686,7 +4687,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message> <message>
<location filename="../src/navigation/reloadstopbutton.cpp" line="36"/> <location filename="../src/navigation/reloadstopbutton.cpp" line="36"/>
<source>Reload</source> <source>Reload</source>
<translation type="unfinished">Ladda om</translation> <translation type="unfinished">Hämta om</translation>
</message> </message>
</context> </context>
<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="29"/>
<location filename="../src/webview/webinspectordockwidget.cpp" line="32"/> <location filename="../src/webview/webinspectordockwidget.cpp" line="32"/>
<source>Web Inspector</source> <source>Web Inspector</source>
<translation type="unfinished"></translation> <translation>Webinspektör</translation>
</message> </message>
</context> </context>
<context> <context>
@ -4786,7 +4787,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<message> <message>
<location filename="../src/webview/webpage.cpp" line="401"/> <location filename="../src/webview/webpage.cpp" line="401"/>
<source>Proxy authentication required</source> <source>Proxy authentication required</source>
<translation type="unfinished"></translation> <translation>Proxyautentisering krävs</translation>
</message> </message>
<message> <message>
<location filename="../src/webview/webpage.cpp" line="404"/> <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> <source>&amp;Print page</source>
<translation type="obsolete">&amp;Skriv ut sida</translation> <translation type="obsolete">&amp;Skriv ut sida</translation>
</message> </message>
<message>
<source>Validate page</source>
<translation type="obsolete">Validera sida</translation>
</message>
<message> <message>
<source>Send text...</source> <source>Send text...</source>
<translation type="obsolete">Skicka text...</translation> <translation type="obsolete">Skicka text...</translation>
@ -5016,7 +5021,7 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
</message> </message>
<message> <message>
<source>Select &amp;all</source> <source>Select &amp;all</source>
<translation type="obsolete">Välj &amp;allt</translation> <translation type="obsolete">Markera &amp;allt</translation>
</message> </message>
<message> <message>
<source>Show so&amp;urce code</source> <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> <source>Show info ab&amp;out site</source>
<translation type="obsolete">Visa &amp;information om denna sida</translation> <translation type="obsolete">Visa &amp;information om denna sida</translation>
</message> </message>
<message>
<source>Show Web &amp;Inspector</source>
<translation type="obsolete">Visa webbinspektören</translation>
</message>
<message> <message>
<source>Search &quot;%1 ..&quot; with %2</source> <source>Search &quot;%1 ..&quot; with %2</source>
<translation type="obsolete">Sök efter&quot;%1 ..&quot; %2 </translation> <translation type="obsolete">Sök efter&quot;%1 ..&quot; %2 </translation>