summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e116ea9)
raw | patch | inline | side by side (parent: e116ea9)
author | Kalle Wallin <kaw@linux.se> | |
Fri, 3 Jun 2005 17:18:52 +0000 (17:18 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Fri, 3 Jun 2005 17:18:52 +0000 (17:18 +0000) |
ChangeLog | patch | blob | history | |
doc/config.sample | patch | blob | history | |
src/conf.c | patch | blob | history | |
src/options.c | patch | blob | history | |
src/options.h | patch | blob | history | |
src/screen.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index e6fb3077ddf32476cd793f7cad1a32816bd3b499..85e7fd53d81a02f65e001f386a65b11ce2bc9f84 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
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 8dd3176fe8eb89d84aaf3aa3090a69d3af3aa3bf..f3bcab541af3bd872a56735145d5af32f6ef89a5 100644 (file)
--- a/doc/config.sample
+++ b/doc/config.sample
## 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 9222ed18ed70f3aa1e843fa4847ba266f62627b6..7e4b4e1aea86da786d83ad57db409c591c3b9f55 100644 (file)
--- a/src/conf.c
+++ b/src/conf.c
#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,
{
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 a5289105b6730bcd23121abb270af8c610f676dc..4e7ce026bcb82f1ed45fe6466d8dc1dab4133330 100644 (file)
--- a/src/options.c
+++ b/src/options.c
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 c3395bbc4e7da2633ff5467102a42f7bbd17bbc9..3f203b09c1793d9dc3046cb03efef8964dbbc644 100644 (file)
--- a/src/options.h
+++ b/src/options.h
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 be4865f0457bc34a20878e8538a2913372387f58..0c56a7420433f5567473624e40909f2ce5efbb98 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
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;
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;
}