Author: asterix Date: 2007-07-11 12:09:31 +0200 (Wed, 11 Jul 2007) New Revision: 8383
Modified: trunk/configure.ac trunk/src/common/defs.py trunk/src/common/optparser.py Log: copy old gtk+ theme to new default one
Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-07-10 22:58:08 UTC (rev 8382) +++ trunk/configure.ac 2007-07-11 10:09:31 UTC (rev 8383) @@ -1,5 +1,5 @@ AC_INIT([Gajim - A Jabber Instant Messager], - [0.11.1.3],[http://trac.gajim.org/%5D,%5Bgajim]) + [0.11.1.4],[http://trac.gajim.org/%5D,%5Bgajim]) AC_PREREQ([2.59]) AM_INIT_AUTOMAKE([1.8]) AC_CONFIG_HEADER(config.h)
Modified: trunk/src/common/defs.py =================================================================== --- trunk/src/common/defs.py 2007-07-10 22:58:08 UTC (rev 8382) +++ trunk/src/common/defs.py 2007-07-11 10:09:31 UTC (rev 8383) @@ -2,7 +2,7 @@
datadir = '../'
-version = '0.11.1.3' +version = '0.11.1.4'
import sys, os.path for base in ('.', 'common'):
Modified: trunk/src/common/optparser.py =================================================================== --- trunk/src/common/optparser.py 2007-07-10 22:58:08 UTC (rev 8382) +++ trunk/src/common/optparser.py 2007-07-11 10:09:31 UTC (rev 8383) @@ -159,6 +159,8 @@ self.update_config_to_01112() if old < [0, 11, 1, 3] and new >= [0, 11, 1, 3]: self.update_config_to_01113() + if old < [0, 11, 1, 4] and new >= [0, 11, 1, 4]: + self.update_config_to_01114()
gajim.logger.init_vars() gajim.config.set('version', new_version) @@ -431,3 +433,25 @@ con.close() gajim.config.set('version', '0.11.1.3')
+ def update_config_to_01114(self): + # add default theme if it doesn't exist + d = ['accounttextcolor', 'accountbgcolor', 'accountfont', + 'accountfontattrs', 'grouptextcolor', 'groupbgcolor', 'groupfont', + 'groupfontattrs', 'contacttextcolor', 'contactbgcolor', 'contactfont', + 'contactfontattrs', 'bannertextcolor', 'bannerbgcolor', 'bannerfont', + 'bannerfontattrs'] + theme_name = _('default') + if theme_name not in gajim.config.get_per('themes'): + gajim.config.add_per('themes', theme_name) + if gajim.config.get_per('themes', 'gtk+'): + # copy from old gtk+ theme + for o in d: + val = gajim.config.get_per('themes', 'gtk+', o) + gajim.config.set_per('themes', theme_name, o, val) + gajim.config.del_per('themes', 'gtk+') + else: + # copy from default theme + theme = gajim.config.themes_default[theme_name] + for o in d: + gajim.config.set_per('themes', theme_name, o, theme[d.index(o)]) + gajim.config.set('version', '0.11.1.4')