ExportFtree: fix typo

svn: r12462
This commit is contained in:
Gerald Britton 2009-04-17 14:58:25 +00:00
parent e63996d08f
commit 5c60081622
4 changed files with 606 additions and 850 deletions

View File

@ -1,111 +1,108 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--*- mode: xml -*-->
<interface> <interface>
<!-- interface-requires gtk+ 2.12 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkDialog" id="scratch_pad"> <object class="GtkDialog" id="scratch_pad">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Clipboard</property> <property name="title" translatable="yes">Clipboard</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="default_width">500</property> <property name="default_width">500</property>
<property name="default_height">300</property> <property name="default_height">300</property>
<property name="resizable">True</property> <property name="type_hint">dialog</property>
<property name="destroy_with_parent">False</property> <signal name="delete_event" handler="on_scratch_pad_delete_event"/>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">True</property>
<signal handler="on_scratch_pad_delete_event" last_modification_time="Wed, 25 May 2005 13:26:32 GMT" name="delete_event"/>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1"> <object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<object class="GtkButton" id="helpbutton1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal handler="on_help_clicked" last_modification_time="Sat, 19 Mar 2005 22:47:16 GMT" name="clicked"/>
</object>
</child>
<child>
<object class="GtkButton" id="btn_clear_all">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Clear _All</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal handler="on_clear_all_clicked" last_modification_time="Sat, 19 Mar 2005 22:46:57 GMT" name="clicked"/>
</object>
</child>
<child>
<object class="GtkButton" id="btn_clear">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-clear</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal handler="on_clear_clicked" last_modification_time="Sat, 19 Mar 2005 22:46:29 GMT" name="clicked"/>
</object>
</child>
<child>
<object class="GtkButton" id="btn_close">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal handler="on_close_scratchpad" last_modification_time="Sat, 19 Mar 2005 22:42:52 GMT" name="clicked"/>
</object>
</child>
</object>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
<child> <child>
<object class="GtkScrolledWindow" id="scrolledwindow86"> <object class="GtkScrolledWindow" id="scrolledwindow86">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">GTK_SHADOW_IN</property> <property name="shadow_type">in</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child> <child>
<object class="GtkTreeView" id="objectlist"> <object class="GtkTreeView" id="objectlist">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="headers_visible">True</property>
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
</object> </object>
</child> </child>
</object> </object>
<packing> <packing>
<property name="padding">0</property> <property name="position">2</property>
<property name="expand">True</property> </packing>
<property name="fill">True</property> </child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="helpbutton1">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_help_clicked"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_clear_all">
<property name="label" translatable="yes">Clear _All</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_clear_all_clicked"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_clear">
<property name="label">gtk-clear</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_clear_clicked"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_close">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_close_scratchpad"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing> </packing>
</child> </child>
</object> </object>

View File

@ -293,7 +293,7 @@ def get_name(name, 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 '') + (name.prefix + ' ' if name.prefix else '') +
name.surname + name.surname +
(str(count) if count != -1 else '') + (str(count) if count != -1 else '') +

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,6 @@
#------------------------------------------------------------------------ #------------------------------------------------------------------------
import os import os
from gettext import gettext as _ from gettext import gettext as _
from gtk import glade
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
@ -57,6 +56,13 @@ except ImportError:
LOG.warn("No Config module available using defaults.") LOG.warn("No Config module available using defaults.")
DEFAULT_SOURCE = False DEFAULT_SOURCE = False
#-------------------------------------------------------------------------
#
# Constants
#
#-------------------------------------------------------------------------
_GLADE_FILE = "ImportGedcom.glade"
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# importData # importData
@ -84,12 +90,14 @@ def importData(database, filename, callback=None):
ifile.close() ifile.close()
if not gramps and ansel: if not gramps and ansel:
glade_file = os.path.join(os.path.dirname(__file__), glade_file = os.path.join(
"ImportGedcom.glade") os.path.split(__file__)[0],
top = glade.XML(glade_file, 'encoding','gramps') _GLADE_FILE)
code = top.get_widget('codeset') top = gtk.Builder()
top.add_from_file(glade_file)
code = top.get_object('codeset')
code.set_active(0) code.set_active(0)
dialog = top.get_widget('encoding') dialog = top.get_object('encoding')
dialog.run() dialog.run()
enc = ['ANSEL', 'ANSEL', 'ANSI', 'ASCII', 'UTF-8'] enc = ['ANSEL', 'ANSEL', 'ANSI', 'ASCII', 'UTF-8']
code_set = enc[ code.get_active()] code_set = enc[ code.get_active()]