Some changes.
This commit is contained in:
parent
8025455851
commit
b959e70539
@ -349,7 +349,6 @@ set(APP_SOURCES
|
|||||||
src/gui/feedstoolbar.cpp
|
src/gui/feedstoolbar.cpp
|
||||||
src/gui/toolbareditor.cpp
|
src/gui/toolbareditor.cpp
|
||||||
src/gui/messagessearchlineedit.cpp
|
src/gui/messagessearchlineedit.cpp
|
||||||
src/gui/formexport.cpp
|
|
||||||
|
|
||||||
# DYNAMIC-SHORTCUTS sources.
|
# DYNAMIC-SHORTCUTS sources.
|
||||||
src/dynamic-shortcuts/shortcutcatcher.cpp
|
src/dynamic-shortcuts/shortcutcatcher.cpp
|
||||||
@ -432,7 +431,6 @@ set(APP_HEADERS
|
|||||||
src/gui/feedstoolbar.h
|
src/gui/feedstoolbar.h
|
||||||
src/gui/toolbareditor.h
|
src/gui/toolbareditor.h
|
||||||
src/gui/messagessearchlineedit.h
|
src/gui/messagessearchlineedit.h
|
||||||
src/gui/formexport.h
|
|
||||||
|
|
||||||
# DYNAMIC-SHORTCUTS headers.
|
# DYNAMIC-SHORTCUTS headers.
|
||||||
src/dynamic-shortcuts/dynamicshortcutswidget.h
|
src/dynamic-shortcuts/dynamicshortcutswidget.h
|
||||||
@ -475,7 +473,6 @@ set(APP_FORMS
|
|||||||
src/gui/formcategorydetails.ui
|
src/gui/formcategorydetails.ui
|
||||||
src/gui/formfeeddetails.ui
|
src/gui/formfeeddetails.ui
|
||||||
src/gui/toolbareditor.ui
|
src/gui/toolbareditor.ui
|
||||||
src/gui/formexport.ui
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# APP translations.
|
# APP translations.
|
||||||
|
@ -139,6 +139,11 @@ int FeedsModel::rowCount(const QModelIndex &parent) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FeedsModel::exportToFile(FeedsModel::ExternalFeedsFileType type, QByteArray &result) {
|
||||||
|
// TODO: POkračovat tady.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool FeedsModel::removeItem(const QModelIndex &index) {
|
bool FeedsModel::removeItem(const QModelIndex &index) {
|
||||||
if (index.isValid()) {
|
if (index.isValid()) {
|
||||||
QModelIndex parent_index = index.parent();
|
QModelIndex parent_index = index.parent();
|
||||||
@ -171,7 +176,7 @@ bool FeedsModel::addCategory(FeedsModelCategory *category,
|
|||||||
// Now, add category to persistent storage.
|
// Now, add category to persistent storage.
|
||||||
// Children are removed, remove this standard category too.
|
// Children are removed, remove this standard category too.
|
||||||
QSqlDatabase database = qApp->database()->connection(objectName(),
|
QSqlDatabase database = qApp->database()->connection(objectName(),
|
||||||
DatabaseFactory::FromSettings);
|
DatabaseFactory::FromSettings);
|
||||||
QSqlQuery query_add(database);
|
QSqlQuery query_add(database);
|
||||||
|
|
||||||
query_add.setForwardOnly(true);
|
query_add.setForwardOnly(true);
|
||||||
@ -213,7 +218,7 @@ bool FeedsModel::addCategory(FeedsModelCategory *category,
|
|||||||
bool FeedsModel::editCategory(FeedsModelCategory *original_category,
|
bool FeedsModel::editCategory(FeedsModelCategory *original_category,
|
||||||
FeedsModelCategory *new_category) {
|
FeedsModelCategory *new_category) {
|
||||||
QSqlDatabase database = qApp->database()->connection(objectName(),
|
QSqlDatabase database = qApp->database()->connection(objectName(),
|
||||||
DatabaseFactory::FromSettings);
|
DatabaseFactory::FromSettings);
|
||||||
QSqlQuery query_update_category(database);
|
QSqlQuery query_update_category(database);
|
||||||
FeedsModelRootItem *original_parent = original_category->parent();
|
FeedsModelRootItem *original_parent = original_category->parent();
|
||||||
FeedsModelRootItem *new_parent = new_category->parent();
|
FeedsModelRootItem *new_parent = new_category->parent();
|
||||||
@ -273,8 +278,7 @@ bool FeedsModel::addFeed(FeedsModelFeed *feed,
|
|||||||
|
|
||||||
// Now, add category to persistent storage.
|
// Now, add category to persistent storage.
|
||||||
// Children are removed, remove this standard category too.
|
// Children are removed, remove this standard category too.
|
||||||
QSqlDatabase database = qApp->database()->connection(objectName(),
|
QSqlDatabase database = qApp->database()->connection(objectName(), DatabaseFactory::FromSettings);
|
||||||
DatabaseFactory::FromSettings);
|
|
||||||
QSqlQuery query_add_feed(database);
|
QSqlQuery query_add_feed(database);
|
||||||
|
|
||||||
query_add_feed.setForwardOnly(true);
|
query_add_feed.setForwardOnly(true);
|
||||||
@ -312,8 +316,7 @@ bool FeedsModel::addFeed(FeedsModelFeed *feed,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Category was added to the persistent storage,
|
// Category was added to the persistent storage so add it to the model.
|
||||||
// so add it to the model.
|
|
||||||
beginInsertRows(parent_index, parent->childCount(), parent->childCount());
|
beginInsertRows(parent_index, parent->childCount(), parent->childCount());
|
||||||
parent->appendChild(feed);
|
parent->appendChild(feed);
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
@ -324,7 +327,7 @@ bool FeedsModel::addFeed(FeedsModelFeed *feed,
|
|||||||
bool FeedsModel::editFeed(FeedsModelFeed *original_feed,
|
bool FeedsModel::editFeed(FeedsModelFeed *original_feed,
|
||||||
FeedsModelFeed *new_feed) {
|
FeedsModelFeed *new_feed) {
|
||||||
QSqlDatabase database = qApp->database()->connection(objectName(),
|
QSqlDatabase database = qApp->database()->connection(objectName(),
|
||||||
DatabaseFactory::FromSettings);
|
DatabaseFactory::FromSettings);
|
||||||
QSqlQuery query_update_feed(database);
|
QSqlQuery query_update_feed(database);
|
||||||
FeedsModelRootItem *original_parent = original_feed->parent();
|
FeedsModelRootItem *original_parent = original_feed->parent();
|
||||||
FeedsModelRootItem *new_parent = new_feed->parent();
|
FeedsModelRootItem *new_parent = new_feed->parent();
|
||||||
@ -437,7 +440,7 @@ QList<Message> FeedsModel::messagesForFeeds(const QList<FeedsModelFeed*> &feeds)
|
|||||||
QList<Message> messages;
|
QList<Message> messages;
|
||||||
|
|
||||||
QSqlDatabase database = qApp->database()->connection(objectName(),
|
QSqlDatabase database = qApp->database()->connection(objectName(),
|
||||||
DatabaseFactory::FromSettings);
|
DatabaseFactory::FromSettings);
|
||||||
QSqlQuery query_read_msg(database);
|
QSqlQuery query_read_msg(database);
|
||||||
query_read_msg.setForwardOnly(true);
|
query_read_msg.setForwardOnly(true);
|
||||||
query_read_msg.prepare("SELECT title, url, author, date_created, contents "
|
query_read_msg.prepare("SELECT title, url, author, date_created, contents "
|
||||||
@ -572,7 +575,7 @@ void FeedsModel::loadFromDatabase() {
|
|||||||
m_rootItem->clearChildren();
|
m_rootItem->clearChildren();
|
||||||
|
|
||||||
QSqlDatabase database = qApp->database()->connection(objectName(),
|
QSqlDatabase database = qApp->database()->connection(objectName(),
|
||||||
DatabaseFactory::FromSettings);
|
DatabaseFactory::FromSettings);
|
||||||
CategoryAssignment categories;
|
CategoryAssignment categories;
|
||||||
FeedAssignment feeds;
|
FeedAssignment feeds;
|
||||||
|
|
||||||
@ -672,7 +675,7 @@ QList<FeedsModelFeed*> FeedsModel::feedsForIndexes(const QModelIndexList &indexe
|
|||||||
bool FeedsModel::markFeedsRead(const QList<FeedsModelFeed*> &feeds,
|
bool FeedsModel::markFeedsRead(const QList<FeedsModelFeed*> &feeds,
|
||||||
int read) {
|
int read) {
|
||||||
QSqlDatabase db_handle = qApp->database()->connection(objectName(),
|
QSqlDatabase db_handle = qApp->database()->connection(objectName(),
|
||||||
DatabaseFactory::FromSettings);
|
DatabaseFactory::FromSettings);
|
||||||
|
|
||||||
if (!db_handle.transaction()) {
|
if (!db_handle.transaction()) {
|
||||||
qWarning("Starting transaction for feeds read change.");
|
qWarning("Starting transaction for feeds read change.");
|
||||||
@ -710,7 +713,7 @@ bool FeedsModel::markFeedsDeleted(const QList<FeedsModelFeed*> &feeds,
|
|||||||
int deleted,
|
int deleted,
|
||||||
bool read_only) {
|
bool read_only) {
|
||||||
QSqlDatabase db_handle = qApp->database()->connection(objectName(),
|
QSqlDatabase db_handle = qApp->database()->connection(objectName(),
|
||||||
DatabaseFactory::FromSettings);
|
DatabaseFactory::FromSettings);
|
||||||
|
|
||||||
if (!db_handle.transaction()) {
|
if (!db_handle.transaction()) {
|
||||||
qWarning("Starting transaction for feeds clearing.");
|
qWarning("Starting transaction for feeds clearing.");
|
||||||
|
@ -39,6 +39,10 @@ class FeedsModel : public QAbstractItemModel {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
enum ExternalFeedsFileType {
|
||||||
|
OMPL20
|
||||||
|
};
|
||||||
|
|
||||||
// Constructors and destructors.
|
// Constructors and destructors.
|
||||||
explicit FeedsModel(QObject *parent = 0);
|
explicit FeedsModel(QObject *parent = 0);
|
||||||
virtual ~FeedsModel();
|
virtual ~FeedsModel();
|
||||||
@ -68,6 +72,9 @@ class FeedsModel : public QAbstractItemModel {
|
|||||||
return m_rootItem->countOfUnreadMessages();
|
return m_rootItem->countOfUnreadMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Import/export.
|
||||||
|
bool exportToFile(ExternalFeedsFileType type, QByteArray &result);
|
||||||
|
|
||||||
// Removes item with given index.
|
// Removes item with given index.
|
||||||
bool removeItem(const QModelIndex &index);
|
bool removeItem(const QModelIndex &index);
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include "gui/messagebox.h"
|
#include "gui/messagebox.h"
|
||||||
#include "gui/messagestoolbar.h"
|
#include "gui/messagestoolbar.h"
|
||||||
#include "gui/feedstoolbar.h"
|
#include "gui/feedstoolbar.h"
|
||||||
#include "gui/formexport.h"
|
|
||||||
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QSplitter>
|
#include <QSplitter>
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
#include "formexport.h"
|
|
||||||
#include "ui_formexport.h"
|
|
||||||
|
|
||||||
FormExport::FormExport(QWidget *parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
ui(new Ui::FormExport)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
FormExport::~FormExport()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
#ifndef FORMEXPORT_H
|
|
||||||
#define FORMEXPORT_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class FormExport;
|
|
||||||
}
|
|
||||||
|
|
||||||
class FormExport : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit FormExport(QWidget *parent = 0);
|
|
||||||
~FormExport();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::FormExport *ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // FORMEXPORT_H
|
|
@ -1,68 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>FormExport</class>
|
|
||||||
<widget class="QDialog" name="FormExport">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>400</width>
|
|
||||||
<height>300</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Dialog</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QDialogButtonBox" name="m_buttonBox">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>50</x>
|
|
||||||
<y>250</y>
|
|
||||||
<width>341</width>
|
|
||||||
<height>32</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>m_buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>FormExport</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>248</x>
|
|
||||||
<y>254</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>m_buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>FormExport</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>316</x>
|
|
||||||
<y>260</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>286</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -58,8 +58,7 @@ FormFeedDetails::~FormFeedDetails() {
|
|||||||
|
|
||||||
int FormFeedDetails::exec(FeedsModelFeed *input_feed) {
|
int FormFeedDetails::exec(FeedsModelFeed *input_feed) {
|
||||||
// Load categories.
|
// Load categories.
|
||||||
loadCategories(m_feedsModel->allCategories().values(),
|
loadCategories(m_feedsModel->allCategories().values(), m_feedsModel->rootItem());
|
||||||
m_feedsModel->rootItem());
|
|
||||||
|
|
||||||
if (input_feed == NULL) {
|
if (input_feed == NULL) {
|
||||||
// User is adding new category.
|
// User is adding new category.
|
||||||
@ -226,17 +225,9 @@ void FormFeedDetails::apply() {
|
|||||||
accept();
|
accept();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (SystemTrayIcon::isSystemTrayActivated()) {
|
qApp->showGuiMessage(tr("Cannot add feed"),
|
||||||
qApp->trayIcon()->showMessage(tr("Cannot add feed"),
|
tr("Feed was not added due to error."),
|
||||||
tr("Feed was not added due to error."),
|
QSystemTrayIcon::Critical);
|
||||||
QSystemTrayIcon::Critical);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
MessageBox::show(this,
|
|
||||||
QMessageBox::Critical,
|
|
||||||
tr("Cannot add feed"),
|
|
||||||
tr("Feed was not added due to error."));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -245,17 +236,9 @@ void FormFeedDetails::apply() {
|
|||||||
accept();
|
accept();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (SystemTrayIcon::isSystemTrayActivated()) {
|
qApp->showGuiMessage(tr("Cannot edit feed"),
|
||||||
qApp->trayIcon()->showMessage(tr("Cannot edit feed"),
|
tr("Feed was not edit due to error."),
|
||||||
tr("Feed was not edited due to error."),
|
QSystemTrayIcon::Critical);
|
||||||
QSystemTrayIcon::Critical);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
MessageBox::show(this,
|
|
||||||
QMessageBox::Critical,
|
|
||||||
tr("Cannot edit feed"),
|
|
||||||
tr("Feed was not edited due to error."));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,16 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -39,7 +48,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>979</width>
|
<width>979</width>
|
||||||
<height>20</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="m_menuFile">
|
<widget class="QMenu" name="m_menuFile">
|
||||||
@ -183,7 +192,7 @@
|
|||||||
<string>Display settings of the application.</string>
|
<string>Display settings of the application.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true">Ctrl+Shift+S</string>
|
<string notr="true">Ctrl+S</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="m_actionAboutGuard">
|
<action name="m_actionAboutGuard">
|
||||||
|
@ -112,8 +112,6 @@ FormSettings::FormSettings(QWidget *parent) : QDialog(parent), m_ui(new Ui::Form
|
|||||||
this, SLOT(onProxyTypeChanged(int)));
|
this, SLOT(onProxyTypeChanged(int)));
|
||||||
connect(m_ui->m_checkShowPassword, SIGNAL(stateChanged(int)),
|
connect(m_ui->m_checkShowPassword, SIGNAL(stateChanged(int)),
|
||||||
this, SLOT(displayProxyPassword(int)));
|
this, SLOT(displayProxyPassword(int)));
|
||||||
connect(m_ui->m_btnWebBrowserColorSample, SIGNAL(clicked()),
|
|
||||||
this, SLOT(changeBrowserProgressColor()));
|
|
||||||
connect(m_ui->m_treeSkins, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
|
connect(m_ui->m_treeSkins, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
|
||||||
this, SLOT(onSkinSelected(QTreeWidgetItem*,QTreeWidgetItem*)));
|
this, SLOT(onSkinSelected(QTreeWidgetItem*,QTreeWidgetItem*)));
|
||||||
connect(m_ui->m_cmbExternalBrowserPreset, SIGNAL(currentIndexChanged(int)),
|
connect(m_ui->m_cmbExternalBrowserPreset, SIGNAL(currentIndexChanged(int)),
|
||||||
@ -171,20 +169,6 @@ void FormSettings::onSkinSelected(QTreeWidgetItem *current,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormSettings::changeBrowserProgressColor() {
|
|
||||||
QPointer<QColorDialog> color_dialog = new QColorDialog(m_initialSettings.m_webBrowserProgress,
|
|
||||||
this);
|
|
||||||
color_dialog.data()->setWindowTitle(tr("Select color for web browser progress bar"));
|
|
||||||
color_dialog.data()->setOption(QColorDialog::ShowAlphaChannel, false);
|
|
||||||
|
|
||||||
if (color_dialog.data()->exec() == QDialog::Accepted) {
|
|
||||||
m_initialSettings.m_webBrowserProgress = color_dialog.data()->selectedColor();
|
|
||||||
loadWebBrowserColor(m_initialSettings.m_webBrowserProgress);
|
|
||||||
}
|
|
||||||
|
|
||||||
delete color_dialog.data();
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormSettings::selectBrowserExecutable() {
|
void FormSettings::selectBrowserExecutable() {
|
||||||
QString executable_file = QFileDialog::getOpenFileName(this,
|
QString executable_file = QFileDialog::getOpenFileName(this,
|
||||||
tr("Select web browser executable"),
|
tr("Select web browser executable"),
|
||||||
@ -268,15 +252,8 @@ bool FormSettings::doSaveCheck() {
|
|||||||
return everything_ok;
|
return everything_ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormSettings::loadWebBrowserColor(const QColor &color) {
|
|
||||||
m_ui->m_btnWebBrowserColorSample->setStyleSheet(QString("QToolButton { background-color: rgba(%1, %2, %3, %4); }").arg(QString::number(color.red()),
|
|
||||||
QString::number(color.green()),
|
|
||||||
QString::number(color.blue()),
|
|
||||||
QString::number(color.alpha())));
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormSettings::promptForRestart() {
|
void FormSettings::promptForRestart() {
|
||||||
if (m_changedDataTexts.count() > 0) {
|
if (!m_changedDataTexts.isEmpty()) {
|
||||||
QStringList changed_settings_description = m_changedDataTexts.replaceInStrings(QRegExp("^"), QString::fromUtf8(" • "));
|
QStringList changed_settings_description = m_changedDataTexts.replaceInStrings(QRegExp("^"), QString::fromUtf8(" • "));
|
||||||
|
|
||||||
MessageBox::show(this,
|
MessageBox::show(this,
|
||||||
@ -332,21 +309,12 @@ void FormSettings::loadBrowser() {
|
|||||||
Settings *settings = qApp->settings();
|
Settings *settings = qApp->settings();
|
||||||
|
|
||||||
// Load settings of web browser GUI.
|
// Load settings of web browser GUI.
|
||||||
m_initialSettings.m_webBrowserProgress = QColor(settings->value(APP_CFG_BROWSER,
|
|
||||||
"browser_progress_color",
|
|
||||||
QColor(155, 250, 80)).toString());
|
|
||||||
m_ui->m_checkBrowserProgressColor->setChecked(settings->value(APP_CFG_BROWSER,
|
|
||||||
"browser_colored_progress_enabled",
|
|
||||||
true).toBool());
|
|
||||||
m_ui->m_checkMouseGestures->setChecked(settings->value(APP_CFG_BROWSER,
|
m_ui->m_checkMouseGestures->setChecked(settings->value(APP_CFG_BROWSER,
|
||||||
"gestures_enabled",
|
"gestures_enabled",
|
||||||
true).toBool());
|
true).toBool());
|
||||||
m_ui->m_checkQueueTabs->setChecked(settings->value(APP_CFG_BROWSER,
|
m_ui->m_checkQueueTabs->setChecked(settings->value(APP_CFG_BROWSER,
|
||||||
"queue_tabs",
|
"queue_tabs",
|
||||||
true).toBool());
|
true).toBool());
|
||||||
m_ui->m_btnWebBrowserColorSample->setMaximumHeight(m_ui->m_checkBrowserProgressColor->sizeHint().height());
|
|
||||||
loadWebBrowserColor(m_initialSettings.m_webBrowserProgress);
|
|
||||||
|
|
||||||
m_ui->m_cmbExternalBrowserPreset->addItem(tr("Opera 12 or older"), "-nosession %1");
|
m_ui->m_cmbExternalBrowserPreset->addItem(tr("Opera 12 or older"), "-nosession %1");
|
||||||
m_ui->m_txtExternalBrowserExecutable->setText(settings->value(APP_CFG_BROWSER,
|
m_ui->m_txtExternalBrowserExecutable->setText(settings->value(APP_CFG_BROWSER,
|
||||||
"external_browser_executable").toString());
|
"external_browser_executable").toString());
|
||||||
@ -368,12 +336,6 @@ void FormSettings::saveBrowser() {
|
|||||||
settings->setValue(APP_CFG_BROWSER,
|
settings->setValue(APP_CFG_BROWSER,
|
||||||
"custom_external_browser",
|
"custom_external_browser",
|
||||||
m_ui->m_grpCustomExternalBrowser->isChecked());
|
m_ui->m_grpCustomExternalBrowser->isChecked());
|
||||||
settings->setValue(APP_CFG_BROWSER,
|
|
||||||
"browser_progress_color",
|
|
||||||
m_initialSettings.m_webBrowserProgress.name());
|
|
||||||
settings->setValue(APP_CFG_BROWSER,
|
|
||||||
"browser_colored_progress_enabled",
|
|
||||||
m_ui->m_checkBrowserProgressColor->isChecked());
|
|
||||||
settings->setValue(APP_CFG_BROWSER,
|
settings->setValue(APP_CFG_BROWSER,
|
||||||
"gestures_enabled",
|
"gestures_enabled",
|
||||||
m_ui->m_checkMouseGestures->isChecked());
|
m_ui->m_checkMouseGestures->isChecked());
|
||||||
|
@ -31,12 +31,9 @@ namespace Ui {
|
|||||||
struct TemporarySettings {
|
struct TemporarySettings {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TemporarySettings()
|
TemporarySettings() : m_mysqlDataStorageChanged(false) {
|
||||||
: m_webBrowserProgress(QColor()),
|
|
||||||
m_mysqlDataStorageChanged(false) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor m_webBrowserProgress;
|
|
||||||
bool m_mysqlDataStorageChanged;
|
bool m_mysqlDataStorageChanged;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -84,8 +81,6 @@ class FormSettings : public QDialog {
|
|||||||
void saveBrowser();
|
void saveBrowser();
|
||||||
void changeDefaultBrowserArguments(int index);
|
void changeDefaultBrowserArguments(int index);
|
||||||
void selectBrowserExecutable();
|
void selectBrowserExecutable();
|
||||||
void changeBrowserProgressColor();
|
|
||||||
void loadWebBrowserColor(const QColor &color);
|
|
||||||
|
|
||||||
void loadProxy();
|
void loadProxy();
|
||||||
void saveProxy();
|
void saveProxy();
|
||||||
|
@ -728,7 +728,42 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="6" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="m_checkQueueTabs">
|
||||||
|
<property name="text">
|
||||||
|
<string>Queue new tabs (with hyperlinks) after the active tab</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="m_checkEnableJavascript">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable JavaScript</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="m_checkEnablePlugins">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable external plugins based on NPAPI</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="m_checkAutoLoadImages">
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto-load images</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="m_checkMouseGestures">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable mouse gestures</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="m_lblMouseGestures">
|
<widget class="QLabel" name="m_lblMouseGestures">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Mouse gestures work with middle mouse button. Possible gestures are:
|
<string>Mouse gestures work with middle mouse button. Possible gestures are:
|
||||||
@ -747,71 +782,6 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="m_checkMouseGestures">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable mouse gestures</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="m_checkQueueTabs">
|
|
||||||
<property name="text">
|
|
||||||
<string>Queue new tabs (with hyperlinks) after the active tab</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="m_checkBrowserProgressColor">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use custom color for web browser progress bar</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="m_btnWebBrowserColorSample">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="m_checkEnableJavascript">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable JavaScript</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QCheckBox" name="m_checkEnablePlugins">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable external plugins based on NPAPI</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QCheckBox" name="m_checkAutoLoadImages">
|
|
||||||
<property name="text">
|
|
||||||
<string>Auto-load images</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="m_tabExternalBrowser">
|
<widget class="QWidget" name="m_tabExternalBrowser">
|
||||||
@ -1361,22 +1331,6 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>m_checkBrowserProgressColor</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>m_btnWebBrowserColorSample</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>468</x>
|
|
||||||
<y>52</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>664</x>
|
|
||||||
<y>52</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>m_checkAutoUpdate</sender>
|
<sender>m_checkAutoUpdate</sender>
|
||||||
<signal>toggled(bool)</signal>
|
<signal>toggled(bool)</signal>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user