rename gt+ theme to default. fixes #2794

This commit is contained in:
Yann Leboulanger 2007-07-04 16:50:54 +00:00
parent 039bf1e10e
commit 1656ea452b
5 changed files with 15 additions and 8 deletions

View File

@ -1,5 +1,5 @@
AC_INIT([Gajim - A Jabber Instant Messager], 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]) AC_PREREQ([2.59])
AM_INIT_AUTOMAKE([1.8]) AM_INIT_AUTOMAKE([1.8])
AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(config.h)

View File

@ -81,7 +81,7 @@ class Config:
'markedmsgcolor': [ opt_color, '#ff8080', '', True ], 'markedmsgcolor': [ opt_color, '#ff8080', '', True ],
'urlmsgcolor': [ opt_color, '#0000ff', '', True ], 'urlmsgcolor': [ opt_color, '#0000ff', '', True ],
'collapsed_rows': [ opt_str, '', _('List (space separated) of rows (accounts and groups) that are collapsed.'), 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 ], 'saveposition': [ opt_bool, True ],
'mergeaccounts': [ opt_bool, False, '', True ], 'mergeaccounts': [ opt_bool, False, '', True ],
'sort_by_show': [ opt_bool, True, '', True ], 'sort_by_show': [ opt_bool, True, '', True ],
@ -386,8 +386,8 @@ class Config:
themes_default = { themes_default = {
# sorted alphanum # sorted alphanum
'gtk+': [ '', '', '', 'B', '', '','', 'I', '', '', '', '', '','', '', _('default'): [ '', '', '', 'B', '', '','', 'I', '', '', '', '', '','',
'B' ], '', 'B' ],
_('green'): [ '', '#94aa8c', '', 'B', '#0000ff', '#eff3e7', _('green'): [ '', '#94aa8c', '', 'B', '#0000ff', '#eff3e7',
'', 'I', '#000000', '', '', '', '', '', 'I', '#000000', '', '', '', '',

View File

@ -2,7 +2,7 @@ docdir = '../'
datadir = '../' datadir = '../'
version = '0.11.1.1' version = '0.11.1.2'
import sys, os.path import sys, os.path
for base in ('.', 'common'): for base in ('.', 'common'):

View File

@ -155,6 +155,8 @@ class OptionsParser:
self.update_config_to_01102() self.update_config_to_01102()
if old < [0, 11, 1, 1] and new >= [0, 11, 1, 1]: if old < [0, 11, 1, 1] and new >= [0, 11, 1, 1]:
self.update_config_to_01111() 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.logger.init_vars()
gajim.config.set('version', new_version) gajim.config.set('version', new_version)
@ -180,7 +182,7 @@ class OptionsParser:
'groupfontattrs', 'contacttextcolor', 'contactbgcolor', 'contactfont', 'groupfontattrs', 'contacttextcolor', 'contactbgcolor', 'contactfont',
'contactfontattrs', 'bannertextcolor', 'bannerbgcolor', 'bannerfont', 'contactfontattrs', 'bannertextcolor', 'bannerbgcolor', 'bannerfont',
'bannerfontattrs'] 'bannerfontattrs']
for theme_name in (_('grocery'), _('gtk+')): for theme_name in (_('grocery'), _('default')):
if theme_name not in gajim.config.get_per('themes'): if theme_name not in gajim.config.get_per('themes'):
gajim.config.add_per('themes', theme_name) gajim.config.add_per('themes', theme_name)
theme = gajim.config.themes_default[theme_name] theme = gajim.config.themes_default[theme_name]
@ -211,7 +213,6 @@ class OptionsParser:
def assert_unread_msgs_table_exists(self): def assert_unread_msgs_table_exists(self):
'''create table unread_messages if there is no such table''' '''create table unread_messages if there is no such table'''
#FIXME see #2812
back = os.getcwd() back = os.getcwd()
os.chdir(logger.LOG_DB_FOLDER) os.chdir(logger.LOG_DB_FOLDER)
con = sqlite.connect(logger.LOG_DB_FILE) con = sqlite.connect(logger.LOG_DB_FILE)
@ -395,3 +396,9 @@ class OptionsParser:
self.old_values['always_hide_chat_buttons']) self.old_values['always_hide_chat_buttons'])
gajim.config.set('version', '0.11.1.1') 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')

View File

@ -2288,7 +2288,7 @@ class Interface:
#add default themes if there is not in the config file #add default themes if there is not in the config file
theme = gajim.config.get('roster_theme') theme = gajim.config.get('roster_theme')
if not theme in gajim.config.get_per('themes'): 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: if len(gajim.config.get_per('themes')) == 0:
d = ['accounttextcolor', 'accountbgcolor', 'accountfont', d = ['accounttextcolor', 'accountbgcolor', 'accountfont',
'accountfontattrs', 'grouptextcolor', 'groupbgcolor', 'groupfont', 'accountfontattrs', 'grouptextcolor', 'groupbgcolor', 'groupfont',