File tree 6 files changed +22
-1
lines changed
6 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1
1
0.17 (dev)
2
2
BugFix: Code for EndeavourOS news was incomplete (thanks to LegitGreenBoi).
3
3
BugFix: Help msg for newer packages was wrong because they're not installed.
4
+ Play a bell sound when the Terminal tab is asking for the user password.
4
5
Improvement: Show a "Collecting transaction data..." msg before presenting the transaction
5
6
dialog, as it can be quite slow on some systems (thanks to Valdir).
6
7
Updated translations.
Original file line number Diff line number Diff line change 4
4
#
5
5
# -------------------------------------------------
6
6
7
- QT += core gui network xml widgets
7
+ QT += core gui network xml widgets multimedia
8
8
DEFINES += OCTOPI_EXTENSIONS ALPM_BACKEND
9
9
10
10
# Disable automatic string conversions
Original file line number Diff line number Diff line change 98
98
<file>resources/translations/octopi_zh-Hans.qm</file>
99
99
<file>resources/translations/octopi_zh_CN.qm</file>
100
100
<file>resources/translations/octopi_ko.qm</file>
101
+ <file>resources/sounds/bell.wav</file>
101
102
</qresource>
102
103
</RCC>
Original file line number Diff line number Diff line change 28
28
#include < QMessageBox>
29
29
#include < QAbstractButton>
30
30
#include < QRegularExpression>
31
+ #include < QSoundEffect>
31
32
// #include <QDebug>
32
33
33
34
/*
@@ -142,6 +143,10 @@ void TermWidget::parseOutput(QString str)
142
143
{
143
144
emit onKeyQuit ();
144
145
}
146
+ else if (str.contains (QLatin1String (" password for " ) + QLatin1String (qgetenv (" USER" )) + QLatin1String (" :" )))
147
+ {
148
+ playBellSound ();
149
+ }
145
150
}
146
151
147
152
/*
@@ -214,6 +219,19 @@ void TermWidget::onZoomOut()
214
219
if (m_zoomFactor != 0 ) SettingsManager::setConsoleFontSize (m_zoomFactor);
215
220
}
216
221
222
+ /*
223
+ * Plays a bell sound which is encoded in the resource file
224
+ */
225
+ void TermWidget::playBellSound ()
226
+ {
227
+ QSoundEffect *se = new QSoundEffect (this );
228
+ se->setSource (QUrl::fromLocalFile (QLatin1String (" :/resources/sounds/bell.wav" )));
229
+ se->setLoopCount (3 );
230
+ se->setMuted (false );
231
+ se->setVolume (1 .0f );
232
+ se->play ();
233
+ }
234
+
217
235
/*
218
236
* Paste code extracted from project "lxqt/qterminal"
219
237
*/
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ private slots:
53
53
54
54
public:
55
55
explicit TermWidget (QWidget *parent);
56
+ void playBellSound ();
56
57
void execute (QString command);
57
58
void enter ();
58
59
You can’t perform that action at this time.
0 commit comments