2007-07-18 Don Allingham <don@gramps-project.org>
* src/ReportBase/_StyleEditor.py: get rid of Utils.destroy_passed_object * src/Utils.py: Remove unused functions * src/ScratchPad.py: get_note removal svn: r8741
This commit is contained in:
parent
7ce0cc4eef
commit
f3d39e5f33
@ -1,3 +1,8 @@
|
||||
2007-07-18 Don Allingham <don@gramps-project.org>
|
||||
* src/ReportBase/_StyleEditor.py: get rid of Utils.destroy_passed_object
|
||||
* src/Utils.py: Remove unused functions
|
||||
* src/ScratchPad.py: get_note removal
|
||||
|
||||
2007-07-18 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
|
||||
* src/MarkupText.py: improved xml generator
|
||||
* src/docgen/GtkPrint.py: fix svn proplist
|
||||
|
@ -86,7 +86,7 @@ class StyleListDisplay:
|
||||
_('Document Styles') )
|
||||
|
||||
self.top.signal_autoconnect({
|
||||
"destroy_passed_object" : Utils.destroy_passed_object,
|
||||
"destroy_passed_object" : self.__close,
|
||||
"on_ok_clicked" : self.on_ok_clicked,
|
||||
"on_add_clicked" : self.on_add_clicked,
|
||||
"on_delete_clicked" : self.on_delete_clicked,
|
||||
@ -106,6 +106,9 @@ class StyleListDisplay:
|
||||
self.window.run()
|
||||
self.window.destroy()
|
||||
|
||||
def __close(self, obj):
|
||||
self.top.destroy()
|
||||
|
||||
def redraw(self):
|
||||
"""Redraws the list of styles that are current available"""
|
||||
|
||||
@ -191,7 +194,7 @@ class StyleEditor:
|
||||
|
||||
self.top.signal_autoconnect({
|
||||
"on_save_style_clicked" : self.on_save_style_clicked,
|
||||
"destroy_passed_object" : Utils.destroy_passed_object
|
||||
"destroy_passed_object" : self.__close,
|
||||
})
|
||||
|
||||
self.window = self.top.get_widget("editor")
|
||||
@ -223,6 +226,9 @@ class StyleEditor:
|
||||
self.window.run()
|
||||
self.window.destroy()
|
||||
|
||||
def __close(self, obj):
|
||||
self.window.destroy()
|
||||
|
||||
def draw(self):
|
||||
"""Updates the display with the selected paragraph."""
|
||||
|
||||
@ -335,7 +341,7 @@ class StyleEditor:
|
||||
self.style.set_name(name)
|
||||
self.parent.sheetlist.set_style_sheet(name, self.style)
|
||||
self.parent.redraw()
|
||||
Utils.destroy_passed_object(obj)
|
||||
self.window.destroy()
|
||||
|
||||
def change_display(self, obj):
|
||||
"""Called when the paragraph selection has been changed. Saves the
|
||||
|
@ -462,14 +462,10 @@ class ScratchPadSourceRef(ScratchPadGrampsTypeWrapper):
|
||||
base = self._db.get_source_from_handle(self._obj.get_reference_handle())
|
||||
s = "<big><b>%s</b></big>\n\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s" % (
|
||||
_("Source Reference"),
|
||||
"\t<b>%s:</b>\t%s" % \
|
||||
(_("Source Reference"),
|
||||
_("Title"),escape(base.get_title()),
|
||||
_("Page"), escape(self._obj.get_page()),
|
||||
_("Text"), escape(self._obj.get_text()),
|
||||
_("Comment"), escape(self._obj.get_note()))
|
||||
_("Page"), escape(self._obj.get_page()))
|
||||
|
||||
return s
|
||||
|
||||
@ -491,15 +487,13 @@ class ScratchPadRepoRef(ScratchPadGrampsTypeWrapper):
|
||||
global escape
|
||||
base = self._db.get_repository_from_handle(self._obj.get_reference_handle())
|
||||
s = "<big><b>%s</b></big>\n\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s" % (
|
||||
_("Repository Reference"),
|
||||
_("Name"),escape(base.get_name()),
|
||||
_("Call Number"), escape(self._obj.get_call_number()),
|
||||
_("Media Type"), escape(self._obj.get_media_type().__str__()),
|
||||
_("Comment"), escape(self._obj.get_note()))
|
||||
_("Media Type"), escape(self._obj.get_media_type().__str__()))
|
||||
|
||||
return s
|
||||
|
||||
@ -749,7 +743,6 @@ class ScratchSourceLink(ScratchPadWrapper):
|
||||
(drag_type, idval, handle, val) = pickle.loads(self._obj)
|
||||
base = self._db.get_source_from_handle(handle)
|
||||
s = "<big><b>%s</b></big>\n\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s\n"\
|
||||
"\t<b>%s:</b>\t%s" % (
|
||||
@ -757,8 +750,7 @@ class ScratchSourceLink(ScratchPadWrapper):
|
||||
_("Title"),escape(base.get_title()),
|
||||
_("Abbreviation"), escape(base.get_abbreviation()),
|
||||
_("Author"), escape(base.get_author()),
|
||||
_("Publication Information"), escape(base.get_publication_info()),
|
||||
_("Comment"), escape(base.get_note()))
|
||||
_("Publication Information"), escape(base.get_publication_info()))
|
||||
return s
|
||||
|
||||
def is_valid(self):
|
||||
|
32
src/Utils.py
32
src/Utils.py
@ -191,38 +191,6 @@ def family_upper_name(family, db):
|
||||
name = mother.get_primary_name().get_upper_name()
|
||||
return name
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def destroy_passed_object(obj):
|
||||
obj.destroy()
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def get_detail_text(obj,priv=1):
|
||||
if obj.get_note() != "":
|
||||
details = "%s" % _("Note")
|
||||
else:
|
||||
details = ""
|
||||
if len(obj.get_source_references()) > 0:
|
||||
if details == "":
|
||||
details = _("Source")
|
||||
else:
|
||||
details = "%s, %s" % (details,_("Source"))
|
||||
if priv and obj.get_privacy() == 1:
|
||||
if details == "":
|
||||
details = _("Private")
|
||||
else:
|
||||
details = "%s, %s" % (details,_("Private"))
|
||||
return details
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user