+ renameWindow: function(window, name) {
+ if(this.getWindow(window.client, window.type, name))
+ return null;
+
+ var clientId = this.getClientId(window.client);
+ var index = this.windowArray.indexOf(window);
+ if(index == -1)
+ return null;
+
+ this.windows.get(clientId).remove(window.identifier);
+
+ var window = this.windowArray[index];
+ window.name = name;
+ window.identifier = this.getWindowIdentifier(window.client, window.type, window.name);
+
+ this.windows.get(clientId).put(window.identifier, this.windowArray[index]);
+
+ if(window.active)
+ this.updateTitle(window.name + " - " + this.options.appTitle);
+
+ window.rename(window.name);
+ return window;
+ },