migration func for ft_add_hosts_to_send option. see #2953

This commit is contained in:
Yann Leboulanger 2007-01-28 19:16:38 +00:00
parent 8a0c47e4a0
commit 1bccdb48fd
3 changed files with 11 additions and 2 deletions

View File

@ -1,5 +1,5 @@
AC_INIT([Gajim - A Jabber Instant Messager], AC_INIT([Gajim - A Jabber Instant Messager],
[0.11.0.1],[http://trac.gajim.org/],[gajim]) [0.11.0.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

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

View File

@ -151,6 +151,8 @@ class OptionsParser:
self.update_config_to_01018() self.update_config_to_01018()
if old < [0, 11, 0, 1] and new >= [0, 11, 0, 1]: if old < [0, 11, 0, 1] and new >= [0, 11, 0, 1]:
self.update_config_to_01101() self.update_config_to_01101()
if old < [0, 11, 0, 2] and new >= [0, 11, 0, 2]:
self.update_config_to_01102()
gajim.logger.init_vars() gajim.logger.init_vars()
gajim.config.set('version', new_version) gajim.config.set('version', new_version)
@ -375,3 +377,10 @@ class OptionsParser:
gajim.config.set('time_stamp', '%s%%X%s ' % ( gajim.config.set('time_stamp', '%s%%X%s ' % (
self.old_values['before_time'], self.old_values['after_time'])) self.old_values['before_time'], self.old_values['after_time']))
gajim.config.set('version', '0.11.0.1') gajim.config.set('version', '0.11.0.1')
def update_config_to_01102(self):
'''fill time_stamp from before_time and after_time'''
if self.old_values.has_key('ft_override_host_to_send'):
gajim.config.set('ft_add_hosts_to_send',
self.old_values['ft_override_host_to_send'])
gajim.config.set('version', '0.11.0.2')