From 7a67be9d4a722440bebacfc225838d3328ca1fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sun, 8 May 2011 13:08:28 +0000 Subject: [PATCH] 4853: Cannot enable 'child' options of BooleanOption (patch by Adam Stein) svn: r17455 --- src/gui/plug/_guioptions.py | 5 +---- src/plugins/export/ExportFtree.py | 7 +++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/gui/plug/_guioptions.py b/src/gui/plug/_guioptions.py index d541f3e97..9845706d0 100644 --- a/src/gui/plug/_guioptions.py +++ b/src/gui/plug/_guioptions.py @@ -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 # # 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): """ diff --git a/src/plugins/export/ExportFtree.py b/src/plugins/export/ExportFtree.py index 850be9bd9..9486c89a0 100644 --- a/src/plugins/export/ExportFtree.py +++ b/src/plugins/export/ExportFtree.py @@ -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 '') )