Fixes for toolbar editor.
This commit is contained in:
parent
06848eea13
commit
b95ca5c259
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
Fixed:
|
Fixed:
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>List of actions in toolbar editor now do not allow copying of items.</li>
|
||||||
<li>Keyboard search for message list should now work with Qt 4.</li>
|
<li>Keyboard search for message list should now work with Qt 4.</li>
|
||||||
<li>Overall code cleanups and refactoring primarily in area of feed/message models and recycle bin functionality.</li>
|
<li>Overall code cleanups and refactoring primarily in area of feed/message models and recycle bin functionality.</li>
|
||||||
<li>Fixed bug #66, #67, #69, #64.</li>
|
<li>Fixed bug #66, #67, #69, #64.</li>
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
#include <QNetworkProxy>
|
#include <QNetworkProxy>
|
||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QKeyEvent>
|
||||||
|
|
||||||
|
|
||||||
FormSettings::FormSettings(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormSettings) {
|
FormSettings::FormSettings(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormSettings) {
|
||||||
@ -54,6 +55,11 @@ FormSettings::FormSettings(QWidget *parent) : QDialog(parent), m_ui(new Ui::Form
|
|||||||
setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
|
setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
|
||||||
setWindowIcon(qApp->icons()->fromTheme("application-settings"));
|
setWindowIcon(qApp->icons()->fromTheme("application-settings"));
|
||||||
|
|
||||||
|
m_ui->m_editorMessagesToolbar->activeItemsWidget()->viewport()->installEventFilter(this);
|
||||||
|
m_ui->m_editorFeedsToolbar->activeItemsWidget()->viewport()->installEventFilter(this);
|
||||||
|
m_ui->m_editorMessagesToolbar->availableItemsWidget()->viewport()->installEventFilter(this);
|
||||||
|
m_ui->m_editorFeedsToolbar->availableItemsWidget()->viewport()->installEventFilter(this);
|
||||||
|
|
||||||
#if !defined(Q_OS_WIN)
|
#if !defined(Q_OS_WIN)
|
||||||
MessageBox::iconify(m_ui->m_buttonBox);
|
MessageBox::iconify(m_ui->m_buttonBox);
|
||||||
#endif
|
#endif
|
||||||
@ -784,3 +790,18 @@ void FormSettings::saveInterface() {
|
|||||||
qApp->mainForm()->tabWidget()->checkTabBarVisibility();
|
qApp->mainForm()->tabWidget()->checkTabBarVisibility();
|
||||||
qApp->mainForm()->tabWidget()->feedMessageViewer()->refreshVisualProperties();
|
qApp->mainForm()->tabWidget()->feedMessageViewer()->refreshVisualProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool FormSettings::eventFilter(QObject *obj, QEvent *e) {
|
||||||
|
Q_UNUSED(obj)
|
||||||
|
|
||||||
|
if (e->type() == QEvent::Drop) {
|
||||||
|
QDropEvent *drop_event = static_cast<QDropEvent*>(e);
|
||||||
|
|
||||||
|
if (drop_event->keyboardModifiers() != Qt::NoModifier) {
|
||||||
|
drop_event->setDropAction(Qt::MoveAction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@ -49,6 +49,8 @@ class FormSettings : public QDialog {
|
|||||||
// Does check of controls before dialog can be submitted.
|
// Does check of controls before dialog can be submitted.
|
||||||
bool doSaveCheck();
|
bool doSaveCheck();
|
||||||
|
|
||||||
|
bool eventFilter(QObject *obj, QEvent *e);
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
// Displays "restart" dialog if some critical settings changed.
|
// Displays "restart" dialog if some critical settings changed.
|
||||||
void promptForRestart();
|
void promptForRestart();
|
||||||
@ -97,4 +99,6 @@ class FormSettings : public QDialog {
|
|||||||
QStringList m_changedDataTexts;
|
QStringList m_changedDataTexts;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // FORMSETTINGS_H
|
#endif // FORMSETTINGS_H
|
||||||
|
@ -14,10 +14,86 @@
|
|||||||
<string>Settings</string>
|
<string>Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QListWidget" name="m_listSettings">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>220</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>220</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="showDropIndicator" stdset="0">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="movement">
|
||||||
|
<enum>QListView::Static</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionRectVisible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="currentRow">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string extracomment="General settings section.">General</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Data storage</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Keyboard shortcuts</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>User interface</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string extracomment="Language settings section.">Language</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Web browser & proxy</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Feeds & messages</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="QDialogButtonBox" name="m_buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QStackedWidget" name="m_stackedSettings">
|
<widget class="QStackedWidget" name="m_stackedSettings">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="m_pageGeneral">
|
<widget class="QWidget" name="m_pageGeneral">
|
||||||
<layout class="QFormLayout" name="formLayout_5">
|
<layout class="QFormLayout" name="formLayout_5">
|
||||||
@ -353,7 +429,7 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
<enum>QTabWidget::North</enum>
|
<enum>QTabWidget::North</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="m_tabIconSkin">
|
<widget class="QWidget" name="m_tabIconSkin">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -1201,82 +1277,6 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QDialogButtonBox" name="m_buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QListWidget" name="m_listSettings">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>220</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>220</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="showDropIndicator" stdset="0">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="movement">
|
|
||||||
<enum>QListView::Static</enum>
|
|
||||||
</property>
|
|
||||||
<property name="selectionRectVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="currentRow">
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string extracomment="General settings section.">General</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Data storage</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Keyboard shortcuts</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>User interface</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string extracomment="Language settings section.">Language</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Web browser & proxy</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Feeds & messages</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
@ -41,6 +41,14 @@ class ToolBarEditor : public QWidget {
|
|||||||
void loadFromToolBar(BaseToolBar *tool_bar);
|
void loadFromToolBar(BaseToolBar *tool_bar);
|
||||||
void saveToolBar();
|
void saveToolBar();
|
||||||
|
|
||||||
|
inline QListWidget *activeItemsWidget() {
|
||||||
|
return m_ui->m_listActivatedActions;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QListWidget *availableItemsWidget() {
|
||||||
|
return m_ui->m_listAvailableActions;
|
||||||
|
}
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// Insert common controls.
|
// Insert common controls.
|
||||||
void insertSpacer();
|
void insertSpacer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user