[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kmix] /: Volume feedback does not require a KMix restart anymore (Mixer directly
From:       Christian Esken <esken () kde ! org>
Date:       2014-08-17 17:10:38
Message-ID: E1XJ3yY-0000zt-2Q () scm ! kde ! org
[Download RAW message or body]

Git commit e8bd7101b450695b083474d7d042ee22f420254f by Christian Esken.
Committed on 17/08/2014 at 17:11.
Pushed by esken into branch 'master'.

Volume feedback does not require a KMix restart anymore (Mixer directly
reads from GlobalConfigData)
BUGS: 301836

M  +0    -14   apps/kmix.cpp
M  +0    -3    apps/kmix.h
M  +0    -5    core/mixer.cpp
M  +6    -2    core/mixer.h

http://commits.kde.org/kmix/e8bd7101b450695b083474d7d042ee22f420254f

diff --git a/apps/kmix.cpp b/apps/kmix.cpp
index 96473b5..ff73dda 100644
--- a/apps/kmix.cpp
+++ b/apps/kmix.cpp
@@ -532,14 +532,12 @@ void KMixWindow::loadBaseConfig()
 {
 	KConfigGroup config(KGlobal::config(), "Global");
 
-//  GlobalConfig& gcfg = GlobalConfig::instance();
 	GlobalConfigData& gcd = GlobalConfig::instance().data;
 
 	QList<QString> preferredMixersInSoundMenu;
 	preferredMixersInSoundMenu = config.readEntry("Soundmenu.Mixers", \
preferredMixersInSoundMenu);  \
GlobalConfig::instance().setMixersForSoundmenu(preferredMixersInSoundMenu.toSet());  
-	setBeepOnVolumeChange(gcd.volumeFeedback);
 	m_startVisible = config.readEntry("Visible", false);
 	m_multiDriverMode = config.readEntry("MultiDriver", false);
 	m_defaultCardOnStart = config.readEntry("DefaultCardOnStart", "");
@@ -1262,18 +1260,6 @@ void KMixWindow::applyPrefs()
 	saveConfig();
 }
 
-/**
- * Sets whether a beep on volume change should be done.
- * This method store the value internally and also propagates
- * this to the Mixer core.
- *
- * @param beep true, if a beep should be changed
- */
-void KMixWindow::setBeepOnVolumeChange(bool beep)
-{
-	Mixer::setBeepOnVolumeChange(beep);
-}
-
 void KMixWindow::toggleMenuBar()
 {
 	menuBar()->setVisible(_actionShowMenubar->isChecked());
diff --git a/apps/kmix.h b/apps/kmix.h
index 9d1179f..77aa3e4 100644
--- a/apps/kmix.h
+++ b/apps/kmix.h
@@ -73,11 +73,8 @@ KMixWindow : public KXmlGuiWindow
    void initActions();
    void initActionsLate();
    void initActionsAfterInitMixer();
-   //void recreateGUI();
    void initWidgets();
-   //void setErrorMixerWidget();
 
-   void setBeepOnVolumeChange(bool beep);
    void fixConfigAfterRead();
 
    virtual bool queryClose();
diff --git a/core/mixer.cpp b/core/mixer.cpp
index 2f9203b..438eb0b 100644
--- a/core/mixer.cpp
+++ b/core/mixer.cpp
@@ -345,11 +345,6 @@ QString Mixer::translateKernelToWhatsthis(const QString \
&kernelName)  
 /* ------- WRAPPER METHODS. END -------------------------------- */
 
-void Mixer::setBeepOnVolumeChange(bool beepOnVolumeChange)
-{
-	m_beepOnVolumeChange = beepOnVolumeChange;
-}
-
 int Mixer::balance() const {
     return m_balance;
 }
diff --git a/core/mixer.h b/core/mixer.h
index b04bce2..a4d3a2b 100644
--- a/core/mixer.h
+++ b/core/mixer.h
@@ -34,6 +34,7 @@
 #include "backends/mixer_backend.h"
 #include "core/MasterControl.h"
 #include "mixset.h"
+#include "core/GlobalConfig.h"
 #include "core/mixdevice.h"
 #include "dbus/dbusmixerwrapper.h"
 
@@ -116,8 +117,11 @@ public:
     // Returns the name of the driver, e.g. "OSS" or "ALSA0.9"
     static QString driverName(int num);
 
-    static void setBeepOnVolumeChange(bool m_beepOnVolumeChange);
-    static bool getBeepOnVolumeChange() { return m_beepOnVolumeChange; }
+    static bool getBeepOnVolumeChange()
+    {
+    	GlobalConfigData& gcd = GlobalConfig::instance().data;
+    	return gcd.beepOnVolumeChange;
+    }
 
     /**
      * Returns an unique ID of the Mixer. It currently looks like \
"<soundcard_descr>::<hw_number>:<driver>"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic