sound: Port some rows to CcListRow
Port the following rows to CcListRow: - Alert Sound - Volume Levels
This commit is contained in:
parent
fed77a9511
commit
f513406f40
2 changed files with 9 additions and 25 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <pulse/pulseaudio.h>
|
||||
#include <gvc-mixer-control.h>
|
||||
|
||||
#include "cc-list-row.h"
|
||||
#include "cc-alert-chooser-window.h"
|
||||
#include "cc-balance-slider.h"
|
||||
#include "cc-device-combo-box.h"
|
||||
|
@ -65,7 +66,7 @@ struct _CcSoundPanel
|
|||
CcProfileComboBox *input_profile_combo_box;
|
||||
CcVolumeSlider *input_volume_slider;
|
||||
AdwPreferencesGroup *input_no_devices_group;
|
||||
GtkLabel *alert_sound_label;
|
||||
CcListRow *alert_sound_row;
|
||||
|
||||
GvcMixerControl *mixer_control;
|
||||
GSettings *sound_settings;
|
||||
|
@ -85,7 +86,7 @@ static void
|
|||
update_alert_sound_label (CcSoundPanel *self)
|
||||
{
|
||||
const gchar *alert_name = get_selected_alert_display_name ();
|
||||
gtk_label_set_label (self->alert_sound_label, alert_name);
|
||||
cc_list_row_set_secondary_label (self->alert_sound_row, alert_name);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -312,7 +313,7 @@ cc_sound_panel_class_init (CcSoundPanelClass *klass)
|
|||
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, input_profile_combo_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, input_volume_slider);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, input_no_devices_group);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, alert_sound_label);
|
||||
gtk_widget_class_bind_template_child (widget_class, CcSoundPanel, alert_sound_row);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, input_device_changed_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, output_device_changed_cb);
|
||||
|
@ -327,6 +328,7 @@ cc_sound_panel_class_init (CcSoundPanelClass *klass)
|
|||
g_type_ensure (CC_TYPE_PROFILE_COMBO_BOX);
|
||||
g_type_ensure (CC_TYPE_SUBWOOFER_SLIDER);
|
||||
g_type_ensure (CC_TYPE_VOLUME_SLIDER);
|
||||
g_type_ensure (CC_TYPE_LIST_ROW);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -367,35 +367,17 @@
|
|||
<object class="AdwPreferencesGroup">
|
||||
<property name="title" translatable="yes">Sounds</property>
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<object class="CcListRow">
|
||||
<property name="title" translatable="yes">Vo_lume Levels</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<property name="show-arrow">True</property>
|
||||
<signal name="activated" handler="volume_levels_activated_cb" swapped="yes"/>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">go-next-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<object class="CcListRow" id="alert_sound_row">
|
||||
<property name="title" translatable="yes">_Alert Sound</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<accessibility>
|
||||
<relation name="described-by">alert_sound_label</relation>
|
||||
</accessibility>
|
||||
<property name="show-arrow">True</property>
|
||||
<signal name="activated" handler="alert_sound_activated_cb" swapped="yes"/>
|
||||
<child>
|
||||
<object class="GtkLabel" id="alert_sound_label"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">go-next-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
Loading…
Add table
Reference in a new issue