Skip to content

Commit

Permalink
Merge pull request #176 from technosf/development
Browse files Browse the repository at this point in the history
Final tweaks
  • Loading branch information
technosf authored Jan 4, 2025
2 parents 1bcadee + aeb8942 commit 13848d9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion data/css/Tuner-system.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion data/io.github.louis77.tuner.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<summary>Window height</summary>
<description>Saved height of main window</description>
</key>
<key name="do-not-track" type="b">
<key name="do-not-vote" type="b">
<default>false</default>
<summary>Do not participate in Station voting</summary>
<description>If enabled, do not send voting and popularity information to metadata provider</description>
Expand Down
4 changes: 2 additions & 2 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/Controllers/DirectoryController.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/Settings.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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; }
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/Widgets/Window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 13848d9

Please sign in to comment.