* src/docgen/PSDrawDoc.py: fix imports - make it work

* src/ReportBase/_StyleEditor.py: use ManagedWindow
	* src/ReportBase/_BareReportDialog.py: import StyleEditor
	* src/plugins/BookReport.py: fix "Center Person" display
	* src/plugins/WriteCD.py: fail gracefully without Gnome

svn: r6860
This commit is contained in:
Brian Matherly 2006-06-04 23:23:10 +00:00
parent a01e2bef1a
commit 848e970ce3
6 changed files with 33 additions and 14 deletions

View File

@ -1,3 +1,10 @@
2006-06-04 Brian Matherly <brian@gramps-project.org>
* src/docgen/PSDrawDoc.py: fix imports - make it work
* src/ReportBase/_StyleEditor.py: use ManagedWindow
* src/ReportBase/_BareReportDialog.py: import StyleEditor
* src/plugins/BookReport.py: fix "Center Person" display
* src/plugins/WriteCD.py: fail gracefully without Gnome
2006-06-04 Don Allingham <don@gramps-project.org> 2006-06-04 Don Allingham <don@gramps-project.org>
* src/plugins/Makefile.am (pkgdata_PYTHON): remove FilterEditor.py * src/plugins/Makefile.am (pkgdata_PYTHON): remove FilterEditor.py

View File

@ -44,6 +44,7 @@ import BaseDoc
import ManagedWindow import ManagedWindow
from Filters import FilterComboBox from Filters import FilterComboBox
from _StyleComboBox import StyleComboBox from _StyleComboBox import StyleComboBox
from _StyleEditor import StyleListDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -55,6 +55,7 @@ import Utils
import const import const
import BaseDoc import BaseDoc
import ListModel import ListModel
import ManagedWindow
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
@ -81,9 +82,9 @@ class StyleListDisplay:
self.top = gtk.glade.XML(const.gladeFile,"styles","gramps") self.top = gtk.glade.XML(const.gladeFile,"styles","gramps")
self.window = self.top.get_widget('styles') self.window = self.top.get_widget('styles')
Utils.set_titles(self.window, ManagedWindow.set_titles( self.window,
self.top.get_widget('title'), self.top.get_widget('title'),
_('Document Styles')) _('Document Styles') )
self.top.signal_autoconnect({ self.top.signal_autoconnect({
"destroy_passed_object" : Utils.destroy_passed_object, "destroy_passed_object" : Utils.destroy_passed_object,
@ -197,7 +198,9 @@ class StyleEditor:
self.pname = self.top.get_widget('pname') self.pname = self.top.get_widget('pname')
self.pdescription = self.top.get_widget('pdescription') self.pdescription = self.top.get_widget('pdescription')
Utils.set_titles(self.window, self.top.get_widget('title'),_('Style editor')) ManagedWindow.set_titles( self.window,
self.top.get_widget('title'),
_('Style editor'))
self.first = 1 self.first = 1

View File

@ -31,9 +31,10 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
#Gramps modules #Gramps modules
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
#from PluginUtils import register_draw_doc from ReportBase import from ReportBase import ReportUtils
#Report, ReportUtils import Errors import BaseDoc from Utils import from PluginUtils import register_draw_doc
#gformat import BaseDoc
from Utils import gformat
def lrgb(grp): def lrgb(grp):
grp = ReportUtils.rgb_color(grp) grp = ReportUtils.rgb_color(grp)

View File

@ -501,7 +501,7 @@ class BookListDisplay:
self.xml = gtk.glade.XML(glade_file,"booklist","gramps") self.xml = gtk.glade.XML(glade_file,"booklist","gramps")
self.top = self.xml.get_widget('booklist') self.top = self.xml.get_widget('booklist')
Utils.set_titles(self.top, ManagedWindow.set_titles(self.top,
self.xml.get_widget('title'),_('Available Books')) self.xml.get_widget('title'),_('Available Books'))
if nodelete: if nodelete:
@ -742,12 +742,12 @@ class BookReportSelector(ManagedWindow.ManagedWindow):
if not the_iter: if not the_iter:
return return
data = self.av_model.get_data(the_iter,range(self.av_ncols)) data = self.av_model.get_data(the_iter,range(self.av_ncols))
if data[2] in ('simple_book_title','custom_text'):
data.append(_("Not Applicable"))
else:
data.append(self.person.get_primary_name().get_regular_name())
self.bk_model.add(data)
item = BookItem(data[2]) item = BookItem(data[2])
if data[2] in ('simple_book_title','custom_text'):
data[2]=(_("Not Applicable"))
else:
data[2]=(self.person.get_primary_name().get_regular_name())
self.bk_model.add(data)
person_id = item.option_class.handler.get_person_id() person_id = item.option_class.handler.get_person_id()
if not person_id: if not person_id:
person_id = self.person.get_gramps_id() person_id = self.person.get_gramps_id()

View File

@ -46,7 +46,14 @@ log = logging.getLogger(".WriteCD")
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import gtk.glade import gtk.glade
import gnome import Errors
try:
import gnome
except ImportError:
raise Errors.UnavailableError(
_("Cannot be loaded because python bindings "
"for GNOME are not installed"))
try: try:
from gnomevfs import URI, create, OPEN_WRITE, make_directory, FileExistsError from gnomevfs import URI, create, OPEN_WRITE, make_directory, FileExistsError