4853: Cannot enable 'child' options of BooleanOption (patch by Adam Stein)

svn: r17455
This commit is contained in:
Jérôme Rapinat 2011-05-08 13:08:28 +00:00
parent cb99cb7e40
commit 7a67be9d4a
2 changed files with 4 additions and 8 deletions

View File

@ -6,6 +6,7 @@
# Copyright (C) 2008 Craig J. Anderson
# Copyright (C) 2009 Nick Hall
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2011 Adam Stein <adam@csh.rit.edu>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -314,9 +315,7 @@ class GuiNumberOption(gtk.SpinButton):
"""
vtype = type(self.__option.get_value())
self.__option.disable_signals()
self.__option.set_value( vtype(self.get_value()) )
self.__option.enable_signals()
def __update_avail(self):
"""
@ -453,9 +452,7 @@ class GuiBooleanOption(gtk.CheckButton):
"""
Handle the change of the value made by the user.
"""
self.__option.disable_signals()
self.__option.set_value( self.get_active() )
self.__option.enable_signals()
def __update_avail(self):
"""

View File

@ -123,7 +123,7 @@ class FtreeWriter(object):
else:
name_map[n] = key
id_map[key] = n
id_name[key] = get_name(pn, count)
id_name[key] = get_name(pn, sn, count)
f = open(self.filename,"w")
@ -194,13 +194,12 @@ def fdate(val):
else:
return ""
def get_name(name, count):
def get_name(name, surname, count):
"""returns a name string built from the components of the Name
instance, in the form of Firstname Surname"""
return (name.first_name + ' ' +
(name.prefix + ' ' if name.prefix else '') +
name.surname +
surname +
(str(count) if count != -1 else '') +
(', ' +name.suffix if name.suffix else '')
)