From 1363cd73c2564541bb7284ce098116c7c9be1bf7 Mon Sep 17 00:00:00 2001 From: Konstantin Kharlamov Date: Wed, 21 Jun 2023 19:07:34 +0300 Subject: [PATCH] mainwindow: change "[Set as] fallback" to "default" The "Set as fallback" title is a frequent source of confusion, many people look at it and do not realize that its actual functional is "setting as default". Presumably, when this title first appeared it was presumed that apps should chose a device themselves, and then if they don't there's a "fallback". But in reality most apps do not chose any device explicitly, and it's expected behavior to make use of this "fallback" device. So it is more correct to call a "default" device. --- src/mainwindow.cc | 10 +++++----- src/pavucontrol.glade | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 2e1c58b..eb32994 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -274,7 +274,7 @@ finish: } } -static void set_icon_name_fallback(Gtk::Image *i, const char *name, Gtk::IconSize size) { +static void set_icon_name_default(Gtk::Image *i, const char *name, Gtk::IconSize size) { Glib::RefPtr theme; Glib::RefPtr pixbuf; gint width = 24, height = 24; @@ -382,7 +382,7 @@ void MainWindow::updateCard(const pa_card_info &info) { g_free(txt); icon = pa_proplist_gets(info.proplist, PA_PROP_DEVICE_ICON_NAME); - set_icon_name_fallback(w->iconImage, icon ? icon : "audio-card", Gtk::ICON_SIZE_SMALL_TOOLBAR); + set_icon_name_default(w->iconImage, icon ? icon : "audio-card", Gtk::ICON_SIZE_SMALL_TOOLBAR); w->hasSinks = w->hasSources = false; profile_priorities.clear(); @@ -580,7 +580,7 @@ bool MainWindow::updateSink(const pa_sink_info &info) { g_free(txt); icon = pa_proplist_gets(info.proplist, PA_PROP_DEVICE_ICON_NAME); - set_icon_name_fallback(w->iconImage, icon ? icon : "audio-card", Gtk::ICON_SIZE_SMALL_TOOLBAR); + set_icon_name_default(w->iconImage, icon ? icon : "audio-card", Gtk::ICON_SIZE_SMALL_TOOLBAR); w->setVolume(info.volume); w->muteToggleButton->set_active(info.mute); @@ -748,7 +748,7 @@ void MainWindow::updateSource(const pa_source_info &info) { g_free(txt); icon = pa_proplist_gets(info.proplist, PA_PROP_DEVICE_ICON_NAME); - set_icon_name_fallback(w->iconImage, icon ? icon : "audio-input-microphone", Gtk::ICON_SIZE_SMALL_TOOLBAR); + set_icon_name_default(w->iconImage, icon ? icon : "audio-input-microphone", Gtk::ICON_SIZE_SMALL_TOOLBAR); w->setVolume(info.volume); w->muteToggleButton->set_active(info.mute); @@ -817,7 +817,7 @@ void MainWindow::setIconFromProplist(Gtk::Image *icon, pa_proplist *l, const cha finish: - set_icon_name_fallback(icon, t, Gtk::ICON_SIZE_SMALL_TOOLBAR); + set_icon_name_default(icon, t, Gtk::ICON_SIZE_SMALL_TOOLBAR); } void MainWindow::updateSinkInput(const pa_sink_input_info &info) { diff --git a/src/pavucontrol.glade b/src/pavucontrol.glade index 2c53748..b9155fb 100644 --- a/src/pavucontrol.glade +++ b/src/pavucontrol.glade @@ -405,7 +405,7 @@ True True False - Set as fallback + Set as default True