closes #26; closes #24

master
Marc Wäckerlin 14 years ago
parent 32349ded77
commit 06d04776ee
  1. 35
      swisssurfer/src/authentication.hxx
  2. 132
      swisssurfer/src/authentication.ui
  3. 1488
      swisssurfer/src/browser.hxx
  4. 7
      swisssurfer/src/qmake.pro.in
  5. 2
      swisssurfer/src/smartcardauth.cxx
  6. 112
      swisssurfer/src/swisssurfer_de.ts
  7. 112
      swisssurfer/src/swisssurfer_en.ts
  8. 112
      swisssurfer/src/swisssurfer_fr.ts
  9. 112
      swisssurfer/src/swisssurfer_it.ts
  10. 20
      swisssurfer/src/webpage.cxx
  11. 24
      swisssurfer/src/webpage.hxx

@ -0,0 +1,35 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#ifndef __AUTHENTICATION_HXX__
#define __AUTHENTICATION_HXX__
#include <ui_authentication.h>
#include <QtGui/QDialog>
#include <QtNetwork/QAuthenticator>
class Authentication: public QDialog, protected Ui::Authentication {
Q_OBJECT;
public:
Authentication(QAuthenticator* auth, QWidget* p=0):
QDialog(p), _auth(auth) {
setupUi(this);
_realm->setText(_auth->realm());
_user->setText(_auth->user());
_password->setText(_auth->password());
}
public Q_SLOTS:
virtual void accept() {
_auth->setUser(_user->text());
_auth->setPassword(_password->text());
QDialog::accept();
}
private:
QAuthenticator* _auth;
};
#endif

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Authentication</class>
<widget class="QDialog" name="Authentication">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>277</width>
<height>172</height>
</rect>
</property>
<property name="windowTitle">
<string>Authorization</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Authentication required for:</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="_realm">
<property name="text">
<string>realm</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Username:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="_user"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Password:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="_password">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Authentication</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Authentication</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

@ -32,6 +32,8 @@
#include <smartcardauth.hxx>
#include <downloadmanager.hxx>
#include <authentication.hxx>
#include <webpage.hxx>
#include <settings.hxx>
#include <sslclientnetworkmanager.hxx>
@ -201,751 +203,9 @@ class Browser: public QMainWindow, protected Ui::Browser {
return true;
}
protected:
void closeEvent(QCloseEvent *event) {
LOG;
if (!_kiosk && _settings.flag("SaveWindowState") && _settings())
saveWin();
QMainWindow::closeEvent(event);
}
private Q_SLOTS:
void load() {
LOG;
load(_url->currentText());
}
void load(QString page) {
_settings.replaceSearchEngine(page);
if (QUrl(page).scheme()=="") page = "http://"+page;
load(QUrl(page));
}
void load(QUrl page, QWebView* view=0) {
LOG<<page.toString();
statusBar()->showMessage(tr("Checking: %1").arg(page.toString()));
if (!check(page)) {
LOG<<"########## BLACK LISTED IGNORED ##########";
statusBar()->showMessage(tr("Forbidden: %1").arg(page.toString()));
QMessageBox::warning(this, tr("Access Denied"),
tr("<p>Access denied due to security"
" considerations.</p><p>You are not"
" allowed to connect to %1.")
.arg(page.toString()));
return;
}
statusBar()->showMessage(tr("Reading: %1").arg(page.toString()));
if (!page.isValid()) {
statusBar()->showMessage(tr("Illegal URL: %1").arg(page.errorString()));
return;
}
if (!view) view=qobject_cast<QWebView*>(_tabs->currentWidget());
view->load(page);
}
void addBookmark() {
_url->addItem(_url->currentText());
}
void zoom(int i) {
LOG<<100.0*i/10.0;
statusBar()->showMessage(tr("Zoom: %1%").arg(100.0*i/10.0));
qobject_cast<QWebView*>(_tabs->currentWidget())->setZoomFactor(i/10.0);
}
void on_actionHome_activated() {
LOG;
load(_home);
}
void on_actionNew_triggered() {
LOG;
QStringList args(QCoreApplication::arguments());
QString prg(args.takeFirst());
QProcess::startDetached(prg, args);
}
void on_actionNewTab_triggered() {
newTab();
}
void on__tabs_currentChanged(int index) {
_url->setEditText(qobject_cast<QWebView*>(_tabs->currentWidget())
->url().toString());
activateTab();
}
void on__tabs_tabCloseRequested(int index) {
_error.erase(_tabs->widget(index));
_errorUrl.erase(_tabs->widget(index));
_tabs->removeTab(index);
_tabs->setTabsClosable(_tabs->count()>1);
}
void on_actionPrintPreview_triggered() {
QPrintPreviewDialog preview(&_printer, this);
connect(&preview, SIGNAL(paintRequested(QPrinter*)),
qobject_cast<QWebView*>(_tabs->currentWidget()),
SLOT(print(QPrinter*)));
preview.exec();
}
void on_actionInstantPrint_triggered() {
qobject_cast<QWebView*>(_tabs->currentWidget())->print(&_printer);
}
void on_actionPrint_triggered() {
QPrintDialog dialog(&_printer, this);
dialog.setWindowTitle(tr("Print Document"));
if (dialog.exec()!=QDialog::Accepted) return;
on_actionInstantPrint_triggered();
}
void on_actionClose_triggered() {
LOG;
close();
}
void on_actionBack_triggered() {
LOG;
qobject_cast<QWebView*>(_tabs->currentWidget())->history()->back();
}
void on_actionBack_hovered() {
LOG;
if (!qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->backItem().isValid())
return;
actionBack->setStatusTip
(tr("%1 - %2", "statusbar actionBack_hovered %1=url %2=title")
.arg(qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->backItem().url().toString())
.arg(qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->backItem().title()));
actionBack->showStatusText(this);
}
void on_actionForward_triggered() {
LOG;
qobject_cast<QWebView*>(_tabs->currentWidget())->history()->forward();
}
void on_actionForward_hovered() {
LOG;
if (!qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->forwardItem().isValid())
return;
actionForward->setStatusTip
(tr("%1 - %2", "statusbar actionForward_hovered %1=url %2=title")
.arg(qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->forwardItem().url().toString())
.arg(qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->forwardItem().title()));
actionForward->showStatusText(this);
}
void on_actionReload_triggered() {
LOG;
qobject_cast<QWebView*>(_tabs->currentWidget())->reload();
}
void on_actionStop_triggered() {
LOG;
for (int i(0); i<_tabs->count(); ++i)
qobject_cast<QWebView*>(_tabs->widget(i))->stop();
_downloadManager.abort();
}
void on_actionFind_triggered() {
if (!_find) {
statusBar()->addPermanentWidget(_find = new QLineEdit);
_find->setText(qobject_cast<QWebView*>(_tabs->currentWidget())
->selectedText());
}
disconnect(_find, SIGNAL(returnPressed()), this, SLOT(rfind()));
disconnect(_find, SIGNAL(textEdited(QString)), this, SLOT(rfind()));
assert(connect(_find, SIGNAL(returnPressed()), SLOT(find())));
assert(connect(_find, SIGNAL(textEdited(QString)), SLOT(find())));
_find->setFocus();
}
void on_actionReverseFind_triggered() {
if (!_find) {
statusBar()->addPermanentWidget(_find = new QLineEdit);
_find->setText(qobject_cast<QWebView*>(_tabs->currentWidget())
->selectedText());
}
disconnect(_find, SIGNAL(returnPressed()), this, SLOT(find()));
disconnect(_find, SIGNAL(textEdited(QString)), this, SLOT(find()));
assert(connect(_find, SIGNAL(returnPressed()), SLOT(rfind())));
assert(connect(_find, SIGNAL(textEdited(QString)), SLOT(rfind())));
_find->setFocus();
}
void find(const QString& txt=QString()) {
qobject_cast<QWebView*>(_tabs->currentWidget())->findText
(_find->text(),
QWebPage::FindWrapsAroundDocument);
}
void rfind(const QString& txt=QString()) {
qobject_cast<QWebView*>(_tabs->currentWidget())->findText
(_find->text(),
QWebPage::FindWrapsAroundDocument
|QWebPage::FindBackward);
}
void on_actionUnFind_triggered() {
delete _find; _find=0;
}
void on_actionAbout_triggered() {
QMessageBox::aboutQt(this);
}
void on_actionSettings_triggered() {
_settings.show();
}
//@name QWebView slots
//@{
void urlChanged(const QUrl& url) {
LOG<<url.toString();
if (sender()!=_tabs->currentWidget()) return;
LOG<<"signal on current tab";
if (_url) _url->setEditText(url.toString());
}
void linkClicked(const QUrl& url) {
LOG<<url.toString();
load(url, qobject_cast<QWebView*>(sender()));
}
void iconChanged() {
LOG;
QWebView* view(qobject_cast<QWebView*>(sender()));
int index = _tabs->indexOf(view);
if (index<0) return;
QIcon icon(QWebSettings::iconForUrl(view->url()));
if (icon.isNull()) {
LOG<<"Icon for URL is Null"<<view->url();
QPixmap pixmap(QWebSettings::webGraphic
(QWebSettings::DefaultFrameIconGraphic));
if (!pixmap.isNull()) icon = pixmap;
} else icon = icon.pixmap(16, 16);
if (icon.isNull()) LOG<<"Icon is still null";
_tabs->setTabIcon(index, icon);
}
void titleChanged(const QString& text) {
LOG<<text;
_tabs->setTabText(_tabs->indexOf(qobject_cast<QWidget*>(sender())),
trUtf8("%1").arg(text));
}
void statusBarMessage(const QString& text) {
LOG<<text;
if (text.size()) statusBar()->showMessage(tr("Info: %1").arg(text));
}
void loadProgress(int i) {
LOG<<i;
}
void loadStarted() {
LOG;
}
void loadFinished(bool ok) {
LOG<<(ok?"success":"error");
if (ok) statusBar()->showMessage(tr("done."));
activateTab();
}
//@}
//@name QWebPage WebAction slots
//@{
void triggeredOpenLink(bool) {
LOG;
}
void triggeredOpenLinkInNewWindow(bool) {
LOG;
}
void triggeredOpenFrameInNewWindow(bool) {
LOG;
}
void triggeredDownloadLinkToDisk(bool) {
LOG;
}
void triggeredCopyLinkToClipboard(bool) {
LOG;
}
void triggeredOpenImageInNewWindow(bool) {
LOG;
}
void triggeredDownloadImageToDisk(bool) {
LOG;
}
void triggeredCopyImageToClipboard(bool) {
LOG;
}
void triggeredBack(bool) {
LOG;
}
void triggeredForward(bool) {
LOG;
}
void triggeredStop(bool) {
LOG;
}
void triggeredReload(bool) {
LOG;
}
void triggeredCut(bool) {
LOG;
}
void triggeredCopy(bool) {
LOG;
}
void triggeredPaste(bool) {
LOG;
}
void triggeredUndo(bool) {
LOG;
}
void triggeredRedo(bool) {
LOG;
}
void triggeredMoveToNextChar(bool) {
LOG;
}
void triggeredMoveToPreviousChar(bool) {
LOG;
}
void triggeredMoveToNextWord(bool) {
LOG;
}
void triggeredMoveToPreviousWord(bool) {
LOG;
}
void triggeredMoveToNextLine(bool) {
LOG;
}
void triggeredMoveToPreviousLine(bool) {
LOG;
}
void triggeredMoveToStartOfLine(bool) {
LOG;
}
void triggeredMoveToEndOfLine(bool) {
LOG;
}
void triggeredMoveToStartOfBlock(bool) {
LOG;
}
void triggeredMoveToEndOfBlock(bool) {
LOG;
}
void triggeredMoveToStartOfDocument(bool) {
LOG;
}
void triggeredMoveToEndOfDocument(bool) {
LOG;
}
void triggeredSelectNextChar(bool) {
LOG;
}
void triggeredSelectPreviousChar(bool) {
LOG;
}
void triggeredSelectNextWord(bool) {
LOG;
}
void triggeredSelectPreviousWord(bool) {
LOG;
}
void triggeredSelectNextLine(bool) {
LOG;
}
void triggeredSelectPreviousLine(bool) {
LOG;
}
void triggeredSelectStartOfLine(bool) {
LOG;
}
void triggeredSelectEndOfLine(bool) {
LOG;
}
void triggeredSelectStartOfBlock(bool) {
LOG;
}
void triggeredSelectEndOfBlock(bool) {
LOG;
}
void triggeredSelectStartOfDocument(bool) {
LOG;
}
void triggeredSelectEndOfDocument(bool) {
LOG;
}
void triggeredDeleteStartOfWord(bool) {
LOG;
}
void triggeredDeleteEndOfWord(bool) {
LOG;
}
void triggeredSetTextDirectionDefault(bool) {
LOG;
}
void triggeredSetTextDirectionLeftToRight(bool) {
LOG;
}
void triggeredSetTextDirectionRightToLeft(bool) {
LOG;
}
void triggeredToggleBold(bool) {
LOG;
}
void triggeredToggleItalic(bool) {
LOG;
}
void triggeredToggleUnderline(bool) {
LOG;
}
void triggeredInspectElement(bool) {
LOG;
}
void triggeredInsertParagraphSeparator(bool) {
LOG;
}
void triggeredInsertLineSeparator(bool) {
LOG;
}
void triggeredSelectAll(bool) {
LOG;
}
//@}
//@name QWebPage slots
//@{
void contentsChanged() {
LOG;
}
void databaseQuotaExceeded(QWebFrame* frame, QString databaseName) {
LOG<<databaseName;
}
void downloadRequested(const QNetworkRequest& request) {
LOG;
}
void frameCreated(QWebFrame* frame) {
LOG;
}
void geometryChangeRequested(const QRect& geom) {
LOG;
}
// void linkClicked(const QUrl& url) {
// LOG<<url.toString();
// }
void linkHovered(const QString& link, const QString& title,
const QString& textContent) {
LOG<<link<<title<<textContent;
statusBar()->showMessage(tr("%1", "statusbar for hovered link %1=url")
.arg(link));
}
// void loadFinished(bool ok) {
// LOG<<(ok?"succeess":"error");
// }
// void loadProgress(int progress) {
// LOG<<progress;
// }
// void loadStarted() {
// LOG;
// }
void menuBarVisibilityChangeRequested(bool visible) {
LOG;
}
void microFocusChanged() {
LOG;
}
void printRequested(QWebFrame* frame) {
LOG;
}
void repaintRequested(const QRect& dirtyRect) {
//LOG;
}
void restoreFrameStateRequested(QWebFrame* frame) {
LOG;
}
void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item) {
LOG;
}
void scrollRequested(int dx, int dy, const QRect& rectToScroll) {
LOG;
}
void selectionChanged() {
LOG;
}
// void statusBarMessage(const QString& text) {
// LOG;
// }
void statusBarVisibilityChangeRequested(bool visible) {
LOG;
}
void toolBarVisibilityChangeRequested(bool visible) {
LOG;
}
//@name handle downloads
//@{
void unsupportedContent(QNetworkReply* reply) {
LOG<<reply->header(QNetworkRequest::ContentTypeHeader).toString();
LOG<<"Status:"<<networkError(reply->error());
assert(connect(reply, SIGNAL(finished()), SLOT(downloadFinished())));
}
void downloadFinished() {
QNetworkReply *reply(qobject_cast<QNetworkReply*>(sender()));
LOG<<"Location:"<<reply->header(QNetworkRequest::LocationHeader)
.toString();
LOG<<"Content-Type:"<<reply->header(QNetworkRequest::ContentTypeHeader)
.toString();
LOG<<"Status:"<<networkError(reply->error());
LOG<<"URL:"<<reply->url().toString();
LOG<<"File:"<<reply->url().toLocalFile();
LOG<<"Path:"<<reply->url().path();
Settings::MimeTypes::const_iterator it
(_settings.mimetypes().find
(reply->header(QNetworkRequest::ContentTypeHeader).toString()));
if (it!=_settings.mimetypes().end()) {
QTemporaryFile *file =
new QTemporaryFile(QDir::tempPath()+QDir::separator()
+"swisssurferXXXXXX."
+it.value().toStringList().at(0), this);
file->open();
file->write(reply->readAll());
file->close();
QProcess* process(new QProcess);
_downloadProcesses[process] = file;
assert(connect(process, SIGNAL(finished(int, QProcess::ExitStatus)),
SLOT(processFinished())));
QStringList args(it.value().toStringList().at(1).split(" ")
.replaceInStrings("%1", file->fileName()));
QString prg(args.takeFirst());
LOG<<"Running:"<<prg<<args.join(" ");
process->start(prg, args);
} else {
QString saveFile
(QFileDialog::getSaveFileName(this, tr("Save File As ..."),
!reply->url().toLocalFile().isEmpty()
?reply->url().toLocalFile()
:reply->url().path()));
if (!saveFile.isEmpty()) {
QFile file(saveFile);
file.open(QIODevice::WriteOnly);
file.write(reply->readAll());
file.close();
}
}
}
void processFinished() {
delete _downloadProcesses[qobject_cast<QProcess*>(sender())];
_downloadProcesses.erase(qobject_cast<QProcess*>(sender()));
}
//@}
void windowCloseRequested() {
LOG;
}
//@}
//@name DownloadManager signals
//@{
void progress(qint64 done, qint64 total) {
_progress->setMaximum(total);
_progress->setValue(done);
}
void started() {
actionStop->setEnabled(true);
_progress->setRange(0, 0);
_progress->setValue(0);
_progress->show();
}
void finished() {
LOG;
actionStop->setEnabled(false);
_progress->hide();
}
//@}
//@name QNetworkAccessManager signals
//@{
void authenticationRequired(QNetworkReply* reply,
QAuthenticator* authenticator) {
LOG;
statusBar()->showMessage(tr("authentication required"));
// _error[sender()] += tr("<h2>%1</h2><p>URL: %3</p><p>%2</p>")
// .arg(tr("Authentication Required"))
// .arg(networkError(reply->error()))
// .arg(reply->url().toString());
// _errorUrl[sender()] = reply->url();
}
void proxyAuthenticationRequired(const QNetworkProxy& proxy,
QAuthenticator* authenticator) {
LOG;
}
void sslErrors(QNetworkReply* reply, const QList<QSslError>& errors) {
LOG;
statusBar()->showMessage(tr("ssl error"));
// QString e;
// for (QList<QSslError>::const_iterator err(errors.begin());
// err!=errors.end(); ++err)
// e+=tr("<li>%1</li>", "single ssl error").arg(err->errorString());
// _error[sender()] += tr("<h2>%1</h2><p>URL: %4</p><p>%2</p>"
// "<h3>SSL Errors</h3>"
// "<p><ul>%3</ul></p>")
// .arg(tr("SSL Error"))
// .arg(networkError(reply->error()))
// .arg(e)
// .arg(reply->url().toString());
// _errorUrl[sender()] = reply->url();
}
//@}
private:
void saveWin() {
LOG<<"Save Window State";
QStringList urls;
for (int i(0); i<_url->count(); ++i)
urls<<_url->itemText(i);
_settings()->setValue("Window/Urls", urls);
QStringList tabs;
for (int i(0); i<_tabs->count(); ++i)
tabs<<qobject_cast<QWebView*>(_tabs->widget(i))->url().toString();
_settings()->setValue("Window/Tabs", tabs);
_settings()->setValue("Window/CurrentTab", _tabs->currentIndex());
_settings()->setValue("Window/Geometry", saveGeometry());
_settings()->setValue("Window/WindowState", saveState());
}
void loadWin(bool noRrestoreTabs=true) {
QStringList urls(_settings()->value("Window/Urls").toStringList());
urls.sort();
urls.removeDuplicates();
_url->addItems(urls);
QStringList tabs(_settings()->value("Window/Tabs").toStringList());
if (!noRrestoreTabs)
for (QStringList::iterator it(tabs.begin()); it!=tabs.end(); ++it)
load(*it, newTab());
if (_tabs->count()>1) _tabs->removeTab(0);
_tabs->setTabsClosable(_tabs->count()>1);
_tabs->setCurrentIndex(_settings()->value("Window/CurrentTab").toInt());
restoreGeometry(_settings()->value("Window/Geometry").toByteArray());
restoreState(_settings()->value("Window/WindowState").toByteArray());
}
void activateTab() {
iconChanged();
actionForward->setEnabled(dynamic_cast<QWebView*>(_tabs->currentWidget())
->history()->canGoForward());
actionBack->setEnabled(dynamic_cast<QWebView*>(_tabs->currentWidget())
->history()->canGoBack());
}
QWebView* newTab() {
QWebView* browser(new QWebView);
browser->setPage(new WebPage(this, browser));
browser->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
browser->page()->setNetworkAccessManager(&_networkManager);
browser->page()->setForwardUnsupportedContent(true);
@ -1205,7 +465,747 @@ class Browser: public QMainWindow, protected Ui::Browser {
SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&))));
_tabs->setCurrentIndex(_tabs->addTab(browser, "*empty*"));
_tabs->setTabsClosable(_tabs->count()>1);
return browser;
return browser;
}
protected:
void closeEvent(QCloseEvent *event) {
LOG;
if (!_kiosk && _settings.flag("SaveWindowState") && _settings())
saveWin();
QMainWindow::closeEvent(event);
}
private Q_SLOTS:
void load() {
LOG;
load(_url->currentText());
}
void load(QString page) {
_settings.replaceSearchEngine(page);
if (QUrl(page).scheme()=="") page = "http://"+page;
load(QUrl(page));
}
void load(QUrl page, QWebView* view=0) {
LOG<<page.toString();
statusBar()->showMessage(tr("Checking: %1").arg(page.toString()));
if (!check(page)) {
LOG<<"########## BLACK LISTED IGNORED ##########";
statusBar()->showMessage(tr("Forbidden: %1").arg(page.toString()));
QMessageBox::warning(this, tr("Access Denied"),
tr("<p>Access denied due to security"
" considerations.</p><p>You are not"
" allowed to connect to %1.")
.arg(page.toString()));
return;
}
statusBar()->showMessage(tr("Reading: %1").arg(page.toString()));
if (!page.isValid()) {
statusBar()->showMessage(tr("Illegal URL: %1").arg(page.errorString()));
return;
}
if (!view) view=qobject_cast<QWebView*>(_tabs->currentWidget());
view->load(page);
}
void addBookmark() {
_url->addItem(_url->currentText());
}
void zoom(int i) {
LOG<<100.0*i/10.0;
statusBar()->showMessage(tr("Zoom: %1%").arg(100.0*i/10.0));
qobject_cast<QWebView*>(_tabs->currentWidget())->setZoomFactor(i/10.0);
}
void on_actionHome_activated() {
LOG;
load(_home);
}
void on_actionNew_triggered() {
LOG;
QStringList args(QCoreApplication::arguments());
QString prg(args.takeFirst());
QProcess::startDetached(prg, args);
}
void on_actionNewTab_triggered() {
newTab();
}
void on__tabs_currentChanged(int index) {
_url->setEditText(qobject_cast<QWebView*>(_tabs->currentWidget())
->url().toString());
activateTab();
}
void on__tabs_tabCloseRequested(int index) {
_error.erase(_tabs->widget(index));
_errorUrl.erase(_tabs->widget(index));
_tabs->removeTab(index);
_tabs->setTabsClosable(_tabs->count()>1);
}
void on_actionPrintPreview_triggered() {
QPrintPreviewDialog preview(&_printer, this);
connect(&preview, SIGNAL(paintRequested(QPrinter*)),
qobject_cast<QWebView*>(_tabs->currentWidget()),
SLOT(print(QPrinter*)));
preview.exec();
}
void on_actionInstantPrint_triggered() {
qobject_cast<QWebView*>(_tabs->currentWidget())->print(&_printer);
}
void on_actionPrint_triggered() {
QPrintDialog dialog(&_printer, this);
dialog.setWindowTitle(tr("Print Document"));
if (dialog.exec()!=QDialog::Accepted) return;
on_actionInstantPrint_triggered();
}
void on_actionClose_triggered() {
LOG;
close();
}
void on_actionBack_triggered() {
LOG;
qobject_cast<QWebView*>(_tabs->currentWidget())->history()->back();
}
void on_actionBack_hovered() {
LOG;
if (!qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->backItem().isValid())
return;
actionBack->setStatusTip
(tr("%1 - %2", "statusbar actionBack_hovered %1=url %2=title")
.arg(qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->backItem().url().toString())
.arg(qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->backItem().title()));
actionBack->showStatusText(this);
}
void on_actionForward_triggered() {
LOG;
qobject_cast<QWebView*>(_tabs->currentWidget())->history()->forward();
}
void on_actionForward_hovered() {
LOG;
if (!qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->forwardItem().isValid())
return;
actionForward->setStatusTip
(tr("%1 - %2", "statusbar actionForward_hovered %1=url %2=title")
.arg(qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->forwardItem().url().toString())
.arg(qobject_cast<QWebView*>(_tabs->currentWidget())->history()
->forwardItem().title()));
actionForward->showStatusText(this);
}
void on_actionReload_triggered() {
LOG;
qobject_cast<QWebView*>(_tabs->currentWidget())->reload();
}
void on_actionStop_triggered() {
LOG;
for (int i(0); i<_tabs->count(); ++i)
qobject_cast<QWebView*>(_tabs->widget(i))->stop();
_downloadManager.abort();
}
void on_actionFind_triggered() {
if (!_find) {
statusBar()->addPermanentWidget(_find = new QLineEdit);
_find->setText(qobject_cast<QWebView*>(_tabs->currentWidget())
->selectedText());
}
disconnect(_find, SIGNAL(returnPressed()), this, SLOT(rfind()));
disconnect(_find, SIGNAL(textEdited(QString)), this, SLOT(rfind()));
assert(connect(_find, SIGNAL(returnPressed()), SLOT(find())));
assert(connect(_find, SIGNAL(textEdited(QString)), SLOT(find())));
_find->setFocus();
}
void on_actionReverseFind_triggered() {
if (!_find) {
statusBar()->addPermanentWidget(_find = new QLineEdit);
_find->setText(qobject_cast<QWebView*>(_tabs->currentWidget())
->selectedText());
}
disconnect(_find, SIGNAL(returnPressed()), this, SLOT(find()));
disconnect(_find, SIGNAL(textEdited(QString)), this, SLOT(find()));
assert(connect(_find, SIGNAL(returnPressed()), SLOT(rfind())));
assert(connect(_find, SIGNAL(textEdited(QString)), SLOT(rfind())));
_find->setFocus();
}
void find(const QString& txt=QString()) {
qobject_cast<QWebView*>(_tabs->currentWidget())->findText
(_find->text(),
QWebPage::FindWrapsAroundDocument);
}
void rfind(const QString& txt=QString()) {
qobject_cast<QWebView*>(_tabs->currentWidget())->findText
(_find->text(),
QWebPage::FindWrapsAroundDocument
|QWebPage::FindBackward);
}
void on_actionUnFind_triggered() {
delete _find; _find=0;
}
void on_actionAbout_triggered() {
QMessageBox::aboutQt(this);
}
void on_actionSettings_triggered() {
_settings.show();
}
//@name QWebView slots
//@{
void urlChanged(const QUrl& url) {
LOG<<url.toString();
if (sender()!=_tabs->currentWidget()) return;
LOG<<"signal on current tab";
if (_url) _url->setEditText(url.toString());
}
void linkClicked(const QUrl& url) {
LOG<<url.toString();
load(url, qobject_cast<QWebView*>(sender()));
}
void iconChanged() {
LOG;
QWebView* view(qobject_cast<QWebView*>(sender()));
int index = _tabs->indexOf(view);
if (index<0) return;
QIcon icon(QWebSettings::iconForUrl(view->url()));
if (icon.isNull()) {
LOG<<"Icon for URL is Null"<<view->url();
QPixmap pixmap(QWebSettings::webGraphic
(QWebSettings::DefaultFrameIconGraphic));
if (!pixmap.isNull()) icon = pixmap;
} else icon = icon.pixmap(16, 16);
if (icon.isNull()) LOG<<"Icon is still null";
_tabs->setTabIcon(index, icon);
}
void titleChanged(const QString& text) {
LOG<<text;
_tabs->setTabText(_tabs->indexOf(qobject_cast<QWidget*>(sender())),
trUtf8("%1").arg(text));
}
void statusBarMessage(const QString& text) {
LOG<<text;
if (text.size()) statusBar()->showMessage(tr("Info: %1").arg(text));
}
void loadProgress(int i) {
LOG<<i;
}
void loadStarted() {
LOG;
}
void loadFinished(bool ok) {
LOG<<(ok?"success":"error");
if (ok) statusBar()->showMessage(tr("done."));
activateTab();
}
//@}
//@name QWebPage WebAction slots
//@{
void triggeredOpenLink(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredOpenLinkInNewWindow(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredOpenFrameInNewWindow(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredDownloadLinkToDisk(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredCopyLinkToClipboard(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredOpenImageInNewWindow(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredDownloadImageToDisk(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredCopyImageToClipboard(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredBack(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredForward(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredStop(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredReload(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredCut(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredCopy(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredPaste(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredUndo(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredRedo(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToNextChar(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToPreviousChar(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToNextWord(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToPreviousWord(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToNextLine(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToPreviousLine(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToStartOfLine(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToEndOfLine(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToStartOfBlock(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToEndOfBlock(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToStartOfDocument(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredMoveToEndOfDocument(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectNextChar(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectPreviousChar(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectNextWord(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectPreviousWord(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectNextLine(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectPreviousLine(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectStartOfLine(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectEndOfLine(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectStartOfBlock(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectEndOfBlock(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectStartOfDocument(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectEndOfDocument(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredDeleteStartOfWord(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredDeleteEndOfWord(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSetTextDirectionDefault(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSetTextDirectionLeftToRight(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSetTextDirectionRightToLeft(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredToggleBold(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredToggleItalic(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredToggleUnderline(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredInspectElement(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredInsertParagraphSeparator(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredInsertLineSeparator(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
void triggeredSelectAll(bool) {
LOG<<qobject_cast<QAction*>(sender())->data().toString();
}
//@}
//@name QWebPage slots
//@{
void contentsChanged() {
LOG;
}
void databaseQuotaExceeded(QWebFrame* frame, QString databaseName) {
LOG<<databaseName;
}
void downloadRequested(const QNetworkRequest& request) {
LOG;
}
void frameCreated(QWebFrame* frame) {
LOG;
}
void geometryChangeRequested(const QRect& geom) {
LOG;
}
// void linkClicked(const QUrl& url) {
// LOG<<url.toString();
// }
void linkHovered(const QString& link, const QString& title,
const QString& textContent) {
LOG<<link<<title<<textContent;
statusBar()->showMessage(tr("%1", "statusbar for hovered link %1=url")
.arg(link));
}
// void loadFinished(bool ok) {
// LOG<<(ok?"succeess":"error");
// }
// void loadProgress(int progress) {
// LOG<<progress;
// }
// void loadStarted() {
// LOG;
// }
void menuBarVisibilityChangeRequested(bool visible) {
LOG;
}
void microFocusChanged() {
LOG;
}
void printRequested(QWebFrame* frame) {
LOG;
}
void repaintRequested(const QRect& dirtyRect) {
//LOG;
}
void restoreFrameStateRequested(QWebFrame* frame) {
LOG;
}
void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item) {
LOG;
}
void scrollRequested(int dx, int dy, const QRect& rectToScroll) {
LOG;
}
void selectionChanged() {
LOG;
}
// void statusBarMessage(const QString& text) {
// LOG;
// }
void statusBarVisibilityChangeRequested(bool visible) {
LOG;
}
void toolBarVisibilityChangeRequested(bool visible) {
LOG;
}
//@name handle downloads
//@{
void unsupportedContent(QNetworkReply* reply) {
LOG<<reply->header(QNetworkRequest::ContentTypeHeader).toString();
LOG<<"Status:"<<networkError(reply->error());
assert(connect(reply, SIGNAL(finished()), SLOT(downloadFinished())));
}
void downloadFinished() {
QNetworkReply *reply(qobject_cast<QNetworkReply*>(sender()));
LOG<<"Location:"<<reply->header(QNetworkRequest::LocationHeader)
.toString();
LOG<<"Content-Type:"<<reply->header(QNetworkRequest::ContentTypeHeader)
.toString();
LOG<<"Status:"<<networkError(reply->error());
LOG<<"URL:"<<reply->url().toString();
LOG<<"File:"<<reply->url().toLocalFile();
LOG<<"Path:"<<reply->url().path();
Settings::MimeTypes::const_iterator it
(_settings.mimetypes().find
(reply->header(QNetworkRequest::ContentTypeHeader).toString()));
if (it!=_settings.mimetypes().end()) {
QTemporaryFile *file =
new QTemporaryFile(QDir::tempPath()+QDir::separator()
+"swisssurferXXXXXX."
+it.value().toStringList().at(0), this);
file->open();
file->write(reply->readAll());
file->close();
QProcess* process(new QProcess);
_downloadProcesses[process] = file;
assert(connect(process, SIGNAL(finished(int, QProcess::ExitStatus)),
SLOT(processFinished())));
QStringList args(it.value().toStringList().at(1).split(" ")
.replaceInStrings("%1", file->fileName()));
QString prg(args.takeFirst());
LOG<<"Running:"<<prg<<args.join(" ");
process->start(prg, args);
} else {
QString saveFile
(QFileDialog::getSaveFileName(this, tr("Save File As ..."),
!reply->url().toLocalFile().isEmpty()
?reply->url().toLocalFile()
:reply->url().path()));
if (!saveFile.isEmpty()) {
QFile file(saveFile);
file.open(QIODevice::WriteOnly);
file.write(reply->readAll());
file.close();
}
}
}
void processFinished() {
delete _downloadProcesses[qobject_cast<QProcess*>(sender())];
_downloadProcesses.erase(qobject_cast<QProcess*>(sender()));
}
//@}
void windowCloseRequested() {
LOG;
}
//@}
//@name DownloadManager signals
//@{
void progress(qint64 done, qint64 total) {
_progress->setMaximum(total);
_progress->setValue(done);
}
void started() {
actionStop->setEnabled(true);
_progress->setRange(0, 0);
_progress->setValue(0);
_progress->show();
}
void finished() {
LOG;
actionStop->setEnabled(false);
_progress->hide();
}
//@}
//@name QNetworkAccessManager signals
//@{
void authenticationRequired(QNetworkReply* reply,
QAuthenticator* authenticator) {
LOG;
statusBar()->showMessage(tr("authentication required"));
Authentication auth(authenticator, this);
auth.exec();
}
void proxyAuthenticationRequired(const QNetworkProxy& proxy,
QAuthenticator* authenticator) {
LOG;
}
void sslErrors(QNetworkReply* reply, const QList<QSslError>& errors) {
LOG;
statusBar()->showMessage(tr("ssl error"));
// QString e;
// for (QList<QSslError>::const_iterator err(errors.begin());
// err!=errors.end(); ++err)
// e+=tr("<li>%1</li>", "single ssl error").arg(err->errorString());
// _error[sender()] += tr("<h2>%1</h2><p>URL: %4</p><p>%2</p>"
// "<h3>SSL Errors</h3>"
// "<p><ul>%3</ul></p>")
// .arg(tr("SSL Error"))
// .arg(networkError(reply->error()))
// .arg(e)
// .arg(reply->url().toString());
// _errorUrl[sender()] = reply->url();
}
//@}
private:
void saveWin() {
LOG<<"Save Window State";
QStringList urls;
for (int i(0); i<_url->count(); ++i)
urls<<_url->itemText(i);
_settings()->setValue("Window/Urls", urls);
QStringList tabs;
for (int i(0); i<_tabs->count(); ++i)
tabs<<qobject_cast<QWebView*>(_tabs->widget(i))->url().toString();
_settings()->setValue("Window/Tabs", tabs);
_settings()->setValue("Window/CurrentTab", _tabs->currentIndex());
_settings()->setValue("Window/Geometry", saveGeometry());
_settings()->setValue("Window/WindowState", saveState());
}
void loadWin(bool noRrestoreTabs=true) {
QStringList urls(_settings()->value("Window/Urls").toStringList());
urls.sort();
urls.removeDuplicates();
_url->addItems(urls);
QStringList tabs(_settings()->value("Window/Tabs").toStringList());
if (!noRrestoreTabs)
for (QStringList::iterator it(tabs.begin()); it!=tabs.end(); ++it)
load(*it, newTab());
if (_tabs->count()>1) _tabs->removeTab(0);
_tabs->setTabsClosable(_tabs->count()>1);
_tabs->setCurrentIndex(_settings()->value("Window/CurrentTab").toInt());
restoreGeometry(_settings()->value("Window/Geometry").toByteArray());
restoreState(_settings()->value("Window/WindowState").toByteArray());
}
void activateTab() {
iconChanged();
actionForward->setEnabled(dynamic_cast<QWebView*>(_tabs->currentWidget())
->history()->canGoForward());
actionBack->setEnabled(dynamic_cast<QWebView*>(_tabs->currentWidget())
->history()->canGoBack());
}
private:

@ -20,12 +20,13 @@ TRANSLATIONS = @PACKAGENAME@_en.ts \
@PACKAGENAME@_fr.ts \
@PACKAGENAME@_it.ts
SOURCES = main.cxx smartcardauth.cxx pindialog.cxx
SOURCES = main.cxx smartcardauth.cxx pindialog.cxx webpage.cxx
HEADERS = browser.hxx smartcardauth.hxx pindialog.hxx \
downloadmanager.hxx settings.hxx sslclientnetworkmanager.hxx
downloadmanager.hxx settings.hxx sslclientnetworkmanager.hxx \
authentication.hxx webpage.hxx
FORMS = browser.ui settings.ui pinentry.ui
FORMS = browser.ui settings.ui pinentry.ui authentication.ui
RESOURCES = languages.qrc resources.qrc

@ -59,6 +59,7 @@ std::map<ssl_ctx_st*, QSslSocket*> sockets;
int client_cert_cb(SSL* ssl, X509 **x509, EVP_PKEY **pkey) {
if (!e) return 0;
while (!_mutex.tryLock()) QCoreApplication::processEvents();
static std::set<QString> allowedUrls;
std::map<ssl_ctx_st*, QSslSocket*>::iterator it(sockets.find(ssl->ctx));
if (it!=sockets.end()) {
@ -76,7 +77,6 @@ int client_cert_cb(SSL* ssl, X509 **x509, EVP_PKEY **pkey) {
sockets.erase(it);
}
while (!_mutex.tryLock()) QCoreApplication::processEvents();
// NB: Keep in mind that this function is called for EVERY SSL connection to be opened.
for(size_t i=certs_found->num_certs;i--;)

@ -2,6 +2,34 @@
<!DOCTYPE TS>
<TS version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>Authentication</name>
<message>
<location filename="authentication.ui" line="14"/>
<source>Authorization</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="22"/>
<source>Authentication required for:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="32"/>
<source>realm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="46"/>
<source>Username:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="56"/>
<source>Password:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Browser</name>
<message>
@ -193,210 +221,210 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="150"/>
<location filename="browser.hxx" line="152"/>
<source>The connection to the proxy server was refused (the proxy server is not accepting requests).</source>
<oldsource>the connection to the proxy timed out or the proxy did not reply in time to the request sent</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="162"/>
<location filename="browser.hxx" line="164"/>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any).</source>
<oldsource>the Network Access API cannot honor the request because the protocol is not known</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="228"/>
<location filename="browser.hxx" line="495"/>
<source>Checking: %1</source>
<oldsource>Opening: %1</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="240"/>
<location filename="browser.hxx" line="507"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="255"/>
<location filename="browser.hxx" line="522"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="130"/>
<location filename="browser.hxx" line="132"/>
<source>Network connection successful, remote host can be reached.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="133"/>
<location filename="browser.hxx" line="135"/>
<source>The remote server refused the connection (the server is not accepting requests).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="136"/>
<location filename="browser.hxx" line="138"/>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="139"/>
<location filename="browser.hxx" line="141"/>
<source>The remote host name was not found (invalid hostname).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="141"/>
<location filename="browser.hxx" line="143"/>
<source>The connection to the remote server timed out.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="143"/>
<location filename="browser.hxx" line="145"/>
<source>The operation was canceled via calls to abort() or close() before it was finished.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="146"/>
<location filename="browser.hxx" line="148"/>
<source>The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="153"/>
<location filename="browser.hxx" line="155"/>
<source>The proxy server closed the connection prematurely, before the entire reply was received and processed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="156"/>
<location filename="browser.hxx" line="158"/>
<source>The proxy host name was not found (invalid proxy hostname).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="159"/>
<location filename="browser.hxx" line="161"/>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="166"/>
<location filename="browser.hxx" line="168"/>
<source>The access to the remote content was denied (similar to HTTP error 401).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="169"/>
<location filename="browser.hxx" line="171"/>
<source>The operation requested on the remote content is not permitted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="172"/>
<location filename="browser.hxx" line="174"/>
<source>The remote content was not found at the server (similar to HTTP error 404).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="175"/>
<location filename="browser.hxx" line="177"/>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted (if any).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="179"/>
<location filename="browser.hxx" line="181"/>
<source>The Network Access API cannot honor the request because the protocol is not known.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="182"/>
<location filename="browser.hxx" line="184"/>
<source>The requested operation is invalid for this protocol.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="184"/>
<location filename="browser.hxx" line="186"/>
<source>An unknown network-related error was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="186"/>
<location filename="browser.hxx" line="188"/>
<source>An unknown proxy-related error was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="188"/>
<location filename="browser.hxx" line="190"/>
<source>An unknonwn error related to the remote content was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="191"/>
<location filename="browser.hxx" line="193"/>
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="194"/>
<location filename="browser.hxx" line="196"/>
<source>&lt;strong&gt;Unknown network error (code: %1).&lt;/string&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="242"/>
<location filename="browser.hxx" line="509"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="302"/>
<location filename="browser.hxx" line="569"/>
<source>Print Document</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="323"/>
<location filename="browser.hxx" line="590"/>
<source>%1 - %2</source>
<oldsource>Back to %1 - %2</oldsource>
<comment>statusbar actionBack_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="452"/>
<location filename="browser.hxx" line="719"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="465"/>
<location filename="browser.hxx" line="732"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="718"/>
<location filename="browser.hxx" line="985"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="231"/>
<location filename="browser.hxx" line="498"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="232"/>
<location filename="browser.hxx" line="499"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="233"/>
<location filename="browser.hxx" line="500"/>
<source>&lt;p&gt;Access denied due to security considerations.&lt;/p&gt;&lt;p&gt;You are not allowed to connect to %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="342"/>
<location filename="browser.hxx" line="609"/>
<source>%1 - %2</source>
<comment>statusbar actionForward_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="447"/>
<location filename="browser.hxx" line="714"/>
<source>%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="819"/>
<location filename="browser.hxx" line="1086"/>
<source>Save File As ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="874"/>
<location filename="browser.hxx" line="1141"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="889"/>
<location filename="browser.hxx" line="1153"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>
@ -505,12 +533,12 @@ Try: %1 --help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="smartcardauth.cxx" line="66"/>
<location filename="smartcardauth.cxx" line="67"/>
<source>Send Authentication?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="smartcardauth.cxx" line="67"/>
<location filename="smartcardauth.cxx" line="68"/>
<source>Do you want to authenticate yourself to %1?</source>
<translation type="unfinished"></translation>
</message>

@ -2,6 +2,34 @@
<!DOCTYPE TS>
<TS version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>Authentication</name>
<message>
<location filename="authentication.ui" line="14"/>
<source>Authorization</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="22"/>
<source>Authentication required for:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="32"/>
<source>realm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="46"/>
<source>Username:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="56"/>
<source>Password:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Browser</name>
<message>
@ -193,210 +221,210 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="150"/>
<location filename="browser.hxx" line="152"/>
<source>The connection to the proxy server was refused (the proxy server is not accepting requests).</source>
<oldsource>the connection to the proxy timed out or the proxy did not reply in time to the request sent</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="162"/>
<location filename="browser.hxx" line="164"/>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any).</source>
<oldsource>the Network Access API cannot honor the request because the protocol is not known</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="228"/>
<location filename="browser.hxx" line="495"/>
<source>Checking: %1</source>
<oldsource>Opening: %1</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="240"/>
<location filename="browser.hxx" line="507"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="255"/>
<location filename="browser.hxx" line="522"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="130"/>
<location filename="browser.hxx" line="132"/>
<source>Network connection successful, remote host can be reached.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="133"/>
<location filename="browser.hxx" line="135"/>
<source>The remote server refused the connection (the server is not accepting requests).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="136"/>
<location filename="browser.hxx" line="138"/>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="139"/>
<location filename="browser.hxx" line="141"/>
<source>The remote host name was not found (invalid hostname).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="141"/>
<location filename="browser.hxx" line="143"/>
<source>The connection to the remote server timed out.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="143"/>
<location filename="browser.hxx" line="145"/>
<source>The operation was canceled via calls to abort() or close() before it was finished.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="146"/>
<location filename="browser.hxx" line="148"/>
<source>The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="153"/>
<location filename="browser.hxx" line="155"/>
<source>The proxy server closed the connection prematurely, before the entire reply was received and processed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="156"/>
<location filename="browser.hxx" line="158"/>
<source>The proxy host name was not found (invalid proxy hostname).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="159"/>
<location filename="browser.hxx" line="161"/>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="166"/>
<location filename="browser.hxx" line="168"/>
<source>The access to the remote content was denied (similar to HTTP error 401).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="169"/>
<location filename="browser.hxx" line="171"/>
<source>The operation requested on the remote content is not permitted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="172"/>
<location filename="browser.hxx" line="174"/>
<source>The remote content was not found at the server (similar to HTTP error 404).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="175"/>
<location filename="browser.hxx" line="177"/>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted (if any).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="179"/>
<location filename="browser.hxx" line="181"/>
<source>The Network Access API cannot honor the request because the protocol is not known.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="182"/>
<location filename="browser.hxx" line="184"/>
<source>The requested operation is invalid for this protocol.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="184"/>
<location filename="browser.hxx" line="186"/>
<source>An unknown network-related error was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="186"/>
<location filename="browser.hxx" line="188"/>
<source>An unknown proxy-related error was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="188"/>
<location filename="browser.hxx" line="190"/>
<source>An unknonwn error related to the remote content was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="191"/>
<location filename="browser.hxx" line="193"/>
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="194"/>
<location filename="browser.hxx" line="196"/>
<source>&lt;strong&gt;Unknown network error (code: %1).&lt;/string&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="242"/>
<location filename="browser.hxx" line="509"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="302"/>
<location filename="browser.hxx" line="569"/>
<source>Print Document</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="323"/>
<location filename="browser.hxx" line="590"/>
<source>%1 - %2</source>
<oldsource>Back to %1 - %2</oldsource>
<comment>statusbar actionBack_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="452"/>
<location filename="browser.hxx" line="719"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="465"/>
<location filename="browser.hxx" line="732"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="718"/>
<location filename="browser.hxx" line="985"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="231"/>
<location filename="browser.hxx" line="498"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="232"/>
<location filename="browser.hxx" line="499"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="233"/>
<location filename="browser.hxx" line="500"/>
<source>&lt;p&gt;Access denied due to security considerations.&lt;/p&gt;&lt;p&gt;You are not allowed to connect to %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="342"/>
<location filename="browser.hxx" line="609"/>
<source>%1 - %2</source>
<comment>statusbar actionForward_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="447"/>
<location filename="browser.hxx" line="714"/>
<source>%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="819"/>
<location filename="browser.hxx" line="1086"/>
<source>Save File As ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="874"/>
<location filename="browser.hxx" line="1141"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="889"/>
<location filename="browser.hxx" line="1153"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>
@ -505,12 +533,12 @@ Try: %1 --help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="smartcardauth.cxx" line="66"/>
<location filename="smartcardauth.cxx" line="67"/>
<source>Send Authentication?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="smartcardauth.cxx" line="67"/>
<location filename="smartcardauth.cxx" line="68"/>
<source>Do you want to authenticate yourself to %1?</source>
<translation type="unfinished"></translation>
</message>

@ -2,6 +2,34 @@
<!DOCTYPE TS>
<TS version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>Authentication</name>
<message>
<location filename="authentication.ui" line="14"/>
<source>Authorization</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="22"/>
<source>Authentication required for:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="32"/>
<source>realm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="46"/>
<source>Username:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="56"/>
<source>Password:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Browser</name>
<message>
@ -193,210 +221,210 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="150"/>
<location filename="browser.hxx" line="152"/>
<source>The connection to the proxy server was refused (the proxy server is not accepting requests).</source>
<oldsource>the connection to the proxy timed out or the proxy did not reply in time to the request sent</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="162"/>
<location filename="browser.hxx" line="164"/>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any).</source>
<oldsource>the Network Access API cannot honor the request because the protocol is not known</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="228"/>
<location filename="browser.hxx" line="495"/>
<source>Checking: %1</source>
<oldsource>Opening: %1</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="240"/>
<location filename="browser.hxx" line="507"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="255"/>
<location filename="browser.hxx" line="522"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="130"/>
<location filename="browser.hxx" line="132"/>
<source>Network connection successful, remote host can be reached.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="133"/>
<location filename="browser.hxx" line="135"/>
<source>The remote server refused the connection (the server is not accepting requests).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="136"/>
<location filename="browser.hxx" line="138"/>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="139"/>
<location filename="browser.hxx" line="141"/>
<source>The remote host name was not found (invalid hostname).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="141"/>
<location filename="browser.hxx" line="143"/>
<source>The connection to the remote server timed out.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="143"/>
<location filename="browser.hxx" line="145"/>
<source>The operation was canceled via calls to abort() or close() before it was finished.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="146"/>
<location filename="browser.hxx" line="148"/>
<source>The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="153"/>
<location filename="browser.hxx" line="155"/>
<source>The proxy server closed the connection prematurely, before the entire reply was received and processed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="156"/>
<location filename="browser.hxx" line="158"/>
<source>The proxy host name was not found (invalid proxy hostname).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="159"/>
<location filename="browser.hxx" line="161"/>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="166"/>
<location filename="browser.hxx" line="168"/>
<source>The access to the remote content was denied (similar to HTTP error 401).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="169"/>
<location filename="browser.hxx" line="171"/>
<source>The operation requested on the remote content is not permitted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="172"/>
<location filename="browser.hxx" line="174"/>
<source>The remote content was not found at the server (similar to HTTP error 404).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="175"/>
<location filename="browser.hxx" line="177"/>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted (if any).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="179"/>
<location filename="browser.hxx" line="181"/>
<source>The Network Access API cannot honor the request because the protocol is not known.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="182"/>
<location filename="browser.hxx" line="184"/>
<source>The requested operation is invalid for this protocol.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="184"/>
<location filename="browser.hxx" line="186"/>
<source>An unknown network-related error was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="186"/>
<location filename="browser.hxx" line="188"/>
<source>An unknown proxy-related error was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="188"/>
<location filename="browser.hxx" line="190"/>
<source>An unknonwn error related to the remote content was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="191"/>
<location filename="browser.hxx" line="193"/>
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="194"/>
<location filename="browser.hxx" line="196"/>
<source>&lt;strong&gt;Unknown network error (code: %1).&lt;/string&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="242"/>
<location filename="browser.hxx" line="509"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="302"/>
<location filename="browser.hxx" line="569"/>
<source>Print Document</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="323"/>
<location filename="browser.hxx" line="590"/>
<source>%1 - %2</source>
<oldsource>Back to %1 - %2</oldsource>
<comment>statusbar actionBack_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="452"/>
<location filename="browser.hxx" line="719"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="465"/>
<location filename="browser.hxx" line="732"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="718"/>
<location filename="browser.hxx" line="985"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="231"/>
<location filename="browser.hxx" line="498"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="232"/>
<location filename="browser.hxx" line="499"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="233"/>
<location filename="browser.hxx" line="500"/>
<source>&lt;p&gt;Access denied due to security considerations.&lt;/p&gt;&lt;p&gt;You are not allowed to connect to %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="342"/>
<location filename="browser.hxx" line="609"/>
<source>%1 - %2</source>
<comment>statusbar actionForward_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="447"/>
<location filename="browser.hxx" line="714"/>
<source>%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="819"/>
<location filename="browser.hxx" line="1086"/>
<source>Save File As ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="874"/>
<location filename="browser.hxx" line="1141"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="889"/>
<location filename="browser.hxx" line="1153"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>
@ -505,12 +533,12 @@ Try: %1 --help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="smartcardauth.cxx" line="66"/>
<location filename="smartcardauth.cxx" line="67"/>
<source>Send Authentication?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="smartcardauth.cxx" line="67"/>
<location filename="smartcardauth.cxx" line="68"/>
<source>Do you want to authenticate yourself to %1?</source>
<translation type="unfinished"></translation>
</message>

@ -2,6 +2,34 @@
<!DOCTYPE TS>
<TS version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>Authentication</name>
<message>
<location filename="authentication.ui" line="14"/>
<source>Authorization</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="22"/>
<source>Authentication required for:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="32"/>
<source>realm</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="46"/>
<source>Username:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="authentication.ui" line="56"/>
<source>Password:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Browser</name>
<message>
@ -193,210 +221,210 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="150"/>
<location filename="browser.hxx" line="152"/>
<source>The connection to the proxy server was refused (the proxy server is not accepting requests).</source>
<oldsource>the connection to the proxy timed out or the proxy did not reply in time to the request sent</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="162"/>
<location filename="browser.hxx" line="164"/>
<source>The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any).</source>
<oldsource>the Network Access API cannot honor the request because the protocol is not known</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="228"/>
<location filename="browser.hxx" line="495"/>
<source>Checking: %1</source>
<oldsource>Opening: %1</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="240"/>
<location filename="browser.hxx" line="507"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="255"/>
<location filename="browser.hxx" line="522"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="130"/>
<location filename="browser.hxx" line="132"/>
<source>Network connection successful, remote host can be reached.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="133"/>
<location filename="browser.hxx" line="135"/>
<source>The remote server refused the connection (the server is not accepting requests).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="136"/>
<location filename="browser.hxx" line="138"/>
<source>The remote server closed the connection prematurely, before the entire reply was received and processed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="139"/>
<location filename="browser.hxx" line="141"/>
<source>The remote host name was not found (invalid hostname).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="141"/>
<location filename="browser.hxx" line="143"/>
<source>The connection to the remote server timed out.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="143"/>
<location filename="browser.hxx" line="145"/>
<source>The operation was canceled via calls to abort() or close() before it was finished.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="146"/>
<location filename="browser.hxx" line="148"/>
<source>The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="153"/>
<location filename="browser.hxx" line="155"/>
<source>The proxy server closed the connection prematurely, before the entire reply was received and processed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="156"/>
<location filename="browser.hxx" line="158"/>
<source>The proxy host name was not found (invalid proxy hostname).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="159"/>
<location filename="browser.hxx" line="161"/>
<source>The connection to the proxy timed out or the proxy did not reply in time to the request sent.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="166"/>
<location filename="browser.hxx" line="168"/>
<source>The access to the remote content was denied (similar to HTTP error 401).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="169"/>
<location filename="browser.hxx" line="171"/>
<source>The operation requested on the remote content is not permitted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="172"/>
<location filename="browser.hxx" line="174"/>
<source>The remote content was not found at the server (similar to HTTP error 404).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="175"/>
<location filename="browser.hxx" line="177"/>
<source>The remote server requires authentication to serve the content but the credentials provided were not accepted (if any).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="179"/>
<location filename="browser.hxx" line="181"/>
<source>The Network Access API cannot honor the request because the protocol is not known.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="182"/>
<location filename="browser.hxx" line="184"/>
<source>The requested operation is invalid for this protocol.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="184"/>
<location filename="browser.hxx" line="186"/>
<source>An unknown network-related error was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="186"/>
<location filename="browser.hxx" line="188"/>
<source>An unknown proxy-related error was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="188"/>
<location filename="browser.hxx" line="190"/>
<source>An unknonwn error related to the remote content was detected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="191"/>
<location filename="browser.hxx" line="193"/>
<source>A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="194"/>
<location filename="browser.hxx" line="196"/>
<source>&lt;strong&gt;Unknown network error (code: %1).&lt;/string&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="242"/>
<location filename="browser.hxx" line="509"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="302"/>
<location filename="browser.hxx" line="569"/>
<source>Print Document</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="323"/>
<location filename="browser.hxx" line="590"/>
<source>%1 - %2</source>
<oldsource>Back to %1 - %2</oldsource>
<comment>statusbar actionBack_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="452"/>
<location filename="browser.hxx" line="719"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="465"/>
<location filename="browser.hxx" line="732"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="718"/>
<location filename="browser.hxx" line="985"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="231"/>
<location filename="browser.hxx" line="498"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="232"/>
<location filename="browser.hxx" line="499"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="233"/>
<location filename="browser.hxx" line="500"/>
<source>&lt;p&gt;Access denied due to security considerations.&lt;/p&gt;&lt;p&gt;You are not allowed to connect to %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="342"/>
<location filename="browser.hxx" line="609"/>
<source>%1 - %2</source>
<comment>statusbar actionForward_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="447"/>
<location filename="browser.hxx" line="714"/>
<source>%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="819"/>
<location filename="browser.hxx" line="1086"/>
<source>Save File As ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="874"/>
<location filename="browser.hxx" line="1141"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="889"/>
<location filename="browser.hxx" line="1153"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>
@ -505,12 +533,12 @@ Try: %1 --help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="smartcardauth.cxx" line="66"/>
<location filename="smartcardauth.cxx" line="67"/>
<source>Send Authentication?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="smartcardauth.cxx" line="67"/>
<location filename="smartcardauth.cxx" line="68"/>
<source>Do you want to authenticate yourself to %1?</source>
<translation type="unfinished"></translation>
</message>

@ -0,0 +1,20 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <webpage.hxx>
#include <browser.hxx>
QWebPage* WebPage::createWindow(WebWindowType type) {
switch (type) {
case QWebPage::WebBrowserWindow:
case QWebPage::WebModalDialog: {
return _browser->newTab()->page();
} break;
}
return 0;
}

@ -0,0 +1,24 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#ifndef __WEBPAGE_HXX__
#define __WEBPAGE_HXX__
#include <QtWebKit/QWebPage>
class Browser;
class WebPage: public QWebPage {
public:
WebPage(Browser* b, QObject *parent = 0): QWebPage(parent), _browser(b) {}
protected:
QWebPage* createWindow(WebWindowType type);
private:
Browser* _browser;
};
#endif
Loading…
Cancel
Save