diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-09-19 18:39:23 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-09-19 18:39:23 +0000 |
commit | f14e0ffa4697077b7d57ac510f6c83fad6aeb665 (patch) | |
tree | 73f47ad1cf518625e1eca1597372f3d187330ee8 /src | |
parent | bce5d5167882d1c96c3fb32306be16faa134bdd3 (diff) |
add support for configuring module-combine
git-svn-id: file:///home/lennart/svn/public/paprefs/trunk@29 54a58c19-9419-0410-9bbb-d8fa3e5d54ff
Diffstat (limited to 'src')
-rw-r--r-- | src/paprefs.cc | 40 | ||||
-rw-r--r-- | src/paprefs.glade | 278 |
2 files changed, 185 insertions, 133 deletions
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::RefPtr<Gnome::Glade: x->get_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::RefPtr<Gnome::Glade: rtpMikeRadioButton->signal_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 @@ <property name="border_width">12</property> <property name="spacing">12</property> <child> - <widget class="GtkVBox" id="vbox32"> + <widget class="GtkNotebook" id="notebook1"> <property name="visible">True</property> - <property name="spacing">18</property> + <property name="can_focus">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <child> - <widget class="GtkVBox" id="vbox33"> + <widget class="GtkVBox" id="vbox30"> <property name="visible">True</property> + <property name="border_width">12</property> <property name="spacing">6</property> <child> - <widget class="GtkLabel" id="label4829"> + <widget class="GtkCheckButton" id="remoteAccessCheckButton"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes"><b>Network Access</b></property> - <property name="use_markup">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Enable _network access to local sound devices</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> @@ -102,18 +106,18 @@ </packing> </child> <child> - <widget class="GtkAlignment" id="alignment7"> + <widget class="GtkAlignment" id="alignment8"> <property name="visible">True</property> <property name="left_padding">12</property> <child> - <widget class="GtkVBox" id="vbox30"> + <widget class="GtkVBox" id="vbox34"> <property name="visible">True</property> <property name="spacing">6</property> <child> - <widget class="GtkCheckButton" id="remoteAccessCheckButton"> + <widget class="GtkCheckButton" id="zeroconfCheckButton"> <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="label" translatable="yes">Allow other machines on LAN to _browse for local sound devices</property> <property name="use_underline">True</property> <property name="response_id">0</property> <property name="draw_indicator">True</property> @@ -124,46 +128,17 @@ </packing> </child> <child> - <widget class="GtkAlignment" id="alignment8"> + <widget class="GtkCheckButton" id="anonymousAuthCheckButton"> <property name="visible">True</property> - <property name="left_padding">12</property> - <child> - <widget class="GtkVBox" id="vbox34"> - <property name="visible">True</property> - <property name="spacing">6</property> - <child> - <widget class="GtkCheckButton" id="zeroconfCheckButton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Allow other machines in LAN to _browse for local sound devices</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> - </packing> - </child> - <child> - <widget class="GtkCheckButton" id="anonymousAuthCheckButton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Don't require _authentication</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">1</property> - </packing> - </child> - </widget> - </child> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Don't require _authentication</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">1</property> </packing> </child> @@ -176,39 +151,69 @@ </child> </widget> <packing> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="tab_expand">False</property> </packing> </child> <child> - <widget class="GtkVBox" id="vbox35"> + <widget class="GtkLabel" id="label1"> <property name="visible">True</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">N_etwork Access</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="tab_expand">False</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="vbox31"> + <property name="visible">True</property> + <property name="border_width">12</property> <property name="spacing">6</property> <child> - <widget class="GtkLabel" id="label4830"> + <widget class="GtkCheckButton" id="rtpReceiveCheckButton"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes"><b>Multicast/RTP</b></property> - <property name="use_markup">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Enable Multicast/RTP _receiver</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> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="rtpSendCheckButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Enable Multicast/RTP _sender</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">1</property> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment9"> + <widget class="GtkAlignment" id="alignment10"> <property name="visible">True</property> <property name="left_padding">12</property> <child> - <widget class="GtkVBox" id="vbox31"> + <widget class="GtkVBox" id="vbox36"> <property name="visible">True</property> <property name="spacing">6</property> <child> - <widget class="GtkCheckButton" id="rtpReceiveCheckButton"> + <widget class="GtkRadioButton" id="rtpMikeRadioButton"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Enable Multicast/RTP _receiver</property> + <property name="label" translatable="yes">Send audio from local _microphone</property> <property name="use_underline">True</property> <property name="response_id">0</property> <property name="draw_indicator">True</property> @@ -219,13 +224,14 @@ </packing> </child> <child> - <widget class="GtkCheckButton" id="rtpSendCheckButton"> + <widget class="GtkRadioButton" id="rtpSpeakerRadioButton"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Enable Multicast/RTP _sender</property> + <property name="label" translatable="yes">Send audio from local s_peakers</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> <packing> <property name="expand">False</property> @@ -234,92 +240,100 @@ </packing> </child> <child> - <widget class="GtkAlignment" id="alignment10"> + <widget class="GtkRadioButton" id="rtpNullSinkRadioButton"> <property name="visible">True</property> - <property name="left_padding">12</property> - <child> - <widget class="GtkVBox" id="vbox36"> - <property name="visible">True</property> - <property name="spacing">6</property> - <child> - <widget class="GtkRadioButton" id="rtpMikeRadioButton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Send audio from local _microphone</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> - </packing> - </child> - <child> - <widget class="GtkRadioButton" id="rtpSpeakerRadioButton"> - <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="use_underline">True</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> - <property name="group">rtpMikeRadioButton</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkRadioButton" id="rtpNullSinkRadioButton"> - <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="use_underline">True</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> - <property name="group">rtpMikeRadioButton</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> - <child> - <widget class="GtkCheckButton" id="rtpLoopbackCheckButton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Loopback audio to local speakers</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">3</property> - </packing> - </child> - </widget> - </child> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Create seperate audio _device for Multicast/RTP</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> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">2</property> </packing> </child> + <child> + <widget class="GtkCheckButton" id="rtpLoopbackCheckButton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Loopback audio to local speakers</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">3</property> + </packing> + </child> </widget> </child> </widget> <packing> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> </widget> <packing> - <property name="expand">False</property> <property name="position">1</property> + <property name="tab_expand">False</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label2"> + <property name="visible">True</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">Multicast/R_TP</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="position">1</property> + <property name="tab_expand">False</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="vbox4"> + <property name="visible">True</property> + <property name="border_width">12</property> + <property name="spacing">6</property> + <child> + <widget class="GtkCheckButton" id="combineCheckButton"> + <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 sound cards</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> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + <property name="tab_expand">False</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label3"> + <property name="visible">True</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">Sim_ultaneous Output</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="position">2</property> + <property name="tab_expand">False</property> + <property name="tab_fill">False</property> </packing> </child> </widget> |