fix(#7): unable to find audio sources

This commit is contained in:
Salem Yaslem 2021-05-20 12:03:00 +03:00
parent e033addfaf
commit ee4542ec11
3 changed files with 305 additions and 292 deletions

View File

@ -1,25 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.2 --> <!-- Generated with glade 3.38.2 -->
<interface> <interface>
<requires lib="gtk+" version="3.16"/> <requires lib="gtk+" version="3.16"/>
<object class="GtkAboutDialog" id="about_dialog"> <object class="GtkAboutDialog" id="about_dialog">
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="destroy_with_parent">True</property> <property name="destroy-with-parent">True</property>
<property name="type_hint">dialog</property> <property name="type-hint">dialog</property>
<property name="logo_icon_name">blue-recorder</property> <property name="logo-icon-name">blue-recorder</property>
<child type="titlebar">
<placeholder/>
</child>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="aboutdialog-vbox1"> <object class="GtkBox" id="aboutdialog-vbox1">
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">2</property> <property name="spacing">2</property>
<child internal-child="action_area"> <child internal-child="action_area">
<object class="GtkButtonBox" id="aboutdialog-action_area1"> <object class="GtkButtonBox" id="aboutdialog-action_area1">
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<property name="layout_style">end</property> <property name="layout-style">end</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -32,73 +29,74 @@
</object> </object>
<object class="GtkAdjustment" id="adjustment1"> <object class="GtkAdjustment" id="adjustment1">
<property name="upper">10000</property> <property name="upper">10000</property>
<property name="step_increment">1</property> <property name="step-increment">1</property>
<property name="page_increment">2</property> <property name="page-increment">2</property>
</object> </object>
<object class="GtkAdjustment" id="adjustment2"> <object class="GtkAdjustment" id="adjustment2">
<property name="lower">1</property> <property name="lower">1</property>
<property name="upper">200</property> <property name="upper">200</property>
<property name="value">30</property> <property name="value">30</property>
<property name="step_increment">1</property> <property name="step-increment">1</property>
<property name="page_increment">10</property> <property name="page-increment">10</property>
</object> </object>
<object class="GtkAdjustment" id="adjustment3"> <object class="GtkAdjustment" id="adjustment3">
<property name="upper">100</property> <property name="upper">100</property>
<property name="step_increment">1</property> <property name="step-increment">1</property>
<property name="page_increment">10</property> <property name="page-increment">10</property>
</object> </object>
<object class="GtkAdjustment" id="adjustment4"> <object class="GtkAdjustment" id="adjustment4">
<property name="upper">100</property> <property name="upper">100</property>
<property name="step_increment">1</property> <property name="step-increment">1</property>
<property name="page_increment">10</property> <property name="page-increment">10</property>
</object> </object>
<object class="GtkWindow" id="area_chooser_window"> <object class="GtkWindow" id="area_chooser_window">
<property name="name">area_chooser_window</property> <property name="name">area_chooser_window</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
<property name="window_position">center</property> <property name="window-position">center</property>
<property name="icon_name">blue-recorder</property> <property name="icon-name">blue-recorder</property>
<property name="gravity">static</property> <property name="gravity">static</property>
<child type="titlebar"> <child type="titlebar">
<object class="GtkHeaderBar" id="headerbar2"> <object class="GtkHeaderBar" id="headerbar2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="has_subtitle">False</property> <property name="has-subtitle">False</property>
<property name="show_close_button">True</property> <property name="show-close-button">True</property>
<child> <child>
<object class="GtkButton" id="area_set_button"> <object class="GtkButton" id="area_set_button">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">True</property> <property name="receives-default">True</property>
<property name="relief">half</property> <property name="relief">half</property>
<property name="always_show_image">True</property> <property name="always-show-image">True</property>
<child> <child>
<!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="column_spacing">3</property> <property name="column-spacing">3</property>
<property name="row_homogeneous">True</property> <property name="row-homogeneous">True</property>
<child> <child>
<object class="GtkImage"> <object class="GtkImage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="icon_name">dialog-ok</property> <property name="icon-name">dialog-ok</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Apply</property> <property name="label" translatable="yes">Apply</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
</object> </object>
@ -110,174 +108,54 @@
</object> </object>
<object class="GtkImage" id="image3"> <object class="GtkImage" id="image3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="icon_name">media-playback-start</property> <property name="icon-name">media-playback-start</property>
</object> </object>
<object class="GtkImage" id="image5"> <object class="GtkImage" id="image5">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="stock">gtk-media-stop</property> <property name="stock">gtk-media-stop</property>
</object> </object>
<object class="GtkMenu" id="menu1"> <object class="GtkMenu" id="menu1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<child> <child>
<object class="GtkMenuItem" id="about_menu_item"> <object class="GtkMenuItem" id="about_menu_item">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
</object> </object>
</child> </child>
</object> </object>
<object class="GtkWindow" id="main_window"> <object class="GtkWindow" id="main_window">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="resizable">False</property> <property name="resizable">False</property>
<property name="window_position">center</property> <property name="window-position">center</property>
<property name="gravity">center</property> <property name="gravity">center</property>
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_subtitle">False</property>
<property name="show_close_button">True</property>
<child>
<object class="GtkButton" id="recordbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">half</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="column_spacing">2</property>
<property name="row_homogeneous">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">media-record</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Record</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="stopbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">half</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="column_spacing">2</property>
<property name="row_homogeneous">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">media-playback-stop</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Stop Recording</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="playbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">image3</property>
<property name="relief">half</property>
<property name="always_show_image">True</property>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="popup">menu1</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">view-list-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
<child> <child>
<object class="GtkBox" id="box3"> <object class="GtkBox" id="box3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="GtkBox" id="box4"> <object class="GtkBox" id="box4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_left">5</property> <property name="margin-left">5</property>
<property name="margin_right">5</property> <property name="margin-right">5</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<child> <child>
<object class="GtkEntry" id="filename"> <object class="GtkEntry" id="filename">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="has_focus">True</property> <property name="has-focus">True</property>
<property name="can_default">True</property> <property name="can-default">True</property>
<property name="has_default">True</property> <property name="has-default">True</property>
<property name="margin_left">5</property> <property name="margin-left">5</property>
<property name="margin_right">5</property> <property name="margin-right">5</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -288,12 +166,12 @@
<child> <child>
<object class="GtkFileChooserButton" id="filechooser"> <object class="GtkFileChooserButton" id="filechooser">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="has_focus">True</property> <property name="has-focus">True</property>
<property name="margin_left">5</property> <property name="margin-left">5</property>
<property name="margin_right">5</property> <property name="margin-right">5</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
<property name="action">select-folder</property> <property name="action">select-folder</property>
</object> </object>
<packing> <packing>
@ -312,11 +190,11 @@
<child> <child>
<object class="GtkComboBoxText" id="comboboxtext1"> <object class="GtkComboBoxText" id="comboboxtext1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_left">10</property> <property name="margin-left">10</property>
<property name="margin_right">10</property> <property name="margin-right">10</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -327,21 +205,21 @@
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_left">5</property> <property name="margin-left">5</property>
<property name="margin_right">5</property> <property name="margin-right">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
<property name="homogeneous">True</property> <property name="homogeneous">True</property>
<child> <child>
<object class="GtkButton" id="window_grab_button"> <object class="GtkButton" id="window_grab_button">
<property name="label" translatable="yes">button</property> <property name="label" translatable="yes">button</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">True</property> <property name="receives-default">True</property>
<property name="margin_left">5</property> <property name="margin-left">5</property>
<property name="margin_right">5</property> <property name="margin-right">5</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -353,12 +231,12 @@
<object class="GtkButton" id="area_grab_button"> <object class="GtkButton" id="area_grab_button">
<property name="label" translatable="yes">button</property> <property name="label" translatable="yes">button</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">True</property> <property name="receives-default">True</property>
<property name="margin_left">5</property> <property name="margin-left">5</property>
<property name="margin_right">5</property> <property name="margin-right">5</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -374,140 +252,147 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid" id="grid1"> <object class="GtkGrid" id="grid1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_left">10</property> <property name="margin-left">10</property>
<property name="margin_right">10</property> <property name="margin-right">10</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
<property name="row_homogeneous">True</property> <property name="row-homogeneous">True</property>
<property name="column_homogeneous">True</property> <property name="column-homogeneous">True</property>
<child> <child>
<!-- n-columns=2 n-rows=2 -->
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="row_homogeneous">True</property> <property name="row-homogeneous">True</property>
<property name="column_homogeneous">True</property> <property name="column-homogeneous">True</property>
<child> <child>
<object class="GtkCheckButton" id="videoswitch"> <object class="GtkCheckButton" id="videoswitch">
<property name="label" translatable="yes">checkbutton</property> <property name="label" translatable="yes">checkbutton</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="active">True</property>
<property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="audioswitch"> <object class="GtkCheckButton" id="audioswitch">
<property name="label" translatable="yes">checkbutton</property> <property name="label" translatable="yes">checkbutton</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="active">True</property>
<property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="mouseswitch"> <object class="GtkCheckButton" id="mouseswitch">
<property name="label" translatable="yes">checkbutton</property> <property name="label" translatable="yes">checkbutton</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="active">True</property>
<property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">1</property> <property name="top-attach">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="followmouseswitch"> <object class="GtkCheckButton" id="followmouseswitch">
<property name="label" translatable="yes">checkbutton</property> <property name="label" translatable="yes">checkbutton</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="receives_default">False</property> <property name="receives-default">False</property>
<property name="draw_indicator">True</property> <property name="active">True</property>
<property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">1</property> <property name="top-attach">1</property>
</packing> </packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=2 n-rows=2 -->
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="row_spacing">3</property> <property name="row-spacing">3</property>
<property name="row_homogeneous">True</property> <property name="row-homogeneous">True</property>
<property name="column_homogeneous">True</property> <property name="column-homogeneous">True</property>
<child> <child>
<object class="GtkLabel" id="frames_label"> <object class="GtkLabel" id="frames_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">label</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="frames"> <object class="GtkSpinButton" id="frames">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="max_width_chars">2</property> <property name="max-width-chars">2</property>
<property name="text" translatable="yes">30</property> <property name="text" translatable="yes">30</property>
<property name="adjustment">adjustment2</property> <property name="adjustment">adjustment2</property>
<property name="value">30</property> <property name="value">30</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="delay_label"> <object class="GtkLabel" id="delay_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">label</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">1</property> <property name="top-attach">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="delay"> <object class="GtkSpinButton" id="delay">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="max_width_chars">2</property> <property name="max-width-chars">2</property>
<property name="text" translatable="yes">0</property> <property name="text" translatable="yes">0</property>
<property name="adjustment">adjustment1</property> <property name="adjustment">adjustment1</property>
<property name="climb_rate">1</property> <property name="climb-rate">1</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">1</property> <property name="top-attach">1</property>
</packing> </packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
</object> </object>
@ -518,65 +403,66 @@
</packing> </packing>
</child> </child>
<child> <child>
<!-- n-columns=2 n-rows=2 -->
<object class="GtkGrid"> <object class="GtkGrid">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_left">10</property> <property name="margin-left">10</property>
<property name="margin_right">10</property> <property name="margin-right">10</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
<property name="row_spacing">2</property> <property name="row-spacing">2</property>
<property name="column_spacing">5</property> <property name="column-spacing">5</property>
<child> <child>
<object class="GtkEntry" id="command"> <object class="GtkEntry" id="command">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can-focus">True</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">1</property> <property name="top-attach">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="command_label"> <object class="GtkLabel" id="command_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">label</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">1</property> <property name="top-attach">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="audio_source_label"> <object class="GtkLabel" id="audio_source_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="margin_top">5</property> <property name="margin-top">5</property>
<property name="margin_bottom">5</property> <property name="margin-bottom">5</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">label</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left-attach">0</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBoxText" id="audiosource"> <object class="GtkComboBoxText" id="audiosource">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can-focus">False</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left-attach">1</property>
<property name="top_attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
</object> </object>
@ -588,5 +474,127 @@
</child> </child>
</object> </object>
</child> </child>
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="has-subtitle">False</property>
<property name="show-close-button">True</property>
<child>
<object class="GtkButton" id="recordbutton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">half</property>
<child>
<!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="column-spacing">2</property>
<property name="row-homogeneous">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">media-record</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Record</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="stopbutton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">half</property>
<child>
<!-- n-columns=2 n-rows=1 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="column-spacing">2</property>
<property name="row-homogeneous">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">media-playback-stop</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Stop Recording</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="playbutton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<property name="relief">half</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="popup">menu1</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">view-list-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
</object> </object>
</interface> </interface>

View File

@ -132,14 +132,16 @@ fn main() {
// get audio sources // get audio sources
let sources_descriptions: Vec<String> = { let sources_descriptions: Vec<String> = {
let list_sources_child = Command::new("pactl")
.args(&["list", "sources"])
.stdout(Stdio::piped())
.spawn();
let sources_descriptions = String::from_utf8( let sources_descriptions = String::from_utf8(
if list_sources_child.is_ok() {
Command::new("grep") Command::new("grep")
.args(&["-e", "device.description"]) .args(&["-e", "device.description"])
.stdin( .stdin(
Command::new("pactl") list_sources_child
.args(&["list", "sources"])
.stdout(Stdio::piped())
.spawn()
.unwrap() .unwrap()
.stdout .stdout
.take() .take()
@ -147,7 +149,10 @@ fn main() {
) )
.output() .output()
.unwrap() .unwrap()
.stdout, .stdout
} else {
Vec::new()
}
) )
.unwrap(); .unwrap();
sources_descriptions sources_descriptions

BIN
test.ogg Normal file

Binary file not shown.