+qwebirc.ui.StandardUI = new Class({
+ Extends: qwebirc.ui.BaseUI,
+ initialize: function(parentElement, windowClass, uiName, options) {
+ this.parent(parentElement, windowClass, uiName, options);
+ window.addEvent("keydown", function(x) {
+ if(!x.alt || x.control)
+ return;
+
+ if(x.key == "a" || x.key == "A") {
+ var highestNum = 0;
+ var highestIndex = -1;
+ new Event(x).stop();
+ for(var i=0;i<this.windowArray.length;i++) {
+ var h = this.windowArray[i].hilighted;
+ if(h > highestNum) {
+ highestIndex = i;
+ highestNum = h;
+ }
+ }
+ if(highestIndex > -1)
+ this.selectWindow(this.windowArray[highestIndex]);
+ } else if(x.key >= '0' && x.key <= '9') {
+ new Event(x).stop();
+
+ number = x.key - '0';
+ if(number == 0)
+ number = 10
+
+ number = number - 1;
+
+ if(number >= this.windowArray.length)
+ return;
+
+ this.selectWindow(this.windowArray[number]);
+ } else if(x.key == "left") {
+ this.prevWindow();
+ } else if(x.key == "right") {
+ this.nextWindow();
+ }
+ }.bind(this));
+ },
+ newCustomWindow: function(name, select, type) {
+ if(!type)
+ type = qwebirc.ui.WINDOW_CUSTOM;
+
+ var w = this.newWindow(qwebirc.ui.CUSTOM_CLIENT, type, name);
+ w.addEvent("close", function(w) {
+ delete this.windows[name];
+ }.bind(this));
+
+ if(select)
+ this.selectWindow(w);
+
+ return w;
+ },
+ embeddedWindow: function() {
+ if(this.embedded) {
+ this.selectWindow(this.embedded)