Ticket #164: paprefs-speaker-setup.patch

File paprefs-speaker-setup.patch, 52.1 kB (added by rodrigo, 6 months ago)

Patch from openSUSE to allow changing speaker setup on the fly

  • src/paprefs.cc

    old new  
    2929#include <libglademm.h> 
    3030#include <gconfmm.h> 
    3131 
     32#include <stdlib.h> 
     33#include <glibmm/spawn.h> 
     34 
    3235#define PA_GCONF_ROOT "/system/pulseaudio" 
    3336#define PA_GCONF_PATH_MODULES PA_GCONF_ROOT"/modules" 
    3437 
     
    5558        *rtpSpeakerRadioButton, 
    5659        *rtpNullSinkRadioButton; 
    5760 
     61    Gtk::ComboBox 
     62       *speakerLayoutComboBox; 
     63 
    5864    Glib::RefPtr<Gnome::Conf::Client> gconf; 
    5965 
    6066    bool ignoreChanges; 
     
    6571    void onChangeZeroconfDiscover(); 
    6672    void onChangeRtpReceive(); 
    6773    void onChangeRtpSend(); 
     74    void onChangeSpeakerLayout(); 
    6875    void onChangeCombine(); 
    6976    void readFromGConf(); 
    7077    void checkForModules(); 
     
    7380    void writeToGConfRtpReceive(); 
    7481    void writeToGConfRtpSend(); 
    7582    void writeToGConfCombine(); 
     83    void writeToGConfSpeakerLayout(); 
    7684    void onGConfChange(const Glib::ustring& key, const Gnome::Conf::Value& value); 
    7785 
    7886    bool rtpRecvAvailable, rtpSendAvailable, zeroconfPublishAvailable, zeroconfDiscoverAvailable, remoteAvailable; 
     
    97105    x->get_widget("rtpSpeakerRadioButton", rtpSpeakerRadioButton); 
    98106    x->get_widget("rtpNullSinkRadioButton", rtpNullSinkRadioButton); 
    99107 
     108    x->get_widget("speakerLayout", speakerLayoutComboBox); 
     109 
    100110    Gdk::Color c("white"); 
    101111    titleEventBox->modify_bg(Gtk::STATE_NORMAL, c); 
    102112 
     
    126136    rtpNullSinkRadioButton->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onChangeRtpSend)); 
    127137 
    128138    combineCheckButton->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::onChangeCombine)); 
     139 
     140    speakerLayoutComboBox->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::onChangeSpeakerLayout)); 
    129141} 
    130142 
    131143MainWindow* MainWindow::create() { 
     
    193205    writeToGConfRtpSend(); 
    194206} 
    195207 
     208void MainWindow::onChangeSpeakerLayout() { 
     209    if (ignoreChanges) 
     210        return; 
     211 
     212    writeToGConfSpeakerLayout(); 
     213} 
     214 
    196215void MainWindow::onChangeCombine() { 
    197216    Gnome::Conf::ChangeSet changeSet; 
    198217 
     
    202221    writeToGConfCombine(); 
    203222} 
    204223 
     224void MainWindow::writeToGConfSpeakerLayout() { 
     225    gchar *contents, *local_path; 
     226    gsize length; 
     227    GString *new_contents = NULL; 
     228 
     229    local_path = g_strdup_printf ("%s/.pulse/daemon.conf", g_get_home_dir ()); 
     230    if (!g_file_get_contents (local_path, &contents, &length, NULL)) 
     231    g_file_get_contents ("/etc/pulse/daemon.conf", &contents, &length, NULL); 
     232 
     233    new_contents = g_string_new (NULL); 
     234    if (contents) { 
     235    gchar **lines; 
     236    gint i; 
     237 
     238    lines = g_strsplit (contents, "\n", 0); 
     239    if (lines) { 
     240            gboolean has_default_samples = FALSE; 
     241        for (i = 0; lines[i] != NULL; i++) { 
     242        if (!g_ascii_strncasecmp ((const gchar *) lines[i], 
     243                      "default-sample-channels", 
     244                      23)) { 
     245            g_string_append_printf (new_contents, "default-sample-channels = %d\n", 
     246                        speakerLayoutComboBox->get_active_row_number() + 1); 
     247            has_default_samples = TRUE; 
     248        } else { 
     249                    g_string_append (new_contents, lines[i]); 
     250            g_string_append (new_contents, "\n"); 
     251        } 
     252        } 
     253 
     254        if (!has_default_samples) { 
     255        g_string_append_printf (new_contents, "default-sample-channels = %d\n", 
     256                    speakerLayoutComboBox->get_active_row_number() + 1); 
     257        } 
     258 
     259        g_strfreev (lines); 
     260    } else { 
     261        g_string_append_printf (new_contents, "default-sample-channels = %d\n", 
     262                    speakerLayoutComboBox->get_active_row_number() + 1); 
     263    } 
     264 
     265    } else { 
     266    g_string_append_printf (new_contents, "default-sample-channels = %d\n", 
     267                speakerLayoutComboBox->get_active_row_number() + 1); 
     268    } 
     269 
     270    /* Save the configuration to local daemon.conf */ 
     271    g_file_set_contents (local_path, new_contents->str, new_contents->len, NULL); 
     272 
     273    g_free (contents); 
     274    g_string_free (new_contents, TRUE); 
     275    g_free (local_path); 
     276 
     277    /* Restart the pulseaudio daemon */ 
     278    Glib::spawn_command_line_sync ("pulseaudio -k"); 
     279    Glib::spawn_command_line_sync ("pulseaudio -D"); 
     280} 
     281 
    205282void MainWindow::writeToGConfCombine() { 
    206283    Gnome::Conf::ChangeSet changeSet; 
    207284    changeSet.set(PA_GCONF_PATH_MODULES"/combine/locked", true); 
     
    385462 
    386463    combineCheckButton->set_active(gconf->get_bool(PA_GCONF_PATH_MODULES"/combine/enabled")); 
    387464 
     465    /* Get speaker layout from daemon.conf file */ 
     466    { 
     467    gchar *contents, *local_path; 
     468    gsize length; 
     469    int speakerLayout; 
     470 
     471    local_path = g_strdup_printf ("%s/.pulse/daemon.conf", g_get_home_dir ()); 
     472    if (!g_file_get_contents (local_path, &contents, &length, NULL)) 
     473        g_file_get_contents ("/etc/pulse/daemon.conf", &contents, &length, NULL); 
     474 
     475    g_free (local_path); 
     476 
     477    if (contents) { 
     478        gchar **lines; 
     479        gint i; 
     480 
     481        lines = g_strsplit (contents, "\n", 0); 
     482        if (lines) { 
     483        for (i = 0; lines[i] != NULL; i++) { 
     484            if (!g_ascii_strncasecmp ((const gchar *) lines[i], 
     485                          "default-sample-channels", 
     486                          23)) { 
     487            gchar **current_line; 
     488            int j; 
     489 
     490            current_line = g_strsplit (lines[i], "=", 2); 
     491            if (current_line) { 
     492                gchar *s = g_strdup (current_line[1] ? current_line[1] : "2"); 
     493                gchar *number = g_strstrip (s); 
     494 
     495                speakerLayout = number ? atoi (number) : 2; 
     496                if (speakerLayout >= 1 && speakerLayout <= 9) 
     497                    speakerLayoutComboBox->set_active (speakerLayout - 1); 
     498                else 
     499                    speakerLayoutComboBox->set_active(1); 
     500 
     501                g_strfreev (current_line); 
     502                g_free (number); 
     503            } else 
     504                 speakerLayoutComboBox->set_active(1); 
     505 
     506            break; 
     507            } 
     508        } 
     509 
     510        g_strfreev (lines); 
     511        } else 
     512        speakerLayoutComboBox->set_active(1); 
     513 
     514        g_free (contents); 
     515    } else 
     516        speakerLayoutComboBox->set_active(1); 
     517    } 
     518 
     519    printf ("Exit from parsing code"); 
     520 
    388521    ignoreChanges = FALSE; 
    389522 
    390523    updateSensitive(); 
     524 
     525    printf ("readFromGConf successful"); 
    391526} 
    392527 
    393528void MainWindow::checkForModules() { 
  • src/paprefs.glade

    old new  
    1 <?xml version="1.0" encoding="UTF-8" standalone="no"?
    2 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> 
    3 <!--*- mode: xml -*--> 
     1<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--
     2<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> 
     3 
    44<glade-interface> 
    5   <widget class="GtkWindow" id="mainWindow"> 
    6     <property name="title" translatable="yes">PulseAudio Preferences</property> 
    7     <property name="resizable">False</property> 
    8     <property name="icon_name">preferences-desktop</property> 
    9     <child> 
    10       <widget class="GtkVBox" id="vbox3"> 
    11         <property name="visible">True</property> 
    12         <child> 
    13           <widget class="GtkEventBox" id="titleEventBox"> 
    14             <property name="visible">True</property> 
    15             <child> 
    16               <widget class="GtkHBox" id="hbox2"> 
    17                 <property name="visible">True</property> 
    18                 <property name="border_width">12</property> 
    19                 <property name="spacing">12</property> 
    20                 <child> 
    21                   <widget class="GtkImage" id="image19"> 
    22                     <property name="visible">True</property> 
    23                     <property name="icon_size">6</property> 
    24                     <property name="icon_name">preferences-desktop</property> 
    25                   </widget> 
    26                   <packing> 
    27                     <property name="expand">False</property> 
    28                     <property name="fill">False</property> 
    29                   </packing> 
    30                 </child> 
    31                 <child> 
    32                   <widget class="GtkVBox" id="vbox22"> 
    33                     <property name="visible">True</property> 
    34                     <property name="spacing">6</property> 
    35                     <child> 
    36                       <widget class="GtkLabel" id="titleLabel"> 
    37                         <property name="visible">True</property> 
    38                         <property name="xalign">0</property> 
    39                         <property name="yalign">1</property> 
    40                         <property name="label" translatable="yes">&lt;span size="18000" color="black"&gt;&lt;b&gt;PulseAudio Preferences&lt;/b&gt;&lt;/span&gt;</property> 
    41                         <property name="use_markup">True</property> 
    42                       </widget> 
    43                     </child> 
    44                     <child> 
    45                       <widget class="GtkLabel" id="label4825"> 
    46                         <property name="visible">True</property> 
    47                         <property name="xalign">0</property> 
    48                         <property name="yalign">0</property> 
    49                         <property name="label" translatable="yes">&lt;span color="black"&gt;View and modify the configuration of your local sound server&lt;/span&gt;</property> 
    50                         <property name="use_markup">True</property> 
    51                       </widget> 
    52                       <packing> 
    53                         <property name="position">1</property> 
    54                       </packing> 
    55                     </child> 
    56                   </widget> 
    57                   <packing> 
    58                     <property name="position">1</property> 
    59                   </packing> 
    60                 </child> 
    61               </widget> 
    62             </child> 
    63           </widget> 
    64           <packing> 
    65             <property name="expand">False</property> 
    66             <property name="fill">False</property> 
    67           </packing> 
    68         </child> 
    69         <child> 
    70           <widget class="GtkHSeparator" id="hseparator1"> 
    71             <property name="visible">True</property> 
    72           </widget> 
    73           <packing> 
    74             <property name="expand">False</property> 
    75             <property name="fill">False</property> 
    76             <property name="position">1</property> 
    77           </packing> 
    78         </child> 
    79         <child> 
    80           <widget class="GtkVBox" id="vbox20"> 
    81             <property name="visible">True</property> 
    82             <property name="border_width">12</property> 
    83             <property name="spacing">12</property> 
    84             <child> 
    85               <widget class="GtkNotebook" id="notebook1"> 
    86                 <property name="visible">True</property> 
    87                 <property name="can_focus">True</property> 
    88                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> 
    89                 <child> 
    90                   <widget class="GtkVBox" id="vbox30"> 
    91                     <property name="visible">True</property> 
    92                     <property name="border_width">12</property> 
    93                     <property name="spacing">6</property> 
    94                     <child> 
    95                       <widget class="GtkCheckButton" id="remoteAccessCheckButton"> 
    96                         <property name="visible">True</property> 
    97                         <property name="can_focus">True</property> 
    98                         <property name="label" translatable="yes">Enable _network access to local sound devices</property> 
    99                         <property name="use_underline">True</property> 
    100                         <property name="response_id">0</property> 
    101                         <property name="draw_indicator">True</property> 
    102                       </widget> 
    103                       <packing> 
    104                         <property name="expand">False</property> 
    105                         <property name="fill">False</property> 
    106                       </packing> 
    107                     </child> 
    108                     <child> 
    109                       <widget class="GtkAlignment" id="alignment8"> 
    110                         <property name="visible">True</property> 
    111                         <property name="left_padding">12</property> 
    112                         <child> 
    113                           <widget class="GtkVBox" id="vbox34"> 
    114                             <property name="visible">True</property> 
    115                             <property name="spacing">6</property> 
    116                             <child> 
    117                               <widget class="GtkCheckButton" id="zeroconfBrowseCheckButton"> 
    118                                 <property name="visible">True</property> 
    119                                 <property name="can_focus">True</property> 
    120                                 <property name="label" translatable="yes">Allow other machines on the LAN to _discover local sound devices</property> 
    121                                 <property name="use_underline">True</property> 
    122                                 <property name="response_id">0</property> 
    123                                 <property name="draw_indicator">True</property> 
    124                               </widget> 
    125                               <packing> 
    126                                 <property name="expand">False</property> 
    127                                 <property name="fill">False</property> 
    128                               </packing> 
    129                             </child> 
    130                             <child> 
    131                               <widget class="GtkCheckButton" id="anonymousAuthCheckButton"> 
    132                                 <property name="visible">True</property> 
    133                                 <property name="can_focus">True</property> 
    134                                 <property name="label" translatable="yes">Don't require _authentication</property> 
    135                                 <property name="use_underline">True</property> 
    136                                 <property name="response_id">0</property> 
    137                                 <property name="draw_indicator">True</property> 
    138                               </widget> 
    139                               <packing> 
    140                                 <property name="expand">False</property> 
    141                                 <property name="fill">False</property> 
    142                                 <property name="position">1</property> 
    143                               </packing> 
    144                             </child> 
    145                           </widget> 
    146                         </child> 
    147                       </widget> 
    148                       <packing> 
    149                         <property name="expand">False</property> 
    150                         <property name="fill">False</property> 
    151                         <property name="position">1</property> 
    152                       </packing> 
    153                     </child> 
    154                     <child> 
    155                       <widget class="GtkCheckButton" id="zeroconfDiscoverCheckButton"> 
    156                         <property name="visible">True</property> 
    157                         <property name="can_focus">True</property> 
    158                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> 
    159                         <property name="label" translatable="yes">_Make discoverable network sound devices available locally</property> 
    160                         <property name="use_underline">True</property> 
    161                         <property name="response_id">0</property> 
    162                         <property name="draw_indicator">True</property> 
    163                       </widget> 
    164                       <packing> 
    165                         <property name="expand">False</property> 
    166                         <property name="fill">False</property> 
    167                         <property name="position">2</property> 
    168                       </packing> 
    169                     </child> 
    170                   </widget> 
    171                 </child> 
    172                 <child> 
    173                   <widget class="GtkLabel" id="label1"> 
    174                     <property name="visible">True</property> 
    175                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> 
    176                     <property name="label" translatable="yes">N_etwork Access</property> 
    177                     <property name="use_underline">True</property> 
    178                   </widget> 
    179                   <packing> 
    180                     <property name="type">tab</property> 
    181                     <property name="tab_fill">False</property> 
    182                   </packing> 
    183                 </child> 
    184                 <child> 
    185                   <widget class="GtkVBox" id="vbox31"> 
    186                     <property name="visible">True</property> 
    187                     <property name="border_width">12</property> 
    188                     <property name="spacing">6</property> 
    189                     <child> 
    190                       <widget class="GtkCheckButton" id="rtpReceiveCheckButton"> 
    191                         <property name="visible">True</property> 
    192                         <property name="can_focus">True</property> 
    193                         <property name="label" translatable="yes">Enable Multicast/RTP _receiver</property> 
    194                         <property name="use_underline">True</property> 
    195                         <property name="response_id">0</property> 
    196                         <property name="draw_indicator">True</property> 
    197                       </widget> 
    198                       <packing> 
    199                         <property name="expand">False</property> 
    200                         <property name="fill">False</property> 
    201                       </packing> 
    202                     </child> 
    203                     <child> 
    204                       <widget class="GtkCheckButton" id="rtpSendCheckButton"> 
    205                         <property name="visible">True</property> 
    206                         <property name="can_focus">True</property> 
    207                         <property name="label" translatable="yes">Enable Multicast/RTP _sender</property> 
    208                         <property name="use_underline">True</property> 
    209                         <property name="response_id">0</property> 
    210                         <property name="draw_indicator">True</property> 
    211                       </widget> 
    212                       <packing> 
    213                         <property name="expand">False</property> 
    214                         <property name="fill">False</property> 
    215                         <property name="position">1</property> 
    216                       </packing> 
    217                     </child> 
    218                     <child> 
    219                       <widget class="GtkAlignment" id="alignment10"> 
    220                         <property name="visible">True</property> 
    221                         <property name="left_padding">12</property> 
    222                         <child> 
    223                           <widget class="GtkVBox" id="vbox36"> 
    224                             <property name="visible">True</property> 
    225                             <property name="spacing">6</property> 
    226                             <child> 
    227                               <widget class="GtkRadioButton" id="rtpMikeRadioButton"> 
    228                                 <property name="visible">True</property> 
    229                                 <property name="can_focus">True</property> 
    230                                 <property name="label" translatable="yes">Send audio from local _microphone</property> 
    231                                 <property name="use_underline">True</property> 
    232                                 <property name="response_id">0</property> 
    233                                 <property name="draw_indicator">True</property> 
    234                               </widget> 
    235                               <packing> 
    236                                 <property name="expand">False</property> 
    237                                 <property name="fill">False</property> 
    238                               </packing> 
    239                             </child> 
    240                             <child> 
    241                               <widget class="GtkRadioButton" id="rtpSpeakerRadioButton"> 
    242                                 <property name="visible">True</property> 
    243                                 <property name="can_focus">True</property> 
    244                                 <property name="label" translatable="yes">Send audio from local s_peakers</property> 
    245                                 <property name="use_underline">True</property> 
    246                                 <property name="response_id">0</property> 
    247                                 <property name="draw_indicator">True</property> 
    248                                 <property name="group">rtpMikeRadioButton</property> 
    249                               </widget> 
    250                               <packing> 
    251                                 <property name="expand">False</property> 
    252                                 <property name="fill">False</property> 
    253                                 <property name="position">1</property> 
    254                               </packing> 
    255                             </child> 
    256                             <child> 
    257                               <widget class="GtkRadioButton" id="rtpNullSinkRadioButton"> 
    258                                 <property name="visible">True</property> 
    259                                 <property name="can_focus">True</property> 
    260                                 <property name="label" translatable="yes">Create seperate audio _device for Multicast/RTP</property> 
    261                                 <property name="use_underline">True</property> 
    262                                 <property name="response_id">0</property> 
    263                                 <property name="draw_indicator">True</property> 
    264                                 <property name="group">rtpMikeRadioButton</property> 
    265                               </widget> 
    266                               <packing> 
    267                                 <property name="expand">False</property> 
    268                                 <property name="fill">False</property> 
    269                                 <property name="position">2</property> 
    270                               </packing> 
    271                             </child> 
    272                             <child> 
    273                               <widget class="GtkCheckButton" id="rtpLoopbackCheckButton"> 
    274                                 <property name="visible">True</property> 
    275                                 <property name="can_focus">True</property> 
    276                                 <property name="label" translatable="yes">_Loopback audio to local speakers</property> 
    277                                 <property name="use_underline">True</property> 
    278                                 <property name="response_id">0</property> 
    279                                 <property name="draw_indicator">True</property> 
    280                               </widget> 
    281                               <packing> 
    282                                 <property name="expand">False</property> 
    283                                 <property name="fill">False</property> 
    284                                 <property name="position">3</property> 
    285                               </packing> 
    286                             </child> 
    287                           </widget> 
    288                         </child> 
    289                       </widget> 
    290                       <packing> 
    291                         <property name="position">2</property> 
    292                       </packing> 
    293                     </child> 
    294                   </widget> 
    295                   <packing> 
    296                     <property name="position">1</property> 
    297                   </packing> 
    298                 </child> 
    299                 <child> 
    300                   <widget class="GtkLabel" id="label2"> 
    301                     <property name="visible">True</property> 
    302                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> 
    303                     <property name="label" translatable="yes">Multicast/R_TP</property> 
    304                     <property name="use_underline">True</property> 
    305                   </widget> 
    306                   <packing> 
    307                     <property name="type">tab</property> 
    308                     <property name="position">1</property> 
    309                     <property name="tab_fill">False</property> 
    310                   </packing> 
    311                 </child> 
    312                 <child> 
    313                   <widget class="GtkVBox" id="vbox4"> 
    314                     <property name="visible">True</property> 
    315                     <property name="border_width">12</property> 
    316                     <property name="spacing">6</property> 
    317                     <child> 
    318                       <widget class="GtkCheckButton" id="combineCheckButton"> 
    319                         <property name="visible">True</property> 
    320                         <property name="can_focus">True</property> 
    321                         <property name="label" translatable="yes">Add _virtual output device for simultaneous output on all local sound cards</property> 
    322                         <property name="use_underline">True</property> 
    323                         <property name="response_id">0</property> 
    324                         <property name="draw_indicator">True</property> 
    325                       </widget> 
    326                       <packing> 
    327                         <property name="expand">False</property> 
    328                         <property name="fill">False</property> 
    329                       </packing> 
    330                     </child> 
    331                   </widget> 
    332                   <packing> 
    333                     <property name="position">2</property> 
    334                   </packing> 
    335                 </child> 
    336                 <child> 
    337                   <widget class="GtkLabel" id="label3"> 
    338                     <property name="visible">True</property> 
    339                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> 
    340                     <property name="label" translatable="yes">Sim_ultaneous Output</property> 
    341                     <property name="use_underline">True</property> 
    342                   </widget> 
    343                   <packing> 
    344                     <property name="type">tab</property> 
    345                     <property name="position">2</property> 
    346                     <property name="tab_fill">False</property> 
    347                   </packing> 
    348                 </child> 
    349               </widget> 
    350             </child> 
    351             <child> 
    352               <widget class="GtkHButtonBox" id="hbuttonbox1"> 
    353                 <property name="visible">True</property> 
    354                 <property name="layout_style">GTK_BUTTONBOX_END</property> 
    355                 <child> 
    356                   <widget class="GtkButton" id="closeButton"> 
    357                     <property name="visible">True</property> 
    358                     <property name="can_focus">True</property> 
    359                     <property name="can_default">True</property> 
    360                     <property name="label">gtk-close</property> 
    361                     <property name="use_stock">True</property> 
    362                     <property name="response_id">0</property> 
    363                   </widget> 
    364                 </child> 
    365               </widget> 
    366               <packing> 
    367                 <property name="expand">False</property> 
    368                 <property name="fill">False</property> 
    369                 <property name="pack_type">GTK_PACK_END</property> 
    370                 <property name="position">1</property> 
    371               </packing> 
    372             </child> 
    373           </widget> 
    374           <packing> 
    375             <property name="position">2</property> 
    376           </packing> 
    377         </child> 
    378       </widget> 
    379     </child> 
    380   </widget> 
     5 
     6<widget class="GtkWindow" id="mainWindow"> 
     7  <property name="title" translatable="yes">PulseAudio Preferences</property> 
     8  <property name="type">GTK_WINDOW_TOPLEVEL</property> 
     9  <property name="window_position">GTK_WIN_POS_NONE</property> 
     10  <property name="modal">False</property> 
     11  <property name="resizable">False</property> 
     12  <property name="destroy_with_parent">False</property> 
     13  <property name="icon_name">preferences-desktop</property> 
     14  <property name="decorated">True</property> 
     15  <property name="skip_taskbar_hint">False</property> 
     16  <property name="skip_pager_hint">False</property> 
     17  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> 
     18  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> 
     19  <property name="focus_on_map">True</property> 
     20  <property name="urgency_hint">False</property> 
     21 
     22  <child> 
     23    <widget class="GtkVBox" id="vbox3"> 
     24      <property name="visible">True</property> 
     25      <property name="homogeneous">False</property> 
     26      <property name="spacing">0</property> 
     27 
     28      <child> 
     29    <widget class="GtkEventBox" id="titleEventBox"> 
     30      <property name="visible">True</property> 
     31      <property name="visible_window">True</property> 
     32      <property name="above_child">False</property> 
     33 
     34      <child> 
     35        <widget class="GtkHBox" id="hbox2"> 
     36          <property name="border_width">12</property> 
     37          <property name="visible">True</property> 
     38          <property name="homogeneous">False</property> 
     39          <property name="spacing">12</property> 
     40 
     41          <child> 
     42        <widget class="GtkImage" id="image19"> 
     43          <property name="visible">True</property> 
     44          <property name="icon_size">6</property> 
     45          <property name="icon_name">preferences-desktop</property> 
     46          <property name="xalign">0.5</property> 
     47          <property name="yalign">0.5</property> 
     48          <property name="xpad">0</property> 
     49          <property name="ypad">0</property> 
     50        </widget> 
     51        <packing> 
     52          <property name="padding">0</property> 
     53          <property name="expand">False</property> 
     54          <property name="fill">False</property> 
     55        </packing> 
     56          </child> 
     57 
     58          <child> 
     59        <widget class="GtkVBox" id="vbox22"> 
     60          <property name="visible">True</property> 
     61          <property name="homogeneous">False</property> 
     62          <property name="spacing">6</property> 
     63 
     64          <child> 
     65            <widget class="GtkLabel" id="titleLabel"> 
     66              <property name="visible">True</property> 
     67              <property name="label" translatable="yes">&lt;span size=&quot;18000&quot; color=&quot;black&quot;&gt;&lt;b&gt;PulseAudio Preferences&lt;/b&gt;&lt;/span&gt;</property> 
     68              <property name="use_underline">False</property> 
     69              <property name="use_markup">True</property> 
     70              <property name="justify">GTK_JUSTIFY_LEFT</property> 
     71              <property name="wrap">False</property> 
     72              <property name="selectable">False</property> 
     73              <property name="xalign">0</property> 
     74              <property name="yalign">1</property> 
     75              <property name="xpad">0</property> 
     76              <property name="ypad">0</property> 
     77              <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> 
     78              <property name="width_chars">-1</property> 
     79              <property name="single_line_mode">False</property> 
     80              <property name="angle">0</property> 
     81            </widget> 
     82            <packing> 
     83              <property name="padding">0</property> 
     84              <property name="expand">True</property> 
     85              <property name="fill">True</property> 
     86            </packing> 
     87          </child> 
     88 
     89          <child> 
     90            <widget class="GtkLabel" id="label4825"> 
     91              <property name="visible">True</property> 
     92              <property name="label" translatable="yes">&lt;span color=&quot;black&quot;&gt;View and modify the configuration of your local sound server&lt;/span&gt;</property> 
     93              <property name="use_underline">False</property> 
     94              <property name="use_markup">True</property> 
     95              <property name="justify">GTK_JUSTIFY_LEFT</property> 
     96              <property name="wrap">False</property> 
     97              <property name="selectable">False</property> 
     98              <property name="xalign">0</property> 
     99              <property name="yalign">0</property> 
     100              <property name="xpad">0</property> 
     101              <property name="ypad">0</property> 
     102              <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> 
     103              <property name="width_chars">-1</property> 
     104              <property name="single_line_mode">False</property> 
     105              <property name="angle">0</property> 
     106            </widget> 
     107            <packing> 
     108              <property name="padding">0</property> 
     109              <property name="expand">True</property> 
     110              <property name="fill">True</property> 
     111            </packing> 
     112          </child> 
     113        </widget> 
     114        <packing> 
     115          <property name="padding">0</property> 
     116          <property name="expand">True</property> 
     117          <property name="fill">True</property> 
     118        </packing> 
     119          </child> 
     120        </widget> 
     121      </child> 
     122    </widget> 
     123    <packing> 
     124      <property name="padding">0</property> 
     125      <property name="expand">False</property> 
     126      <property name="fill">False</property> 
     127    </packing> 
     128      </child> 
     129 
     130      <child> 
     131    <widget class="GtkHSeparator" id="hseparator1"> 
     132      <property name="visible">True</property> 
     133    </widget> 
     134    <packing> 
     135      <property name="padding">0</property> 
     136      <property name="expand">False</property> 
     137      <property name="fill">False</property> 
     138    </packing> 
     139      </child> 
     140 
     141      <child> 
     142    <widget class="GtkVBox" id="vbox20"> 
     143      <property name="border_width">12</property> 
     144      <property name="visible">True</property> 
     145      <property name="homogeneous">False</property> 
     146      <property name="spacing">12</property> 
     147 
     148      <child> 
     149        <widget class="GtkNotebook" id="notebook1"> 
     150          <property name="visible">True</property> 
     151          <property name="can_focus">True</property> 
     152          <property name="show_tabs">True</property> 
     153          <property name="show_border">True</property> 
     154          <property name="tab_pos">GTK_POS_TOP</property> 
     155          <property name="scrollable">False</property> 
     156          <property name="enable_popup">False</property> 
     157 
     158          <child> 
     159        <widget class="GtkVBox" id="vbox30"> 
     160          <property name="border_width">12</property> 
     161          <property name="visible">True</property> 
     162          <property name="homogeneous">False</property> 
     163          <property name="spacing">6</property> 
     164 
     165          <child> 
     166            <widget class="GtkCheckButton" id="remoteAccessCheckButton"> 
     167              <property name="visible">True</property> 
     168              <property name="can_focus">True</property> 
     169              <property name="label" translatable="yes">Enable _network access to local sound devices</property> 
     170              <property name="use_underline">True</property> 
     171              <property name="relief">GTK_RELIEF_NORMAL</property> 
     172              <property name="focus_on_click">True</property> 
     173              <property name="active">False</property> 
     174              <property name="inconsistent">False</property> 
     175              <property name="draw_indicator">True</property> 
     176            </widget> 
     177            <packing> 
     178              <property name="padding">0</property> 
     179              <property name="expand">False</property> 
     180              <property name="fill">False</property> 
     181            </packing> 
     182          </child> 
     183 
     184          <child> 
     185            <widget class="GtkAlignment" id="alignment8"> 
     186              <property name="visible">True</property> 
     187              <property name="xalign">0.5</property> 
     188              <property name="yalign">0.5</property> 
     189              <property name="xscale">1</property> 
     190              <property name="yscale">1</property> 
     191              <property name="top_padding">0</property> 
     192              <property name="bottom_padding">0</property> 
     193              <property name="left_padding">12</property> 
     194              <property name="right_padding">0</property> 
     195 
     196              <child> 
     197            <widget class="GtkVBox" id="vbox34"> 
     198              <property name="visible">True</property> 
     199              <property name="homogeneous">False</property> 
     200              <property name="spacing">6</property> 
     201 
     202              <child> 
     203                <widget class="GtkCheckButton" id="zeroconfBrowseCheckButton"> 
     204                  <property name="visible">True</property> 
     205                  <property name="can_focus">True</property> 
     206                  <property name="label" translatable="yes">Allow other machines on the LAN to _discover local sound devices</property> 
     207                  <property name="use_underline">True</property> 
     208                  <property name="relief">GTK_RELIEF_NORMAL</property> 
     209                  <property name="focus_on_click">True</property> 
     210                  <property name="active">False</property> 
     211                  <property name="inconsistent">False</property> 
     212                  <property name="draw_indicator">True</property> 
     213                </widget> 
     214                <packing> 
     215                  <property name="padding">0</property> 
     216                  <property name="expand">False</property> 
     217                  <property name="fill">False</property> 
     218                </packing> 
     219              </child> 
     220 
     221              <child> 
     222                <widget class="GtkCheckButton" id="anonymousAuthCheckButton"> 
     223                  <property name="visible">True</property> 
     224                  <property name="can_focus">True</property> 
     225                  <property name="label" translatable="yes">Don't require _authentication</property> 
     226                  <property name="use_underline">True</property> 
     227                  <property name="relief">GTK_RELIEF_NOR