Permalink
Browse files

Fixed registering command emitter

  • Loading branch information...
1 parent be66023 commit 0ef01002444acef7ee6ea5a0db88bad916e49d7f @vslinko committed Nov 28, 2012
Showing with 5 additions and 6 deletions.
  1. +1 −1 package.json
  2. +2 −1 tio.js
  3. +2 −4 ui.js
View
@@ -1,6 +1,6 @@
{
"name": "tio",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "tines.io console player",
"keywords": ["tunes.io", "audio", "music", "player"],
"homepage": "https://github.com/rithis/tio",
View
3 tio.js
@@ -36,7 +36,7 @@ if (argv.help) {
optimist.showHelp();
process.exit();
} else if (argv.version) {
- console.log('0.1.0');
+ console.log('0.1.1');
process.exit();
}
@@ -259,6 +259,7 @@ for (var i = 0; i < argv.t; i++) {
downloadTrack();
}
+win.registerCommandEmitter();
process.on('SIGINT', quit);
process.on('SIGTERM', quit);
process.on('uncaughtException', quit);
View
6 ui.js
@@ -6,7 +6,6 @@ var EventEmitter = require('events').EventEmitter,
// SimpleUI
var SimpleUI = function () {
EventEmitter.call(this);
- this.registerCommandEmitter();
};
util.inherits(SimpleUI, EventEmitter);
@@ -42,14 +41,13 @@ VerboseUI.prototype.log = function (str) {
// SimpleWindowUI
var SimpleWindowUI = function () {
- EventEmitter.call(this);
+ SimpleUI.call(this);
var self = this;
this.nowPlayingWindow = new nc.Window();
this.nowPlayingWindow.attron(nc.colorPair(1, nc.colors['GREEN'], nc.attrs['NORMAL']));
this.currentTrackMetadata = null;
nc.showCursor = false;
- this.registerCommandEmitter();
process.on('SIGWINCH', function () {
self.resize();
@@ -107,7 +105,7 @@ var VerboseWindowUI = function () {
util.inherits(VerboseWindowUI, SimpleWindowUI);
VerboseWindowUI.prototype.registerCommandEmitter = function () {
- this.super_.registerCommandEmitter();
+ SimpleWindowUI.prototype.registerCommandEmitter.call(this);
var self = this;
this.logWindow.on('inputChar', function (c) {

0 comments on commit 0ef0100

Please sign in to comment.