From 6a62ae4231c2ce10b6623e32198f40f0a2a8e777 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 15 Dec 2009 17:08:19 +0100 Subject: New history feature Default key is 'h', playlists are no longer part of PianoHandle_t now (=> libpiano's api changed) --- src/settings.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/settings.c') diff --git a/src/settings.c b/src/settings.c index a7d6f61..1726a78 100644 --- a/src/settings.c +++ b/src/settings.c @@ -149,6 +149,8 @@ void BarSettingsRead (BarSettings_t *settings) { "act_songexplain", NULL}, {'g', BarUiActStationFromGenre, "add genre station", "act_stationaddbygenre", NULL}, + {'h', BarUiActHistory, "song history", + "act_history", NULL}, {'i', BarUiActSongInfo, "print information about current song/station", "act_songinfo", NULL}, @@ -181,6 +183,7 @@ void BarSettingsRead (BarSettings_t *settings) { settings->audioFormat = PIANO_AF_MP3; #endif #endif + settings->history = 5; BarGetXdgConfigDir (PACKAGE "/config", configfile, sizeof (configfile)); if ((configfd = fopen (configfile, "r")) == NULL) { @@ -192,6 +195,7 @@ void BarSettingsRead (BarSettings_t *settings) { return; } + /* read config file */ while (!feof (configfd)) { memset (val, 0, sizeof (*val)); memset (key, 0, sizeof (*key)); @@ -233,6 +237,8 @@ void BarSettingsRead (BarSettings_t *settings) { settings->autostartStation = strdup (val); } else if (strcmp ("event_command", key) == 0) { settings->eventCmd = strdup (val); + } else if (strcmp ("history", key) == 0) { + settings->history = atoi (val); } } -- cgit v1.2.3