aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--doc/config.sample3
-rw-r--r--src/conf.c5
-rw-r--r--src/options.c1
-rw-r--r--src/options.h1
-rw-r--r--src/screen.c4
6 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e6fb3077d..85e7fd53d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2005-06-03: Kalle Wallin <kaw@linux.se>
- * Added a "hide cursor" feature #0000417
+ * Seek time can now be defined in the conf file (seek-time)
+ * Added a "hide cursor" feature #0000417 (hide-cursor)
2005-06-01: Kalle Wallin <kaw@linux.se>
* main.c: Fixes #0000406, patch from René van Bevern
diff --git a/doc/config.sample b/doc/config.sample
index 8dd3176fe..f3bcab541 100644
--- a/doc/config.sample
+++ b/doc/config.sample
@@ -38,6 +38,9 @@
## enable mouse events
#enable-mouse = no
+## seek time (default 1s)
+#seek-time = 3
+
## mpd crossfade time
##crossfade-time = 10
diff --git a/src/conf.c b/src/conf.c
index 9222ed18e..7e4b4e1ae 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -61,6 +61,7 @@
#define CONF_CROSSFADE_TIME "crossfade-time"
#define CONF_SEARCH_MODE "search-mode"
#define CONF_HIDE_CURSOR "hide-cursor"
+#define CONF_SEEK_TIME "seek-time"
typedef enum {
KEY_PARSER_UNKNOWN,
@@ -482,6 +483,10 @@ read_rc_file(char *filename, options_t *options)
{
options->hide_cursor = atoi(value);
}
+ else if( !strcasecmp(CONF_SEEK_TIME, name) )
+ {
+ options->seek_time = atoi(value);
+ }
else
{
match_found = 0;
diff --git a/src/options.c b/src/options.c
index a5289105b..4e7ce026b 100644
--- a/src/options.c
+++ b/src/options.c
@@ -363,6 +363,7 @@ options_init( void )
options.wide_cursor = TRUE;
options.audible_bell = TRUE;
options.crossfade_time = DEFAULT_CROSSFADE_TIME;
+ options.seek_time = 1;
return &options;
}
diff --git a/src/options.h b/src/options.h
index c3395bbc4..3f203b09c 100644
--- a/src/options.h
+++ b/src/options.h
@@ -16,6 +16,7 @@ typedef struct
int crossfade_time;
int search_mode;
int hide_cursor;
+ int seek_time;
gboolean reconnect;
gboolean debug;
gboolean find_wrap;
diff --git a/src/screen.c b/src/screen.c
index be4865f04..0c56a7420 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -783,7 +783,7 @@ screen_cmd(mpdclient_t *c, command_t cmd)
seek_id = c->song->id;
seek_target_time = c->status->elapsedTime;
}
- seek_target_time++;
+ seek_target_time+=options.seek_time;
if( seek_target_time < c->status->totalTime )
break;
seek_target_time = c->status->totalTime;
@@ -803,7 +803,7 @@ screen_cmd(mpdclient_t *c, command_t cmd)
seek_id = c->song->id;
seek_target_time = c->status->elapsedTime;
}
- seek_target_time--;
+ seek_target_time-=options.seek_time;
if( seek_target_time < 0 )
seek_target_time=0;
}