From debcfe1cea78e236c006d533a76821a385f8523a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 21 Jan 2011 13:32:27 +0000 Subject: [PATCH] ready for weekend; several changes; refs #22 --- swisssurfer/src/browser.hxx | 739 ++++++++++++++++-------------- swisssurfer/src/browser.ui | 9 + swisssurfer/src/main.cxx | 12 +- swisssurfer/src/pinentry.ui | 141 ++++++ swisssurfer/src/settings.hxx | 174 +++++-- swisssurfer/src/settings.ui | 123 ++++- swisssurfer/src/smartcardauth.cxx | 48 +- swisssurfer/src/smartcardauth.hxx | 2 +- swisssurfer/src/swisssurfer_de.ts | 229 +++++---- swisssurfer/src/swisssurfer_en.ts | 229 +++++---- swisssurfer/src/swisssurfer_fr.ts | 229 +++++---- swisssurfer/src/swisssurfer_it.ts | 229 +++++---- 12 files changed, 1403 insertions(+), 761 deletions(-) create mode 100644 swisssurfer/src/pinentry.ui diff --git a/swisssurfer/src/browser.hxx b/swisssurfer/src/browser.hxx index 706e3ce..28b8a89 100644 --- a/swisssurfer/src/browser.hxx +++ b/swisssurfer/src/browser.hxx @@ -43,20 +43,22 @@ #define LOG qDebug()<<__PRETTY_FUNCTION__ #endif -extern SmartCardAuth _scAuth; - class Browser: public QMainWindow, protected Ui::Browser { Q_OBJECT; public: - Browser(const QStringList& urls, Settings::MimeTypes mimeTypes, - QSettings* settings=0, bool kiosk = false): + Browser(const QString& actlib, const QStringList& urls = QStringList(), + QSettings* settings=0, + Settings::MimeTypes mimeTypes = Settings::MimeTypes(), + bool kiosk = false): _url(0), _clearUrl(0), _addBookmark(0), _find(0), - _home(urls.at(0)), _kiosk(kiosk), - _settings(mimeTypes, this, settings, !kiosk) { + _kiosk(kiosk), + _settings(mimeTypes, this, settings, !kiosk), + _scAuth(actlib) { LOG<addPermanentWidget(_progress = new QProgressBar()); @@ -72,7 +74,7 @@ class Browser: public QMainWindow, protected Ui::Browser { _url->setEditable(!kiosk); _url->addItems(urls); assert(connect(_url, SIGNAL(currentIndexChanged(const QString&)), - SLOT(load(const QString&)))); + SLOT(load(QString)))); assert(connect(&_networkManager, SIGNAL(extendedContextInitialization(ssl_ctx_st*, QSslSocket*)), @@ -103,7 +105,13 @@ class Browser: public QMainWindow, protected Ui::Browser { assert(connect(_addBookmark, SIGNAL(clicked(bool)), SLOT(addBookmark()))); } - load(); + if (!_kiosk && _settings.flag("SaveWindowState") && _settings()) { + loadWin(); + for (int i(0); ifirst; } } - + QString networkError(QNetworkReply::NetworkError err) { LOG<showMessage(tr("Checking: %1").arg(page.toString())); if (!check(page)) { @@ -228,28 +239,24 @@ class Browser: public QMainWindow, protected Ui::Browser { .arg(page.toString())); return; } - startDownload(page); + + 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(_tabs->currentWidget()); + view->load(page); } void addBookmark() { _url->addItem(_url->currentText()); } - - void startDownload(QUrl url) { - LOG<showMessage(tr("Reading: %1").arg(url.toString())); - if (!url.isValid()) { - statusBar()->showMessage(tr("Illegal URL: %1").arg(url.errorString())); - return; - } - //if (url.scheme()=="") url.setScheme("http"); - dynamic_cast(_tabs->currentWidget())->load(url); - } void zoom(int i) { LOG<<100.0*i/10.0; statusBar()->showMessage(tr("Zoom: %1%").arg(100.0*i/10.0)); - dynamic_cast(_tabs->currentWidget())->setZoomFactor(i/10.0); + qobject_cast(_tabs->currentWidget())->setZoomFactor(i/10.0); } void on_actionHome_activated() { @@ -257,279 +264,20 @@ class Browser: public QMainWindow, protected Ui::Browser { load(_home); } -// void on_actionNew_triggered() { //@!todo exec new process -// LOG; -// (new Browser(dynamic_cast(_tabs->currentWidget())->url().toString(), _kiosk, false))->show(); -// } + void on_actionNew_triggered() { + LOG; + QStringList args(QCoreApplication::arguments()); + QString prg(args.takeFirst()); + QProcess::startDetached(prg, args); + } void on_actionNewTab_triggered() { - QWebView* browser(new QWebView); - browser->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); - browser->page()->setNetworkAccessManager(&_networkManager); - browser->page()->setForwardUnsupportedContent(true); - _url->setFocus(); - // QWebView - assert(connect(browser, SIGNAL(urlChanged(const QUrl&)), - SLOT(urlChanged(const QUrl&)))); - assert(connect(browser, SIGNAL(linkClicked(const QUrl&)), - SLOT(linkClicked(const QUrl&)))); - assert(connect(browser, SIGNAL(iconChanged()), - SLOT(iconChanged()))); - assert(connect(browser, SIGNAL(titleChanged(const QString&)), - SLOT(titleChanged(const QString&)))); - assert(connect(browser, SIGNAL(statusBarMessage(const QString&)), - SLOT(statusBarMessage(const QString&)))); - assert(connect(browser, SIGNAL(loadProgress(int)), - SLOT(loadProgress(int)))); - assert(connect(browser, SIGNAL(loadStarted()), - SLOT(loadStarted()))); - assert(connect(browser, SIGNAL(loadFinished(bool)), - SLOT(loadFinished(bool)))); - assert(connect(browser, SIGNAL(iconChanged()), - SLOT(iconChanged()))); - // QWebPage WebAction - assert(connect(browser->pageAction(QWebPage::OpenLink), - SIGNAL(triggered(bool)), - SLOT(triggeredOpenLink(bool)))); - assert(connect(browser->pageAction(QWebPage::OpenLinkInNewWindow), - SIGNAL(triggered(bool)), - SLOT(triggeredOpenLinkInNewWindow(bool)))); - assert(connect(browser->pageAction(QWebPage::OpenFrameInNewWindow), - SIGNAL(triggered(bool)), - SLOT(triggeredOpenFrameInNewWindow(bool)))); - assert(connect(browser->pageAction(QWebPage::DownloadLinkToDisk), - SIGNAL(triggered(bool)), - SLOT(triggeredDownloadLinkToDisk(bool)))); - assert(connect(browser->pageAction(QWebPage::CopyLinkToClipboard), - SIGNAL(triggered(bool)), - SLOT(triggeredCopyLinkToClipboard(bool)))); - assert(connect(browser->pageAction(QWebPage::OpenImageInNewWindow), - SIGNAL(triggered(bool)), - SLOT(triggeredOpenImageInNewWindow(bool)))); - assert(connect(browser->pageAction(QWebPage::DownloadImageToDisk), - SIGNAL(triggered(bool)), - SLOT(triggeredDownloadImageToDisk(bool)))); - assert(connect(browser->pageAction(QWebPage::CopyImageToClipboard), - SIGNAL(triggered(bool)), - SLOT(triggeredCopyImageToClipboard(bool)))); - assert(connect(browser->pageAction(QWebPage::Back), - SIGNAL(triggered(bool)), - SLOT(triggeredBack(bool)))); - assert(connect(browser->pageAction(QWebPage::Forward), - SIGNAL(triggered(bool)), - SLOT(triggeredForward(bool)))); - assert(connect(browser->pageAction(QWebPage::Stop), - SIGNAL(triggered(bool)), - SLOT(triggeredStop(bool)))); - assert(connect(browser->pageAction(QWebPage::Reload), - SIGNAL(triggered(bool)), - SLOT(triggeredReload(bool)))); - assert(connect(browser->pageAction(QWebPage::Cut), - SIGNAL(triggered(bool)), - SLOT(triggeredCut(bool)))); - assert(connect(browser->pageAction(QWebPage::Copy), - SIGNAL(triggered(bool)), - SLOT(triggeredCopy(bool)))); - assert(connect(browser->pageAction(QWebPage::Paste), - SIGNAL(triggered(bool)), - SLOT(triggeredPaste(bool)))); - assert(connect(browser->pageAction(QWebPage::Undo), - SIGNAL(triggered(bool)), - SLOT(triggeredUndo(bool)))); - assert(connect(browser->pageAction(QWebPage::Redo), - SIGNAL(triggered(bool)), - SLOT(triggeredRedo(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToNextChar), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToNextChar(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToPreviousChar), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToPreviousChar(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToNextWord), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToNextWord(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToPreviousWord), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToPreviousWord(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToNextLine), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToNextLine(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToPreviousLine), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToPreviousLine(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToStartOfLine), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToStartOfLine(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToEndOfLine), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToEndOfLine(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToStartOfBlock), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToStartOfBlock(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToEndOfBlock), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToEndOfBlock(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToStartOfDocument), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToStartOfDocument(bool)))); - assert(connect(browser->pageAction(QWebPage::MoveToEndOfDocument), - SIGNAL(triggered(bool)), - SLOT(triggeredMoveToEndOfDocument(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectNextChar), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectNextChar(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectPreviousChar), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectPreviousChar(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectNextWord), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectNextWord(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectPreviousWord), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectPreviousWord(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectNextLine), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectNextLine(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectPreviousLine), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectPreviousLine(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectStartOfLine), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectStartOfLine(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectEndOfLine), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectEndOfLine(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectStartOfBlock), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectStartOfBlock(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectEndOfBlock), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectEndOfBlock(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectStartOfDocument), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectStartOfDocument(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectEndOfDocument), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectEndOfDocument(bool)))); - assert(connect(browser->pageAction(QWebPage::DeleteStartOfWord), - SIGNAL(triggered(bool)), - SLOT(triggeredDeleteStartOfWord(bool)))); - assert(connect(browser->pageAction(QWebPage::DeleteEndOfWord), - SIGNAL(triggered(bool)), - SLOT(triggeredDeleteEndOfWord(bool)))); - assert(connect(browser->pageAction(QWebPage::SetTextDirectionDefault), - SIGNAL(triggered(bool)), - SLOT(triggeredSetTextDirectionDefault(bool)))); - assert(connect(browser->pageAction(QWebPage::SetTextDirectionLeftToRight), - SIGNAL(triggered(bool)), - SLOT(triggeredSetTextDirectionLeftToRight(bool)))); - assert(connect(browser->pageAction(QWebPage::SetTextDirectionRightToLeft), - SIGNAL(triggered(bool)), - SLOT(triggeredSetTextDirectionRightToLeft(bool)))); - assert(connect(browser->pageAction(QWebPage::ToggleBold), - SIGNAL(triggered(bool)), - SLOT(triggeredToggleBold(bool)))); - assert(connect(browser->pageAction(QWebPage::ToggleItalic), - SIGNAL(triggered(bool)), - SLOT(triggeredToggleItalic(bool)))); - assert(connect(browser->pageAction(QWebPage::ToggleUnderline), - SIGNAL(triggered(bool)), - SLOT(triggeredToggleUnderline(bool)))); - assert(connect(browser->pageAction(QWebPage::InspectElement), - SIGNAL(triggered(bool)), - SLOT(triggeredInspectElement(bool)))); - assert(connect(browser->pageAction(QWebPage::InsertParagraphSeparator), - SIGNAL(triggered(bool)), - SLOT(triggeredInsertParagraphSeparator(bool)))); - assert(connect(browser->pageAction(QWebPage::InsertLineSeparator), - SIGNAL(triggered(bool)), - SLOT(triggeredInsertLineSeparator(bool)))); - assert(connect(browser->pageAction(QWebPage::SelectAll), - SIGNAL(triggered(bool)), - SLOT(triggeredSelectAll(bool)))); - // QWebPage - assert(connect(browser->page(), SIGNAL(contentsChanged()), - SLOT(contentsChanged()))); - assert(connect(browser->page(), - SIGNAL(databaseQuotaExceeded(QWebFrame*, QString)), - SLOT(databaseQuotaExceeded(QWebFrame*, QString)))); - assert(connect(browser->page(), - SIGNAL(downloadRequested(const QNetworkRequest&)), - SLOT(downloadRequested(const QNetworkRequest&)))); - assert(connect(browser->page(), SIGNAL(frameCreated(QWebFrame*)), - SLOT(frameCreated(QWebFrame*)))); - assert(connect(browser->page(), - SIGNAL(geometryChangeRequested(const QRect&)), - SLOT(geometryChangeRequested(const QRect&)))); -// assert(connect(browser->page(), SIGNAL(linkClicked(const QUrl&)), -// SLOT(linkClicked(const QUrl&)))); - assert(connect(browser->page(), - SIGNAL(linkHovered(const QString&, const QString&, - const QString&)), - SLOT(linkHovered(const QString&, const QString&, - const QString&)))); -// assert(connect(browser->page(), SIGNAL(loadFinished(bool)), -// SLOT(loadFinished(bool)))); -// assert(connect(browser->page(), SIGNAL(loadProgress(int)), -// SLOT(loadProgress(int)))); -// assert(connect(browser->page(), SIGNAL(loadStarted()), -// SLOT(loadStarted()))); - assert(connect(browser->page(), - SIGNAL(menuBarVisibilityChangeRequested(bool)), - SLOT(menuBarVisibilityChangeRequested(bool)))); - assert(connect(browser->page(), SIGNAL(microFocusChanged()), - SLOT(microFocusChanged()))); - assert(connect(browser->page(), SIGNAL(printRequested(QWebFrame*)), - SLOT(printRequested(QWebFrame*)))); - assert(connect(browser->page(), SIGNAL(repaintRequested(const QRect&)), - SLOT(repaintRequested(const QRect&)))); - assert(connect(browser->page(), - SIGNAL(restoreFrameStateRequested(QWebFrame*)), - SLOT(restoreFrameStateRequested(QWebFrame*)))); - assert(connect(browser->page(), - SIGNAL(saveFrameStateRequested(QWebFrame*, - QWebHistoryItem*)), - SLOT(saveFrameStateRequested(QWebFrame*, - QWebHistoryItem*)))); - assert(connect(browser->page(), - SIGNAL(scrollRequested(int, int, const QRect&)), - SLOT(scrollRequested(int, int, const QRect&)))); - assert(connect(browser->page(), SIGNAL(selectionChanged()), - SLOT(selectionChanged()))); -// assert(connect(browser->page(), SIGNAL(statusBarMessage(const QString&)), -// SLOT(statusBarMessage(const QString&)))); - assert(connect(browser->page(), - SIGNAL(statusBarVisibilityChangeRequested(bool)), - SLOT(statusBarVisibilityChangeRequested(bool)))); - assert(connect(browser->page(), - SIGNAL(toolBarVisibilityChangeRequested(bool)), - SLOT(toolBarVisibilityChangeRequested(bool)))); - assert(connect(browser->page(), - SIGNAL(unsupportedContent(QNetworkReply*)), - SLOT(unsupportedContent(QNetworkReply*)))); - assert(connect(browser->page(), SIGNAL(windowCloseRequested()), - SLOT(windowCloseRequested()))); - // QNetworkAccessManager - assert(connect(browser->page()->networkAccessManager(), - SIGNAL(authenticationRequired(QNetworkReply*, - QAuthenticator*)), - SLOT(authenticationRequired(QNetworkReply*, - QAuthenticator*)))); - assert(connect(browser->page()->networkAccessManager(), - SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, - QAuthenticator*)), - SLOT(proxyAuthenticationRequired(const QNetworkProxy&, - QAuthenticator*)))); - assert(connect(browser->page()->networkAccessManager(), - SIGNAL(sslErrors(QNetworkReply*, const QList&)), - SLOT(sslErrors(QNetworkReply*, const QList&)))); - _tabs->setCurrentIndex(_tabs->addTab(browser, "*empty*")); - _tabs->setTabsClosable(_tabs->count()>1); + newTab(); } void on__tabs_currentChanged(int index) { - _url->setEditText(dynamic_cast(_tabs->currentWidget()) - ->url().toString()); + _url->setEditText(qobject_cast(_tabs->currentWidget()) + ->url().toString()); activateTab(); } @@ -543,13 +291,13 @@ class Browser: public QMainWindow, protected Ui::Browser { void on_actionPrintPreview_triggered() { QPrintPreviewDialog preview(&_printer, this); connect(&preview, SIGNAL(paintRequested(QPrinter*)), - dynamic_cast(_tabs->currentWidget()), + qobject_cast(_tabs->currentWidget()), SLOT(print(QPrinter*))); preview.exec(); } void on_actionInstantPrint_triggered() { - dynamic_cast(_tabs->currentWidget())->print(&_printer); + qobject_cast(_tabs->currentWidget())->print(&_printer); } void on_actionPrint_triggered() { @@ -566,64 +314,89 @@ class Browser: public QMainWindow, protected Ui::Browser { void on_actionBack_triggered() { LOG; - dynamic_cast(_tabs->currentWidget())->history()->back(); + qobject_cast(_tabs->currentWidget())->history()->back(); } void on_actionBack_hovered() { LOG; - if (!dynamic_cast(_tabs->currentWidget())->history() + if (!qobject_cast(_tabs->currentWidget())->history() ->backItem().isValid()) return; actionBack->setStatusTip (tr("%1 - %2", "statusbar actionBack_hovered %1=url %2=title") - .arg(dynamic_cast(_tabs->currentWidget())->history() + .arg(qobject_cast(_tabs->currentWidget())->history() ->backItem().url().toString()) - .arg(dynamic_cast(_tabs->currentWidget())->history() + .arg(qobject_cast(_tabs->currentWidget())->history() ->backItem().title())); actionBack->showStatusText(this); } void on_actionForward_triggered() { LOG; - dynamic_cast(_tabs->currentWidget())->history()->forward(); + qobject_cast(_tabs->currentWidget())->history()->forward(); } void on_actionForward_hovered() { LOG; - if (!dynamic_cast(_tabs->currentWidget())->history() + if (!qobject_cast(_tabs->currentWidget())->history() ->forwardItem().isValid()) return; actionForward->setStatusTip (tr("%1 - %2", "statusbar actionForward_hovered %1=url %2=title") - .arg(dynamic_cast(_tabs->currentWidget())->history() + .arg(qobject_cast(_tabs->currentWidget())->history() ->forwardItem().url().toString()) - .arg(dynamic_cast(_tabs->currentWidget())->history() + .arg(qobject_cast(_tabs->currentWidget())->history() ->forwardItem().title())); actionForward->showStatusText(this); } void on_actionReload_triggered() { LOG; - dynamic_cast(_tabs->currentWidget())->reload(); + qobject_cast(_tabs->currentWidget())->reload(); } void on_actionStop_triggered() { LOG; + for (int i(0); i<_tabs->count(); ++i) + qobject_cast(_tabs->widget(i))->stop(); _downloadManager.abort(); } void on_actionFind_triggered() { if (!_find) { statusBar()->addPermanentWidget(_find = new QLineEdit); - _find->setText(dynamic_cast(_tabs->currentWidget()) + _find->setText(qobject_cast(_tabs->currentWidget()) ->selectedText()); - assert(connect(_find, SIGNAL(returnPressed()), SLOT(find()))); } + disconnect(_find, SIGNAL(returnPressed()), this, SLOT(rfind())); + assert(connect(_find, SIGNAL(returnPressed()), SLOT(find()))); _find->setFocus(); } - void find() { - dynamic_cast(_tabs->currentWidget())->findText(_find->text()); + void on_actionReverseFind_triggered() { + if (!_find) { + statusBar()->addPermanentWidget(_find = new QLineEdit); + _find->setText(qobject_cast(_tabs->currentWidget()) + ->selectedText()); + } + disconnect(_find, SIGNAL(returnPressed()), this, SLOT(find())); + assert(connect(_find, SIGNAL(returnPressed()), SLOT(rfind()))); + _find->setFocus(); + } + + void find(const QString& txt=QString()) { + qobject_cast(_tabs->currentWidget())->findText + (_find->text(), + QWebPage::HighlightAllOccurrences + |QWebPage::FindWrapsAroundDocument); + } + + void rfind(const QString& txt=QString()) { + qobject_cast(_tabs->currentWidget())->findText + (_find->text(), + QWebPage::HighlightAllOccurrences + |QWebPage::FindWrapsAroundDocument + |QWebPage::FindBackward); } void on_actionUnFind_triggered() { @@ -637,43 +410,37 @@ class Browser: public QMainWindow, protected Ui::Browser { void on_actionSettings_triggered() { _settings.show(); } - + //@name QWebView slots //@{ - void urlChanged(const QUrl& url) { //!@todo + void urlChanged(const QUrl& url) { LOG<currentWidget()) return; LOG<<"signal on current tab"; if (_url) _url->setEditText(url.toString()); } - void linkClicked(const QUrl& url) { //!@todo + void linkClicked(const QUrl& url) { LOG<currentWidget()) return; - LOG<<"signal on current tab"; - load(url); + load(url, qobject_cast(sender())); } - void iconChanged() { //!@todo + void iconChanged() { LOG; - if (sender()!=_tabs->currentWidget()) return; - LOG<<"signal on current tab"; - setWindowIcon(dynamic_cast(_tabs->currentWidget())->icon()); + QWebView* view(qobject_cast(sender())); + for (int i(0); i<_tabs->count(); ++i) + if (_tabs->widget(i)==view) _tabs->setTabIcon(i, view->icon()); } - void titleChanged(const QString& text) { //!@todo + void titleChanged(const QString& text) { LOG<currentWidget()) return; - LOG<<"signal on current tab"; _tabs->setTabText(_tabs->indexOf(qobject_cast(sender())), trUtf8("%1").arg(text)); } - void statusBarMessage(const QString& text) { //!@todo + void statusBarMessage(const QString& text) { LOG<currentWidget()) return; - LOG<<"signal on current tab"; if (text.size()) statusBar()->showMessage(tr("Info: %1").arg(text)); } @@ -687,17 +454,6 @@ class Browser: public QMainWindow, protected Ui::Browser { void loadFinished(bool ok) { LOG<<(ok?"success":"error"); -// if (!ok) { -// dynamic_cast(sender()) -// ->setHtml(tr("Page Load Error" -// "

Page Load Error

%1" -// "") -// .arg(_error[sender()]), -// _errorUrl[sender()]); -// } - if (sender()!=_tabs->currentWidget()) return; - LOG<<"signal on current tab"; - _error[sender()].clear(); if (ok) statusBar()->showMessage(tr("done.")); activateTab(); } @@ -1046,7 +802,7 @@ class Browser: public QMainWindow, protected Ui::Browser { assert(connect(process, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(processFinished()))); QStringList args(it.value().toStringList().at(1).split(" ") - .replaceInStrings("", file->fileName())); + .replaceInStrings("%1", file->fileName())); QString prg(args.takeFirst()); LOG<<"Running:"<start(prg, args); @@ -1141,6 +897,36 @@ class Browser: public QMainWindow, protected Ui::Browser { 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<(_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() { + QStringList urls(_settings()->value("Window/Urls").toStringList()); + urls.sort(); + urls.removeDuplicates(); + _url->addItems(urls); + QStringList tabs(_settings()->value("Window/Tabs").toStringList()); + 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(_tabs->currentWidget()) @@ -1148,7 +934,271 @@ class Browser: public QMainWindow, protected Ui::Browser { actionBack->setEnabled(dynamic_cast(_tabs->currentWidget()) ->history()->canGoBack()); } - + + QWebView* newTab() { + QWebView* browser(new QWebView); + browser->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); + browser->page()->setNetworkAccessManager(&_networkManager); + browser->page()->setForwardUnsupportedContent(true); + _url->setFocus(); + // QWebView + assert(connect(browser, SIGNAL(urlChanged(const QUrl&)), + SLOT(urlChanged(const QUrl&)))); + assert(connect(browser, SIGNAL(linkClicked(const QUrl&)), + SLOT(linkClicked(const QUrl&)))); + assert(connect(browser, SIGNAL(iconChanged()), + SLOT(iconChanged()))); + assert(connect(browser, SIGNAL(titleChanged(const QString&)), + SLOT(titleChanged(const QString&)))); + assert(connect(browser, SIGNAL(statusBarMessage(const QString&)), + SLOT(statusBarMessage(const QString&)))); + assert(connect(browser, SIGNAL(loadProgress(int)), + SLOT(loadProgress(int)))); + assert(connect(browser, SIGNAL(loadStarted()), + SLOT(loadStarted()))); + assert(connect(browser, SIGNAL(loadFinished(bool)), + SLOT(loadFinished(bool)))); + // QWebPage WebAction + assert(connect(browser->pageAction(QWebPage::OpenLink), + SIGNAL(triggered(bool)), + SLOT(triggeredOpenLink(bool)))); + assert(connect(browser->pageAction(QWebPage::OpenLinkInNewWindow), + SIGNAL(triggered(bool)), + SLOT(triggeredOpenLinkInNewWindow(bool)))); + assert(connect(browser->pageAction(QWebPage::OpenFrameInNewWindow), + SIGNAL(triggered(bool)), + SLOT(triggeredOpenFrameInNewWindow(bool)))); + assert(connect(browser->pageAction(QWebPage::DownloadLinkToDisk), + SIGNAL(triggered(bool)), + SLOT(triggeredDownloadLinkToDisk(bool)))); + assert(connect(browser->pageAction(QWebPage::CopyLinkToClipboard), + SIGNAL(triggered(bool)), + SLOT(triggeredCopyLinkToClipboard(bool)))); + assert(connect(browser->pageAction(QWebPage::OpenImageInNewWindow), + SIGNAL(triggered(bool)), + SLOT(triggeredOpenImageInNewWindow(bool)))); + assert(connect(browser->pageAction(QWebPage::DownloadImageToDisk), + SIGNAL(triggered(bool)), + SLOT(triggeredDownloadImageToDisk(bool)))); + assert(connect(browser->pageAction(QWebPage::CopyImageToClipboard), + SIGNAL(triggered(bool)), + SLOT(triggeredCopyImageToClipboard(bool)))); + assert(connect(browser->pageAction(QWebPage::Back), + SIGNAL(triggered(bool)), + SLOT(triggeredBack(bool)))); + assert(connect(browser->pageAction(QWebPage::Forward), + SIGNAL(triggered(bool)), + SLOT(triggeredForward(bool)))); + assert(connect(browser->pageAction(QWebPage::Stop), + SIGNAL(triggered(bool)), + SLOT(triggeredStop(bool)))); + assert(connect(browser->pageAction(QWebPage::Reload), + SIGNAL(triggered(bool)), + SLOT(triggeredReload(bool)))); + assert(connect(browser->pageAction(QWebPage::Cut), + SIGNAL(triggered(bool)), + SLOT(triggeredCut(bool)))); + assert(connect(browser->pageAction(QWebPage::Copy), + SIGNAL(triggered(bool)), + SLOT(triggeredCopy(bool)))); + assert(connect(browser->pageAction(QWebPage::Paste), + SIGNAL(triggered(bool)), + SLOT(triggeredPaste(bool)))); + assert(connect(browser->pageAction(QWebPage::Undo), + SIGNAL(triggered(bool)), + SLOT(triggeredUndo(bool)))); + assert(connect(browser->pageAction(QWebPage::Redo), + SIGNAL(triggered(bool)), + SLOT(triggeredRedo(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToNextChar), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToNextChar(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToPreviousChar), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToPreviousChar(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToNextWord), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToNextWord(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToPreviousWord), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToPreviousWord(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToNextLine), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToNextLine(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToPreviousLine), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToPreviousLine(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToStartOfLine), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToStartOfLine(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToEndOfLine), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToEndOfLine(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToStartOfBlock), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToStartOfBlock(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToEndOfBlock), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToEndOfBlock(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToStartOfDocument), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToStartOfDocument(bool)))); + assert(connect(browser->pageAction(QWebPage::MoveToEndOfDocument), + SIGNAL(triggered(bool)), + SLOT(triggeredMoveToEndOfDocument(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectNextChar), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectNextChar(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectPreviousChar), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectPreviousChar(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectNextWord), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectNextWord(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectPreviousWord), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectPreviousWord(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectNextLine), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectNextLine(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectPreviousLine), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectPreviousLine(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectStartOfLine), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectStartOfLine(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectEndOfLine), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectEndOfLine(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectStartOfBlock), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectStartOfBlock(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectEndOfBlock), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectEndOfBlock(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectStartOfDocument), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectStartOfDocument(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectEndOfDocument), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectEndOfDocument(bool)))); + assert(connect(browser->pageAction(QWebPage::DeleteStartOfWord), + SIGNAL(triggered(bool)), + SLOT(triggeredDeleteStartOfWord(bool)))); + assert(connect(browser->pageAction(QWebPage::DeleteEndOfWord), + SIGNAL(triggered(bool)), + SLOT(triggeredDeleteEndOfWord(bool)))); + assert(connect(browser->pageAction(QWebPage::SetTextDirectionDefault), + SIGNAL(triggered(bool)), + SLOT(triggeredSetTextDirectionDefault(bool)))); + assert(connect(browser->pageAction(QWebPage::SetTextDirectionLeftToRight), + SIGNAL(triggered(bool)), + SLOT(triggeredSetTextDirectionLeftToRight(bool)))); + assert(connect(browser->pageAction(QWebPage::SetTextDirectionRightToLeft), + SIGNAL(triggered(bool)), + SLOT(triggeredSetTextDirectionRightToLeft(bool)))); + assert(connect(browser->pageAction(QWebPage::ToggleBold), + SIGNAL(triggered(bool)), + SLOT(triggeredToggleBold(bool)))); + assert(connect(browser->pageAction(QWebPage::ToggleItalic), + SIGNAL(triggered(bool)), + SLOT(triggeredToggleItalic(bool)))); + assert(connect(browser->pageAction(QWebPage::ToggleUnderline), + SIGNAL(triggered(bool)), + SLOT(triggeredToggleUnderline(bool)))); + assert(connect(browser->pageAction(QWebPage::InspectElement), + SIGNAL(triggered(bool)), + SLOT(triggeredInspectElement(bool)))); + assert(connect(browser->pageAction(QWebPage::InsertParagraphSeparator), + SIGNAL(triggered(bool)), + SLOT(triggeredInsertParagraphSeparator(bool)))); + assert(connect(browser->pageAction(QWebPage::InsertLineSeparator), + SIGNAL(triggered(bool)), + SLOT(triggeredInsertLineSeparator(bool)))); + assert(connect(browser->pageAction(QWebPage::SelectAll), + SIGNAL(triggered(bool)), + SLOT(triggeredSelectAll(bool)))); + // QWebPage + assert(connect(browser->page(), SIGNAL(contentsChanged()), + SLOT(contentsChanged()))); + assert(connect(browser->page(), + SIGNAL(databaseQuotaExceeded(QWebFrame*, QString)), + SLOT(databaseQuotaExceeded(QWebFrame*, QString)))); + assert(connect(browser->page(), + SIGNAL(downloadRequested(const QNetworkRequest&)), + SLOT(downloadRequested(const QNetworkRequest&)))); + assert(connect(browser->page(), SIGNAL(frameCreated(QWebFrame*)), + SLOT(frameCreated(QWebFrame*)))); + assert(connect(browser->page(), + SIGNAL(geometryChangeRequested(const QRect&)), + SLOT(geometryChangeRequested(const QRect&)))); +// assert(connect(browser->page(), SIGNAL(linkClicked(const QUrl&)), +// SLOT(linkClicked(const QUrl&)))); + assert(connect(browser->page(), + SIGNAL(linkHovered(const QString&, const QString&, + const QString&)), + SLOT(linkHovered(const QString&, const QString&, + const QString&)))); +// assert(connect(browser->page(), SIGNAL(loadFinished(bool)), +// SLOT(loadFinished(bool)))); +// assert(connect(browser->page(), SIGNAL(loadProgress(int)), +// SLOT(loadProgress(int)))); +// assert(connect(browser->page(), SIGNAL(loadStarted()), +// SLOT(loadStarted()))); + assert(connect(browser->page(), + SIGNAL(menuBarVisibilityChangeRequested(bool)), + SLOT(menuBarVisibilityChangeRequested(bool)))); + assert(connect(browser->page(), SIGNAL(microFocusChanged()), + SLOT(microFocusChanged()))); + assert(connect(browser->page(), SIGNAL(printRequested(QWebFrame*)), + SLOT(printRequested(QWebFrame*)))); + assert(connect(browser->page(), SIGNAL(repaintRequested(const QRect&)), + SLOT(repaintRequested(const QRect&)))); + assert(connect(browser->page(), + SIGNAL(restoreFrameStateRequested(QWebFrame*)), + SLOT(restoreFrameStateRequested(QWebFrame*)))); + assert(connect(browser->page(), + SIGNAL(saveFrameStateRequested(QWebFrame*, + QWebHistoryItem*)), + SLOT(saveFrameStateRequested(QWebFrame*, + QWebHistoryItem*)))); + assert(connect(browser->page(), + SIGNAL(scrollRequested(int, int, const QRect&)), + SLOT(scrollRequested(int, int, const QRect&)))); + assert(connect(browser->page(), SIGNAL(selectionChanged()), + SLOT(selectionChanged()))); +// assert(connect(browser->page(), SIGNAL(statusBarMessage(const QString&)), +// SLOT(statusBarMessage(const QString&)))); + assert(connect(browser->page(), + SIGNAL(statusBarVisibilityChangeRequested(bool)), + SLOT(statusBarVisibilityChangeRequested(bool)))); + assert(connect(browser->page(), + SIGNAL(toolBarVisibilityChangeRequested(bool)), + SLOT(toolBarVisibilityChangeRequested(bool)))); + assert(connect(browser->page(), + SIGNAL(unsupportedContent(QNetworkReply*)), + SLOT(unsupportedContent(QNetworkReply*)))); + assert(connect(browser->page(), SIGNAL(windowCloseRequested()), + SLOT(windowCloseRequested()))); + // QNetworkAccessManager + assert(connect(browser->page()->networkAccessManager(), + SIGNAL(authenticationRequired(QNetworkReply*, + QAuthenticator*)), + SLOT(authenticationRequired(QNetworkReply*, + QAuthenticator*)))); + assert(connect(browser->page()->networkAccessManager(), + SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, + QAuthenticator*)), + SLOT(proxyAuthenticationRequired(const QNetworkProxy&, + QAuthenticator*)))); + assert(connect(browser->page()->networkAccessManager(), + SIGNAL(sslErrors(QNetworkReply*, const QList&)), + SLOT(sslErrors(QNetworkReply*, const QList&)))); + _tabs->setCurrentIndex(_tabs->addTab(browser, "*empty*")); + _tabs->setTabsClosable(_tabs->count()>1); + return browser; + } + private: QComboBox* _url; @@ -1167,6 +1217,7 @@ class Browser: public QMainWindow, protected Ui::Browser { typedef std::map DownloadProcesses; DownloadProcesses _downloadProcesses; Settings _settings; + SmartCardAuth _scAuth; }; diff --git a/swisssurfer/src/browser.ui b/swisssurfer/src/browser.ui index b4ce7a7..871db85 100644 --- a/swisssurfer/src/browser.ui +++ b/swisssurfer/src/browser.ui @@ -89,6 +89,7 @@ Edit + @@ -285,6 +286,14 @@ QAction::PreferencesRole + + + &Reverse Find + + + Ctrl+R + + diff --git a/swisssurfer/src/main.cxx b/swisssurfer/src/main.cxx index a1574b8..37ffd72 100644 --- a/swisssurfer/src/main.cxx +++ b/swisssurfer/src/main.cxx @@ -26,8 +26,6 @@ #include -SmartCardAuth _scAuth; - const QByteArray SWISSSIGN_GOLD_CA_G2 ("-----BEGIN CERTIFICATE-----\n" "MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJ\n" @@ -196,6 +194,7 @@ int main(int argv, char** argc) try { qDebug()<<"***************************************************************"; //---------------------------------------------------------------------------- QStringList urls; + QString actlib; bool silent(false); Settings::MimeTypes mimetypes; QStringList args(app.arguments()); @@ -209,6 +208,8 @@ int main(int argv, char** argc) try { " -h, --help show this help text\n" " -k, --kiosk no url bar\n" " if you sepcify -k and -s, -k must be first\n" + " -n, --no-settings don't load or store any settings\n" + " -l, --lib path to file libengine_act.so\n" " -s, --settings \n" " load settings from \n" " if you sepcify -k and -s, -k must be first\n" @@ -231,6 +232,10 @@ int main(int argv, char** argc) try { } else if ((*it=="-k" || *it=="--kiosk")) { silent=true; settings.reset(); + } else if ((*it=="-n" || *it=="--no-settings")) { + settings.reset(); + } else if ((*it=="-l" || *it=="--lib") && ++it!=args.end()) { + actlib = *it; } else if ((*it=="-s" || *it=="--settings") && ++it!=args.end()) { settings = std::auto_ptr (new QSettings(*it, QSettings::IniFormat)); @@ -275,8 +280,7 @@ int main(int argv, char** argc) try { sslConfig.setPeerVerifyMode(QSslSocket::VerifyPeer); QSslConfiguration::setDefaultConfiguration(sslConfig); //............................................................................ - if (urls.size()==0) urls< + + PinEntry + + + + 0 + 0 + 389 + 218 + + + + SwissSign Pin Entry + + + + + + + 0 + 0 + + + + Please enter your SwissSign Certificate PIN to authenticate yourself: + + + true + + + + + + + + + PIN: + + + _pin + + + + + + + + + + + + Qt::Vertical + + + + 20 + 32 + + + + + + + + + + + 0 + 0 + + + + You have %1 tries left + + + true + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; color:#00b900;">✔</span></p></body></html> + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + PinEntry + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + PinEntry + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/swisssurfer/src/settings.hxx b/swisssurfer/src/settings.hxx index ecd9d1a..3543060 100644 --- a/swisssurfer/src/settings.hxx +++ b/swisssurfer/src/settings.hxx @@ -10,8 +10,8 @@ #include #include #include -#include +#include #include #ifndef LOG #define LOG qDebug()<<__PRETTY_FUNCTION__ @@ -34,6 +34,7 @@ class Settings: public QDialog, protected Ui::Settings { setupUi(this); + // Web Attributes _attributes[QWebSettings::AutoLoadImages] = _settingAutoLoadImages; _attributes[QWebSettings::DnsPrefetchEnabled] = @@ -81,6 +82,10 @@ class Settings: public QDialog, protected Ui::Settings { _attributes[QWebSettings::SiteSpecificQuirksEnabled] = _settingSiteSpecificQuirksEnabled; + // CheckBoxes + _checkboxes["SaveWindowState"] = + std::make_pair(_saveWindowState, _saveWindowState->isChecked()); + load(!_mimetypes.size()); on__buttons_rejected(); } @@ -89,27 +94,57 @@ class Settings: public QDialog, protected Ui::Settings { _settings = settings; } + QSettings* operator()() { + return _settings; + } + void setAttribute(QWebSettings::WebAttribute attr, bool state) { //LOG; QWebSettings::globalSettings()->setAttribute(attr, state); _attributes[attr]->setChecked(state); } + bool flag(const QString& name) { + assert(_checkboxes.find(name)!=_checkboxes.end()); + return _checkboxes[name].second; + } + const MimeTypes& mimetypes() const { return _mimetypes; } + QString& replaceSearchEngine(QString& url) { + LOG; + int len(url.indexOf(QRegExp("[ :]"))); + if (len<=0) return url; + QString scheme(url.left(len)); + LOG<<"scheme:"<isWritable()) return false; // Attributes - for (Attributes::iterator attribute(_attributes.begin()); - attribute!=_attributes.end(); ++attribute) + for (Attributes::iterator it(_attributes.begin()); + it!=_attributes.end(); ++it) _settings->setValue - (QString("QWebSettings/%1").arg(attribute->first), - QWebSettings::globalSettings()->testAttribute(attribute->first)); + (QString("QWebSettings/%1").arg(it->first), + QWebSettings::globalSettings()->testAttribute(it->first)); + // CheckBoxes + for (CheckBoxes::iterator it(_checkboxes.begin()); + it!=_checkboxes.end(); ++it) + _settings->setValue + (QString("Flags/%1").arg(it->first), it->second.second); // MimeTypes _settings->setValue("QWebSettings/MimeTypes", _mimetypes); + // Search Engines + _settings->setValue("QWebSettings/SearchEngines", _searchEngines); return true; } @@ -117,20 +152,36 @@ class Settings: public QDialog, protected Ui::Settings { LOG; if (!_settings) return false; // Attributes - for (Attributes::iterator attribute(_attributes.begin()); - attribute!=_attributes.end(); ++attribute) { + for (Attributes::iterator it(_attributes.begin()); + it!=_attributes.end(); ++it) { QVariant val (_settings->value - (QString("QWebSettings/%1").arg(attribute->first), - QWebSettings::globalSettings()->testAttribute(attribute->first))); + (QString("QWebSettings/%1").arg(it->first), + QWebSettings::globalSettings()->testAttribute(it->first))); if (val.isValid() && val.canConvert(QVariant::Bool)) - setAttribute(attribute->first, val.toBool()); + setAttribute(it->first, val.toBool()); + } + // CheckBoxes + for (CheckBoxes::iterator it(_checkboxes.begin()); + it!=_checkboxes.end(); ++it) { + QVariant val + (_settings->value + (QString("Flags/%1").arg(it->first), it->second.second)); + if (val.isValid() && val.canConvert(QVariant::Bool)) { + it->second.first->setChecked(val.toBool()); + it->second.second = val.toBool(); + } } // MimeTypes - if (!overwriteMimeTypes) return true; - QVariant val(_settings->value("QWebSettings/MimeTypes")); + if (overwriteMimeTypes) { + QVariant val(_settings->value("QWebSettings/MimeTypes")); + if (val.isValid() && val.canConvert(QVariant::Map)) + _mimetypes = val.toMap(); + } + // SearchEngines + QVariant val(_settings->value("QWebSettings/SearchEngines")); if (val.isValid() && val.canConvert(QVariant::Map)) - _mimetypes = val.toMap(); + _searchEngines = val.toMap(); return true; } @@ -139,20 +190,26 @@ class Settings: public QDialog, protected Ui::Settings { void on__buttons_accepted() { LOG; // Attributes - for (Attributes::iterator attribute(_attributes.begin()); - attribute!=_attributes.end(); ++attribute) + for (Attributes::iterator it(_attributes.begin()); + it!=_attributes.end(); ++it) QWebSettings::globalSettings() - ->setAttribute(attribute->first, attribute->second->isChecked()); + ->setAttribute(it->first, it->second->isChecked()); + // CheckBoxes + for (CheckBoxes::iterator it(_checkboxes.begin()); + it!=_checkboxes.end(); ++it) + it->second.second = it->second.first->isChecked(); // MimeTypes _mimetypes.clear(); for (int row(_mimeTypeTable->rowCount()); row--;) - _mimetypes[qobject_cast(_mimeTypeTable->cellWidget(row, 0)) - ->text()] = + _mimetypes[_mimeTypeTable->item(row, 0)->text()] = QStringList() - <(_mimeTypeTable->cellWidget(row, 1)) - ->text() - <(_mimeTypeTable->cellWidget(row, 2)) - ->text(); + <<_mimeTypeTable->item(row, 1)->text() + <<_mimeTypeTable->item(row, 2)->text(); + // SearchEngines + _searchEngines.clear(); + for (int row(_searchEngineTable->rowCount()); row--;) + _searchEngines[_searchEngineTable->item(row, 0)->text()] = + _searchEngineTable->item(row, 1)->text(); // Save if (_autoWrite) save(); } @@ -160,10 +217,14 @@ class Settings: public QDialog, protected Ui::Settings { void on__buttons_rejected() { LOG; // Attributes - for (Attributes::iterator attribute(_attributes.begin()); - attribute!=_attributes.end(); ++attribute) - attribute->second->setChecked - (QWebSettings::globalSettings()->testAttribute(attribute->first)); + for (Attributes::iterator it(_attributes.begin()); + it!=_attributes.end(); ++it) + it->second->setChecked + (QWebSettings::globalSettings()->testAttribute(it->first)); + // CheckBoxes + for (CheckBoxes::iterator it(_checkboxes.begin()); + it!=_checkboxes.end(); ++it) + it->second.first->setChecked(it->second.second); // MimeTypes _mimeTypeTable->setRowCount(_mimetypes.size()); _mimeTypeTable->verticalHeader()->show(); @@ -173,23 +234,37 @@ class Settings: public QDialog, protected Ui::Settings { for (MimeTypes::iterator it(_mimetypes.begin()); it!=_mimetypes.end(); ++it, ++row) { LOG<<"MimeType:"<setCellWidget - (row, 0, new QLineEdit(it.key())); - _mimeTypeTable->setCellWidget - (row, 1, new QLineEdit(it.value().toStringList().at(0))); - _mimeTypeTable->setCellWidget - (row, 2, new QLineEdit(it.value().toStringList().at(1))); + _mimeTypeTable->setItem + (row, 0, new QTableWidgetItem(it.key())); + _mimeTypeTable->setItem + (row, 1, new QTableWidgetItem(it.value().toStringList().at(0))); + _mimeTypeTable->setItem + (row, 2, new QTableWidgetItem(it.value().toStringList().at(1))); + } + // SearchEngines + _searchEngineTable->setRowCount(_searchEngines.size()); + _searchEngineTable->verticalHeader()->show(); + _searchEngineTable->horizontalHeader()->show(); + _searchEngineTable->horizontalHeader()->setStretchLastSection(true); + row = 0; + for (MimeTypes::iterator it(_searchEngines.begin()); + it!=_searchEngines.end(); ++it, ++row) { + LOG<<"SearchEngine:"<setItem + (row, 0, new QTableWidgetItem(it.key())); + _searchEngineTable->setItem + (row, 1, new QTableWidgetItem(it.value().toString())); } } void on__addMimeType_pressed() { _mimeTypeTable->setRowCount(_mimeTypeTable->rowCount()+1); - _mimeTypeTable->setCellWidget(_mimeTypeTable->rowCount()-1, 0, - new QLineEdit); - _mimeTypeTable->setCellWidget(_mimeTypeTable->rowCount()-1, 1, - new QLineEdit); - _mimeTypeTable->setCellWidget(_mimeTypeTable->rowCount()-1, 2, - new QLineEdit); + _mimeTypeTable->setItem(_mimeTypeTable->rowCount()-1, 0, + new QTableWidgetItem); + _mimeTypeTable->setItem(_mimeTypeTable->rowCount()-1, 1, + new QTableWidgetItem); + _mimeTypeTable->setItem(_mimeTypeTable->rowCount()-1, 2, + new QTableWidgetItem); } void on__removeMimeType_pressed() { @@ -201,12 +276,35 @@ class Settings: public QDialog, protected Ui::Settings { _mimeTypeTable->removeRow(begin); } + void on__addSearchEngine_pressed() { + _searchEngineTable->setRowCount(_searchEngineTable->rowCount()+1); + _searchEngineTable->setItem(_searchEngineTable->rowCount()-1, 0, + new QTableWidgetItem); + _searchEngineTable->setItem(_searchEngineTable->rowCount()-1, 1, + new QTableWidgetItem); + _searchEngineTable->setItem(_searchEngineTable->rowCount()-1, 2, + new QTableWidgetItem); + } + + void on__removeSearchEngine_pressed() { + QList ranges + (_searchEngineTable->selectedRanges()); + if (ranges.isEmpty()) return; + for (int begin(ranges.at(0).topRow()), count(ranges.at(0).rowCount()); + count; --count) + _searchEngineTable->removeRow(begin); + } + private: typedef std::map Attributes ; Attributes _attributes; + typedef std::map > CheckBoxes; + CheckBoxes _checkboxes; QSettings* _settings; bool _autoWrite; MimeTypes _mimetypes; + typedef QMap SearchEngines; + SearchEngines _searchEngines; }; diff --git a/swisssurfer/src/settings.ui b/swisssurfer/src/settings.ui index fc98635..da46ffc 100644 --- a/swisssurfer/src/settings.ui +++ b/swisssurfer/src/settings.ui @@ -17,7 +17,7 @@ - 0 + 2 @@ -412,7 +412,7 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls.</span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls. </span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Local resources are by default restricted from accessing remote content, which means your </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">file://</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;"> will not be able to access </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">http://domain.com/foo.html</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">. </span></p></body></html> local content can access remote urls @@ -522,7 +522,7 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">&lt;FILENAME&gt;</span> as file name placeholder.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">%1</span> as file name placeholder.</p></body></html> true @@ -562,6 +562,123 @@ p, li { white-space: pre-wrap; } + + + Search Engines + + + + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + true + + + + Scheme + + + + + Query URL + + + + + + + + Use %1 as placeholder for the query, use %2 as placeholder for your system language. + + + true + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + - + + + + + + + + + + TBD + + + + + + Session Management + + + + + + save window state + + + + + + + close mimetype helper applications on exit + + + true + + + + + + + + + + Qt::Vertical + + + + 20 + 191 + + + + + + diff --git a/swisssurfer/src/smartcardauth.cxx b/swisssurfer/src/smartcardauth.cxx index 1cf8eea..db5616d 100644 --- a/swisssurfer/src/smartcardauth.cxx +++ b/swisssurfer/src/smartcardauth.cxx @@ -18,39 +18,41 @@ bool pin_configured=false; bool pin_rejected=false; QMutex _mutex; -SmartCardAuth::SmartCardAuth() { +SmartCardAuth::SmartCardAuth(const QString& actlib) { //QSslSocketPrivate::ensureInitialized(); - ENGINE_load_dynamic(); - e = ENGINE_by_id("dynamic"); - Q_ASSERT(e); + if (e || actlib.isEmpty()) return; - int r=ENGINE_ctrl_cmd_string(e, "SO_PATH", "../openssl-act-engine/src/.libs/libengine_act.so", 0); - Q_ASSERT(r); - r=ENGINE_ctrl_cmd_string(e, "ID", "act", 0); - Q_ASSERT(r); - r=ENGINE_ctrl_cmd_string(e, "LIST_ADD", "1", 0); - Q_ASSERT(r); - r=ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0); - Q_ASSERT(r); + ENGINE_load_dynamic(); + e = ENGINE_by_id("dynamic"); + Q_ASSERT(e); + + int r=ENGINE_ctrl_cmd_string(e, "SO_PATH", actlib.toStdString().c_str(), 0); + Q_ASSERT(r); + r=ENGINE_ctrl_cmd_string(e, "ID", "act", 0); + Q_ASSERT(r); + r=ENGINE_ctrl_cmd_string(e, "LIST_ADD", "1", 0); + Q_ASSERT(r); + r=ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0); + Q_ASSERT(r); - if(!r) - { - unsigned int err = 0; - while((err = ERR_get_error())) - { - char *str = ERR_error_string(err, NULL); - fprintf(stderr,"%s\n", str); - } + if (!r) { + unsigned int err = 0; + while((err = ERR_get_error())) { + char *str = ERR_error_string(err, NULL); + fprintf(stderr,"%s\n", str); } + } - r=ENGINE_init(e); + r=ENGINE_init(e); } SmartCardAuth::~SmartCardAuth() { - ENGINE_finish(e); - ENGINE_cleanup(); + if (!e) return; + ENGINE_finish(e); + ENGINE_cleanup(); + e=0; } std::map sockets; diff --git a/swisssurfer/src/smartcardauth.hxx b/swisssurfer/src/smartcardauth.hxx index f82811b..1d0357c 100644 --- a/swisssurfer/src/smartcardauth.hxx +++ b/swisssurfer/src/smartcardauth.hxx @@ -11,7 +11,7 @@ class SmartCardAuth: public QObject { public: - SmartCardAuth(); + SmartCardAuth(const QString& actlib); ~SmartCardAuth(); private Q_SLOTS: diff --git a/swisssurfer/src/swisssurfer_de.ts b/swisssurfer/src/swisssurfer_de.ts index 689b3cc..bc56f52 100644 --- a/swisssurfer/src/swisssurfer_de.ts +++ b/swisssurfer/src/swisssurfer_de.ts @@ -26,367 +26,377 @@ - + Info - + neu laden - + F5 - + stoppen - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + &Close - + &Proxy... - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + Close Find - + &About - + &Settings ... - - + + &Reverse Find + + + + + Ctrl+R + + + + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + The connection to the proxy server was refused (the proxy server is not accepting requests). the connection to the proxy timed out or the proxy did not reply in time to the request sent - + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). the Network Access API cannot honor the request because the protocol is not known - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Network connection successful, remote host can be reached. - + The remote server refused the connection (the server is not accepting requests). - + The remote server closed the connection prematurely, before the entire reply was received and processed. - + The remote host name was not found (invalid hostname). - + The connection to the remote server timed out. - + The operation was canceled via calls to abort() or close() before it was finished. - + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - + The proxy server closed the connection prematurely, before the entire reply was received and processed. - + The proxy host name was not found (invalid proxy hostname). - + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - + The access to the remote content was denied (similar to HTTP error 401). - + The operation requested on the remote content is not permitted. - + The remote content was not found at the server (similar to HTTP error 404). - + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - + The Network Access API cannot honor the request because the protocol is not known. - + The requested operation is invalid for this protocol. - + An unknown network-related error was detected. - + An unknown proxy-related error was detected. - + An unknonwn error related to the remote content was detected. - + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - + <strong>Unknown network error (code: %1).</string> - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + %1 - + Save File As ... - + authentication required - + ssl error @@ -444,12 +454,14 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text -k, --kiosk no url bar if you sepcify -k and -s, -k must be first + -n, --no-settings don't load or store any settings + -l, --lib <file> path to file libengine_act.so -s, --settings <file> load settings from <file> if you sepcify -k and -s, -k must be first @@ -467,43 +479,38 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help - - http://swisssign.com - - - - + Send Authentication? - + Do you want to authenticate yourself to %1? @@ -832,7 +839,48 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls.</span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls. </span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Local resources are by default restricted from accessing remote content, which means your </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">file://</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;"> will not be able to access </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">http://domain.com/foo.html</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">. </span></p></body></html> + + + + + Search Engines + + + + + Scheme + + + + + Query URL + + + + + Use %1 as placeholder for the query, use %2 as placeholder for your system language. + Use <QUERY> as placeholder for the query. + + + + + TBD + + + + + Session Management + + + + + save window state + + + + + close mimetype helper applications on exit @@ -894,16 +942,23 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">&lt;FILENAME&gt;</span> as file name placeholder.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">%1</span> as file name placeholder.</p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">&lt;FILENAME&gt;</span> as file name placeholder.</p></body></html> + + + - diff --git a/swisssurfer/src/swisssurfer_en.ts b/swisssurfer/src/swisssurfer_en.ts index 689b3cc..bc56f52 100644 --- a/swisssurfer/src/swisssurfer_en.ts +++ b/swisssurfer/src/swisssurfer_en.ts @@ -26,367 +26,377 @@ - + Info - + neu laden - + F5 - + stoppen - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + &Close - + &Proxy... - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + Close Find - + &About - + &Settings ... - - + + &Reverse Find + + + + + Ctrl+R + + + + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + The connection to the proxy server was refused (the proxy server is not accepting requests). the connection to the proxy timed out or the proxy did not reply in time to the request sent - + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). the Network Access API cannot honor the request because the protocol is not known - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Network connection successful, remote host can be reached. - + The remote server refused the connection (the server is not accepting requests). - + The remote server closed the connection prematurely, before the entire reply was received and processed. - + The remote host name was not found (invalid hostname). - + The connection to the remote server timed out. - + The operation was canceled via calls to abort() or close() before it was finished. - + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - + The proxy server closed the connection prematurely, before the entire reply was received and processed. - + The proxy host name was not found (invalid proxy hostname). - + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - + The access to the remote content was denied (similar to HTTP error 401). - + The operation requested on the remote content is not permitted. - + The remote content was not found at the server (similar to HTTP error 404). - + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - + The Network Access API cannot honor the request because the protocol is not known. - + The requested operation is invalid for this protocol. - + An unknown network-related error was detected. - + An unknown proxy-related error was detected. - + An unknonwn error related to the remote content was detected. - + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - + <strong>Unknown network error (code: %1).</string> - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + %1 - + Save File As ... - + authentication required - + ssl error @@ -444,12 +454,14 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text -k, --kiosk no url bar if you sepcify -k and -s, -k must be first + -n, --no-settings don't load or store any settings + -l, --lib <file> path to file libengine_act.so -s, --settings <file> load settings from <file> if you sepcify -k and -s, -k must be first @@ -467,43 +479,38 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help - - http://swisssign.com - - - - + Send Authentication? - + Do you want to authenticate yourself to %1? @@ -832,7 +839,48 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls.</span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls. </span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Local resources are by default restricted from accessing remote content, which means your </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">file://</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;"> will not be able to access </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">http://domain.com/foo.html</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">. </span></p></body></html> + + + + + Search Engines + + + + + Scheme + + + + + Query URL + + + + + Use %1 as placeholder for the query, use %2 as placeholder for your system language. + Use <QUERY> as placeholder for the query. + + + + + TBD + + + + + Session Management + + + + + save window state + + + + + close mimetype helper applications on exit @@ -894,16 +942,23 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">&lt;FILENAME&gt;</span> as file name placeholder.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">%1</span> as file name placeholder.</p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">&lt;FILENAME&gt;</span> as file name placeholder.</p></body></html> + + + - diff --git a/swisssurfer/src/swisssurfer_fr.ts b/swisssurfer/src/swisssurfer_fr.ts index 689b3cc..bc56f52 100644 --- a/swisssurfer/src/swisssurfer_fr.ts +++ b/swisssurfer/src/swisssurfer_fr.ts @@ -26,367 +26,377 @@ - + Info - + neu laden - + F5 - + stoppen - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + &Close - + &Proxy... - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + Close Find - + &About - + &Settings ... - - + + &Reverse Find + + + + + Ctrl+R + + + + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + The connection to the proxy server was refused (the proxy server is not accepting requests). the connection to the proxy timed out or the proxy did not reply in time to the request sent - + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). the Network Access API cannot honor the request because the protocol is not known - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Network connection successful, remote host can be reached. - + The remote server refused the connection (the server is not accepting requests). - + The remote server closed the connection prematurely, before the entire reply was received and processed. - + The remote host name was not found (invalid hostname). - + The connection to the remote server timed out. - + The operation was canceled via calls to abort() or close() before it was finished. - + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - + The proxy server closed the connection prematurely, before the entire reply was received and processed. - + The proxy host name was not found (invalid proxy hostname). - + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - + The access to the remote content was denied (similar to HTTP error 401). - + The operation requested on the remote content is not permitted. - + The remote content was not found at the server (similar to HTTP error 404). - + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - + The Network Access API cannot honor the request because the protocol is not known. - + The requested operation is invalid for this protocol. - + An unknown network-related error was detected. - + An unknown proxy-related error was detected. - + An unknonwn error related to the remote content was detected. - + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - + <strong>Unknown network error (code: %1).</string> - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + %1 - + Save File As ... - + authentication required - + ssl error @@ -444,12 +454,14 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text -k, --kiosk no url bar if you sepcify -k and -s, -k must be first + -n, --no-settings don't load or store any settings + -l, --lib <file> path to file libengine_act.so -s, --settings <file> load settings from <file> if you sepcify -k and -s, -k must be first @@ -467,43 +479,38 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help - - http://swisssign.com - - - - + Send Authentication? - + Do you want to authenticate yourself to %1? @@ -832,7 +839,48 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls.</span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls. </span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Local resources are by default restricted from accessing remote content, which means your </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">file://</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;"> will not be able to access </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">http://domain.com/foo.html</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">. </span></p></body></html> + + + + + Search Engines + + + + + Scheme + + + + + Query URL + + + + + Use %1 as placeholder for the query, use %2 as placeholder for your system language. + Use <QUERY> as placeholder for the query. + + + + + TBD + + + + + Session Management + + + + + save window state + + + + + close mimetype helper applications on exit @@ -894,16 +942,23 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">&lt;FILENAME&gt;</span> as file name placeholder.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">%1</span> as file name placeholder.</p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">&lt;FILENAME&gt;</span> as file name placeholder.</p></body></html> + + + - diff --git a/swisssurfer/src/swisssurfer_it.ts b/swisssurfer/src/swisssurfer_it.ts index 689b3cc..bc56f52 100644 --- a/swisssurfer/src/swisssurfer_it.ts +++ b/swisssurfer/src/swisssurfer_it.ts @@ -26,367 +26,377 @@ - + Info - + neu laden - + F5 - + stoppen - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + &Close - + &Proxy... - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + Close Find - + &About - + &Settings ... - - + + &Reverse Find + + + + + Ctrl+R + + + + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + The connection to the proxy server was refused (the proxy server is not accepting requests). the connection to the proxy timed out or the proxy did not reply in time to the request sent - + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). the Network Access API cannot honor the request because the protocol is not known - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Network connection successful, remote host can be reached. - + The remote server refused the connection (the server is not accepting requests). - + The remote server closed the connection prematurely, before the entire reply was received and processed. - + The remote host name was not found (invalid hostname). - + The connection to the remote server timed out. - + The operation was canceled via calls to abort() or close() before it was finished. - + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - + The proxy server closed the connection prematurely, before the entire reply was received and processed. - + The proxy host name was not found (invalid proxy hostname). - + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - + The access to the remote content was denied (similar to HTTP error 401). - + The operation requested on the remote content is not permitted. - + The remote content was not found at the server (similar to HTTP error 404). - + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - + The Network Access API cannot honor the request because the protocol is not known. - + The requested operation is invalid for this protocol. - + An unknown network-related error was detected. - + An unknown proxy-related error was detected. - + An unknonwn error related to the remote content was detected. - + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - + <strong>Unknown network error (code: %1).</string> - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + %1 - + Save File As ... - + authentication required - + ssl error @@ -444,12 +454,14 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text -k, --kiosk no url bar if you sepcify -k and -s, -k must be first + -n, --no-settings don't load or store any settings + -l, --lib <file> path to file libengine_act.so -s, --settings <file> load settings from <file> if you sepcify -k and -s, -k must be first @@ -467,43 +479,38 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help - - http://swisssign.com - - - - + Send Authentication? - + Do you want to authenticate yourself to %1? @@ -832,7 +839,48 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls.</span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Specifies whether locally loaded documents are allowed to access remote urls. </span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">Local resources are by default restricted from accessing remote content, which means your </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">file://</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;"> will not be able to access </span><span style=" font-family:'Courier New,courier'; font-size:medium; color:#363534;">http://domain.com/foo.html</span><span style=" font-family:'Verdana'; font-size:medium; color:#363534;">. </span></p></body></html> + + + + + Search Engines + + + + + Scheme + + + + + Query URL + + + + + Use %1 as placeholder for the query, use %2 as placeholder for your system language. + Use <QUERY> as placeholder for the query. + + + + + TBD + + + + + Session Management + + + + + save window state + + + + + close mimetype helper applications on exit @@ -894,16 +942,23 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">&lt;FILENAME&gt;</span> as file name placeholder.</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">%1</span> as file name placeholder.</p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">In the <span style=" font-weight:600;">Program</span>-column, enter <span style=" font-weight:600;">&lt;FILENAME&gt;</span> as file name placeholder.</p></body></html> + + + -