From 65311c6fc4f19dfac93c3969ea45cf33d1fb6a64 Mon Sep 17 00:00:00 2001
From: technosf <535060+technosf@users.noreply.github.com>
Date: Sat, 4 Jan 2025 11:40:24 -0800
Subject: [PATCH 1/2] Renaming metadata in gschema
---
data/io.github.louis77.tuner.gschema.xml | 2 +-
src/Application.vala | 4 ++--
src/Controllers/DirectoryController.vala | 4 ++--
src/Settings.vala | 8 ++++----
src/Widgets/Window.vala | 8 ++++----
5 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/data/io.github.louis77.tuner.gschema.xml b/data/io.github.louis77.tuner.gschema.xml
index 7edeac3..267ef27 100644
--- a/data/io.github.louis77.tuner.gschema.xml
+++ b/data/io.github.louis77.tuner.gschema.xml
@@ -22,7 +22,7 @@
Window height
Saved height of main window
-
+
false
Do not participate in Station voting
If enabled, do not send voting and popularity information to metadata provider
diff --git a/src/Application.vala b/src/Application.vala
index 0f8e871..d08d7fc 100644
--- a/src/Application.vala
+++ b/src/Application.vala
@@ -331,7 +331,7 @@ namespace Tuner {
player.state_changed_sig.connect ((station, state) =>
// Do a provider click when starting to play a sation
{
- if ( !settings.do_not_track && state == PlayerController.Is.PLAYING )
+ if ( !settings.do_not_vote && state == PlayerController.Is.PLAYING )
{
provider.click(station.stationuuid);
station.clickcount++;
@@ -343,7 +343,7 @@ namespace Tuner {
// Every ten minutes of continuous playing tape counter sigs are emitted
// Vote and click the station each time as appropriate
{
- if ( settings.do_not_track ) return;
+ if ( settings.do_not_vote ) return;
if ( station.starred )
{
provider.vote(station.stationuuid);
diff --git a/src/Controllers/DirectoryController.vala b/src/Controllers/DirectoryController.vala
index 1b3d1c5..9d40475 100644
--- a/src/Controllers/DirectoryController.vala
+++ b/src/Controllers/DirectoryController.vala
@@ -333,14 +333,14 @@ public class Tuner.DirectoryController : Object
*/
public void count_station_click (Model.Station station)
{
- if (!app().settings.do_not_track)
+ if (!app().settings.do_not_vote)
{
debug (@"Send listening event for station $(station.stationuuid)");
_provider.click (station.stationuuid);
}
else
{
- debug ("do-not-track enabled, will not send listening event");
+ debug ("do-not-vote enabled, will not send listening event");
}
} // count_station_click
diff --git a/src/Settings.vala b/src/Settings.vala
index 243c290..57dd62c 100644
--- a/src/Settings.vala
+++ b/src/Settings.vala
@@ -10,7 +10,7 @@
public class Tuner.Settings : GLib.Settings
{
private const string SETTINGS_AUTO_PLAY = "auto-play";
- private const string SETTINGS_DO_NOT_TRACK = "do-not-track";
+ private const string SETTINGS_DO_NOT_VOTE = "do-not-vote";
private const string SETTINGS_LAST_PLAYED_STATION = "last-played-station";
private const string SETTINGS_POS_X = "pos-x";
private const string SETTINGS_POS_Y = "pos-y";
@@ -23,7 +23,7 @@ public class Tuner.Settings : GLib.Settings
private const string SETTINGS_WINDOW_WIDTH = "window-width";
public bool auto_play { get; set; }
- public bool do_not_track { get; set; }
+ public bool do_not_vote { get; set; }
public string last_played_station { get; set; }
public bool start_on_starred { get; set; }
public bool stream_info { get; set; }
@@ -48,7 +48,7 @@ public class Tuner.Settings : GLib.Settings
_window_width = get_int(SETTINGS_WINDOW_WIDTH);
auto_play = get_boolean(SETTINGS_AUTO_PLAY);
- do_not_track = get_boolean(SETTINGS_DO_NOT_TRACK);
+ do_not_vote = get_boolean(SETTINGS_DO_NOT_VOTE);
last_played_station = get_string(SETTINGS_LAST_PLAYED_STATION);
start_on_starred = get_boolean(SETTINGS_START_ON_STARRED);
stream_info = get_boolean(SETTINGS_STREAM_INFO);
@@ -80,7 +80,7 @@ public class Tuner.Settings : GLib.Settings
set_int(SETTINGS_WINDOW_WIDTH, app().window.width);
set_boolean(SETTINGS_AUTO_PLAY, auto_play);
- set_boolean(SETTINGS_DO_NOT_TRACK, do_not_track);
+ set_boolean(SETTINGS_DO_NOT_VOTE, do_not_vote);
set_string(SETTINGS_LAST_PLAYED_STATION, last_played_station);
set_boolean(SETTINGS_START_ON_STARRED, start_on_starred);
set_boolean(SETTINGS_STREAM_INFO, stream_info);
diff --git a/src/Widgets/Window.vala b/src/Widgets/Window.vala
index 7ac40ca..e0f95b7 100644
--- a/src/Widgets/Window.vala
+++ b/src/Widgets/Window.vala
@@ -149,7 +149,7 @@ public class Tuner.Window : Gtk.ApplicationWindow
set_geometry_hints (null, Gdk.Geometry() {
min_height = GEOMETRY_MIN_HEIGHT, min_width = GEOMETRY_MIN_WIDTH
}, Gdk.WindowHints.MIN_SIZE);
- change_action_state (ACTION_DISABLE_TRACKING, settings.do_not_track);
+ change_action_state (ACTION_DISABLE_TRACKING, settings.do_not_vote);
change_action_state (ACTION_ENABLE_AUTOPLAY, settings.auto_play);
change_action_state (ACTION_START_ON_STARRED, settings.start_on_starred);
change_action_state (ACTION_STREAM_INFO, settings.stream_info);
@@ -295,9 +295,9 @@ public class Tuner.Window : Gtk.ApplicationWindow
*/
public void on_action_disable_tracking (SimpleAction action, Variant? parameter)
{
- settings.do_not_track = !settings.do_not_track;
- action.set_state (settings.do_not_track);
- debug (@"on_action_disable_tracking: $(settings.do_not_track)");
+ settings.do_not_vote = !settings.do_not_vote;
+ action.set_state (settings.do_not_vote);
+ debug (@"on_action_disable_tracking: $(settings.do_not_vote)");
} // on_action_disable_tracking
From aeb89422fb9af26bb4773ada9bd0754c5ba96f89 Mon Sep 17 00:00:00 2001
From: technosf <535060+technosf@users.noreply.github.com>
Date: Sat, 4 Jan 2025 11:51:02 -0800
Subject: [PATCH 2/2] Final look/feel tweek
---
data/css/Tuner-system.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/css/Tuner-system.css b/data/css/Tuner-system.css
index 79d3c82..6c1b8c8 100644
--- a/data/css/Tuner-system.css
+++ b/data/css/Tuner-system.css
@@ -65,7 +65,7 @@
/* Description on 2nd line RHS of the station button */
.station-button-description {
- font-size: 14px;
+ font-size: 13px;
color: gray;
background-color: transparent;
border: none;