diff --git a/swisssurfer/src/browser.hxx b/swisssurfer/src/browser.hxx index 89bb292..b5501d9 100644 --- a/swisssurfer/src/browser.hxx +++ b/swisssurfer/src/browser.hxx @@ -67,15 +67,18 @@ class Browser: public QMainWindow, protected Ui::Browser { _settings(mimeTypes, this, settings, !kiosk), _errorLog(this), _logincertificate(this), _proxy("http://swisssign.com", this), - _showErrorLog(0) { + _showErrorLog(0), + _startUrl(urls.size()) { LOG<addPermanentWidget(_progress = new QProgressBar()); _progress -> setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); statusBar()->addPermanentWidget(_zoom = new QSlider(Qt::Horizontal)); @@ -130,6 +133,8 @@ class Browser: public QMainWindow, protected Ui::Browser { SLOT(finished()))); assert(connect(&_downloadManager, SIGNAL(error(QString)), SLOT(downloadError(QString)))); + assert(connect(&_downloadManager, SIGNAL(metaDataChanged(QNetworkReply*)), + SLOT(metaDataChanged(QNetworkReply*)))); on_actionNewTab_triggered(); if (!settings || _kiosk) { @@ -143,8 +148,9 @@ class Browser: public QMainWindow, protected Ui::Browser { actionNewTab->setVisible(false); actionCloseTab->setVisible(false); } - if (!_kiosk && _settings.flag("SaveWindowState") && _settings()) - loadWin(urls.size()); + if (!_kiosk && !_startUrl && _settings.flag("SaveWindowState") + && _settings()) + loadWin(); if (urls.size()) load(urls.at(0)); for (int i(1); ipage(), SIGNAL(toolBarVisibilityChangeRequested(bool)), SLOT(toolBarVisibilityChangeRequested(bool)))); - assert(connect(browser->page(), - SIGNAL(unsupportedContent(QNetworkReply*)), - SLOT(unsupportedContent(QNetworkReply*)))); + // assert(connect(browser->page(), + // SIGNAL(unsupportedContent(QNetworkReply*)), + // SLOT(unsupportedContent(QNetworkReply*)))); assert(connect(browser->page(), SIGNAL(windowCloseRequested()), SLOT(windowCloseRequested()))); // QNetworkAccessManager @@ -442,9 +448,11 @@ class Browser: public QMainWindow, protected Ui::Browser { void closeEvent(QCloseEvent *event) { LOG; - if (!_kiosk && _settings.flag("SaveWindowState") && _settings()) + if (!_kiosk && !_startUrl && _settings.flag("SaveWindowState") + && _settings()) saveWin(); QMainWindow::closeEvent(event); + QApplication::exit(0); } private Q_SLOTS: @@ -617,11 +625,6 @@ class Browser: public QMainWindow, protected Ui::Browser { _downloadManager.abort(); } - void on__find_textChanged(QString) { - _find->changeStyleSheet(tr("background-color: white", "neutral find")); - } - - void on_actionClearLocation_triggered() { if (!qobject_cast(_url)) return; qobject_cast(_url)->clearEditText(); @@ -725,6 +728,51 @@ class Browser: public QMainWindow, protected Ui::Browser { _settings.show(); } + void on_actionSaveWindowState_triggered() { + saveWin(); + } + + void on_actionLoadWindowState_triggered() { + loadWin(); + } + + void saveWin() { + LOG<<"Save Window State"; + if (!_settings()) return; + QStringList urls; + if (qobject_cast(_url)) + 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() { + LOG; + QStringList urls(_settings()->value("Window/Urls").toStringList()); + urls.sort(); + urls.removeDuplicates(); + if (qobject_cast(_url)) + qobject_cast(_url)->addItems(urls); + QStringList tabs(_settings()->value("Window/Tabs").toStringList()); + while (_tabs->count()>1) _tabs->removeTab(0); + for (QStringList::iterator it(tabs.begin()); it!=tabs.end(); ++it) { + LOG<<"-------------------------------------------------------------"; + load(*it, newTab()); + LOG<<"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"; + } + _tabs->setTabsClosable(_tabs->count()>1); + _tabs->setCurrentIndex(_settings()->value("Window/CurrentTab").toInt()); + restoreGeometry(_settings()->value("Window/Geometry").toByteArray()); + restoreState(_settings()->value("Window/WindowState").toByteArray()); + } + //@name QWebView slots //@{ @@ -780,6 +828,9 @@ class Browser: public QMainWindow, protected Ui::Browser { void loadFinished(bool ok) { LOG<<(ok?"success":"error"); + QSize sz(qobject_cast(_tabs->currentWidget())->size()); + qobject_cast(_tabs->currentWidget())->resize(0,0); + qobject_cast(_tabs->currentWidget())->resize(sz); if (ok) { statusBar()->showMessage(tr("done.")); goodUrl(); @@ -1102,6 +1153,11 @@ class Browser: public QMainWindow, protected Ui::Browser { void unsupportedContent(QNetworkReply* reply) { LOG<header(QNetworkRequest::ContentTypeHeader).toString(); LOG<<"Status:"<<_downloadManager.networkError(reply->error()); + QList rh(reply->rawHeaderPairs()); + for(QList::iterator it(rh.begin()); + it!=rh.end(); ++it) { + LOG<<"RawHeader:"<first<second; + } if (reply->isFinished()) handleContent(reply); else @@ -1114,6 +1170,31 @@ class Browser: public QMainWindow, protected Ui::Browser { handleContent(reply); } + //! check and handle content that is defined in settings + void metaDataChanged(QNetworkReply* reply) { + QString filename + (QString::fromUtf8(reply->rawHeader("Content-Disposition"))); + if (filename.contains + (QRegExp("^\\s*attachment\\s*;\\s*filename\\s*=\\s*\"[^\"]+\""))) { + LOG<<"From Content-Disposition"; + filename = filename.replace + (QRegExp("^\\s*attachment\\s*;\\s*filename\\s*=\\s*\"([^\"]+)\".*"), + "\\1"); + } else { + LOG<<"From path"; + filename = + QFileInfo(!reply->url().toLocalFile().isEmpty() + ?reply->url().toLocalFile() + :reply->url().path()).fileName(); + } + LOG<<"Filename:"<header(QNetworkRequest::ContentTypeHeader).toString(), + filename)); + if (!type.isEmpty()) unsupportedContent(reply); + } + void handleContent(QNetworkReply* reply) { LOG<<"Location:"<header(QNetworkRequest::LocationHeader) .toString(); @@ -1153,23 +1234,23 @@ class Browser: public QMainWindow, protected Ui::Browser { "\\1"); // remove extension run(reply, filename+"."+type.at(0), type.at(1)); } else { - SaveOrRun choice(filename, - reply->header(QNetworkRequest::ContentTypeHeader) - .toString(), - reply->url().host(), - _kiosk, this); - choice.exec(); - if (choice.ok()) + SaveOrRunDialog choice(_kiosk, this); + choice.setup(filename, + reply->header(QNetworkRequest::ContentTypeHeader) + .toString(), + reply->url().host()); + if (choice.exec()==QDialog::Accepted) { if (choice.save()) { - QFile file(choice.filename()); + QFile file(choice.sor()->filename()); file.open(QIODevice::WriteOnly); file.write(reply->readAll()); file.close(); } else if (choice.run()) { - run(reply, filename, choice.program()+" %1"); + run(reply, filename, choice.sor()->program()+" %1"); } else { // ... } + } } } @@ -1178,6 +1259,7 @@ class Browser: public QMainWindow, protected Ui::Browser { (QDir::tempPath()+QDir::separator() +filename)); file->open(); + reply->seek(0); file->write(reply->readAll()); file->close(); LOG<<"Stored as:"<fileName(); @@ -1311,39 +1393,6 @@ class Browser: public QMainWindow, protected Ui::Browser { private: - void saveWin() { - LOG<<"Save Window State"; - QStringList urls; - if (qobject_cast(_url)) - 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(bool noRrestoreTabs=true) { - QStringList urls(_settings()->value("Window/Urls").toStringList()); - urls.sort(); - urls.removeDuplicates(); - if (qobject_cast(_url)) - qobject_cast(_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(); QWebHistory* history(qobject_cast(_tabs->currentWidget()) @@ -1428,6 +1477,7 @@ class Browser: public QMainWindow, protected Ui::Browser { gui::Proxy _proxy; QPushButton* _showErrorLog; std::auto_ptr _editbookmarks; + bool _startUrl; }; #endif diff --git a/swisssurfer/src/browser.ui b/swisssurfer/src/browser.ui index ddad1a8..e8e3184 100644 --- a/swisssurfer/src/browser.ui +++ b/swisssurfer/src/browser.ui @@ -97,6 +97,9 @@ + + + @@ -444,6 +447,16 @@ Ctrl+W + + + Sa&ve Session + + + + + &Load Session + + diff --git a/swisssurfer/src/certificate.hxx b/swisssurfer/src/certificate.hxx index dce0c1b..cfbedd7 100644 --- a/swisssurfer/src/certificate.hxx +++ b/swisssurfer/src/certificate.hxx @@ -14,6 +14,8 @@ #include #include +#include + class Certificate: public QWidget, protected Ui::Certificate { public: Certificate(QWidget* p): QWidget(p) { @@ -30,9 +32,15 @@ class Certificate: public QWidget, protected Ui::Certificate { ((new QTreeWidgetItem (QStringList()<addTopLevelItem + ((new QTreeWidgetItem + (QStringList()<addTopLevelItem ((new QTreeWidgetItem - (QStringList()<addTopLevelItem // ((new QTreeWidgetItem diff --git a/swisssurfer/src/downloadmanager.hxx b/swisssurfer/src/downloadmanager.hxx index 5fa267d..7c225a1 100644 --- a/swisssurfer/src/downloadmanager.hxx +++ b/swisssurfer/src/downloadmanager.hxx @@ -103,6 +103,7 @@ class DownloadManager: public QObject { void started(); void finished(); void error(QString); + void metaDataChanged(QNetworkReply*); public Q_SLOTS: @@ -116,7 +117,7 @@ class DownloadManager: public QObject { assert(connect(reply, SIGNAL(finished()), SLOT(slotFinished()))); assert(connect(reply, SIGNAL(metaDataChanged()), - SLOT(metaDataChanged()))); + SLOT(slotMetaDataChanged()))); assert(connect(reply, SIGNAL(sslErrors(const QList&)), SLOT(sslErrors(const QList&)))); assert(connect(reply, SIGNAL(uploadProgress(qint64, qint64)), @@ -172,8 +173,20 @@ class DownloadManager: public QObject { _downloads.erase(reply); if (_downloads.size()==0) finished(); } - void metaDataChanged() { + void slotMetaDataChanged() { LOG; + QNetworkReply* reply(qobject_cast(sender())); + if (!reply) return; + LOG<<"Location:"<header(QNetworkRequest::LocationHeader) + .toString(); + LOG<<"Content-Type:"<header(QNetworkRequest::ContentTypeHeader) + .toString(); + LOG<<"Content-Disposition:"<rawHeader("Content-Disposition"); + LOG<<"Status:"<error()); + LOG<<"URL:"<url().toString(); + LOG<<"File:"<url().toLocalFile(); + LOG<<"Path:"<url().path(); + metaDataChanged(reply); } void sslErrors(const QList & errors) { LOG; diff --git a/swisssurfer/src/main.cxx b/swisssurfer/src/main.cxx index 5e26a58..93022b0 100644 --- a/swisssurfer/src/main.cxx +++ b/swisssurfer/src/main.cxx @@ -217,6 +217,8 @@ void notrace(QtMsgType, const char*) { return; } +extern QWEBKIT_EXPORT void qt_drt_overwritePluginDirectories(); + int main(int argv, char** argc) try { // qInstallMsgHandler(notrace); // std::cout.rdbuf((new std::stringstream)->rdbuf()); @@ -227,12 +229,20 @@ int main(int argv, char** argc) try { sslConfig.setProtocol(QSsl::AnyProtocol); sslConfig.setPeerVerifyMode(QSslSocket::AutoVerifyPeer); QList certs(sslConfig.caCertificates()); - certs.push_back(QSslCertificate(SWISSSIGN_EV_GOLD_CA_2009_G2)); - certs.push_back(QSslCertificate(SWISSSIGN_GOLD_CA_G2)); - //certs.push_back(QSslCertificate(SWISSSIGN_SERVER_GOLD_CA_2008_G2)); - certs.push_back(QSslCertificate(SWISSSIGN_SILVER_CA_G2)); - certs.push_back(QSslCertificate(SWISSSIGN_PLATINUM_CA_G2)); - sslConfig.setCaCertificates(certs); + for (QList::iterator cert(certs.begin()); + cert!=certs.end(); ++cert) { + qDebug()<<"CERTIFICATE: " + <issuerInfo(QSslCertificate::Organization) + <issuerInfo(QSslCertificate::CommonName) + <subjectInfo(QSslCertificate::Organization) + <subjectInfo(QSslCertificate::CommonName); + } + // certs.push_back(QSslCertificate(SWISSSIGN_EV_GOLD_CA_2009_G2)); + // certs.push_back(QSslCertificate(SWISSSIGN_GOLD_CA_G2)); + // //certs.push_back(QSslCertificate(SWISSSIGN_SERVER_GOLD_CA_2008_G2)); + // certs.push_back(QSslCertificate(SWISSSIGN_SILVER_CA_G2)); + // certs.push_back(QSslCertificate(SWISSSIGN_PLATINUM_CA_G2)); + // sslConfig.setCaCertificates(certs); //............................................................................ QStringList l(QProcess::systemEnvironment()); QMap env; @@ -387,8 +397,8 @@ int main(int argv, char** argc) try { } QSslConfiguration::setDefaultConfiguration(sslConfig); //............................................................................ + if (env.contains("QTWEBKIT_PLUGIN_PATH")) qt_drt_overwritePluginDirectories(); Browser browser(actlib, urls, settings.get(), mimetypes, silent, login); - browser.show(); return app.exec(); } catch (std::exception& x) { std::cerr<<"**** Error: "< #include +#include #include +#ifndef LOG +#define LOG qDebug()<<__PRETTY_FUNCTION__ +#endif class PinEntry: public QDialog, public Ui::PinEntry { Q_OBJECT; @@ -30,6 +34,33 @@ class PinEntry: public QDialog, public Ui::PinEntry { QString pin() const { return _pin->text(); } + int myexec() { + LOG; + show(); + LOG<<"SSSSSSSSSTTTTTTTAAAAAAAAAAAAARRRRRRRRRRTTTTTTTTTT"; + int res(_run.exec(QEventLoop::ExcludeSocketNotifiers)); + LOG<<"EEEEEEEEEEEEENNNNNNNNNNNNNNNNNNNNNDDDDDDDDDDDDDDEEEEEEEEEEEEE"; + hide(); + return res; + } + public Q_SLOTS: + virtual void accept() { + LOG; + QDialog::accept(); + } + virtual void done(int r) { + LOG< -#include -#include +#include #include #ifndef LOG @@ -43,69 +42,7 @@ class PluginFactory: public QWebPluginFactory { <<"argumentNames:"<isLocked()); - - // output some meta-data - int major = 0, minor = 0; - doc->getPdfVersion( &major, &minor ); - qDebug() << " PDF Version: " << qPrintable(QString::fromLatin1("%1.%2").arg(major).arg(minor)); - qDebug() << " Title: " << doc->info("Title"); - qDebug() << " Subject: " << doc->info("Subject"); - qDebug() << " Author: " << doc->info("Author"); - qDebug() << " Key words: " << doc->info("Keywords"); - qDebug() << " Creator: " << doc->info("Creator"); - qDebug() << " Producer: " << doc->info("Producer"); - qDebug() << " Date created: " << doc->date("CreationDate").toString(); - qDebug() << " Date modified: " << doc->date("ModDate").toString(); - qDebug() << "Number of pages: " << doc->numPages(); - qDebug() << " Linearised: " << doc->isLinearized(); - qDebug() << " Encrypted: " << doc->isEncrypted(); - qDebug() << " OK to print: " << doc->okToPrint(); - qDebug() << " OK to copy: " << doc->okToCopy(); - qDebug() << " OK to change: " << doc->okToChange(); - qDebug() << "OK to add notes: " << doc->okToAddNotes(); - qDebug() << " Page mode: " << doc->pageMode(); - qDebug() << " Metadata: " << doc->metadata(); - QStringList fontNameList; - foreach(font, doc->fonts()) - fontNameList += font->name(); - qDebug() << " Fonts: " << fontNameList.join( ", " ); - - if ( doc->hasEmbeddedFiles() ) { - qDebug() << "Embedded files:"; - foreach(file, doc->embeddedFiles()) { - qDebug() << " " << (*file)->name(); - } - qDebug(); - } else { - qDebug() << "No embedded files"; - } - - if (doc->numPages() <= 0) - { - delete doc; - qDebug() << "Doc has no pages"; - return 0; - } - - { - std::auto_ptr page(doc->page(0)); - qDebug() << "Page 1 size: " << page->pageSize().width()/72 << "inches x " << page->pageSize().height()/72 << "inches"; - } - - bool useArthur(false); - PDFDisplay* test(new PDFDisplay(doc, useArthur)); - test->setWindowTitle("Poppler-Qt4 Test"); - test->setShowTextRects(false); - test->display(); - test->show(); - // QMainWindow* main(new QMainWindow); - // main->setCentralWidget(test); - // main->show(); - return test; + return new SaveOrRunPlugin(url, mimeType); } return 0; } diff --git a/swisssurfer/src/qmake.pro.in b/swisssurfer/src/qmake.pro.in index 1b30fe7..a5101aa 100644 --- a/swisssurfer/src/qmake.pro.in +++ b/swisssurfer/src/qmake.pro.in @@ -1,7 +1,7 @@ QT += webkit network gui CONFIG += no_keywords -QMAKE_LIBS += -lproxyface -lcryptoki++ -lssl -lcrypto -lpoppler-qt4 -QMAKE_CXXFLAGS += -std=c++0x +QMAKE_LIBS += -lproxyface -lpcscxx -lssl -lcrypto -lpoppler-qt4 +QMAKE_CXXFLAGS += -Werror -Wfatal-errors -Wno-parentheses -Wno-unused-parameter unix { !macx { diff --git a/swisssurfer/src/saveorrun.hxx b/swisssurfer/src/saveorrun.hxx index 6cdb98e..ba97a2b 100644 --- a/swisssurfer/src/saveorrun.hxx +++ b/swisssurfer/src/saveorrun.hxx @@ -10,92 +10,83 @@ #include +#include #include #include #include #include #include -class SaveOrRun: public QDialog, protected Ui::SaveOrRun { +#include +#include +#ifndef LOG +#define LOG qDebug()<<__PRETTY_FUNCTION__ +#endif + +class SaveOrRun: public QWidget, public Ui::SaveOrRun { Q_OBJECT; + + Q_SIGNALS: + + void save(); + void run(); + public: - SaveOrRun(QString obj, QString type, QString src, - bool kiosk=false, QWidget* p=0): - QDialog(p), _ok(false) { + SaveOrRun(QWidget* p=0): QWidget(p) { + LOG; setupUi(this); + _filename->setText(savePath()+QDir::separator()); + _program->setText(QCoreApplication::applicationDirPath() + +QDir::separator()); + } + + void setup(QString obj, QString type, QString src) { + LOG; _object->setText(obj); _type->setText(type); _source->setText(src); - QString path(QDir::homePath()); - QStringList defpaths; - defpaths<<"downloads"<<"Downloads"<<"Documents" - <setText(path+QDir::separator()+obj); - _program->setText(QCoreApplication::applicationDirPath() - +QDir::separator()); - // if (kiosk) { - // _openWith->hide(); - // _program->hide(); - // _programpath->hide(); - // _saveAs->hide(); - // _filenamelabel->setText(_saveAs->text()+' '+_filenamelabel->text()); - // } - } - - void init() { - _ok = false; - } - - bool save() { - return _saveAs->isChecked(); - } - - bool run() { - return _openWith->isChecked(); - } - - bool ok() { - return _ok; + _filename->setText(savePath()+QDir::separator()+obj); } QString filename() { + LOG; return _filename->text(); } QString program() { + LOG; return _program->text(); } - public Q_SLOTS: - - virtual void accept() { - if (save() && QFileInfo(filename()).exists() - && QMessageBox::question(this, tr("File Exists"), - tr("File already exists:\n\n" - "%1\n\n" - "Overwrite?").arg(filename()), - QMessageBox::Yes|QMessageBox::No) - == QMessageBox::No - || run() && (!QFile::exists(program()) - || !QFileInfo(program()).isExecutable()) - || save() && filename().size()==0 - || run() && program().size()==0) - return; // reject - _ok = true; - QDialog::accept(); - } - protected Q_SLOTS: + void on__saveFileAs_clicked(bool=true) { + LOG; + if ((QFileInfo(filename()).exists() + && QMessageBox::question(this, tr("File Exists"), + tr("File already exists:\n\n" + "%1\n\n" + "Overwrite?").arg(filename()), + QMessageBox::Yes|QMessageBox::No) + == QMessageBox::No) + || filename().size()==0) + return; // reject + save(); + } + + void on__openFileIn_clicked(bool=true) { + LOG; + if ((!QFile::exists(program()) + || !QFileInfo(program()).isExecutable() + || QFileInfo(program()).isDir()) + || program().size()==0) + return; // reject + run(); + } + void on__browseSaveAs_clicked(bool) { + LOG; QString saveFile (QFileDialog::getSaveFileName(this, tr("Save File As ..."), _filename->text(), QString(), 0, @@ -104,18 +95,115 @@ class SaveOrRun: public QDialog, protected Ui::SaveOrRun { if (QFileInfo(saveFile).isDir()) saveFile += QDir::separator()+_object->text(); _filename->setText(saveFile); + on__saveFileAs_clicked(); } void on__browseOpenWith_clicked(bool) { + LOG; QString openFile (QFileDialog::getOpenFileName(this, tr("Open File With ..."), _program->text())); - if (openFile.size()) _program->setText(openFile); + if (!openFile.size()) return; + _program->setText(openFile); + on__openFileIn_clicked(); + } + + protected: + + QString savePath() { + LOG; + QString path(QDir::homePath()); + QStringList defpaths; + defpaths<<"downloads"<<"Downloads"<<"Documents" + <setText(mime); + _source->setText(url.host()); + } + +}; + +class SaveOrRunDialog: public QDialog { + Q_OBJECT; + + public: + + SaveOrRunDialog(bool kiosk=false, QWidget* p=0): + QDialog(p), _action(UNDEFINED), _sor(new SaveOrRun) { + LOG; + QVBoxLayout* l(new QVBoxLayout(this)); + l->addWidget(_sor); + assert(connect(_sor, SIGNAL(save()), SLOT(doSave()))); + assert(connect(_sor, SIGNAL(run()), SLOT(doRun()))); + assert(connect(_sor->_buttons, SIGNAL(rejected()), SLOT(reject()))); + } + + void setup(QString obj, QString type, QString src) { + _sor->setup(obj, type, src); + } + + bool save() { + LOG; + return _action==SAVE; + } + + bool run() { + LOG; + return _action==RUN; + } + + SaveOrRun* sor() { + LOG; + return _sor; + } + + public Q_SLOTS: + + void doSave() { + LOG; + _action = SAVE; + accept(); + } + + void doRun() { + LOG; + _action = RUN; + accept(); + } + + protected: + + enum Action { + SAVE, + RUN, + UNDEFINED + } _action; + + SaveOrRun* _sor; - bool _ok; }; #endif diff --git a/swisssurfer/src/saveorrun.ui b/swisssurfer/src/saveorrun.ui index bf2e58a..411b1e1 100644 --- a/swisssurfer/src/saveorrun.ui +++ b/swisssurfer/src/saveorrun.ui @@ -1,173 +1,220 @@ SaveOrRun - + 0 0 - 583 - 161 + 670 + 294 - File Downloaded + Download - - - - - - 75 - true - - - - File: + + + + + + + + 0 + 0 + + + + + 75 + true + + + + File: + + + + + + + + 0 + 0 + + + + ... + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Type: + + + + + + + + 0 + 0 + + + + ... + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Source + + + + + + + + 0 + 0 + + + + ... + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + Save File + + + + + Save File As: + + + + + + + + + + + 0 + 0 + + + + browse ... + + + + + + + remember save path + + + true + + + + - - - - - 0 - 0 - - - - ... - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + Open in External Application + + + + + Open File in: + + + + + + + true + + + + + + + true + + + + 0 + 0 + + + + browse ... + + + + + + + remember tool for this type + + + true + + + + - - - - - 75 - true - - - - Type: - - - - - - - - 0 - 0 - - - - ... - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - 75 - true - - - - Source - - - - - - - - 0 - 0 - - - - ... - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - open file with: - - - - - - - false - - - - - - - false - - - - 0 - 0 - - - - browse ... - - - - - - - save file as - - - true - - - - - - - - - - - 0 - 0 - - - - browse ... - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - + Qt::Vertical @@ -175,108 +222,54 @@ 20 - 40 + 0 + + + + QDialogButtonBox::Cancel + + + true + + + - buttonBox - accepted() - SaveOrRun - accept() + _filename + returnPressed() + _saveFileAs + click() - 248 - 254 + 371 + 113 - 157 - 274 + 94 + 126 - buttonBox - rejected() - SaveOrRun - reject() + _program + returnPressed() + _openFileIn + click() - 316 - 260 + 371 + 207 - 286 - 274 - - - - - _openWith - toggled(bool) - _program - setEnabled(bool) - - - 105 - 170 - - - 232 - 172 - - - - - _saveAs - toggled(bool) - _filename - setEnabled(bool) - - - 92 - 463 - - - 220 - 463 - - - - - _openWith - toggled(bool) - _browseOpenWith - setEnabled(bool) - - - 82 - 79 - - - 531 - 79 - - - - - _saveAs - toggled(bool) - _browseSaveAs - setEnabled(bool) - - - 82 - 109 - - - 531 - 109 + 94 + 220 diff --git a/swisssurfer/src/settings.ui b/swisssurfer/src/settings.ui index ac098c4..cef0a63 100644 --- a/swisssurfer/src/settings.ui +++ b/swisssurfer/src/settings.ui @@ -17,7 +17,7 @@ - 4 + 0 @@ -635,7 +635,7 @@ p, li { white-space: pre-wrap; } - TBD + Session @@ -647,7 +647,7 @@ p, li { white-space: pre-wrap; } - save window state + save window state when opened withiut URL diff --git a/swisssurfer/src/smartcardauth.hxx b/swisssurfer/src/smartcardauth.hxx index a3cd178..52484df 100644 --- a/swisssurfer/src/smartcardauth.hxx +++ b/swisssurfer/src/smartcardauth.hxx @@ -18,6 +18,10 @@ #include +#ifndef LOG +#define LOG qDebug()<<__PRETTY_FUNCTION__ +#endif + class CryptokiEngine: public QObject, public openssl::Engine { Q_OBJECT; @@ -30,13 +34,13 @@ class CryptokiEngine: public QObject, public openssl::Engine { CryptokiEngine(std::string lib): _cryptoki(lib) { - OPENSSL_LOG("log"); + LOG; } operator bool() { - OPENSSL_LOG("Status of CryptokiEngine: " - <<(_privateKey.get() - ?"privateKey defined, ":"privateKey undefined")); + LOG<<"Status of CryptokiEngine: " + <<(_privateKey.get() + ?"privateKey defined, ":"privateKey undefined"); return _privateKey.get(); } @@ -45,7 +49,7 @@ class CryptokiEngine: public QObject, public openssl::Engine { } void cert(cryptoki::Object& privateKey, const std::string& certVal) { - OPENSSL_LOG("log"); + LOG; _privateKey = std::auto_ptr (new cryptoki::Object(privateKey)); try { // new @@ -86,11 +90,11 @@ class CryptokiEngine: public QObject, public openssl::Engine { set(rsa->iqmp, privateKey, CKA_COEFFICIENT, "CKA_COEFFICIENT"); rsa->flags |= RSA_FLAG_SIGN_VER; // don't emulate with encrypt/decrypt assert(!privkey.isNull()); - OPENSSL_LOG("Setup RSA finished"); + LOG<<"Setup RSA finished"; sslConfig.setPrivateKey(privkey); QSslConfiguration::setDefaultConfiguration(sslConfig); } catch (const std::exception& e) { - OPENSSL_LOG("SETUP ERROR: "<sign(in, CKM_RSA_PKCS); } catch (const std::exception& x) { @@ -144,7 +148,7 @@ class SmartCardAuth: public QObject { SmartCardAuth(const QString& lib, QWidget* p=0, bool loginAtStart=true): _parent(p), _e(new CryptokiEngine(lib.toStdString())), _reg(_e) { - qDebug()<<__PRETTY_FUNCTION__; + LOG; if (loginAtStart) login(); assert(connect(_e, SIGNAL(certRequired()), SLOT(login()))); } @@ -152,90 +156,104 @@ class SmartCardAuth: public QObject { public Q_SLOTS: void login(bool force=true) { - qDebug()<<__PRETTY_FUNCTION__; - while (!_mutex.tryLock()) QCoreApplication::processEvents(); - FreeLock freelock(_mutex); - OPENSSL_LOG("got lock"); - if (!_e || (!force && *_e)) return; // no smartcard or already logged in - OPENSSL_LOG("start login to smartcard"); try { + LOG; + Lock lock; + LOG<<"got lock"; + if (!_e || (!force && *_e)) return; // no smartcard or already logged in + LOG<<"start login to smartcard"; QList authcerts; QList allcerts; QSslConfiguration sslConfig(QSslConfiguration::defaultConfiguration()); _slots = _e->cryptoki().slotList(); + LOG<<"number of slots"<<_slots.size(); // look for login certificates ---------------------------------------- for (cryptoki::SlotList::iterator slot(_slots.begin()); slot!=_slots.end(); ++slot) { - _session = - std::auto_ptr(new cryptoki::Session(*slot)); - cryptoki::ObjectList certs(_session->find + cryptoki::Session session(*slot); + cryptoki::ObjectList certs(session.find (cryptoki::Attribute(CKA_CLASS) .from(CKO_CERTIFICATE))); for (cryptoki::ObjectList::iterator cert(certs.begin()); cert!=certs.end(); ++cert) { cryptoki::Attribute label(cert->attribute(CKA_LABEL)); cryptoki::Attribute id(cert->attribute(CKA_ID)); - OPENSSL_LOG("**** FOUND CERTIFICATE: "<find(cryptoki::Attribute(CKA_CLASS) - .from(CKO_PUBLIC_KEY), - id)); - OPENSSL_LOG("**** with keys: "<(CKO_PUBLIC_KEY), + id)); + LOG<<"**** with keys: "<attribute(CKA_VALUE).value); if (!keys.size()) { // add CA-certificate - OPENSSL_LOG("**** add to CA-certificates"); + LOG<<"**** add to CA-certificates"; } else { - OPENSSL_LOG("**** user cert, check for authentictaion"); + LOG<<"**** user cert, check for authentictaion"; if (label.value.find("auth")==0 || label.value.find("Authentication")!=std::string::npos) { - OPENSSL_LOG("**** it's our authentication cert"); + LOG<<"**** it's our authentication cert"; authcerts.push_back(CertInfo(data, slot, id)); } else { - OPENSSL_LOG("**** it's an unknown cert"); + LOG<<"**** it's an unknown cert"; allcerts.push_back(CertInfo(data, slot, id)); } } } } // get pin and install client certificate ------------------------------ + LOG<<"00000000000000000000000000000000000000000000000000"; if (!authcerts.isEmpty() || !allcerts.isEmpty()) { + LOG<<"11111111111111111111111111111111111111111111111111"; CertInfo c(authcerts.size()?authcerts[0]:allcerts[0]); PinEntry pinEntry(QSslCertificate(QByteArray(c.data.data(), c.data.size()), QSsl::Der), _parent); - while (pinEntry.retries(retries(c.slot->slotinfo().slotDescription)) - .exec()==PinEntry::Accepted) - try { + while (true) try { + LOG<<"******************************************1*******"; + pinEntry.retries(retries(c.slot->slotinfo().slotDescription)); + LOG<<"******************************************2*******"; + int res(pinEntry.myexec()); + LOG<<"******************************************3*******"; + if (res!=PinEntry::Accepted) return; + LOG<<"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; _session = // session login with pin std::auto_ptr (new cryptoki::Session(*c.slot)); + LOG<<"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; _session->login(pinEntry.pin().toStdString()); + LOG<<"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"; cryptoki::ObjectList keys (_session->find(cryptoki::Attribute(CKA_CLASS) .from(CKO_PRIVATE_KEY), c.id)); + LOG<<"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"; if (keys.size()==1) { - OPENSSL_LOG("**** found one private key"); + LOG<<"**** found one private key"; _e->cert(keys[0], c.data); // install client cert + LOG<<"=================================================="; break; } + LOG<<"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; } catch (std::exception& x) { pinEntry.pin().clear(); - OPENSSL_LOG("**** ERROR"<1) loops().back()->exec(); // wait } - ~FreeLock() { - _mutex.unlock(); + ~Lock() { + LOG<exit(0); // wake up next } private: - QMutex& _mutex; + QList& loops() { // same as a static member variable + static QList _loops; + return _loops; + } }; private: @@ -308,9 +336,6 @@ class SmartCardAuth: public QObject { openssl::RegisterEngine _reg; cryptoki::SlotList _slots; std::auto_ptr _session; - QMutex _mutex; - //std::map sockets; - // std::list _cacerts; }; diff --git a/swisssurfer/src/swisssurfer_de.ts b/swisssurfer/src/swisssurfer_de.ts index 5314360..48b4185 100644 --- a/swisssurfer/src/swisssurfer_de.ts +++ b/swisssurfer/src/swisssurfer_de.ts @@ -54,364 +54,373 @@ - + Info - + History - + neu laden - + F5 - + stoppen - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + Ctrl+W - + &Proxy... - + &Quit - + 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 - + Error Log - + show error logs - + User Login Certificate - + &Proxy ... - + Clear Location - + clear location bar - + Add Bookmark - + add bookmark to location bar - + Ctrl+D - + &Bookmarks - + Clear Find - + clear find bar - + &Close Tab - - + + Sa&ve Session + + + + + &Load Session + + + + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + 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 - + SSL Not Supported - + SSL is not supported on your system - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + opening new window - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - - - + + background-color: white neutral find - - + + background-color: #ADA background-color: #7F7 text found - - + + background-color: #F77 background-color: lightred text not found - + About - + %8 Version: %1 Builddate: %2 @@ -431,42 +440,42 @@ openssl-%7 - + %1 - + launching application ... - + errors show error log - - + + background-color: #F77 invalid url - - + + background-color: white valid url - + authentication required - + ssl error @@ -474,83 +483,88 @@ openssl-%7 Certificate - + Valid Since - + Valid Until - - Serial Number - - - - + Issuer Info - + Subject Info - + + SuisseID Number + + + + + Certificate Serial Number + + + + Alternate Subject - + E-Mail - + URL - + error unknown certificate subject alternate name - + Organization - + Common Name - + Locality - + Organizational Unit - + Country - + State or Province - + error unknown certificate subject info @@ -690,13 +704,13 @@ openssl-%7 - + <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> <h1>Network Error</h2><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> - + <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Provive:</th><td>%15</td></tr></table> <h1>SSL Error</h2><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Provive:</th><td>%15</td></tr></table> @@ -771,7 +785,7 @@ openssl-%7 - + there are %1 PIN attempts left @@ -779,12 +793,12 @@ openssl-%7 QMessageBox - + Wrong PIN - + Authentication failed, please try again. @@ -792,13 +806,13 @@ openssl-%7 QObject - + SwissSurfer application name - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -825,27 +839,27 @@ 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 @@ -854,77 +868,12 @@ Try: %1 --help SaveOrRun - - File Downloaded - - - - - File: - - - - - - - ... - - - - - Type: - - - - - Source - - - - - open file with: - - - - - - browse ... - - - - - save file as - - - - - Save File As ... - - - - - Open File With ... - - - - + File Exists - - Dokumente - Documents folder in local language - - - - - Arbeitsfläche - Desktop folder in local language - - - - + File already exists: %1 @@ -932,6 +881,91 @@ Try: %1 --help Overwrite? + + + Save File As ... + + + + + Open File With ... + + + + + Dokumente + Documents folder in local language + + + + + Arbeitsfläche + Desktop folder in local language + + + + + Download + + + + + File: + + + + + + + ... + + + + + Type: + + + + + Source + + + + + Save File + + + + + Save File As: + + + + + + browse ... + + + + + remember save path + + + + + Open in External Application + + + + + Open File in: + + + + + remember tool for this type + + Settings @@ -1283,7 +1317,7 @@ p, li { white-space: pre-wrap; } - TBD + Session @@ -1293,7 +1327,8 @@ p, li { white-space: pre-wrap; } - save window state + save window state when opened withiut URL + save window state diff --git a/swisssurfer/src/swisssurfer_en.ts b/swisssurfer/src/swisssurfer_en.ts index 8684d67..1cf5de0 100644 --- a/swisssurfer/src/swisssurfer_en.ts +++ b/swisssurfer/src/swisssurfer_en.ts @@ -53,344 +53,353 @@ - + History - + Info - + neu laden - + F5 - + stoppen - - + + Esc - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + Ctrl+W - + &Proxy... - + &Quit - + Print ... - + Print Pre&view ... - + Quick &Print - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + find in page - + Ctrl+F - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - + User Login Certificate - + &Proxy ... - + Clear Location - + clear location bar - + Add Bookmark - + add bookmark to location bar - + Ctrl+D - + &Bookmarks - + Clear Find - + clear find bar - + &Close Tab - + + Sa&ve Session + + + + + &Load Session + + + + Checking: %1 - + SSL Not Supported - + SSL is not supported on your system - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + Reading: %1 - + Illegal URL: %1 - + Zoom: %1% - + opening new window - + Print Document - + %1 - %2 statusbar actionBack_hovered %1=url %2=title - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - - - + + background-color: white neutral find - - + + background-color: #ADA background-color: #7F7 text found - - + + background-color: #F77 background-color: lightred text not found - + About - + %8 Version: %1 Builddate: %2 @@ -410,58 +419,58 @@ openssl-%7 - + %1 - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + launching application ... - + errors show error log - - + + background-color: #F77 invalid url - - + + background-color: white valid url - + authentication required - + ssl error @@ -469,83 +478,88 @@ openssl-%7 Certificate - + Valid Since - + Valid Until - - Serial Number - - - - + Issuer Info - + Subject Info - + + SuisseID Number + + + + + Certificate Serial Number + + + + Alternate Subject - + E-Mail - + URL - + error unknown certificate subject alternate name - + Organization - + Common Name - + Locality - + Organizational Unit - + Country - + State or Province - + error unknown certificate subject info @@ -684,12 +698,12 @@ openssl-%7 - + <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> - + <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Provive:</th><td>%15</td></tr></table> @@ -761,7 +775,7 @@ openssl-%7 - + there are %1 PIN attempts left @@ -769,12 +783,12 @@ openssl-%7 QMessageBox - + Wrong PIN - + Authentication failed, please try again. @@ -782,13 +796,13 @@ openssl-%7 QObject - + SwissSurfer application name - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -815,27 +829,27 @@ 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 @@ -844,77 +858,12 @@ Try: %1 --help SaveOrRun - - File Downloaded - - - - - File: - - - - - - - ... - - - - - Type: - - - - - Source - - - - - open file with: - - - - - - browse ... - - - - - save file as - - - - - Save File As ... - - - - - Open File With ... - - - - + File Exists - - Dokumente - Documents folder in local language - - - - - Arbeitsfläche - Desktop folder in local language - - - - + File already exists: %1 @@ -922,6 +871,91 @@ Try: %1 --help Overwrite? + + + Save File As ... + + + + + Open File With ... + + + + + Dokumente + Documents folder in local language + + + + + Arbeitsfläche + Desktop folder in local language + + + + + Download + + + + + File: + + + + + + + ... + + + + + Type: + + + + + Source + + + + + Save File + + + + + Save File As: + + + + + + browse ... + + + + + remember save path + + + + + Open in External Application + + + + + Open File in: + + + + + remember tool for this type + + Settings @@ -1346,7 +1380,7 @@ p, li { white-space: pre-wrap; } - TBD + Session @@ -1356,7 +1390,8 @@ p, li { white-space: pre-wrap; } - save window state + save window state when opened withiut URL + save window state diff --git a/swisssurfer/src/swisssurfer_fr.ts b/swisssurfer/src/swisssurfer_fr.ts index 5314360..48b4185 100644 --- a/swisssurfer/src/swisssurfer_fr.ts +++ b/swisssurfer/src/swisssurfer_fr.ts @@ -54,364 +54,373 @@ - + Info - + History - + neu laden - + F5 - + stoppen - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + Ctrl+W - + &Proxy... - + &Quit - + 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 - + Error Log - + show error logs - + User Login Certificate - + &Proxy ... - + Clear Location - + clear location bar - + Add Bookmark - + add bookmark to location bar - + Ctrl+D - + &Bookmarks - + Clear Find - + clear find bar - + &Close Tab - - + + Sa&ve Session + + + + + &Load Session + + + + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + 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 - + SSL Not Supported - + SSL is not supported on your system - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + opening new window - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - - - + + background-color: white neutral find - - + + background-color: #ADA background-color: #7F7 text found - - + + background-color: #F77 background-color: lightred text not found - + About - + %8 Version: %1 Builddate: %2 @@ -431,42 +440,42 @@ openssl-%7 - + %1 - + launching application ... - + errors show error log - - + + background-color: #F77 invalid url - - + + background-color: white valid url - + authentication required - + ssl error @@ -474,83 +483,88 @@ openssl-%7 Certificate - + Valid Since - + Valid Until - - Serial Number - - - - + Issuer Info - + Subject Info - + + SuisseID Number + + + + + Certificate Serial Number + + + + Alternate Subject - + E-Mail - + URL - + error unknown certificate subject alternate name - + Organization - + Common Name - + Locality - + Organizational Unit - + Country - + State or Province - + error unknown certificate subject info @@ -690,13 +704,13 @@ openssl-%7 - + <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> <h1>Network Error</h2><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> - + <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Provive:</th><td>%15</td></tr></table> <h1>SSL Error</h2><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Provive:</th><td>%15</td></tr></table> @@ -771,7 +785,7 @@ openssl-%7 - + there are %1 PIN attempts left @@ -779,12 +793,12 @@ openssl-%7 QMessageBox - + Wrong PIN - + Authentication failed, please try again. @@ -792,13 +806,13 @@ openssl-%7 QObject - + SwissSurfer application name - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -825,27 +839,27 @@ 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 @@ -854,77 +868,12 @@ Try: %1 --help SaveOrRun - - File Downloaded - - - - - File: - - - - - - - ... - - - - - Type: - - - - - Source - - - - - open file with: - - - - - - browse ... - - - - - save file as - - - - - Save File As ... - - - - - Open File With ... - - - - + File Exists - - Dokumente - Documents folder in local language - - - - - Arbeitsfläche - Desktop folder in local language - - - - + File already exists: %1 @@ -932,6 +881,91 @@ Try: %1 --help Overwrite? + + + Save File As ... + + + + + Open File With ... + + + + + Dokumente + Documents folder in local language + + + + + Arbeitsfläche + Desktop folder in local language + + + + + Download + + + + + File: + + + + + + + ... + + + + + Type: + + + + + Source + + + + + Save File + + + + + Save File As: + + + + + + browse ... + + + + + remember save path + + + + + Open in External Application + + + + + Open File in: + + + + + remember tool for this type + + Settings @@ -1283,7 +1317,7 @@ p, li { white-space: pre-wrap; } - TBD + Session @@ -1293,7 +1327,8 @@ p, li { white-space: pre-wrap; } - save window state + save window state when opened withiut URL + save window state diff --git a/swisssurfer/src/swisssurfer_it.ts b/swisssurfer/src/swisssurfer_it.ts index 51e5bed..446452a 100644 --- a/swisssurfer/src/swisssurfer_it.ts +++ b/swisssurfer/src/swisssurfer_it.ts @@ -53,342 +53,351 @@ - + History - + Info - + neu laden - + F5 - + stoppen - - + + Esc - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + Ctrl+W - + &Proxy... - + &Quit - + Print ... - + Print Pre&view ... - + Quick &Print - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + find in page - + Ctrl+F - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - + User Login Certificate - + &Proxy ... - + Clear Location - + clear location bar - + Add Bookmark - + add bookmark to location bar - + Ctrl+D - + &Bookmarks - + Clear Find - + clear find bar - + &Close Tab - + + Sa&ve Session + + + + + &Load Session + + + + SSL Not Supported - + SSL is not supported on your system - + Checking: %1 - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + Reading: %1 - + Illegal URL: %1 - + Zoom: %1% - + opening new window - + Print Document - + %1 - %2 statusbar actionBack_hovered %1=url %2=title - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - - - + + background-color: white neutral find - - + + background-color: #ADA text found - - + + background-color: #F77 text not found - + About - + %8 Version: %1 Builddate: %2 @@ -400,58 +409,58 @@ openssl-%7 - + %1 - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + launching application ... - + errors show error log - - + + background-color: #F77 invalid url - - + + background-color: white valid url - + authentication required - + ssl error @@ -474,83 +483,88 @@ openssl-%7 - + Valid Since - + Valid Until - - Serial Number + + SuisseID Number + Certificate Serial Number + + + + Subject Info - + Alternate Subject - + Issuer Info - + E-Mail - + URL - + error unknown certificate subject alternate name - + Organization - + Common Name - + Locality - + Organizational Unit - + Country - + State or Province - + error unknown certificate subject info @@ -674,12 +688,12 @@ openssl-%7 - + <h1>Network Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl> - + <h1>SSL Error</h1><dl><dt>URL:</dt><dd>%1</dd><dt>Error Code:</dt><dd>%3</dd><dt>Error Details:</dt><dd>%2</dd></dl><table><caption>Certificate Issuer</caption><tr><th>Organization:</th><td>%4</td></tr><tr><th>Common Name:</th><td>%5</td></tr><tr><th>Location:</th><td>%6</td></tr><tr><th>Organizational Unit:</th><td>%7</td></tr><tr><th>Country:</th><td>%8</td></tr><tr><th>State or Provive:</th><td>%9</td></tr></table><table><caption>Certificate Subject</caption><tr><th>Organization:</th><td>%10</td></tr><tr><th>Common Name:</th><td>%11</td></tr><tr><th>Location:</th><td>%12</td></tr><tr><th>Organizational Unit:</th><td>%13</td></tr><tr><th>Country:</th><td>%14</td></tr><tr><th>State or Provive:</th><td>%15</td></tr></table> @@ -751,7 +765,7 @@ openssl-%7 - + there are %1 PIN attempts left @@ -759,12 +773,12 @@ openssl-%7 QMessageBox - + Wrong PIN - + Authentication failed, please try again. @@ -772,13 +786,13 @@ openssl-%7 QObject - + SwissSurfer application name - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -805,27 +819,27 @@ 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 @@ -834,77 +848,12 @@ Try: %1 --help SaveOrRun - - File Downloaded - - - - - File: - - - - - - - ... - - - - - Type: - - - - - Source - - - - - open file with: - - - - - - browse ... - - - - - save file as - - - - - Save File As ... - - - - - Open File With ... - - - - + File Exists - - Dokumente - Documents folder in local language - - - - - Arbeitsfläche - Desktop folder in local language - - - - + File already exists: %1 @@ -912,6 +861,91 @@ Try: %1 --help Overwrite? + + + Save File As ... + + + + + Open File With ... + + + + + Dokumente + Documents folder in local language + + + + + Arbeitsfläche + Desktop folder in local language + + + + + Download + + + + + File: + + + + + + + ... + + + + + Type: + + + + + Source + + + + + Save File + + + + + Save File As: + + + + + + browse ... + + + + + remember save path + + + + + Open in External Application + + + + + Open File in: + + + + + remember tool for this type + + Settings @@ -1336,7 +1370,7 @@ p, li { white-space: pre-wrap; } - TBD + Session @@ -1346,7 +1380,8 @@ p, li { white-space: pre-wrap; } - save window state + save window state when opened withiut URL + save window state