From f14e0ffa4697077b7d57ac510f6c83fad6aeb665 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 19 Sep 2007 18:39:23 +0000 Subject: add support for configuring module-combine git-svn-id: file:///home/lennart/svn/public/paprefs/trunk@29 54a58c19-9419-0410-9bbb-d8fa3e5d54ff --- po/de.po | 38 +++++--- src/paprefs.cc | 40 +++++++- src/paprefs.glade | 278 ++++++++++++++++++++++++++++-------------------------- 3 files changed, 210 insertions(+), 146 deletions(-) diff --git a/po/de.po b/po/de.po index 18011d9..9055821 100644 --- a/po/de.po +++ b/po/de.po @@ -1,8 +1,9 @@ msgid "" msgstr "" "Project-Id-Version: paprefs\n" -"POT-Creation-Date: \n" -"PO-Revision-Date: 2007-05-24 01:12+0100\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2007-09-19 20:34+0200\n" +"PO-Revision-Date: 2007-09-19 20:37+0100\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -12,7 +13,7 @@ msgstr "" "X-Poedit-Country: GERMANY\n" #: ../src/paprefs.desktop.in.h:1 -#: ../src/paprefs.glade.h:10 +#: ../src/paprefs.glade.h:12 msgid "PulseAudio Preferences" msgstr "PulseAudio-Einstellungen" @@ -21,24 +22,23 @@ msgid "Sound Server Preferences" msgstr "Audio-Dienst-Einstellungen" #: ../src/paprefs.desktop.in.h:3 -#: ../src/paprefs.glade.h:13 msgid "View and modify the configuration of the local sound server" msgstr "Anzeigen und Ändern der Konfiguration des lokalen Audio-Dienstes" #: ../src/paprefs.glade.h:1 -msgid "Multicast/RTP" -msgstr "Multicast/RTP" +msgid "View and modify the configuration of your local sound server" +msgstr "Anzeigen und Ändern der Konfiguration des lokalen Audio-Dienstes" #: ../src/paprefs.glade.h:2 -msgid "Network Access" -msgstr "Netzwerkzugriff" - -#: ../src/paprefs.glade.h:3 msgid "PulseAudio Preferences" msgstr "PulseAudio-Einstellungen" +#: ../src/paprefs.glade.h:3 +msgid "Add _virtual output device for simultaneous output on all sound cards" +msgstr "_Virtuelles Ausgabegerät zur simultanen Wiedergabe auf allen Soundkarten zur Verfügung stellen" + #: ../src/paprefs.glade.h:4 -msgid "Allow other machines in LAN to _browse for local sound devices" +msgid "Allow other machines on LAN to _browse for local sound devices" msgstr "Lokale Audio-Geräte für andere Maschinen im lokalen Netz auf_findbar machen" #: ../src/paprefs.glade.h:5 @@ -61,15 +61,27 @@ msgstr "Multicast/RTP-_Sender aktivieren" msgid "Enable _network access to local sound devices" msgstr "_Netzwerkzugriff auf lokale Audio-Geräte erlauben" +#: ../src/paprefs.glade.h:10 +msgid "Multicast/R_TP" +msgstr "Multicast/R_TP" + #: ../src/paprefs.glade.h:11 +msgid "N_etwork Access" +msgstr "N_etzwerkzugriff" + +#: ../src/paprefs.glade.h:13 msgid "Send audio from local _microphone" msgstr "Audio vom lokalen _Mikrophon senden" -#: ../src/paprefs.glade.h:12 +#: ../src/paprefs.glade.h:14 msgid "Send audio from local s_peakers" msgstr "Audio von den lokalen _Lautsprechern senden" -#: ../src/paprefs.glade.h:14 +#: ../src/paprefs.glade.h:15 +msgid "Sim_ultaneous Output" +msgstr "Sim_ultane Ausgabe" + +#: ../src/paprefs.glade.h:16 msgid "_Loopback audio to local speakers" msgstr "Versendetes Audio durch lokale Lautsprecher _zurückschleifen" diff --git a/src/paprefs.cc b/src/paprefs.cc index 871f2de..b671671 100644 --- a/src/paprefs.cc +++ b/src/paprefs.cc @@ -46,7 +46,8 @@ public: *anonymousAuthCheckButton, *rtpReceiveCheckButton, *rtpSendCheckButton, - *rtpLoopbackCheckButton; + *rtpLoopbackCheckButton, + *combineCheckButton; Gtk::RadioButton *rtpMikeRadioButton, @@ -62,11 +63,13 @@ public: void onChangeRemoteAccess(); void onChangeRtpReceive(); void onChangeRtpSend(); + void onChangeCombine(); void readFromGConf(); void checkForModules(); void writeToGConfRemoteAccess(); void writeToGConfRtpReceive(); void writeToGConfRtpSend(); + void writeToGConfCombine(); void onGConfChange(const Glib::ustring& key, const Gnome::Conf::Value& value); bool rtpRecvAvailable, rtpSendAvailable, zeroconfAvailable, remoteAvailable; @@ -84,6 +87,7 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("rtpReceiveCheckButton", rtpReceiveCheckButton); x->get_widget("rtpSendCheckButton", rtpSendCheckButton); x->get_widget("rtpLoopbackCheckButton", rtpLoopbackCheckButton); + x->get_widget("combineCheckButton", combineCheckButton); x->get_widget("rtpMikeRadioButton", rtpMikeRadioButton); x->get_widget("rtpSpeakerRadioButton", rtpSpeakerRadioButton); @@ -114,6 +118,8 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtrsignal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onChangeRtpSend)); rtpSpeakerRadioButton->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onChangeRtpSend)); rtpNullSinkRadioButton->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onChangeRtpSend)); + + combineCheckButton->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::onChangeCombine)); } MainWindow* MainWindow::create() { @@ -170,6 +176,36 @@ void MainWindow::onChangeRtpSend() { writeToGConfRtpSend(); } +void MainWindow::onChangeCombine() { + Gnome::Conf::ChangeSet changeSet; + + if (ignoreChanges) + return; + + writeToGConfCombine(); +} + +void MainWindow::writeToGConfCombine() { + Gnome::Conf::ChangeSet changeSet; + changeSet.set(PA_GCONF_PATH_MODULES"/combine/locked", true); + gconf->change_set_commit(changeSet, true); + + if (combineCheckButton->get_active()) { + changeSet.set(PA_GCONF_PATH_MODULES"/combine/name0", Glib::ustring("module-combine")); + changeSet.set(PA_GCONF_PATH_MODULES"/combine/args0", Glib::ustring("")); + + changeSet.set(PA_GCONF_PATH_MODULES"/combine/enabled", true); + } else + changeSet.set(PA_GCONF_PATH_MODULES"/combine/enabled", false); + + gconf->change_set_commit(changeSet, true); + + changeSet.set(PA_GCONF_PATH_MODULES"/combine/locked", false); + gconf->change_set_commit(changeSet, true); + + gconf->suggest_sync(); +} + void MainWindow::writeToGConfRemoteAccess() { Gnome::Conf::ChangeSet changeSet; bool zeroconfEnabled, anonymousEnabled; @@ -306,6 +342,8 @@ void MainWindow::readFromGConf() { else rtpNullSinkRadioButton->set_active(TRUE); + combineCheckButton->set_active(gconf->get_bool(PA_GCONF_PATH_MODULES"/combine/enabled")); + ignoreChanges = FALSE; updateSensitive(); diff --git a/src/paprefs.glade b/src/paprefs.glade index 4dfae02..666ebd6 100644 --- a/src/paprefs.glade +++ b/src/paprefs.glade @@ -82,19 +82,23 @@ 12 12 - + True - 18 + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True + 12 6 - + True - 0 - <b>Network Access</b> - True + True + Enable _network access to local sound devices + True + 0 + True False @@ -102,18 +106,18 @@ - + True 12 - + True 6 - + True True - Enable _network access to local sound devices + Allow other machines on LAN to _browse for local sound devices True 0 True @@ -124,46 +128,17 @@ - + True - 12 - - - True - 6 - - - True - True - Allow other machines in LAN to _browse for local sound devices - True - 0 - True - - - False - False - - - - - True - True - Don't require _authentication - True - 0 - True - - - False - False - 1 - - - - + True + Don't require _authentication + True + 0 + True + False + False 1 @@ -176,39 +151,69 @@ - False - False + False - + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + N_etwork Access + True + + + tab + False + False + + + + + True + 12 6 - + True - 0 - <b>Multicast/RTP</b> - True + True + Enable Multicast/RTP _receiver + True + 0 + True + + + False + False + + + + + True + True + Enable Multicast/RTP _sender + True + 0 + True False False + 1 - + True 12 - + True 6 - + True True - Enable Multicast/RTP _receiver + Send audio from local _microphone True 0 True @@ -219,13 +224,14 @@ - + True True - Enable Multicast/RTP _sender + Send audio from local s_peakers True 0 True + rtpMikeRadioButton False @@ -234,92 +240,100 @@ - + True - 12 - - - True - 6 - - - True - True - Send audio from local _microphone - True - 0 - True - - - False - False - - - - - True - True - Send audio from local s_peakers - True - 0 - True - rtpMikeRadioButton - - - False - False - 1 - - - - - True - True - Create seperate audio _device for Multicast/RTP - True - 0 - True - rtpMikeRadioButton - - - False - False - 2 - - - - - True - True - _Loopback audio to local speakers - True - 0 - True - - - False - False - 3 - - - - + True + Create seperate audio _device for Multicast/RTP + True + 0 + True + rtpMikeRadioButton + False + False 2 + + + True + True + _Loopback audio to local speakers + True + 0 + True + + + False + False + 3 + + - 1 + 2 - False 1 + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Multicast/R_TP + True + + + tab + 1 + False + False + + + + + True + 12 + 6 + + + True + True + Add _virtual output device for simultaneous output on all sound cards + True + 0 + True + + + False + False + + + + + 2 + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Sim_ultaneous Output + True + + + tab + 2 + False + False -- cgit