summaryrefslogtreecommitdiffstats
path: root/src/paprefs.cc
diff options
context:
space:
mode:
authorColin Guthrie <development@colin.guthr.ie>2008-07-28 22:43:39 +0100
committerColin Guthrie <cguthrie@mandriva.org>2009-02-22 16:42:34 +0000
commit5336feb8529aed15c9d57f55dba5742f59725976 (patch)
treea9f938cc5bb9fa0eb3b15cf1b04ee4fd4fe5cde5 /src/paprefs.cc
parentec2d521629835830db68e875ce30f0ff72beee08 (diff)
Add support for module-raop-discover
Diffstat (limited to 'src/paprefs.cc')
-rw-r--r--src/paprefs.cc38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/paprefs.cc b/src/paprefs.cc
index 18e6696..f7f9191 100644
--- a/src/paprefs.cc
+++ b/src/paprefs.cc
@@ -28,6 +28,8 @@
#include <gconfmm.h>
#include <libintl.h>
+#include <libintl.h>
+
#define PA_GCONF_ROOT "/system/pulseaudio"
#define PA_GCONF_PATH_MODULES PA_GCONF_ROOT"/modules"
@@ -43,6 +45,7 @@ public:
*remoteAccessCheckButton,
*zeroconfPublishCheckButton,
*zeroconfDiscoverCheckButton,
+ *zeroconfRaopDiscoverCheckButton,
*anonymousAuthCheckButton,
*rtpReceiveCheckButton,
*rtpSendCheckButton,
@@ -62,6 +65,7 @@ public:
void updateSensitive();
void onChangeRemoteAccess();
void onChangeZeroconfDiscover();
+ void onChangeZeroconfRaopDiscover();
void onChangeRtpReceive();
void onChangeRtpSend();
void onChangeCombine();
@@ -69,6 +73,7 @@ public:
void checkForModules();
void writeToGConfRemoteAccess();
void writeToGConfZeroconfDiscover();
+ void writeToGConfZeroconfRaopDiscover();
void writeToGConfRtpReceive();
void writeToGConfRtpSend();
void writeToGConfCombine();
@@ -85,6 +90,7 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
x->get_widget("remoteAccessCheckButton", remoteAccessCheckButton);
x->get_widget("zeroconfDiscoverCheckButton", zeroconfDiscoverCheckButton);
+ x->get_widget("zeroconfRaopDiscoverCheckButton", zeroconfRaopDiscoverCheckButton);
x->get_widget("zeroconfBrowseCheckButton", zeroconfPublishCheckButton);
x->get_widget("anonymousAuthCheckButton", anonymousAuthCheckButton);
x->get_widget("rtpReceiveCheckButton", rtpReceiveCheckButton);
@@ -115,6 +121,7 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
anonymousAuthCheckButton->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::onChangeRemoteAccess));
zeroconfDiscoverCheckButton->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::onChangeZeroconfDiscover));
+ zeroconfRaopDiscoverCheckButton->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::onChangeZeroconfRaopDiscover));
rtpReceiveCheckButton->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::onChangeRtpReceive));
@@ -175,6 +182,15 @@ void MainWindow::onChangeZeroconfDiscover() {
writeToGConfZeroconfDiscover();
}
+void MainWindow::onChangeZeroconfRaopDiscover() {
+
+ if (ignoreChanges)
+ return;
+
+ updateSensitive();
+ writeToGConfZeroconfRaopDiscover();
+}
+
void MainWindow::onChangeRtpReceive() {
if (ignoreChanges)
return;
@@ -286,6 +302,28 @@ void MainWindow::writeToGConfZeroconfDiscover() {
gconf->suggest_sync();
}
+void MainWindow::writeToGConfZeroconfRaopDiscover() {
+ Gnome::Conf::ChangeSet changeSet;
+
+ changeSet.set(PA_GCONF_PATH_MODULES"/raop-discover/locked", true);
+ gconf->change_set_commit(changeSet, true);
+
+ if (zeroconfDiscoverCheckButton->get_active()) {
+ changeSet.set(PA_GCONF_PATH_MODULES"/raop-discover/name0", Glib::ustring("module-raop-discover"));
+ changeSet.set(PA_GCONF_PATH_MODULES"/raop-discover/args0", Glib::ustring(""));
+
+ changeSet.set(PA_GCONF_PATH_MODULES"/raop-discover/enabled", true);
+ } else
+ changeSet.set(PA_GCONF_PATH_MODULES"/raop-discover/enabled", false);
+
+ gconf->change_set_commit(changeSet, true);
+
+ changeSet.set(PA_GCONF_PATH_MODULES"/raop-discover/locked", false);
+ gconf->change_set_commit(changeSet, true);
+
+ gconf->suggest_sync();
+}
+
void MainWindow::writeToGConfRtpReceive() {
Gnome::Conf::ChangeSet changeSet;