* src/AddMedia.py: glade path

* src/AddrEdit.py: glade path
* src/AttrEdit.py: glade path
* src/DateEdit.py: glade path
* src/EventEdit.py: glade path
* src/GrampsCfg.py: glade path
* src/ImageSelect.py: glade path
* src/Sources.py: glade path
* src/StyleEditor.py: glade path
* src/const.py.in: glade path
* src/Marriage.py: glade path
* src/unlocked.png: added
* src/GrampsDb/_ReadGedcom.py: optimize UI updates, add test code


svn: r5772
This commit is contained in:
Don Allingham 2006-01-17 05:03:30 +00:00
parent 8fcd6fe446
commit 06731ccf4f
22 changed files with 83 additions and 64 deletions

View File

@ -1,6 +1,18 @@
2006-01-16 Don Allingham <don@gramps-project.org>
* src/AddMedia.py: glade path
* src/AddrEdit.py: glade path
* src/AttrEdit.py: glade path
* src/DateEdit.py: glade path
* src/EventEdit.py: glade path
* src/GrampsCfg.py: glade path
* src/ImageSelect.py: glade path
* src/Sources.py: glade path
* src/StyleEditor.py: glade path
* src/const.py.in: glade path
* src/Marriage.py: glade path
* src/unlocked.png: added
* src/gramps.glade: remove lock border
* src/GrampsDb/_ReadGedcom.py: optimize UI updates
* src/GrampsDb/_ReadGedcom.py: optimize UI updates, add test code
2006-01-16 Alex Roitman <shura@gramps-project.org>
* src/ViewManager: Remov unused code.

View File

@ -79,7 +79,7 @@ class AddMediaObject:
db - the database in which the new object is to be stored
"""
self.db = db
self.glade = gtk.glade.XML(const.imageselFile,"imageSelect","gramps")
self.glade = gtk.glade.XML(const.gladeFile,"imageSelect","gramps")
self.window = self.glade.get_widget("imageSelect")
self.description = self.glade.get_widget("photoDescription")
self.image = self.glade.get_widget("image")

View File

@ -86,7 +86,7 @@ class AddressEditor(DisplayState.ManagedWindow):
return
# Get the important widgets from the glade description
self.top = gtk.glade.XML(const.dialogFile, "addr_edit","gramps")
self.top = gtk.glade.XML(const.gladeFile, "addr_edit","gramps")
self.gladeif = GladeIf(self.top)
self.window = self.top.get_widget("addr_edit")

View File

@ -92,7 +92,7 @@ class AttributeEditor(DisplayState.ManagedWindow):
if self.already_exist:
return
self.top = gtk.glade.XML(const.dialogFile, "attr_edit","gramps")
self.top = gtk.glade.XML(const.gladeFile, "attr_edit","gramps")
self.slist = self.top.get_widget("slist")
self.value_field = self.top.get_widget("attr_value")
self.note_field = self.top.get_widget("attr_note")

View File

@ -187,7 +187,7 @@ class DateEditorDialog:
# Create self.date as a copy of the given Date object.
self.date = Date.Date(date)
self.top = gtk.glade.XML(const.dialogFile, "date_edit","gramps" )
self.top = gtk.glade.XML(const.gladeFile, "date_edit","gramps" )
self.top_window = self.top.get_widget('date_edit')
self.top_window.hide()
title = self.top.get_widget('title')

View File

@ -26,7 +26,7 @@
#
#-------------------------------------------------------------------------
import cPickle as pickle
import gc
import os
import sys
from gettext import gettext as _
@ -166,7 +166,7 @@ class EditFamily(DisplayState.ManagedWindow):
def build_interface(self):
self.top = gtk.glade.XML(const.placesFile,"marriageEditor","gramps")
self.top = gtk.glade.XML(const.gladeFile,"marriageEditor","gramps")
self.gladeif = GladeIf(self.top)
self.window = self.top.get_widget("marriageEditor")
@ -191,6 +191,8 @@ class EditFamily(DisplayState.ManagedWindow):
self.vbox = self.top.get_widget('vbox')
self.child_list = self.top.get_widget('child_list')
self.private= self.top.get_widget('private')
rel_types = dict(Utils.family_relations)
mtype = self.family.get_relationship()
@ -242,6 +244,19 @@ class EditFamily(DisplayState.ManagedWindow):
self.notebook.set_tab_label(self.gallery_tab,self.gallery_tab.get_tab_widget())
self.gid.set_text(self.family.get_gramps_id())
self.private.connect('toggled',self.privacy_toggled)
self.private.set_active(self.family.get_privacy())
def privacy_toggled(self,obj):
for o in obj.get_children():
obj.remove(o)
img = gtk.Image()
if obj.get_active():
img.set_from_file(os.path.join(const.rootDir,"locked.png"))
else:
img.set_from_file(os.path.join(const.rootDir,"unlocked.png"))
img.show()
obj.add(img)
def update_father(self,handle):
self.load_parent(handle, self.fbox, self.fbirth, self.fdeath, self.fbutton)

View File

@ -86,7 +86,7 @@ class EditPlace(DisplayState.ManagedWindow):
else:
self.srcreflist = []
self.top = gtk.glade.XML(const.placesFile,"placeEditor","gramps")
self.top = gtk.glade.XML(const.gladeFile,"placeEditor","gramps")
self.gladeif = GladeIf(self.top)
self.window = self.top.get_widget("placeEditor")

View File

@ -134,7 +134,7 @@ class EventEditor(DisplayState.ManagedWindow):
self.srcreflist = []
self.date = Date.Date(None)
self.top = gtk.glade.XML(const.dialogFile, "event_edit","gramps")
self.top = gtk.glade.XML(const.gladeFile, "event_edit","gramps")
self.gladeif = GladeIf(self.top)
self.window = self.top.get_widget("event_edit")
@ -426,7 +426,7 @@ class EventRefEditor(DisplayState.ManagedWindow):
self.title = _('Event Reference Editor')
self.top = gtk.glade.XML(const.dialogFile, "event_eref_edit","gramps")
self.top = gtk.glade.XML(const.gladeFile, "event_eref_edit","gramps")
self.window = self.top.get_widget('event_eref_edit')
self.ref_note_field = self.top.get_widget('eer_ref_note')
self.role_combo = self.top.get_widget('eer_role_combo')

View File

@ -145,7 +145,7 @@ class GrampsPreferences:
def __init__(self,db):
self.built = 0
self.db = db
self.top = gtk.glade.XML(const.prefsFile,"preferences","gramps")
self.top = gtk.glade.XML(const.gladeFile,"preferences","gramps")
self.gladeif = GladeIf(self.top)
self.gladeif.connect('button6','clicked',self.on_close_clicked)

View File

@ -493,8 +493,8 @@ class GedcomParser:
def update(self,field,text):
field.set_text(text)
while gtk.events_pending():
gtk.main_iteration()
# while gtk.events_pending():
# gtk.main_iteration()
def get_next(self):
if self.backoff == 0:

View File

@ -116,7 +116,7 @@ class ImageSelect:
if self.path == '':
return
self.glade = gtk.glade.XML(const.imageselFile,"imageSelect","gramps")
self.glade = gtk.glade.XML(const.gladeFile,"imageSelect","gramps")
self.window = self.glade.get_widget("imageSelect")
self.fname = self.glade.get_widget("fname")
@ -695,7 +695,7 @@ class LocalMediaProperties:
self.lists_changed = 0
fname = self.obj.get_path()
self.change_dialog = gtk.glade.XML(const.imageselFile,
self.change_dialog = gtk.glade.XML(const.gladeFile,
"change_description","gramps")
title = _('Media Reference Editor')
@ -981,7 +981,7 @@ class GlobalMediaProperties(DisplayState.ManagedWindow):
self.refmodel = None # this becomes the model for the references
self.path = self.db.get_save_path()
self.change_dialog = gtk.glade.XML(const.imageselFile,
self.change_dialog = gtk.glade.XML(const.gladeFile,
"change_global","gramps")
self.gladeif = GladeIf(self.change_dialog)

View File

@ -59,7 +59,7 @@ class LocationEditor:
else:
self.win_key = self
self.location = location
self.top = gtk.glade.XML(const.dialogFile, "loc_edit","gramps")
self.top = gtk.glade.XML(const.gladeFile, "loc_edit","gramps")
self.gladeif = GladeIf(self.top)
self.window = self.top.get_widget("loc_edit")

View File

@ -111,7 +111,7 @@ class Marriage:
p = db.get_place_from_handle(key).get_display_info()
self.pmap[p[0]] = key
self.top = gtk.glade.XML(const.marriageFile,"marriageEditor","gramps")
self.top = gtk.glade.XML(const.gladeFile,"marriageEditor","gramps")
self.gladeif = GladeIf(self.top)
self.window = self.get_widget("marriageEditor")

View File

@ -75,7 +75,7 @@ class NameEditor(DisplayState.ManagedWindow):
return
self.name = name
self.top = gtk.glade.XML(const.dialogFile, "name_edit","gramps")
self.top = gtk.glade.XML(const.gladeFile, "name_edit","gramps")
self.gladeif = GladeIf(self.top)
self.window = self.top.get_widget("name_edit")
self.given_field = self.top.get_widget("alt_given")

View File

@ -51,7 +51,7 @@ except:
class SaveDialog:
def __init__(self,msg1,msg2,task1,task2,parent=None):
self.xml = gtk.glade.XML(const.errdialogsFile,"savedialog","gramps")
self.xml = gtk.glade.XML(const.gladeFile,"savedialog","gramps")
self.top = self.xml.get_widget('savedialog')
self.top.set_icon(ICON)
self.dontask = self.xml.get_widget('dontask')
@ -79,7 +79,7 @@ class SaveDialog:
class QuestionDialog:
def __init__(self,msg1,msg2,label,task,parent=None):
self.xml = gtk.glade.XML(const.errdialogsFile,"questiondialog","gramps")
self.xml = gtk.glade.XML(const.gladeFile,"questiondialog","gramps")
self.top = self.xml.get_widget('questiondialog')
self.top.set_icon(ICON)
self.top.set_title('')
@ -104,7 +104,7 @@ class QuestionDialog:
class QuestionDialog2:
def __init__(self,msg1,msg2,label_msg1,label_msg2,parent=None):
self.xml = gtk.glade.XML(const.errdialogsFile,"questiondialog","gramps")
self.xml = gtk.glade.XML(const.gladeFile,"questiondialog","gramps")
self.top = self.xml.get_widget('questiondialog')
self.top.set_icon(ICON)
self.top.set_title('')
@ -130,7 +130,7 @@ class QuestionDialog2:
class OptionDialog:
def __init__(self,msg1,msg2,btnmsg1,task1,btnmsg2,task2,parent=None):
self.xml = gtk.glade.XML(const.errdialogsFile,"optiondialog","gramps")
self.xml = gtk.glade.XML(const.gladeFile,"optiondialog","gramps")
self.top = self.xml.get_widget('optiondialog')
self.top.set_icon(ICON)
self.top.set_title('')
@ -163,7 +163,7 @@ class OptionDialog:
class ErrorDialog:
def __init__(self,msg1,msg2="",parent=None):
self.xml = gtk.glade.XML(const.errdialogsFile,"errdialog","gramps")
self.xml = gtk.glade.XML(const.gladeFile,"errdialog","gramps")
self.top = self.xml.get_widget('errdialog')
self.top.set_icon(ICON)
@ -181,7 +181,7 @@ class ErrorDialog:
class WarningDialog:
def __init__(self,msg1,msg2="",parent=None):
self.xml = gtk.glade.XML(const.errdialogsFile,"warndialog","gramps")
self.xml = gtk.glade.XML(const.gladeFile,"warndialog","gramps")
self.top = self.xml.get_widget('warndialog')
self.top.set_icon(ICON)
@ -199,7 +199,7 @@ class WarningDialog:
class OkDialog:
def __init__(self,msg1,msg2="",parent=None):
self.xml = gtk.glade.XML(const.errdialogsFile,"okdialog","gramps")
self.xml = gtk.glade.XML(const.gladeFile,"okdialog","gramps")
self.top = self.xml.get_widget('okdialog')
self.top.set_icon(ICON)
@ -216,7 +216,7 @@ class OkDialog:
class MissingMediaDialog:
def __init__(self,msg1,msg2,task1,task2,task3,parent=None):
self.xml = gtk.glade.XML(const.errdialogsFile,"missmediadialog","gramps")
self.xml = gtk.glade.XML(const.gladeFile,"missmediadialog","gramps")
self.top = self.xml.get_widget('missmediadialog')
self.top.set_icon(ICON)
self.task1 = task1

View File

@ -87,7 +87,7 @@ class SourceSelector(DisplayState.ManagedWindow):
for s in self.orig:
self.list.append(RelLib.SourceRef(s))
self.update=update
self.top = gtk.glade.XML(const.srcselFile,"sourcesel","gramps")
self.top = gtk.glade.XML(const.gladeFile,"sourcesel","gramps")
self.gladeif = GladeIf(self.top)
self.window = self.top.get_widget("sourcesel")
@ -356,7 +356,7 @@ class SourceEditor(DisplayState.ManagedWindow):
self.update = update
self.source_ref = srcref
self.showSource = gtk.glade.XML(const.srcselFile,
self.showSource = gtk.glade.XML(const.gladeFile,
"sourceDisplay","gramps")
self.window = self.get_widget("sourceDisplay")

View File

@ -77,7 +77,7 @@ class StyleListDisplay:
self.callback = callback
self.sheetlist = stylesheetlist
self.top = gtk.glade.XML(const.stylesFile,"styles","gramps")
self.top = gtk.glade.XML(const.gladeFile,"styles","gramps")
self.window = self.top.get_widget('styles')
Utils.set_titles(self.window,
@ -185,7 +185,7 @@ class StyleEditor:
self.original_style = style
self.style = BaseDoc.StyleSheet(style)
self.parent = parent
self.top = gtk.glade.XML(const.stylesFile,"editor","gramps")
self.top = gtk.glade.XML(const.gladeFile,"editor","gramps")
self.top.signal_autoconnect({
"on_save_style_clicked" : self.on_save_style_clicked,

View File

@ -70,7 +70,7 @@ class UrlEditor(DisplayState.ManagedWindow):
self.url = url
self.callback = callback
self.top = gtk.glade.XML(const.dialogFile, "url_edit","gramps")
self.top = gtk.glade.XML(const.gladeFile, "url_edit","gramps")
self.gladeif = GladeIf(self.top)
self.window = self.top.get_widget("url_edit")

View File

@ -144,7 +144,7 @@ class WitnessEditor:
self.win_key = self
self.update = update
self.ref = ref
self.show_witness = gtk.glade.XML(const.dialogFile,
self.show_witness = gtk.glade.XML(const.gladeFile,
"witness_edit","gramps")
self.gladeif = GladeIf(self.show_witness)

View File

@ -93,42 +93,34 @@ if os.environ.has_key('GRAMPSDIR'):
else:
rootDir = "."
good_xpm = "%s/good.png" % rootDir
bad_xpm = "%s/bad.png" % rootDir
caution_xpm = "%s/caution.png" % rootDir
good_xpm = os.path.join(rootDir,"good.png")
bad_xpm = os.path.join(rootDir,"bad.png")
caution_xpm = os.path.join(rootDir,"caution.png")
system_filters = "%s/system_filters.xml" % rootDir
system_filters = os.path.join(rootDir,"system_filters.xml")
custom_filters = "~/.gramps/custom_filters.xml"
report_options = "~/.gramps/report_options.xml"
tool_options = "~/.gramps/tool_options.xml"
bsddbenv_dir = "~/.gramps/bsddbenv"
icon = "%s/gramps.png" % rootDir
logo = "%s/logo.png" % rootDir
splash = "%s/splash.jpg" % rootDir
license = "%s/COPYING" % rootDir
gladeFile = "%s/gramps.glade" % rootDir
placesFile = "%s/gramps.glade" % rootDir
imageselFile = "%s/gramps.glade" % rootDir
marriageFile = "%s/gramps.glade" % rootDir
editPersonFile = "%s/edit_person.glade" % rootDir
pluginsFile = "%s/plugins.glade" % rootDir
prefsFile = "%s/gramps.glade" % rootDir
stylesFile = "%s/gramps.glade" % rootDir
dialogFile = "%s/gramps.glade" % rootDir
srcselFile = "%s/gramps.glade" % rootDir
mergeFile = "%s/mergedata.glade" % rootDir
merge2File = "%s/merge.glade" % rootDir
filterFile = "%s/rule.glade" % rootDir
errdialogsFile = "%s/gramps.glade" % rootDir
icon = os.path.join(rootDir,"gramps.png")
logo = os.path.join(rootDir,"logo.png")
splash = os.path.join(rootDir,"splash.jpg")
license = os.path.join(rootDir,"COPYING")
gladeFile = os.path.join(rootDir,"gramps.glade")
editPersonFile = os.path.join(rootDir,"edit_person.glade")
pluginsFile = os.path.join(rootDir,"plugins.glade")
mergeFile = os.path.join(rootDir,"mergedata.glade")
merge2File = os.path.join(rootDir,"merge.glade")
filterFile = os.path.join(rootDir,"rule.glade")
pluginsDir = "%s/plugins" % rootDir
datesDir = "%s/dates" % rootDir
docgenDir = "%s/docgen" % rootDir
dataDir = "%s/data" % rootDir
template_dir = "%s/templates" % dataDir
pluginsDir = os.path.join(rootDir,"plugins")
datesDir = os.path.join(rootDir,"dates")
docgenDir = os.path.join(rootDir,"docgen")
dataDir = os.path.join(rootDir,"data")
template_dir = os.path.join(dataDir,"templates")
papersize = "file:%s/papersize.xml" % dataDir
tipdata = "%s/tips.xml" % dataDir
fdl = "%s/fdl.txt" % dataDir
tipdata = os.path.join(dataDir,"tips.xml")
fdl = os.path.join(dataDir,"fdl.txt")
startup = 1
dnd_images = 1

View File

@ -2420,7 +2420,7 @@
</child>
<child>
<widget class="GtkToggleButton" id="togglebutton1">
<widget class="GtkToggleButton" id="private">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
@ -2431,7 +2431,7 @@
<child>
<widget class="GtkImage" id="image2672">
<property name="visible">True</property>
<property name="pixbuf">locked.png</property>
<property name="pixbuf">unlocked.png</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>

BIN
gramps2/src/unlocked.png Normal file

Binary file not shown.