diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-04-14 14:25:31 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-04-14 14:25:31 +0200 |
commit | e59894207becb469b2c908b4e06d3ac55b70f65b (patch) | |
tree | 2eeb658f4549eecd5708a0a8715db01ac1656411 | |
parent | 9cb9961f2eb7dcc05ba49ca6594ec5dd1588ca63 (diff) | |
parent | 76bb14b899b155d2f379ed00ec0749aa1b11ee2e (diff) |
Merge commit 'coling/airtunes'
-rw-r--r-- | src/paprefs.cc | 42 | ||||
-rw-r--r-- | src/paprefs.glade | 112 |
2 files changed, 120 insertions, 34 deletions
diff --git a/src/paprefs.cc b/src/paprefs.cc index 18e6696..6a067d8 100644 --- a/src/paprefs.cc +++ b/src/paprefs.cc @@ -43,6 +43,7 @@ public: *remoteAccessCheckButton, *zeroconfPublishCheckButton, *zeroconfDiscoverCheckButton, + *zeroconfRaopDiscoverCheckButton, *anonymousAuthCheckButton, *rtpReceiveCheckButton, *rtpSendCheckButton, @@ -62,6 +63,7 @@ public: void updateSensitive(); void onChangeRemoteAccess(); void onChangeZeroconfDiscover(); + void onChangeZeroconfRaopDiscover(); void onChangeRtpReceive(); void onChangeRtpSend(); void onChangeCombine(); @@ -69,12 +71,13 @@ public: void checkForModules(); void writeToGConfRemoteAccess(); void writeToGConfZeroconfDiscover(); + void writeToGConfZeroconfRaopDiscover(); void writeToGConfRtpReceive(); void writeToGConfRtpSend(); 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<Gnome::Glade::Xml>& x) : @@ -85,6 +88,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 +119,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)); @@ -147,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); @@ -175,6 +181,15 @@ void MainWindow::onChangeZeroconfDiscover() { writeToGConfZeroconfDiscover(); } +void MainWindow::onChangeZeroconfRaopDiscover() { + + if (ignoreChanges) + return; + + updateSensitive(); + writeToGConfZeroconfRaopDiscover(); +} + void MainWindow::onChangeRtpReceive() { if (ignoreChanges) return; @@ -286,6 +301,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 (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("")); + + 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; @@ -368,6 +405,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")); @@ -398,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; } diff --git a/src/paprefs.glade b/src/paprefs.glade index 0e9b50b..33ab460 100644 --- a/src/paprefs.glade +++ b/src/paprefs.glade @@ -1,7 +1,7 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> -<!--*- mode: xml -*--> +<?xml version="1.0"?> <glade-interface> + <!-- interface-requires gtk+ 2.16 --> + <!-- interface-naming-policy toplevel-contextual --> <widget class="GtkWindow" id="mainWindow"> <property name="title" translatable="yes">PulseAudio Preferences</property> <property name="resizable">False</property> @@ -20,12 +20,13 @@ <child> <widget class="GtkImage" id="image19"> <property name="visible">True</property> - <property name="icon_size">6</property> <property name="icon_name">preferences-desktop</property> + <property name="icon-size">6</property> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> @@ -40,6 +41,9 @@ <property name="label" translatable="yes"><span size="18000" color="black"><b>PulseAudio Preferences</b></span></property> <property name="use_markup">True</property> </widget> + <packing> + <property name="position">0</property> + </packing> </child> <child> <widget class="GtkLabel" id="label4825"> @@ -64,6 +68,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> @@ -93,16 +98,17 @@ <property name="spacing">6</property> <child> <widget class="GtkCheckButton" id="remoteAccessCheckButton"> + <property name="label" translatable="yes">Enable _network access to local sound devices</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Enable _network access to local sound devices</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> @@ -115,25 +121,26 @@ <property name="spacing">6</property> <child> <widget class="GtkCheckButton" id="zeroconfBrowseCheckButton"> + <property name="label" translatable="yes">Allow other machines on the LAN to _discover local sound devices</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Allow other machines on the LAN to _discover local sound devices</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <widget class="GtkCheckButton" id="anonymousAuthCheckButton"> + <property name="label" translatable="yes">Don't require _authentication</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Don't require _authentication</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> @@ -153,12 +160,12 @@ </child> <child> <widget class="GtkCheckButton" id="zeroconfDiscoverCheckButton"> + <property name="label" translatable="yes">_Make discoverable network sound devices available locally</property> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="receives_default">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="label" translatable="yes">_Make discoverable network sound devices available locally</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> @@ -167,6 +174,34 @@ <property name="position">2</property> </packing> </child> + <child> + <widget class="GtkCheckButton" id="zeroconfRaopDiscoverCheckButton"> + <property name="label" translatable="yes">Make discoverable Apple Air_tunes sound devices available locally</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">3</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="tm"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes"><i>Apple and Airtunes are trademarks of Apple Inc., registered in the U.S. and other countries.</i></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="position">4</property> + </packing> + </child> </widget> </child> <child> @@ -177,8 +212,8 @@ <property name="use_underline">True</property> </widget> <packing> - <property name="type">tab</property> <property name="tab_fill">False</property> + <property name="type">tab</property> </packing> </child> <child> @@ -188,25 +223,26 @@ <property name="spacing">6</property> <child> <widget class="GtkCheckButton" id="rtpReceiveCheckButton"> + <property name="label" translatable="yes">Enable Multicast/RTP _receiver</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Enable Multicast/RTP _receiver</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <widget class="GtkCheckButton" id="rtpSendCheckButton"> + <property name="label" translatable="yes">Enable Multicast/RTP _sender</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Enable Multicast/RTP _sender</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> @@ -225,25 +261,26 @@ <property name="spacing">6</property> <child> <widget class="GtkRadioButton" id="rtpMikeRadioButton"> + <property name="label" translatable="yes">Send audio from local _microphone</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Send audio from local _microphone</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> <widget class="GtkRadioButton" id="rtpSpeakerRadioButton"> + <property name="label" translatable="yes">Send audio from local s_peakers</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Send audio from local s_peakers</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> <property name="group">rtpMikeRadioButton</property> </widget> @@ -255,11 +292,11 @@ </child> <child> <widget class="GtkRadioButton" id="rtpNullSinkRadioButton"> + <property name="label" translatable="yes">Create seperate audio _device for Multicast/RTP</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Create seperate audio _device for Multicast/RTP</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> <property name="group">rtpMikeRadioButton</property> </widget> @@ -271,11 +308,11 @@ </child> <child> <widget class="GtkCheckButton" id="rtpLoopbackCheckButton"> + <property name="label" translatable="yes">_Loopback audio to local speakers</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Loopback audio to local speakers</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> @@ -304,9 +341,9 @@ <property name="use_underline">True</property> </widget> <packing> - <property name="type">tab</property> <property name="position">1</property> <property name="tab_fill">False</property> + <property name="type">tab</property> </packing> </child> <child> @@ -316,16 +353,17 @@ <property name="spacing">6</property> <child> <widget class="GtkCheckButton" id="combineCheckButton"> + <property name="label" translatable="yes">Add _virtual output device for simultaneous output on all local sound cards</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Add _virtual output device for simultaneous output on all local sound cards</property> + <property name="receives_default">False</property> <property name="use_underline">True</property> - <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> + <property name="position">0</property> </packing> </child> </widget> @@ -341,32 +379,40 @@ <property name="use_underline">True</property> </widget> <packing> - <property name="type">tab</property> <property name="position">2</property> <property name="tab_fill">False</property> + <property name="type">tab</property> </packing> </child> </widget> + <packing> + <property name="position">0</property> + </packing> </child> <child> <widget class="GtkHButtonBox" id="hbuttonbox1"> <property name="visible">True</property> - <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="layout_style">end</property> <child> <widget class="GtkButton" id="closeButton"> + <property name="label">gtk-close</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="can_default">True</property> - <property name="label">gtk-close</property> + <property name="receives_default">False</property> <property name="use_stock">True</property> - <property name="response_id">0</property> </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> </child> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="pack_type">GTK_PACK_END</property> + <property name="pack_type">end</property> <property name="position">1</property> </packing> </child> |