From 5336feb8529aed15c9d57f55dba5742f59725976 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 28 Jul 2008 22:43:39 +0100 Subject: Add support for module-raop-discover --- src/paprefs.cc | 38 ++++++++++++++++++++++++++++++++++++++ src/paprefs.glade | 16 ++++++++++++++++ 2 files changed, 54 insertions(+) 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 #include +#include + #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::RefPtrget_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::RefPtrsignal_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; diff --git a/src/paprefs.glade b/src/paprefs.glade index 0e9b50b..881b2cb 100644 --- a/src/paprefs.glade +++ b/src/paprefs.glade @@ -167,6 +167,22 @@ 2 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Make discoverable Apple Air_tunes sound devices available locally + True + 0 + True + + + False + False + 3 + + -- cgit From 6ea326e349279ddab0c1866b9fac7807ed1bd122 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Wed, 8 Oct 2008 22:20:39 +0100 Subject: Remove double include after auto-merge --- src/paprefs.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/paprefs.cc b/src/paprefs.cc index f7f9191..d1a5ecb 100644 --- a/src/paprefs.cc +++ b/src/paprefs.cc @@ -28,8 +28,6 @@ #include #include -#include - #define PA_GCONF_ROOT "/system/pulseaudio" #define PA_GCONF_PATH_MODULES PA_GCONF_ROOT"/modules" -- cgit From 62623a3d4b4492e302d00406ecfc5c41d47f16cd Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 11 Oct 2008 13:33:36 +0100 Subject: Fix a typo in the raop enabling code --- src/paprefs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paprefs.cc b/src/paprefs.cc index d1a5ecb..404a882 100644 --- a/src/paprefs.cc +++ b/src/paprefs.cc @@ -306,7 +306,7 @@ void MainWindow::writeToGConfZeroconfRaopDiscover() { changeSet.set(PA_GCONF_PATH_MODULES"/raop-discover/locked", true); gconf->change_set_commit(changeSet, true); - if (zeroconfDiscoverCheckButton->get_active()) { + if (zeroconfDiscoverRaopCheckButton->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("")); -- cgit From 1c5db09910ec5d3ef41051b7093ad16f1d825bda Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 11 Oct 2008 13:37:03 +0100 Subject: Fix a typo in my typo fix :) --- src/paprefs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paprefs.cc b/src/paprefs.cc index 404a882..457f78c 100644 --- a/src/paprefs.cc +++ b/src/paprefs.cc @@ -306,7 +306,7 @@ void MainWindow::writeToGConfZeroconfRaopDiscover() { changeSet.set(PA_GCONF_PATH_MODULES"/raop-discover/locked", true); gconf->change_set_commit(changeSet, true); - if (zeroconfDiscoverRaopCheckButton->get_active()) { + if (zeroconfRaopDiscoverCheckButton->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("")); -- cgit From 63ce8401f261d43600d0418aec23471a2ef90e25 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 11 Oct 2008 13:42:40 +0100 Subject: Set the initial state correctly --- src/paprefs.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/paprefs.cc b/src/paprefs.cc index 457f78c..cd7081e 100644 --- a/src/paprefs.cc +++ b/src/paprefs.cc @@ -404,6 +404,7 @@ void MainWindow::readFromGConf() { anonymousAuthCheckButton->set_active(gconf->get_bool(PA_GCONF_PATH_MODULES"/remote-access/anonymous_enabled")); zeroconfDiscoverCheckButton->set_active(gconf->get_bool(PA_GCONF_PATH_MODULES"/zeroconf-discover/enabled")); + zeroconfRaopDiscoverCheckButton->set_active(gconf->get_bool(PA_GCONF_PATH_MODULES"/raop-discover/enabled")); rtpReceiveCheckButton->set_active(gconf->get_bool(PA_GCONF_PATH_MODULES"/rtp-recv/enabled")); -- cgit From 75fc8f14b24e795656b04407ec55a9e5e8c5c755 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 26 Jan 2009 20:23:03 +0000 Subject: Fix the enabling/disabling of the RAOP option if the module is not detected --- src/paprefs.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/paprefs.cc b/src/paprefs.cc index cd7081e..6a067d8 100644 --- a/src/paprefs.cc +++ b/src/paprefs.cc @@ -77,7 +77,7 @@ public: void writeToGConfCombine(); void onGConfChange(const Glib::ustring& key, const Gnome::Conf::Value& value); - bool rtpRecvAvailable, rtpSendAvailable, zeroconfPublishAvailable, zeroconfDiscoverAvailable, remoteAvailable; + bool rtpRecvAvailable, rtpSendAvailable, zeroconfPublishAvailable, zeroconfDiscoverAvailable, zeroconfRaopDiscoverAvailable, remoteAvailable; }; MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr& x) : @@ -152,6 +152,7 @@ void MainWindow::updateSensitive() { anonymousAuthCheckButton->set_sensitive(b && remoteAvailable); zeroconfDiscoverCheckButton->set_sensitive(zeroconfDiscoverAvailable); + zeroconfRaopDiscoverCheckButton->set_sensitive(zeroconfRaopDiscoverAvailable); rtpReceiveCheckButton->set_sensitive(rtpRecvAvailable); rtpSendCheckButton->set_sensitive(rtpSendAvailable); @@ -435,6 +436,8 @@ void MainWindow::checkForModules() { zeroconfPublishAvailable = access(MODULESDIR "module-zeroconf-publish" SHREXT, F_OK) == 0; zeroconfDiscoverAvailable = access(MODULESDIR "module-zeroconf-discover" SHREXT, F_OK) == 0; + zeroconfRaopDiscoverAvailable = access(MODULESDIR "module-raop-discover" SHREXT, F_OK) == 0; + rtpRecvAvailable = access(MODULESDIR "module-rtp-recv" SHREXT, F_OK) == 0; rtpSendAvailable = access(MODULESDIR "module-rtp-send" SHREXT, F_OK) == 0; } -- cgit From 76bb14b899b155d2f379ed00ec0749aa1b11ee2e Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 22 Feb 2009 16:25:23 +0000 Subject: Add copyright/trademark attribution notices --- src/paprefs.glade | 100 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 65 insertions(+), 35 deletions(-) diff --git a/src/paprefs.glade b/src/paprefs.glade index 881b2cb..33ab460 100644 --- a/src/paprefs.glade +++ b/src/paprefs.glade @@ -1,7 +1,7 @@ - - - + + + PulseAudio Preferences False @@ -20,12 +20,13 @@ True - 6 preferences-desktop + 6 False False + 0 @@ -40,6 +41,9 @@ <span size="18000" color="black"><b>PulseAudio Preferences</b></span> True + + 0 + @@ -64,6 +68,7 @@ False False + 0 @@ -93,16 +98,17 @@ 6 + Enable _network access to local sound devices True True - Enable _network access to local sound devices + False True - 0 True False False + 0 @@ -115,25 +121,26 @@ 6 + Allow other machines on the LAN to _discover local sound devices True True - Allow other machines on the LAN to _discover local sound devices + False True - 0 True False False + 0 + Don't require _authentication True True - Don't require _authentication + False True - 0 True @@ -153,12 +160,12 @@ + _Make discoverable network sound devices available locally True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _Make discoverable network sound devices available locally True - 0 True @@ -169,12 +176,12 @@ + Make discoverable Apple Air_tunes sound devices available locally True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Make discoverable Apple Air_tunes sound devices available locally True - 0 True @@ -183,6 +190,18 @@ 3 + + + True + False + 0 + <i>Apple and Airtunes are trademarks of Apple Inc., registered in the U.S. and other countries.</i> + True + + + 4 + + @@ -193,8 +212,8 @@ True - tab False + tab @@ -204,25 +223,26 @@ 6 + Enable Multicast/RTP _receiver True True - Enable Multicast/RTP _receiver + False True - 0 True False False + 0 + Enable Multicast/RTP _sender True True - Enable Multicast/RTP _sender + False True - 0 True @@ -241,25 +261,26 @@ 6 + Send audio from local _microphone True True - Send audio from local _microphone + False True - 0 True False False + 0 + Send audio from local s_peakers True True - Send audio from local s_peakers + False True - 0 True rtpMikeRadioButton @@ -271,11 +292,11 @@ + Create seperate audio _device for Multicast/RTP True True - Create seperate audio _device for Multicast/RTP + False True - 0 True rtpMikeRadioButton @@ -287,11 +308,11 @@ + _Loopback audio to local speakers True True - _Loopback audio to local speakers + False True - 0 True @@ -320,9 +341,9 @@ True - tab 1 False + tab @@ -332,16 +353,17 @@ 6 + Add _virtual output device for simultaneous output on all local sound cards True True - Add _virtual output device for simultaneous output on all local sound cards + False True - 0 True False False + 0 @@ -357,32 +379,40 @@ True - tab 2 False + tab + + 0 + True - GTK_BUTTONBOX_END + end + gtk-close True True True - gtk-close + False True - 0 + + False + False + 0 + False False - GTK_PACK_END + end 1 -- cgit