4853: Cannot enable 'child' options of BooleanOption (patch by Adam Stein)
svn: r17455
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
# Copyright (C) 2008 Craig J. Anderson
|
# Copyright (C) 2008 Craig J. Anderson
|
||||||
# Copyright (C) 2009 Nick Hall
|
# Copyright (C) 2009 Nick Hall
|
||||||
# Copyright (C) 2010 Jakim Friant
|
# 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
|
# 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
|
# 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())
|
vtype = type(self.__option.get_value())
|
||||||
|
|
||||||
self.__option.disable_signals()
|
|
||||||
self.__option.set_value( vtype(self.get_value()) )
|
self.__option.set_value( vtype(self.get_value()) )
|
||||||
self.__option.enable_signals()
|
|
||||||
|
|
||||||
def __update_avail(self):
|
def __update_avail(self):
|
||||||
"""
|
"""
|
||||||
@@ -453,9 +452,7 @@ class GuiBooleanOption(gtk.CheckButton):
|
|||||||
"""
|
"""
|
||||||
Handle the change of the value made by the user.
|
Handle the change of the value made by the user.
|
||||||
"""
|
"""
|
||||||
self.__option.disable_signals()
|
|
||||||
self.__option.set_value( self.get_active() )
|
self.__option.set_value( self.get_active() )
|
||||||
self.__option.enable_signals()
|
|
||||||
|
|
||||||
def __update_avail(self):
|
def __update_avail(self):
|
||||||
"""
|
"""
|
||||||
|
@@ -123,7 +123,7 @@ class FtreeWriter(object):
|
|||||||
else:
|
else:
|
||||||
name_map[n] = key
|
name_map[n] = key
|
||||||
id_map[key] = n
|
id_map[key] = n
|
||||||
id_name[key] = get_name(pn, count)
|
id_name[key] = get_name(pn, sn, count)
|
||||||
|
|
||||||
f = open(self.filename,"w")
|
f = open(self.filename,"w")
|
||||||
|
|
||||||
@@ -194,13 +194,12 @@ def fdate(val):
|
|||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def get_name(name, count):
|
def get_name(name, surname, count):
|
||||||
"""returns a name string built from the components of the Name
|
"""returns a name string built from the components of the Name
|
||||||
instance, in the form of Firstname Surname"""
|
instance, in the form of Firstname Surname"""
|
||||||
|
|
||||||
return (name.first_name + ' ' +
|
return (name.first_name + ' ' +
|
||||||
(name.prefix + ' ' if name.prefix else '') +
|
surname +
|
||||||
name.surname +
|
|
||||||
(str(count) if count != -1 else '') +
|
(str(count) if count != -1 else '') +
|
||||||
(', ' +name.suffix if name.suffix else '')
|
(', ' +name.suffix if name.suffix else '')
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user