From 07277df1e24d50cbbdf8a3a348076c3c74df6acc Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Tue, 6 Oct 2009 11:41:32 +0200
Subject: [PATCH] [gotham] update default colors to be tangoified. see #5307

---
 configure.ac            |  2 +-
 src/common/config.py    | 12 ++++++------
 src/common/defs.py      |  2 +-
 src/common/optparser.py | 16 ++++++++++++++++
 4 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9e06da228c..24d8ad2c44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_INIT([Gajim - A Jabber Instant Messager],
-		[0.12.5.3-dev],[http://trac.gajim.org/],[gajim])
+		[0.12.5.4-dev],[http://trac.gajim.org/],[gajim])
 AC_PREREQ([2.59])
 
 AC_CONFIG_HEADER(config.h)
diff --git a/src/common/config.py b/src/common/config.py
index 5b1f887a4b..903c313e81 100644
--- a/src/common/config.py
+++ b/src/common/config.py
@@ -90,11 +90,11 @@ class Config:
 		'mood_iconset': [ opt_str, DEFAULT_MOOD_ICONSET, '', True ],
 		'activity_iconset': [ opt_str, DEFAULT_ACTIVITY_ICONSET, '', True ],
 		'use_transports_iconsets': [ opt_bool, True, '', True ],
-		'inmsgcolor': [ opt_color, '#a34526', '', True ],
-		'outmsgcolor': [ opt_color, '#164e6f', '', True ],
-		'statusmsgcolor': [ opt_color, '#1eaa1e', '', True ],
+		'inmsgcolor': [ opt_color, '#a40000', '', True ],
+		'outmsgcolor': [ opt_color, '#3465a4', '', True ],
+		'statusmsgcolor': [ opt_color, '#73d216', '', True ],
 		'markedmsgcolor': [ opt_color, '#ff8080', '', True ],
-		'urlmsgcolor': [ opt_color, '#0000ff', '', True ],
+		'urlmsgcolor': [ opt_color, '#204a87', '', True ],
 		'collapsed_rows': [ opt_str, '', _('List (space separated) of rows (accounts and groups) that are collapsed.'), True ],
 		'roster_theme': [ opt_str, _('default'), '', True ],
 		'mergeaccounts': [ opt_bool, False, '', True ],
@@ -225,7 +225,7 @@ class Config:
 		'log_contact_status_changes': [opt_bool, False],
 		'just_connected_bg_color': [opt_str, '#adc3c6', _('Background color of contacts when they just signed in.')],
 		'just_disconnected_bg_color': [opt_str, '#ab6161', _('Background color of contacts when they just signed out.')],
-		'restored_messages_color': [opt_str, 'grey'],
+		'restored_messages_color': [opt_color, '#555753'],
 		'restored_messages_small': [opt_bool, True, _('If True, restored messages will use a smaller font than the default one.')],
 		'hide_avatar_of_transport': [opt_bool, False, _('Don\'t show avatar for the transport itself.')],
 		'roster_window_skip_taskbar': [opt_bool, False, _('Don\'t show roster in the system taskbar.')],
@@ -244,7 +244,7 @@ class Config:
 		'chat_merge_consecutive_nickname': [opt_bool, False, _('In a chat, show the nickname at the beginning of a line only when it\'s not the same person talking than in previous message.')],
 		'chat_merge_consecutive_nickname_indent': [opt_str, '  ', _('Indentation when using merge consecutive nickname.')],
 		'use_smooth_scrolling': [opt_bool, True, _('Smooth scroll message in conversation window')],
-		'gc_nicknames_colors': [ opt_str, '#a34526:#c000ff:#0012ff:#388a99:#045723:#7c7c7c:#ff8a00:#94452d:#244b5a:#32645a', _('List of colors, separated by ":", that will be used to color nicknames in group chats.'), True ],
+		'gc_nicknames_colors': [ opt_str, '#4e9a06:#f57900:#ce5c00:#3465a4:#204a87:#75507b:#5c3566:#c17d11:#8f5902:#ef2929:#cc0000:#a40000', _('List of colors, separated by ":", that will be used to color nicknames in group chats.'), True ],
 		'ctrl_tab_go_to_next_composing': [opt_bool, True, _('Ctrl-Tab go to next composing tab when none is unread.')],
 		'confirm_metacontacts': [ opt_str, '', _('Should we show the confirm metacontacts creation dialog or not? Empty string means we never show the dialog.')],
 		'confirm_block': [ opt_str, '', _('Should we show the confirm block contact dialog or not? Empty string means we never show the dialog.')],
diff --git a/src/common/defs.py b/src/common/defs.py
index 3f73a6c9f0..8bbc982c4e 100644
--- a/src/common/defs.py
+++ b/src/common/defs.py
@@ -27,7 +27,7 @@
 datadir = '../'
 localedir = '../po'
 
-version = '0.12.5.3-dev'
+version = '0.12.5.4-dev'
 
 import sys, os.path
 for base in ('.', 'common'):
diff --git a/src/common/optparser.py b/src/common/optparser.py
index f161ca0539..96020f11b7 100644
--- a/src/common/optparser.py
+++ b/src/common/optparser.py
@@ -206,6 +206,8 @@ def update_config(self, old_version, new_version):
 			self.update_config_to_01252()
 		if old < [0, 12, 5, 3] and new >= [0, 12, 5, 3]:
 			self.update_config_to_01253()
+		if old < [0, 12, 5, 4] and new >= [0, 12, 5, 4]:
+			self.update_config_to_01254()
 
 		gajim.logger.init_vars()
 		gajim.config.set('version', new_version)
@@ -748,4 +750,18 @@ def update_config_to_01253(self):
 					gajim.config.set_per('accounts', account, 'active', True)
 		gajim.config.set('version', '0.12.5.3')
 
+	def update_config_to_01254(self):
+		vals = {'inmsgcolor': ['#a34526', '#a40000'],
+			'outmsgcolor': ['#164e6f', '#3465a4'],
+			'restored_messages_color': ['grey', '#555753'],
+			'statusmsgcolor': ['#1eaa1e', '#73d216'],
+			'urlmsgcolor': ['#0000ff', '#204a87'],
+			'gc_nicknames_colors': ['#a34526:#c000ff:#0012ff:#388a99:#045723:#7c7c7c:#ff8a00:#94452d:#244b5a:#32645a', '#4e9a06:#f57900:#ce5c00:#3465a4:#204a87:#75507b:#5c3566:#c17d11:#8f5902:#ef2929:#cc0000:#a40000']}
+		for c in vals:
+			val = self.old_values[c]
+			if val == vals[c][0]:
+				# We didn't change default value, so update it with new default
+				gajim.config.set(c, vals[c][1])
+		gajim.config.set('version', '0.12.5.4')
+
 # vim: se ts=3:
-- 
GitLab