[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/8] dtas-console: show paused track when paused
From: |
Eric Wong |
Subject: |
[PATCH 6/8] dtas-console: show paused track when paused |
Date: |
Sat, 7 Sep 2013 20:03:25 +0000 |
Lightly tested, but this seems to work.
---
bin/dtas-console | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/bin/dtas-console b/bin/dtas-console
index 6d5672b..eb246ee 100755
--- a/bin/dtas-console
+++ b/bin/dtas-console
@@ -39,6 +39,8 @@ tfmt = update_tfmt(prec_step[prec_nr])
events = []
interval = 1.0 / 10 ** prec_nr
+pause = nil
+
def show_events(lineno, screen, events)
Curses.setpos(lineno += 1, 0)
Curses.clrtoeol
@@ -132,7 +134,7 @@ begin
else
Curses.setpos(lineno += 1, 0)
Curses.clrtoeol
- Curses.addstr(cur['paused'] ? 'paused' : 'idle')
+ Curses.addstr(cur['paused'] ? "paused #{pause}" : 'idle')
Curses.setpos(lineno += 1, 0)
Curses.clrtoeol
end
@@ -153,6 +155,12 @@ begin
Curses.clear
when w
event = w.res_wait
+ case event
+ when "pause"
+ pause = current['infile'] || current['command']
+ when %r{\Afile }
+ pause = nil
+ end
events << "#{Time.now.strftime(tfmt)} #{event}"
# something happened, refresh current
# we could be more intelligent here, maybe, but too much work.
--
1.8.4
- [PATCH 0/8] latest changes in dtas.git (dtas-splitfx), Eric Wong, 2013/09/07
- [PATCH 4/8] test/*: compatibility class for both minitest 4 and 5, Eric Wong, 2013/09/07
- [PATCH 8/8] add dtas-splitfx - .cuesheets + make(1), Eric Wong, 2013/09/07
- [PATCH 1/8] source/sox: correctly extend xs for try_to_fail_harder, Eric Wong, 2013/09/07
- [PATCH 5/8] test/helper: delay at_exit registration for tmpfifo, Eric Wong, 2013/09/07
- [PATCH 3/8] test/player_integration: thread-safety fix, Eric Wong, 2013/09/07
- [PATCH 2/8] test/*.rb: test/unit compatibility, Eric Wong, 2013/09/07
- [PATCH 6/8] dtas-console: show paused track when paused,
Eric Wong <=
- [PATCH 7/8] test/helper: fix var shadowing, Eric Wong, 2013/09/07