diff --git a/.gitignore b/.gitignore
index f7ec5df1a..190c27892 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ headers*.tar.gz
license_template
Makefile*
TestPlugin-build
+search_*
diff --git a/bin/locale/cs_CZ.qm b/bin/locale/cs_CZ.qm
index d8e707562..3fc5dac95 100644
Binary files a/bin/locale/cs_CZ.qm and b/bin/locale/cs_CZ.qm differ
diff --git a/src/3rdparty/squeezelabel.cpp b/src/3rdparty/squeezelabel.cpp
index d8a20a10f..d268405b1 100644
--- a/src/3rdparty/squeezelabel.cpp
+++ b/src/3rdparty/squeezelabel.cpp
@@ -5,15 +5,21 @@ SqueezeLabel::SqueezeLabel(QWidget *parent)
{
}
-void SqueezeLabel::paintEvent(QPaintEvent *event)
+void SqueezeLabel::setText(const QString &txt)
{
- if (m_SqueezedTextCache != text()) {
- m_SqueezedTextCache = text();
- QFontMetrics fm = fontMetrics();
- if (fm.width(m_SqueezedTextCache) > contentsRect().width()) {
- QString elided = fm.elidedText(text(), Qt::ElideMiddle, width());
- setText(elided);
- }
- }
- QLabel::paintEvent(event);
+ m_originalText = txt;
+ QLabel::setText(txt);
+}
+
+QString SqueezeLabel::originalText()
+{
+ return m_originalText;
+}
+
+void SqueezeLabel::resizeEvent(QResizeEvent *event)
+{
+ QLabel::resizeEvent(event);
+ QFontMetrics fm = fontMetrics();
+ QString elided = fm.elidedText(originalText(), Qt::ElideMiddle, width());
+ QLabel::setText(elided);
}
diff --git a/src/3rdparty/squeezelabel.h b/src/3rdparty/squeezelabel.h
index 1adbb828d..d7c5b9727 100644
--- a/src/3rdparty/squeezelabel.h
+++ b/src/3rdparty/squeezelabel.h
@@ -41,12 +41,15 @@ class SqueezeLabel : public QLabel
public:
SqueezeLabel(QWidget *parent = 0);
+ QString originalText();
+ void setText(const QString &txt);
protected:
- void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
private:
QString m_SqueezedTextCache;
+ QString m_originalText;
};
#endif // SQUEEZELABEL_H
diff --git a/src/app/mainapplication.cpp b/src/app/mainapplication.cpp
index 502765a65..1d04c716a 100644
--- a/src/app/mainapplication.cpp
+++ b/src/app/mainapplication.cpp
@@ -219,6 +219,9 @@ void MainApplication::loadSettings()
m_websettings->setMaximumPagesInCache(maxCachedPages);
setWheelScrollLines(scrollingLines);
+
+ if (m_downloadManager)
+ m_downloadManager->loadSettings();
}
void MainApplication::setupJumpList()
diff --git a/src/data/icons/locationbar/search.png b/src/data/icons/locationbar/search.png
index 2bbbc1abf..5365b6c6f 100644
Binary files a/src/data/icons/locationbar/search.png and b/src/data/icons/locationbar/search.png differ
diff --git a/src/downloads/downloaditem.cpp b/src/downloads/downloaditem.cpp
index 688d997df..7d8580eb9 100644
--- a/src/downloads/downloaditem.cpp
+++ b/src/downloads/downloaditem.cpp
@@ -21,6 +21,7 @@
#include "qupzilla.h"
#include "tabwidget.h"
#include "webpage.h"
+#include "downloadmanager.h"
//#define DOWNMANAGER_DEBUG
@@ -47,6 +48,7 @@ DownloadItem::DownloadItem(QListWidgetItem* item, QNetworkReply* reply, QString
m_outputFile.setFileName(fullPath);
ui->setupUi(this);
+ setMaximumWidth(525);
#ifdef Q_WS_WIN
ui->progressBar->setStyleSheet("QProgressBar {border: 1px solid;}");
#endif
@@ -71,6 +73,7 @@ DownloadItem::DownloadItem(QListWidgetItem* item, QNetworkReply* reply, QString
connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(error(QNetworkReply::NetworkError)));
connect(m_reply, SIGNAL(metaDataChanged()), this, SLOT(metaDataChanged()));
connect(ui->button, SIGNAL(clicked(QPoint)), this, SLOT(stop()));
+ connect((DownloadManager*)parentWidget(), SIGNAL(resized(QSize)), this, SLOT(parentResized(QSize)));
m_downloading = true;
m_timer.start(1000*1, this);
@@ -97,6 +100,13 @@ DownloadItem::DownloadItem(QListWidgetItem* item, QNetworkReply* reply, QString
}
}
+void DownloadItem::parentResized(const QSize &size)
+{
+ if (size.width() < 200)
+ return;
+ setMaximumWidth(size.width());
+}
+
void DownloadItem::metaDataChanged()
{
// http://www.olympus.cz/consumer/images/XD-Picture_card_1GB_Hand_CROP(1).jpg
@@ -278,7 +288,7 @@ void DownloadItem::mouseDoubleClickEvent(QMouseEvent* e)
e->accept();
}
-void DownloadItem::customContextMenuRequested(QPoint pos)
+void DownloadItem::customContextMenuRequested(const QPoint &pos)
{
QMenu menu;
menu.addAction(QIcon::fromTheme("document-open"), tr("Open File"), this, SLOT(openFile()));
diff --git a/src/downloads/downloaditem.h b/src/downloads/downloaditem.h
index e8aab6602..d9281e99b 100644
--- a/src/downloads/downloaditem.h
+++ b/src/downloads/downloaditem.h
@@ -59,6 +59,7 @@ signals:
void downloadFinished(bool success);
private slots:
+ void parentResized(const QSize &size);
void finished();
void metaDataChanged();
void downloadProgress(qint64 received, qint64 total);
@@ -68,7 +69,7 @@ private slots:
void readyRead();
void error(QNetworkReply::NetworkError);
void updateDownload();
- void customContextMenuRequested(QPoint pos);
+ void customContextMenuRequested(const QPoint &pos);
void clear();
void goToDownloadPage();
diff --git a/src/downloads/downloadmanager.cpp b/src/downloads/downloadmanager.cpp
index d3440fa49..487e49dd1 100644
--- a/src/downloads/downloadmanager.cpp
+++ b/src/downloads/downloadmanager.cpp
@@ -30,6 +30,7 @@ DownloadManager::DownloadManager(QWidget* parent) :
,ui(new Ui::DownloadManager)
,m_isClosing(false)
{
+ setWindowFlags(windowFlags() ^ Qt::WindowMaximizeButtonHint);
ui->setupUi(this);
#ifdef Q_WS_WIN
if (QtWin::isCompositionEnabled())
@@ -44,20 +45,38 @@ DownloadManager::DownloadManager(QWidget* parent) :
m_iconProvider = new QFileIconProvider();
m_networkManager = mApp->networkManager();
- QSettings settings(mApp->getActiveProfil()+"settings.ini", QSettings::IniFormat);
- settings.beginGroup("DownloadManager");
- m_downloadPath = settings.value("defaultDownloadPath", "").toString();
- m_lastDownloadPath = settings.value("lastDownloadPath",QDir::homePath()+"/").toString();
- settings.endGroup();
-
connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clearList()));
+ loadSettings();
+
#ifdef W7API
if (QtWin::isRunningWindows7())
win7.init(this->winId());
#endif
}
+void DownloadManager::loadSettings()
+{
+ QSettings settings(mApp->getActiveProfil()+"settings.ini", QSettings::IniFormat);
+ settings.beginGroup("DownloadManager");
+ m_downloadPath = settings.value("defaultDownloadPath", "").toString();
+ m_lastDownloadPath = settings.value("lastDownloadPath",QDir::homePath()+"/").toString();
+ m_useNativeDialog = settings.value("useNativeDialog",
+ #ifdef Q_WS_WIN
+ false
+ #else
+ true
+ #endif
+ ).toBool();
+ settings.endGroup();
+}
+
+void DownloadManager::resizeEvent(QResizeEvent *e)
+{
+ QWidget::resizeEvent(e);
+ emit resized(size());
+}
+
#ifdef W7API
bool DownloadManager::winEvent(MSG* message, long* result)
{
@@ -182,17 +201,17 @@ void DownloadManager::optionsDialogAccepted(int finish)
if (!m_hOpenFileChoosed) {
if (m_downloadPath.isEmpty()) {
-#ifdef Q_WS_WIN //Well, poor Windows users will use non-native file dialog for downloads
- QFileDialog* dialog = new QFileDialog(mApp->getWindow());
- dialog->setAttribute(Qt::WA_DeleteOnClose);
- dialog->setWindowTitle(tr("Save file as..."));
- dialog->setDirectory(m_lastDownloadPath);
- dialog->selectFile(m_h_fileName);
- dialog->show();
- connect(dialog, SIGNAL(fileSelected(QString)), this, SLOT(fileNameChoosed(QString)));
-#else
- fileNameChoosed(QFileDialog::getSaveFileName(mApp->getWindow(), tr("Save file as..."), m_lastDownloadPath + m_h_fileName));
-#endif
+ if (m_useNativeDialog) {
+ fileNameChoosed(QFileDialog::getSaveFileName(mApp->getWindow(), tr("Save file as..."), m_lastDownloadPath + m_h_fileName));
+ } else {
+ QFileDialog* dialog = new QFileDialog(mApp->getWindow());
+ dialog->setAttribute(Qt::WA_DeleteOnClose);
+ dialog->setWindowTitle(tr("Save file as..."));
+ dialog->setDirectory(m_lastDownloadPath);
+ dialog->selectFile(m_h_fileName);
+ dialog->show();
+ connect(dialog, SIGNAL(fileSelected(QString)), this, SLOT(fileNameChoosed(QString)));
+ }
}
else
fileNameChoosed(m_downloadPath + m_h_fileName);
diff --git a/src/downloads/downloadmanager.h b/src/downloads/downloadmanager.h
index 25c1863fb..12c54983a 100644
--- a/src/downloads/downloadmanager.h
+++ b/src/downloads/downloadmanager.h
@@ -53,6 +53,8 @@ public:
explicit DownloadManager(QWidget* parent = 0);
~DownloadManager();
+ void loadSettings();
+
void download(const QNetworkRequest &request, bool askWhatToDo = true);
void handleUnsupportedContent(QNetworkReply* reply, bool askWhatToDo = true);
bool canClose();
@@ -73,6 +75,9 @@ private slots:
void optionsDialogAccepted(int finish);
void fileNameChoosed(const QString &name = "");
+signals:
+ void resized(QSize);
+
private:
#ifdef W7API
EcWin7 win7;
@@ -80,6 +85,7 @@ private:
void timerEvent(QTimerEvent* event);
QString getFileName(QNetworkReply* reply);
void closeEvent(QCloseEvent* e);
+ void resizeEvent(QResizeEvent *e);
Ui::DownloadManager* ui;
NetworkManager* m_networkManager;
@@ -87,6 +93,8 @@ private:
QString m_lastDownloadPath;
QString m_downloadPath;
+ bool m_useNativeDialog;
+
QBasicTimer m_timer;
bool m_isClosing;
diff --git a/src/downloads/downloadmanager.ui b/src/downloads/downloadmanager.ui
index db6575caa..11373d389 100644
--- a/src/downloads/downloadmanager.ui
+++ b/src/downloads/downloadmanager.ui
@@ -6,10 +6,16 @@
0
0
- 529
+ 525
315
+
+
+ 300
+ 0
+
+
Download Manager
@@ -38,6 +44,9 @@
border: none;
+
+ Qt::ScrollBarAlwaysOff
+
true
diff --git a/src/navigation/websearchbar.cpp b/src/navigation/websearchbar.cpp
index 22f904b1b..6f382fa4e 100644
--- a/src/navigation/websearchbar.cpp
+++ b/src/navigation/websearchbar.cpp
@@ -27,7 +27,7 @@ WebSearchBar::WebSearchBar(QupZilla* mainClass, QWidget* parent)
m_buttonSearch = new ClickableLabel(this);
m_buttonSearch->setPixmap(QPixmap(":/icons/locationbar/search.png"));
m_buttonSearch->setCursor(QCursor(Qt::PointingHandCursor));
- m_buttonSearch->setStyleSheet("QLabel{margin-bottom:1px;}");
+ m_buttonSearch->setStyleSheet("QLabel{margin-bottom:2px;}");
m_buttonSearch->setFocusPolicy(Qt::ClickFocus);
m_boxSearchType = new QToolButton(this);
diff --git a/src/preferences/preferences.cpp b/src/preferences/preferences.cpp
index 6ebb1e358..1b5252c4d 100644
--- a/src/preferences/preferences.cpp
+++ b/src/preferences/preferences.cpp
@@ -216,6 +216,13 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) :
//DOWNLOADS
settings.beginGroup("DownloadManager");
ui->downLoc->setText( settings.value("defaultDownloadPath","").toString() );
+ ui->downlaodNativeSystemDialog->setChecked( settings.value("useNativeDialog",
+#ifdef Q_WS_WIN
+ false
+#else
+ true
+#endif
+ ).toBool() );
if (ui->downLoc->text().isEmpty())
ui->askEverytime->setChecked(true);
else
@@ -614,6 +621,7 @@ void Preferences::saveSettings()
#endif
settings.setValue("defaultDownloadPath",text);
}
+ settings.setValue("useNativeDialog", ui->downlaodNativeSystemDialog->isChecked());
settings.endGroup();
//FONTS
diff --git a/src/preferences/preferences.ui b/src/preferences/preferences.ui
index 0831b02cf..0996086c2 100644
--- a/src/preferences/preferences.ui
+++ b/src/preferences/preferences.ui
@@ -228,7 +228,7 @@
Qt::NoFocus
- 0
+ 5
@@ -1424,7 +1424,7 @@
-
- <b>Downloads</b>
+ <b>Download Location</b>
@@ -1456,7 +1456,7 @@
- -
+
-
Qt::Vertical
@@ -1498,6 +1498,21 @@
+ -
+
+
+ <b>Download Options</b>
+
+
+
+ -
+
+
+ Use native system file dialog
+(may or may not cause problems with downloading SSL secured content)
+
+
+
diff --git a/translations/cs_CZ.ts b/translations/cs_CZ.ts
index cbc210a48..930c936a9 100644
--- a/translations/cs_CZ.ts
+++ b/translations/cs_CZ.ts
@@ -933,50 +933,50 @@ nebyl nalezen!
DownloadManager
-
+
%1% z %2 souborů (%3) %4 zbyvá
-
+
% - Správce stahování
-
-
+
+
Uložit soubor jako...
-
+
Stahování dokončeno
-
+
Všechna stahování byla úspěšně dokončena.
-
+
Varování
-
+
Jste si jistý že chcete skončit? Všechna nedokončená stahování budou zrušena!
-
+
BezNazvu
-
-
+
+
Správce stahování
@@ -1186,12 +1186,12 @@ nebyl nalezen!
MainApplication
-
+
Poslední relace spadla
-
+
<b>QupZilla spadla :-(</b><br/>Oops, poslední relace QupZilly skončila jejím pádem. Velice se omlouváme. Přejete si obnovit uložený stav?
@@ -1458,11 +1458,6 @@ nebyl nalezen!
50 MB
-
-
-
- <b>Stahování</b>
-
@@ -1474,7 +1469,7 @@ nebyl nalezen!
Povolit ukládání cache na disk
-
+
<b>Cookies</b>
@@ -1484,7 +1479,7 @@ nebyl nalezen!
<b>Chování adresního řádku</b>
-
+
<b>Jazyk</b>
@@ -1718,6 +1713,11 @@ nebyl nalezen!
<b>Velikosti písem</b>
+
+
+
+ <b>Cíl stahování</b>
+
@@ -1730,52 +1730,64 @@ nebyl nalezen!
-
+
...
-
+
+
+ <b>Možnosti stahování</b>
+
+
+
+
+ Použít nativní systémový dialog pro výběr souboru
+(může ale také nemusí dělat problémy při stahování SSL zabezpečeného obsahu)
+
+
+
<b>Oznámení</b>
-
+
Používat OSD oznámení
-
+
Používat nativní systémové oznámení (pouze Linux)
-
+
Nepoužívat oznámení
-
+
Doba:
-
+
sekund
-
+
<b>Poznámka: </b> Můžete změnit pozici OSD oznámení na obrazovce jejím přetažením.
-
+
<b>Uživatelský CSS styl</b>
-
+
Styl, automaticky načítán ke všem stránkám:
@@ -1865,12 +1877,12 @@ nebyl nalezen!
Správce hesel
-
+
<b>Možnosti doplňování</b>
-
+
Povolit ukládání hesel ze stránek
@@ -1880,32 +1892,32 @@ nebyl nalezen!
Soukromí
-
+
Filtrovat sledovací cookies
-
+
Povolit přijímání cookies
-
+
Vymazat cookies při zavření prohlížeče
-
+
Vyžadovat přesnou shodu domény
-
+
<b>Upozornění:</b> Možnosti vyžadovat přesnou shodu domény a filtrovat sledovací cookies mohou vést k odmítnutí některých cookies. Pokud máte problémy s cookies, zkuste nejdříve tyto možnosti zakázat!
-
+
Správce cookies
@@ -1946,78 +1958,78 @@ nebyl nalezen!
Přidat .cz doménu stísknutím ALT klávesy
-
+
Správce certifikátů
-
+
Dostupné překlady:
-
+
Ke změně jazyka je nutný restart prohlížeče.
-
+
OSD Oznámení
-
+
Přetáhněte ho na obrazovce na místo, na kterém jej chcete mít.
-
+
Vyberte složku pro stahování...
-
+
-
+
Vyberte umístění stylu...
-
+
Nový profil
-
+
Zvolte jméno nového profilu:
-
-
+
+
Chyba!
-
+
Tento profil již existuje!
-
+
Nemohu vytvořit složku profilu!
-
+
Potvrzení
-
+
Jste si jisti že chcete permanentně smazat profil "%1"? Tato akce nelze vrátit zpět!
@@ -3264,92 +3276,97 @@ Prosím přidejte si nějaký kliknutím na RSS ikonku v navigačním řádku.
WebPage
-
+
Pro zobrazení této stránky musí QupZilla znovu odeslat požadavek na server
(jako např. hledaní při nakupování, které již bylo provedeno.)
-
+
Server odmítl spojení
-
+
Server ukončil spojení
-
+
Server nenalezen
-
+
Spojení vypršelo
-
+
Nedůvěryhodné spojení
-
+
AdBlock obsah
-
+
Blokováno pravidlem <i>%1</i>
-
+
Odmítnut přístup k obsahu
-
+
Neznámá chyba
-
+
Chybový kód %1
-
+
Chyba při načítání stránky
-
+
QupZilla nemůže načíst stránku ze serveru %1.
-
+
Zkontrolujte, zda je adresa napsána správně a neobsahuje chyby jako <b>ww.</b>server.cz místo <b>www</b>.server.cz
-
+
Pokud se vám nezobrazují ani ostatní stránky, zkontrolujte síťové připojení svého počítače.
-
+
Pokud je váš počítač chráněn firewallem a nebo proxy serverem, zkontrolujte, zda má QupZilla přístup na Internet.
-
+
Zkusit znovu
+
+
+
+ Vyberte soubor...
+
WebView
diff --git a/translations/sk_SK.ts b/translations/sk_SK.ts
index a77fe0f6f..99b0a3ea0 100644
--- a/translations/sk_SK.ts
+++ b/translations/sk_SK.ts
@@ -936,50 +936,50 @@ p, li { white-space: pre-wrap; }
DownloadManager
-
+
%1% z %2 súborov (%3) %4 zostávajú
-
+
% - Správca sťahovania
-
-
+
+
Uložiť súbor ako...
-
+
Sťahovanie dokončené
-
+
-
+
Upozornenie
-
+
Ste si istý, že chcete skončiť? Všetky nedokončené sťahovania budú zrušene!
-
+
BezNázvu
-
-
+
+
Správca sťahovania
@@ -1188,12 +1188,12 @@ p, li { white-space: pre-wrap; }
MainApplication
-
+
Posledná relácia spadla
-
+
<b>QupZilla spadla :-(</b><br/>Oops, posledná relácia QupZilly skončila chybou. Prepáčte. Chcete obnoviť uložený stav?
@@ -1474,18 +1474,13 @@ p, li { white-space: pre-wrap; }
<b>Navigačný panel</b>
-
-
-
- <b>Sťahovanie</b>
-
Povoliť ukladanie sieťovej cache na disk
-
+
<b>Cookies</b>
@@ -1495,7 +1490,7 @@ p, li { white-space: pre-wrap; }
<b>Chovanie adresového riadku</b>
-
+
<b>Jazyk</b>
@@ -1597,7 +1592,7 @@ p, li { white-space: pre-wrap; }
-
+
...
@@ -1637,12 +1632,12 @@ p, li { white-space: pre-wrap; }
Správca hesiel
-
+
<b>Možnosťi doplňovania</b>
-
+
Povoliť ukladanie hesiel zo stránok
@@ -1792,77 +1787,93 @@ p, li { white-space: pre-wrap; }
<b>Veľkosti písmen</b>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Filtrovať sledovacie cookies
-
+
Povoliť prijímanie cookies
-
+
Vymazať cookies pri zavrení prehliadača
-
+
Požadovať presnú zhodu domény
-
+
<b>Upozornenie:</b> Možnosti požadovanie presnej zhody domény a filtrovať sledovacie cookies môžú viesť k odmietnutiu niektorých cookies zo stránok. Ak máte problémy s cookies, skuste tieto možnosti najskôr zakázať!
-
+
Správca cookies
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1948,78 +1959,78 @@ p, li { white-space: pre-wrap; }
Pridať .sk doménu stlačením ALT klávesy
-
+
Správca SSL
-
+
Dostupné preklady:
-
+
K zmene jazyku je potrebný reštart prehliadača.
-
+
-
+
-
+
Vyberte zložku pre sťahovanie...
-
+
Zvoľte lokáciu pozadia...
-
+
-
+
Nový profil
-
+
Zadajte nové meno profilu:
-
-
+
+
Chyba!
-
+
Tento profil už existuje!
-
+
Nemožno vytvoriť zložku profilu!
-
+
Potvrdenie
-
+
Ste si istý, že chcete permanentne zmazať profil "%1"? Táto akcia sa nebude dať vrátiť späť!
@@ -3264,91 +3275,96 @@ Prosím pridajte si nejaký kliknutím na RSS ikonku v navigačnom riadku.
WebPage
-
+
-
+
Server odmietol spojenie
-
+
Server ukončil spojenie
-
+
Server nebol nájdený
-
+
Spojenie vypršalo
-
+
Nedôveryhodné spojenie
-
+
AdBlock obsah
-
+
Blokováno pravidlom <i>%1</i>
-
+
Odmietnuť prístup k obsahu
-
+
Neznáma chyba
-
+
Chybový kód %1
-
+
Chyba pri načítaní stránky
-
+
QupZilla nemôže načítať stránku zo serveru %1.
-
+
Skontrolujte, či je adresa napísaná správne a neobsahuje chyby ako <b>ww.</b>server.sk miesto <b>www.</b>server.sk
-
+
Pokiaľ sa vám nezobrazujú ani ostatné stránky, tak skontrolujte sieťové pripojenie svojho počítača.
-
+
Pokiaľ je váš počítač chránený firewallom alebo proxy severom, tak skontrolujte či má QupZilla prístup na internet.
-
+
Skúsiť znova
+
+
+
+
+
WebView