Update
svn: r6824
This commit is contained in:
@@ -20,6 +20,12 @@
|
||||
|
||||
# $Id: _Report.py 6669 2006-05-15 15:53:42Z rshura $
|
||||
|
||||
from types import ClassType, InstanceType
|
||||
import gtk
|
||||
|
||||
import NameDisplay
|
||||
import BaseDoc
|
||||
from _StyleComboBox import StyleComboBox
|
||||
|
||||
class BareReportDialog:
|
||||
"""
|
||||
@@ -268,7 +274,7 @@ class BareReportDialog:
|
||||
label = gtk.Label('<span size="larger" weight="bold">%s</span>' % title)
|
||||
label.set_use_markup(True)
|
||||
self.window.vbox.pack_start(label, True, True,
|
||||
ReportDialog.border_pad)
|
||||
BareReportDialog.border_pad)
|
||||
|
||||
def setup_target_frame(self):
|
||||
"""Bare report dialog only uses Doc Options header."""
|
||||
@@ -312,7 +318,7 @@ class BareReportDialog:
|
||||
label = gtk.Label("%s:" % _("Style"))
|
||||
label.set_alignment(0.0,0.5)
|
||||
|
||||
self.style_menu = GrampsStyleComboBox()
|
||||
self.style_menu = StyleComboBox()
|
||||
self.style_button = gtk.Button("%s..." % _("Style Editor"))
|
||||
self.style_button.connect('clicked',self.on_style_edit_clicked)
|
||||
|
||||
|
@@ -20,6 +20,9 @@
|
||||
|
||||
# $Id: _Report.py 6669 2006-05-15 15:53:42Z rshura $
|
||||
|
||||
import os
|
||||
import gtk
|
||||
|
||||
class FileEntry(gtk.HBox):
|
||||
def __init__(self,defname,title):
|
||||
gtk.HBox.__init__(self)
|
||||
|
@@ -60,7 +60,7 @@ except:
|
||||
#-------------------------------------------------------------------------
|
||||
paper_sizes = []
|
||||
|
||||
class GrampsPaperComboBox(gtk.ComboBox):
|
||||
class PaperComboBox(gtk.ComboBox):
|
||||
|
||||
def __init__(self):
|
||||
gtk.ComboBox.__init__(self,model=None)
|
||||
@@ -91,7 +91,7 @@ class GrampsPaperComboBox(gtk.ComboBox):
|
||||
key = self.store[active][0]
|
||||
return (self.mapping[key],key)
|
||||
|
||||
class GrampsOrientationComboBox(gtk.ComboBox):
|
||||
class OrientationComboBox(gtk.ComboBox):
|
||||
|
||||
def __init__(self):
|
||||
gtk.ComboBox.__init__(self,model=None)
|
||||
|
@@ -20,7 +20,19 @@
|
||||
|
||||
# $Id: _Report.py 6669 2006-05-15 15:53:42Z rshura $
|
||||
|
||||
import os
|
||||
import gtk
|
||||
|
||||
import Config
|
||||
import Errors
|
||||
from QuestionDialog import ErrorDialog, OptionDialog
|
||||
|
||||
from _Constants import CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK, \
|
||||
CATEGORY_VIEW, CATEGORY_CODE, CATEGORY_WEB, standalone_categories
|
||||
from _BareReportDialog import BareReportDialog
|
||||
from _FileEntry import FileEntry
|
||||
from _PaperMenu import PaperComboBox, OrientationComboBox, paper_sizes
|
||||
from _TemplateParser import _template_map, _default_template, _user_template
|
||||
|
||||
class ReportDialog(BareReportDialog):
|
||||
"""
|
||||
@@ -298,10 +310,10 @@ class ReportDialog(BareReportDialog):
|
||||
self.paper_table.set_row_spacings(6)
|
||||
self.paper_table.set_border_width(6)
|
||||
|
||||
self.papersize_menu = _PaperMenu.GrampsPaperComboBox()
|
||||
self.papersize_menu = PaperComboBox()
|
||||
self.papersize_menu.connect('changed',self.size_changed)
|
||||
|
||||
self.orientation_menu = _PaperMenu.GrampsOrientationComboBox()
|
||||
self.orientation_menu = OrientationComboBox()
|
||||
l = gtk.Label("%s:" % _("Size"))
|
||||
l.set_alignment(0.0,0.5)
|
||||
|
||||
@@ -337,7 +349,7 @@ class ReportDialog(BareReportDialog):
|
||||
l.set_alignment(0.0,0.5)
|
||||
self.paper_table.attach(l,5,6,1,2,gtk.SHRINK|gtk.FILL)
|
||||
|
||||
self.papersize_menu.set(_PaperMenu.paper_sizes,
|
||||
self.papersize_menu.set(paper_sizes,
|
||||
self.options.handler.get_paper_name())
|
||||
self.orientation_menu.set(self.options.handler.get_orientation())
|
||||
|
||||
@@ -577,8 +589,10 @@ def report(database,person,report_class,options_class,
|
||||
"""
|
||||
|
||||
if category == CATEGORY_TEXT:
|
||||
from _TextReportDialog import TextReportDialog
|
||||
dialog_class = TextReportDialog
|
||||
elif category == CATEGORY_DRAW:
|
||||
from _DrawReportDialog import DrawReportDialog
|
||||
dialog_class = DrawReportDialog
|
||||
elif category in (CATEGORY_BOOK,CATEGORY_VIEW,
|
||||
CATEGORY_CODE,CATEGORY_WEB):
|
||||
|
@@ -20,6 +20,8 @@
|
||||
|
||||
# $Id: _Report.py 6669 2006-05-15 15:53:42Z rshura $
|
||||
|
||||
import gtk
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# StyleComboBox
|
||||
|
@@ -40,7 +40,7 @@ class TextFormatComboBox(gtk.ComboBox):
|
||||
|
||||
out_pref = Config.get(Config.OUTPUT_PREFERENCE)
|
||||
index = 0
|
||||
_PluginMgr.textdoc_list.sort()
|
||||
PluginUtils.textdoc_list.sort()
|
||||
active_index = 0
|
||||
for item in PluginUtils.textdoc_list:
|
||||
if tables and item[2] == 0:
|
||||
@@ -72,7 +72,7 @@ class TextFormatComboBox(gtk.ComboBox):
|
||||
return PluginUtils.textdoc_list[self.get_active()][5]
|
||||
|
||||
def get_printable(self):
|
||||
return PluginUtil.textdoc_list[self.get_active()][6]
|
||||
return PluginUtils.textdoc_list[self.get_active()][6]
|
||||
|
||||
def get_clname(self):
|
||||
return PluginUtils.textdoc_list[self.get_active()][7]
|
||||
|
@@ -35,5 +35,5 @@ from _CommandLineReport import cl_report
|
||||
from _DrawReportDialog import DrawReportDialog
|
||||
from _TextReportDialog import TextReportDialog
|
||||
|
||||
import _ReportOptions as ReportOptions
|
||||
from _ReportOptions import ReportOptions
|
||||
import _ReportUtils as ReportUtils
|
||||
|
Reference in New Issue
Block a user