Skip to content

Commit 505af2c

Browse files
author
Martin Rotter
committed
fixed #438 and related stuff
1 parent 628ebae commit 505af2c

File tree

8 files changed

+24
-32
lines changed

8 files changed

+24
-32
lines changed

src/librssguard/gui/notifications/singlenotificationeditor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ SingleNotificationEditor::SingleNotificationEditor(const Notification& notificat
1212
m_ui.setupUi(this);
1313

1414
m_ui.m_btnBrowseSound->setIcon(qApp->icons()->fromTheme(QSL("document-open")));
15-
m_ui.m_btnClearSound->setIcon(qApp->icons()->fromTheme(QSL("edit-clear")));
1615
m_ui.m_btnPlaySound->setIcon(qApp->icons()->fromTheme(QSL("media-playback-start")));
1716

1817
loadNotification(notification);
1918

2019
connect(m_ui.m_btnPlaySound, &QPushButton::clicked, this, &SingleNotificationEditor::playSound);
2120
connect(m_ui.m_btnBrowseSound, &QPushButton::clicked, this, &SingleNotificationEditor::selectSoundFile);
22-
connect(m_ui.m_btnClearSound, &QPushButton::clicked, m_ui.m_txtSound, &QLineEdit::clear);
2321
connect(m_ui.m_txtSound, &QLineEdit::textChanged, this, &SingleNotificationEditor::notificationChanged);
2422
connect(m_ui.m_cbBalloon, &QCheckBox::toggled, this, &SingleNotificationEditor::notificationChanged);
2523

src/librssguard/gui/notifications/singlenotificationeditor.ui

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,12 @@
3636
<item row="1" column="1">
3737
<layout class="QHBoxLayout" name="horizontalLayout_2">
3838
<item>
39-
<widget class="QLineEdit" name="m_txtSound">
39+
<widget class="BaseLineEdit" name="m_txtSound">
4040
<property name="placeholderText">
4141
<string>Full path to your WAV sound file</string>
4242
</property>
4343
</widget>
4444
</item>
45-
<item>
46-
<widget class="QPushButton" name="m_btnClearSound">
47-
<property name="text">
48-
<string>&amp;Clear</string>
49-
</property>
50-
</widget>
51-
</item>
5245
<item>
5346
<widget class="QPushButton" name="m_btnBrowseSound">
5447
<property name="text">
@@ -74,10 +67,16 @@
7467
</item>
7568
</layout>
7669
</widget>
70+
<customwidgets>
71+
<customwidget>
72+
<class>BaseLineEdit</class>
73+
<extends>QLineEdit</extends>
74+
<header>baselineedit.h</header>
75+
</customwidget>
76+
</customwidgets>
7777
<tabstops>
7878
<tabstop>m_cbBalloon</tabstop>
7979
<tabstop>m_txtSound</tabstop>
80-
<tabstop>m_btnClearSound</tabstop>
8180
<tabstop>m_btnBrowseSound</tabstop>
8281
<tabstop>m_btnPlaySound</tabstop>
8382
</tabstops>

src/librssguard/gui/reusable/baselineedit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
#include <QKeyEvent>
66

7-
BaseLineEdit::BaseLineEdit(QWidget* parent) : QLineEdit(parent) {}
7+
BaseLineEdit::BaseLineEdit(QWidget* parent) : QLineEdit(parent) {
8+
setClearButtonEnabled(true);
9+
}
810

911
void BaseLineEdit::submit(const QString& text) {
1012
setText(text);

src/librssguard/gui/reusable/networkproxydetails.ui

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<item row="0" column="1">
3434
<layout class="QHBoxLayout" name="horizontalLayout_7">
3535
<item>
36-
<widget class="QLineEdit" name="m_txtProxyHost">
36+
<widget class="BaseLineEdit" name="m_txtProxyHost">
3737
<property name="enabled">
3838
<bool>true</bool>
3939
</property>
@@ -84,7 +84,7 @@
8484
</widget>
8585
</item>
8686
<item row="1" column="1">
87-
<widget class="QLineEdit" name="m_txtProxyUsername">
87+
<widget class="BaseLineEdit" name="m_txtProxyUsername">
8888
<property name="enabled">
8989
<bool>true</bool>
9090
</property>
@@ -107,7 +107,7 @@
107107
</widget>
108108
</item>
109109
<item row="2" column="1">
110-
<widget class="QLineEdit" name="m_txtProxyPassword">
110+
<widget class="BaseLineEdit" name="m_txtProxyPassword">
111111
<property name="enabled">
112112
<bool>true</bool>
113113
</property>
@@ -193,6 +193,13 @@
193193
</item>
194194
</layout>
195195
</widget>
196+
<customwidgets>
197+
<customwidget>
198+
<class>BaseLineEdit</class>
199+
<extends>QLineEdit</extends>
200+
<header>baselineedit.h</header>
201+
</customwidget>
202+
</customwidgets>
196203
<resources/>
197204
<connections/>
198205
</ui>

src/librssguard/gui/reusable/searchtextwidget.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ SearchTextWidget::SearchTextWidget(QWidget* parent) : QWidget(parent) {
1212
setFocusProxy(m_ui.m_txtSearch);
1313
setFixedHeight(28);
1414

15-
m_ui.m_btnClear->setIcon(qApp->icons()->fromTheme(QSL("edit-clear")));
1615
m_ui.m_btnSearchBackward->setIcon(qApp->icons()->fromTheme(QSL("back")));
1716
m_ui.m_btnSearchForward->setIcon(qApp->icons()->fromTheme(QSL("forward")));
1817

19-
connect(m_ui.m_btnClear, &QToolButton::clicked, m_ui.m_txtSearch, &QLineEdit::clear);
2018
connect(m_ui.m_txtSearch, &BaseLineEdit::textChanged, this, &SearchTextWidget::onTextChanged);
2119
connect(m_ui.m_txtSearch, &BaseLineEdit::submitted, this, [this]() {
2220
emit searchForText(m_ui.m_txtSearch->text(), false);
@@ -42,7 +40,6 @@ void SearchTextWidget::cancelSearch() {
4240
void SearchTextWidget::onTextChanged(const QString& text) {
4341
m_ui.m_btnSearchBackward->setDisabled(text.isEmpty());
4442
m_ui.m_btnSearchForward->setDisabled(text.isEmpty());
45-
m_ui.m_btnClear->setDisabled(text.isEmpty());
4643

4744
if (!text.isEmpty()) {
4845
emit searchForText(text, false);

src/librssguard/gui/reusable/searchtextwidget.ui

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>461</width>
10-
<height>25</height>
10+
<height>28</height>
1111
</rect>
1212
</property>
1313
<layout class="QHBoxLayout">
@@ -26,16 +26,6 @@
2626
<property name="bottomMargin">
2727
<number>3</number>
2828
</property>
29-
<item>
30-
<widget class="QToolButton" name="m_btnClear">
31-
<property name="toolTip">
32-
<string>Clear searched phrase</string>
33-
</property>
34-
<property name="text">
35-
<string/>
36-
</property>
37-
</widget>
38-
</item>
3929
<item>
4030
<widget class="BaseLineEdit" name="m_txtSearch">
4131
<property name="placeholderText">
@@ -86,7 +76,6 @@
8676
</customwidget>
8777
</customwidgets>
8878
<tabstops>
89-
<tabstop>m_btnClear</tabstop>
9079
<tabstop>m_txtSearch</tabstop>
9180
<tabstop>m_btnSearchBackward</tabstop>
9281
<tabstop>m_btnSearchForward</tabstop>

src/librssguard/gui/settings/settingsfeedsmessages.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@
264264
<item row="4" column="0" colspan="2">
265265
<widget class="QCheckBox" name="m_checkKeppMessagesInTheMiddle">
266266
<property name="text">
267-
<string>Keep message selection in the middle of the article list viewport</string>
267+
<string>Keep article selection in the middle of the article list viewport</string>
268268
</property>
269269
</widget>
270270
</item>

src/librssguard/gui/settings/settingsgui.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<item>
2727
<widget class="QTabWidget" name="m_tabUi">
2828
<property name="currentIndex">
29-
<number>1</number>
29+
<number>0</number>
3030
</property>
3131
<widget class="QWidget" name="m_tabIconSkin">
3232
<attribute name="title">

0 commit comments

Comments
 (0)