From 2df39a5c51d45675154325cbae75fa2b058676dd Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Mon, 11 Nov 2013 20:45:00 +0000 Subject: [PATCH] Move window_title config option to client settings --- client/src/app.js | 2 +- client/src/views/application.js | 2 +- config.example.js | 7 ++----- server/httphandler.js | 7 ------- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/client/src/app.js b/client/src/app.js index 7fd8e80..a164633 100644 --- a/client/src/app.js +++ b/client/src/app.js @@ -134,7 +134,7 @@ _kiwi.global = { _kiwi.global.settings.load(); // Set the window title - window.document.title = opts.server_settings.window_title || 'Kiwi IRC'; + window.document.title = opts.server_settings.client.window_title || 'Kiwi IRC'; locale = _kiwi.global.settings.get('locale'); if (!locale) { diff --git a/client/src/views/application.js b/client/src/views/application.js index 1e09500..6999bb8 100644 --- a/client/src/views/application.js +++ b/client/src/views/application.js @@ -192,7 +192,7 @@ _kiwi.view.Application = Backbone.View.extend({ var tmr; var has_focus = true; var state = 0; - var default_title = _kiwi.app.server_settings.window_title; + var default_title = _kiwi.app.server_settings.client.window_title; var title = 'Kiwi IRC'; this.setTitle = function (new_title) { diff --git a/config.example.js b/config.example.js index 355cc02..85df3bf 100644 --- a/config.example.js +++ b/config.example.js @@ -78,10 +78,6 @@ conf.default_encoding = 'utf8'; */ //conf.default_gecos = 'Web IRC Client'; -/* -* Window title -*/ -conf.window_title = 'Kiwi IRC'; /* @@ -187,7 +183,8 @@ conf.client = { show_timestamps: false, mute_sounds: false, show_emoticons: true - } + }, + window_title: 'Kiwi IRC' }; diff --git a/server/httphandler.js b/server/httphandler.js index 0aef2c0..ee8b7e1 100644 --- a/server/httphandler.js +++ b/server/httphandler.js @@ -306,13 +306,6 @@ function generateSettings(request, debug, callback) { vars.server_settings.client = config.get().client; } - // Get the window title - if (config.get().window_title) { - vars.server_settings.window_title = config.get().window_title; - } else { - vars.server_settings.window_title = 'Kiwi IRC'; - } - // Any client plugins? if (config.get().client_plugins && config.get().client_plugins.length > 0) { vars.client_plugins = config.get().client_plugins; -- 2.25.1