From 195680a024d8b476ab752f0d51ef1c6fcd563f49 Mon Sep 17 00:00:00 2001 From: Alex K <73014273+alexkdeveloper@users.noreply.github.com> Date: Fri, 21 Apr 2023 17:40:21 +0800 Subject: [PATCH] Add files via upload --- src/MainWindow.vala | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index d89d848..37e54fb 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -491,19 +491,19 @@ private void on_stop_record_clicked(){ var play_last_station_row = new Adw.ActionRow(); play_last_station_row.can_focus = false; play_last_station_row.title = _("Play the last station at startup"); - var play_last_station_check_button = new CheckButton(); - play_last_station_check_button.valign = Align.CENTER; - play_last_station_row.add_suffix(play_last_station_check_button); + var play_last_station_switch = new Switch(); + play_last_station_switch.valign = Align.CENTER; + play_last_station_row.add_suffix(play_last_station_switch); var show_favorite_stations_row = new Adw.ActionRow(); show_favorite_stations_row.title = _("Show favorites after launch"); - var show_favorites_check_button = new CheckButton(); - show_favorites_check_button.valign = Align.CENTER; - show_favorite_stations_row.add_suffix(show_favorites_check_button); + var show_favorites_switch = new Switch(); + show_favorites_switch.valign = Align.CENTER; + show_favorite_stations_row.add_suffix(show_favorites_switch); var not_load_stations_row = new Adw.ActionRow(); not_load_stations_row.title = _("Do not load stations at startup"); - var not_load_stations_check_button = new CheckButton(); - not_load_stations_check_button.valign = Align.CENTER; - not_load_stations_row.add_suffix(not_load_stations_check_button); + var not_load_stations_switch = new Switch(); + not_load_stations_switch.valign = Align.CENTER; + not_load_stations_row.add_suffix(not_load_stations_switch); var preferences_box = new ListBox(); preferences_box.add_css_class("boxed-list"); @@ -512,9 +512,9 @@ private void on_stop_record_clicked(){ preferences_box.append(not_load_stations_row); var settings = RadioSettings.settings; - settings.bind("play-last-station-at-startup", play_last_station_check_button, "active", GLib.SettingsBindFlags.DEFAULT); - settings.bind("show-favorite-stations-at-startup", show_favorites_check_button, "active", GLib.SettingsBindFlags.DEFAULT); - settings.bind("not-load-stations-at-startup", not_load_stations_check_button, "active", GLib.SettingsBindFlags.DEFAULT); + settings.bind("play-last-station-at-startup", play_last_station_switch, "active", GLib.SettingsBindFlags.DEFAULT); + settings.bind("show-favorite-stations-at-startup", show_favorites_switch, "active", GLib.SettingsBindFlags.DEFAULT); + settings.bind("not-load-stations-at-startup", not_load_stations_switch, "active", GLib.SettingsBindFlags.DEFAULT); var window = new Adw.PreferencesWindow(); window.title = _("Preferences");