From 083af203a3d4d8a1a5d011dca37deb8090acfeb0 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Mon, 28 Oct 2013 00:26:54 +0100 Subject: [PATCH] Added "tick" sound when switching tabs. --- LameXP.rc | 1 + res/sounds/tick.wav | Bin 0 -> 7002 bytes src/Config.h | 2 +- src/Dialog_About.cpp | 14 ++++++++++++-- src/Dialog_About.h | 2 +- src/Dialog_MainWindow.cpp | 11 +++++++++-- src/Dialog_MainWindow.h | 2 +- src/Resource.h | 1 + 8 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 res/sounds/tick.wav diff --git a/LameXP.rc b/LameXP.rc index 8294a124..9addb483 100644 --- a/LameXP.rc +++ b/LameXP.rc @@ -118,6 +118,7 @@ IDR_WAVE_BEEP WAVE "res\\sounds\\beep.wav" IDR_WAVE_BEEP_LONG WAVE "res\\sounds\\beep2.wav" IDR_WAVE_WAITING WAVE "res\\sounds\\waiting.wav" IDR_WAVE_BLAST WAVE "res\\sounds\\blast.wav" +IDR_WAVE_TICK WAVE "res\\sounds\\tick.wav" ///////////////////////////////////////////////////////////////////////////// // diff --git a/res/sounds/tick.wav b/res/sounds/tick.wav new file mode 100644 index 0000000000000000000000000000000000000000..b4c5746547d4be6da240795a8c02c3a0284407b4 GIT binary patch literal 7002 zcmeHLd3aRCmOoW>FJTn|K0wx{fk+J5!;(N)!=?lxL_iUwlQa;rnlzHI3J*qBbwCtk zQ66qAqHGEh*+EnutAdYB76E;rAwZJu+ue2EuQQIrH#7hE$NVwhN1v~%&OLSRsj9Qp zxjke+-@Zed5)JP;tk2jSm#rQV2|&_DqPZgkNvcN~4woY>FhRBGF=|3}=q_L4a<=2? zdp^zWs3YFE$eZ{wFQb~Gfw)B<(rW5XFY%i^ml}yZ^f}+x;T%mdVw^ZZW&AZSrbYBC z@1*_W6ri7&P6ueHSb(?dQ31^rcjysXK`)3abdoz!s0g9ov;apv5i7D}FZrf;T!k7_ zou}LjW^6!{YfI&=;n*_rO8rW zqIZi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us+ zZ=puHit%Uu3GJW2entN)cy7VpuVd~qtaBN&m-!58opZ3#d3>!M;}gi1r$IXl>M`Ko zgYpe>=vRQicmTQiYrr1Z_#htzwvYGnx8ObsY#*M#1=m5|4}3Rx_Q4Mh0o%@7;TOBn z0@!Dm+09=fpMMF?{dnUDB<`tN|0q^HgWX)@AFzvS*ylO)zu^qO00O57;CI-=ew^J0 zJrHgs1#Q)bj%wh`umSY;2wDSr6nd=nJKmUDLc`5*Q`u1YwIMrnZ9^Y|r&gdhf!>?K z0yba`F@{uGrX_3>0V~D8LQmk1=tK#yT|C9&yS4}Qq|TU0fG76@-V1lbU|2c@mL3Q! z;Mu7(q>7RXY!KjSKuT2$c*IkvRs;9RQ+Pj#dQ%^?&bWgDYjmxW9f!37t3_e$Xn0Ns ztQ*)v7eG8XI)SrC6?Y=~&Y*SqW404`64j7|Ai^o%J z)oeT@1n?O2ffZt^&L5Bz&_guz5k~C+VSskfQ#9VCc$7SXw+DmusvD-2;679n~Bu6FZ_jZoY>_54{Idt-%)bz<&>G2u%?%is3ElMcL z$_s*of$enDFT6SbMjcwyp&kV-toX z_5J-lJSE!4yIlDRk&%-oO^TQl8wt*= zkdfppOfSgHcV*_~+5$2iX?YV}iFP~YZU4EcocyHZKg8!2MpSJvB0VoB61$I#j);m( zD$aG}WTq!OGcvK~z`K}9N=|T0%*f0e>d48@b`Ej4oQd|hxag>;|D7SVI3Enr9mCTy zUH_e<_jpHct~2|0mj5xEmy=)MEG*0`NVMnV$EFM!ynmCeUElHjLT$+@efrr3I*OeI z;j!&)aUE?>rR5je+9eOQJsCdK1%t=-ayndv*!}}kS}mz=4YInF{CGzuG488I?owFj&iaE>Y(yaOH< z`G<=Ixc~2e4;T4UI)13GhwA!M8u(Mp554Q5y8e^~{uJ{=@B06xuA2Wvalue(ui->tabWidget->widget(index), false); @@ -288,6 +288,12 @@ void AboutDialog::tabChanged(int index) qApp->restoreOverrideCursor(); } + //Play tick sound + if(m_settings->soundsEnabled() && (!silent)) + { + lamexp_play_sound(IDR_WAVE_TICK, true); + } + //Scroll to the top if(QWidget *tab = ui->tabWidget->widget(index)) { @@ -428,7 +434,7 @@ void AboutDialog::showEvent(QShowEvent *e) QDialog::showEvent(e); ui->tabWidget->setCurrentIndex(ui->tabWidget->indexOf(ui->infoTab)); - tabChanged(m_lastTab = ui->tabWidget->currentIndex()); + tabChanged(m_lastTab = ui->tabWidget->currentIndex(), true); if(m_firstShow) { @@ -591,6 +597,10 @@ void AboutDialog::initContributorsTab(void) contributorsAboutText += QString("%1%2").arg(webIcon, spaces); contributorsAboutText += QString("%1%2%3").arg(tr("Qt Developer Network"), spaces, "http://qt-project.org/"); contributorsAboutText += QString("%1%2").arg(webIcon, spaces); + contributorsAboutText += QString("%1%2%3").arg(tr("BerliOS Developer"), spaces, "http://developer.berlios.de/"); + contributorsAboutText += QString("%1%2").arg(webIcon, spaces); + contributorsAboutText += QString("%1%2%3").arg(tr("CodePlex"), spaces, "http://www.codeplex.com/"); + contributorsAboutText += QString("%1%2").arg(webIcon, spaces); contributorsAboutText += QString("%1%2%3").arg(tr("Marius Hudea"), spaces, "http://savedonthe.net/"); contributorsAboutText += QString("%1%2").arg(webIcon, spaces); contributorsAboutText += QString("%1%2%3").arg(tr("Codecs.com"), spaces, "http://www.codecs.com/"); diff --git a/src/Dialog_About.h b/src/Dialog_About.h index 219c77e8..239ca62c 100644 --- a/src/Dialog_About.h +++ b/src/Dialog_About.h @@ -53,7 +53,7 @@ public slots: void gotoLicenseTab(void); void showAboutQt(void); void moveDisque(void); - void tabChanged(int index); + void tabChanged(int index, const bool silent = false); void adjustSize(void); void geometryUpdated(void); diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index d9e1660c..ce585594 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -1014,7 +1014,7 @@ void MainWindow::changeEvent(QEvent *e) lamexp_update_sysmenu(this, IDM_ABOUTBOX, ui->buttonAbout->text()); //Force resize, if needed - tabPageChanged(ui->tabWidget->currentIndex()); + tabPageChanged(ui->tabWidget->currentIndex(), true); } } @@ -1616,10 +1616,11 @@ void MainWindow::closeButtonClicked(void) /* * Tab page changed */ -void MainWindow::tabPageChanged(int idx) +void MainWindow::tabPageChanged(int idx, const bool silent) { resizeEvent(NULL); + //Update "view" menu QList actions = m_tabActionGroup->actions(); for(int i = 0; i < actions.count(); i++) { @@ -1631,6 +1632,12 @@ void MainWindow::tabPageChanged(int idx) } } + //Play tick sound + if(m_settings->soundsEnabled() && (!silent)) + { + lamexp_play_sound(IDR_WAVE_TICK, true); + } + int initialWidth = this->width(); int maximumWidth = QApplication::desktop()->availableGeometry().width(); diff --git a/src/Dialog_MainWindow.h b/src/Dialog_MainWindow.h index b45246eb..52880ba8 100644 --- a/src/Dialog_MainWindow.h +++ b/src/Dialog_MainWindow.h @@ -155,7 +155,7 @@ private slots: void sourceModelChanged(void); void styleActionActivated(QAction *action); void tabActionActivated(QAction *action); - void tabPageChanged(int idx); + void tabPageChanged(int idx, const bool silent = false); void toneAdjustBassChanged(double value); void toneAdjustTrebleChanged(double value); void toneAdjustTrebleReset(void); diff --git a/src/Resource.h b/src/Resource.h index 493f6e0d..858bee2a 100644 --- a/src/Resource.h +++ b/src/Resource.h @@ -36,6 +36,7 @@ #define IDR_WAVE_BEEP_LONG 674 #define IDR_WAVE_WAITING 675 #define IDR_WAVE_BLAST 676 +#define IDR_WAVE_TICK 677 /* * Next default values for new objects