/** _kiwi.view.StatusMessage */\r
message: null,\r
\r
- /* Address for the kiwi server */\r
- kiwi_server: null,\r
-\r
initialize: function (options) {\r
+ this.app_options = options;\r
+\r
if (options.container) {\r
this.set('container', options.container);\r
}\r
this.themes = options.themes || [];\r
this.text_theme = options.text_theme || {};\r
\r
- // Best guess at where the kiwi server is if not already specified\r
- this.kiwi_server = options.kiwi_server || this.detectKiwiServer();\r
-\r
// The applet to initially load\r
this.startup_applet_name = options.startup || 'kiwi_startup';\r
\r
\r
\r
initializeInterfaces: function () {\r
+ // Best guess at where the kiwi server is if not already specified\r
+ var kiwi_server = this.app_options.kiwi_server || this.detectKiwiServer();\r
+\r
// Set the gateway up\r
- _kiwi.gateway = new _kiwi.model.Gateway();\r
+ _kiwi.gateway = new _kiwi.model.Gateway({kiwi_server: kiwi_server});\r
this.bindGatewayCommands(_kiwi.gateway);\r
\r
this.initializeClient();\r
that.message.text(msg, {timeout: 8000});\r
\r
setTimeout(function forcedReconnectPartTwo() {\r
- _kiwi.app.kiwi_server = serv;\r
+ _kiwi.gateway.set('kiwi_server', serv);\r
\r
_kiwi.gateway.reconnect(function() {\r
// Reconnect all the IRC connections\r
\r
this.connect_callback = callback;\r
\r
- // Keep note of the server we are connecting to\r
- this.set('kiwi_server', _kiwi.app.kiwi_server);\r
-\r
this.socket = new EngineioTools.ReconnectingSocket(this.get('kiwi_server'), {\r
transports: _kiwi.app.server_settings.transports || ['polling', 'websocket'],\r
path: _kiwi.app.get('base_path') + '/transport',\r