From 1656ea452b4bd584f10da3bfc6ec00d565902d24 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 4 Jul 2007 16:50:54 +0000 Subject: [PATCH] rename gt+ theme to default. fixes #2794 --- configure.ac | 2 +- src/common/config.py | 6 +++--- src/common/defs.py | 2 +- src/common/optparser.py | 11 +++++++++-- src/gajim.py | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 0887f90dc..6e9b1e770 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_INIT([Gajim - A Jabber Instant Messager], - [0.11.1.1],[http://trac.gajim.org/],[gajim]) + [0.11.1.2],[http://trac.gajim.org/],[gajim]) AC_PREREQ([2.59]) AM_INIT_AUTOMAKE([1.8]) AC_CONFIG_HEADER(config.h) diff --git a/src/common/config.py b/src/common/config.py index 77b40616d..c32c308cc 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -81,7 +81,7 @@ class Config: 'markedmsgcolor': [ opt_color, '#ff8080', '', True ], 'urlmsgcolor': [ opt_color, '#0000ff', '', True ], 'collapsed_rows': [ opt_str, '', _('List (space separated) of rows (accounts and groups) that are collapsed.'), True ], - 'roster_theme': [ opt_str, 'gtk+', '', True ], + 'roster_theme': [ opt_str, _('default'), '', True ], 'saveposition': [ opt_bool, True ], 'mergeaccounts': [ opt_bool, False, '', True ], 'sort_by_show': [ opt_bool, True, '', True ], @@ -386,8 +386,8 @@ class Config: themes_default = { # sorted alphanum - 'gtk+': [ '', '', '', 'B', '', '','', 'I', '', '', '', '', '','', '', - 'B' ], + _('default'): [ '', '', '', 'B', '', '','', 'I', '', '', '', '', '','', + '', 'B' ], _('green'): [ '', '#94aa8c', '', 'B', '#0000ff', '#eff3e7', '', 'I', '#000000', '', '', '', '', diff --git a/src/common/defs.py b/src/common/defs.py index 4fa536584..16d2b6824 100644 --- a/src/common/defs.py +++ b/src/common/defs.py @@ -2,7 +2,7 @@ docdir = '../' datadir = '../' -version = '0.11.1.1' +version = '0.11.1.2' import sys, os.path for base in ('.', 'common'): diff --git a/src/common/optparser.py b/src/common/optparser.py index fbba72539..4f0298be2 100644 --- a/src/common/optparser.py +++ b/src/common/optparser.py @@ -155,6 +155,8 @@ class OptionsParser: self.update_config_to_01102() if old < [0, 11, 1, 1] and new >= [0, 11, 1, 1]: self.update_config_to_01111() + if old < [0, 11, 1, 2] and new >= [0, 11, 1, 2]: + self.update_config_to_01112() gajim.logger.init_vars() gajim.config.set('version', new_version) @@ -180,7 +182,7 @@ class OptionsParser: 'groupfontattrs', 'contacttextcolor', 'contactbgcolor', 'contactfont', 'contactfontattrs', 'bannertextcolor', 'bannerbgcolor', 'bannerfont', 'bannerfontattrs'] - for theme_name in (_('grocery'), _('gtk+')): + for theme_name in (_('grocery'), _('default')): if theme_name not in gajim.config.get_per('themes'): gajim.config.add_per('themes', theme_name) theme = gajim.config.themes_default[theme_name] @@ -211,7 +213,6 @@ class OptionsParser: def assert_unread_msgs_table_exists(self): '''create table unread_messages if there is no such table''' - #FIXME see #2812 back = os.getcwd() os.chdir(logger.LOG_DB_FOLDER) con = sqlite.connect(logger.LOG_DB_FILE) @@ -395,3 +396,9 @@ class OptionsParser: self.old_values['always_hide_chat_buttons']) gajim.config.set('version', '0.11.1.1') + def update_config_to_01112(self): + '''gtk+ theme is renamed to default''' + if self.old_values.has_key('roster_theme') and \ + self.old_values['roster_theme'] == 'gtk+': + gajim.config.set('roster_theme', _('default')) + gajim.config.set('version', '0.11.1.2') diff --git a/src/gajim.py b/src/gajim.py index e6110b8c5..fee6411b9 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -2288,7 +2288,7 @@ class Interface: #add default themes if there is not in the config file theme = gajim.config.get('roster_theme') if not theme in gajim.config.get_per('themes'): - gajim.config.set('roster_theme', 'gtk+') + gajim.config.set('roster_theme', _('default')) if len(gajim.config.get_per('themes')) == 0: d = ['accounttextcolor', 'accountbgcolor', 'accountfont', 'accountfontattrs', 'grouptextcolor', 'groupbgcolor', 'groupfont',