diff --git a/src/AbiWordDoc.py b/src/AbiWordDoc.py
index f4652dacf..e3d4fdaf2 100644
--- a/src/AbiWordDoc.py
+++ b/src/AbiWordDoc.py
@@ -35,8 +35,8 @@ except:
class AbiWordDoc(TextDoc):
- def __init__(self,type,orientation):
- TextDoc.__init__(self,type,orientation)
+ def __init__(self,styles,type,orientation):
+ TextDoc.__init__(self,styles,type,orientation)
self.f = None
self.level = 0
self.new_page = 0
diff --git a/src/FindDoc.py b/src/FindDoc.py
index 4ff8d6669..386ade589 100644
--- a/src/FindDoc.py
+++ b/src/FindDoc.py
@@ -24,6 +24,7 @@
#
#-------------------------------------------------------------------------
from TextDoc import *
+from DrawDoc import *
import gtk
import Config
import intl
@@ -51,6 +52,7 @@ _template = 0
#
#-------------------------------------------------------------------------
_textdoc = []
+_drawdoc = []
try:
import OpenOfficeDoc
@@ -58,6 +60,12 @@ try:
except:
pass
+try:
+ import OpenDrawDoc
+ _drawdoc.append(_OpenOffice)
+except:
+ pass
+
try:
import AbiWordDoc
_textdoc.append((_AbiWord, _no_tables, _paper))
@@ -70,6 +78,12 @@ try:
except:
pass
+try:
+ import PdfDrawDoc
+ _drawdoc.append(_PDF)
+except:
+ pass
+
try:
import HtmlDoc
_textdoc.append((_HTML, _has_tables, _template))
@@ -108,13 +122,50 @@ def get_text_doc_menu(main_menu,tables,callback,obj=None):
#
#
#-------------------------------------------------------------------------
-def make_text_doc(name,paper,orien,template):
- if name == _OpenOffice:
- return OpenOfficeDoc.OpenOfficeDoc(paper,orien)
- elif name == _AbiWord:
- return AbiWordDoc.AbiWordDoc(paper,orien)
- elif name == _PDF:
- return PdfDoc.PdfDoc(paper,orien)
- else:
- return HtmlDoc.HtmlDoc(template)
+def get_draw_doc_menu(main_menu,callback,obj=None):
+
+ index = 0
+ myMenu = gtk.GtkMenu()
+ for item in _textdoc:
+ if tables and item[1] == 0:
+ continue
+ name = item[0]
+ menuitem = gtk.GtkMenuItem(name)
+ menuitem.set_data("name",name)
+ menuitem.set_data("obj",obj)
+ if callback:
+ menuitem.connect("activate",callback)
+ menuitem.show()
+ myMenu.append(menuitem)
+ if name == Config.output_preference:
+ myMenu.set_active(index)
+ callback(menuitem)
+ index = index + 1
+ main_menu.set_menu(myMenu)
+
+#-------------------------------------------------------------------------
+#
+#
+#
+#-------------------------------------------------------------------------
+def make_text_doc(styles,name,paper,orien,template):
+ if name == _OpenOffice:
+ return OpenOfficeDoc.OpenOfficeDoc(styles,paper,orien)
+ elif name == _AbiWord:
+ return AbiWordDoc.AbiWordDoc(styles,paper,orien)
+ elif name == _PDF:
+ return PdfDoc.PdfDoc(styles,paper,orien)
+ else:
+ return HtmlDoc.HtmlDoc(styles,template)
+
+#-------------------------------------------------------------------------
+#
+#
+#
+#-------------------------------------------------------------------------
+def make_draw_doc(name,paper,orien):
+ if name == _OpenOffice:
+ return OpenDrawDoc.OpenDrawDoc(paper,orien)
+ else:
+ return PdfDrawDoc.PdfDrawDoc(paper,orien)
diff --git a/src/HtmlDoc.py b/src/HtmlDoc.py
index 9770bde5f..d86a36e0c 100644
--- a/src/HtmlDoc.py
+++ b/src/HtmlDoc.py
@@ -56,8 +56,8 @@ _bottom = [
class HtmlDoc(TextDoc):
- def __init__(self,template):
- TextDoc.__init__(self,PaperStyle("",0,0),None)
+ def __init__(self,styles,template):
+ TextDoc.__init__(self,styles,PaperStyle("",0,0),None)
self.f = None
self.filename = None
self.template = template
diff --git a/src/OpenOfficeDoc.py b/src/OpenOfficeDoc.py
index 35619d1e8..ee7571f17 100644
--- a/src/OpenOfficeDoc.py
+++ b/src/OpenOfficeDoc.py
@@ -40,8 +40,8 @@ except:
class OpenOfficeDoc(TextDoc):
- def __init__(self,type,orientation):
- TextDoc.__init__(self,type,orientation)
+ def __init__(self,styles,type,orientation):
+ TextDoc.__init__(self,styles,type,orientation)
self.f = None
self.filename = None
self.level = 0
diff --git a/src/StyleEditor.py b/src/StyleEditor.py
new file mode 100644
index 000000000..24323e5a3
--- /dev/null
+++ b/src/StyleEditor.py
@@ -0,0 +1,237 @@
+#
+# Gramps - a GTK+/GNOME based genealogy program
+#
+# Copyright (C) 2000 Donald N. Allingham
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+import libglade
+import gtk
+import utils
+import ListColors
+import const
+
+from TextDoc import *
+
+class StyleListDisplay:
+ def __init__(self,stylesheetlist,callback,object):
+ self.object = object
+ self.callback = callback
+
+ self.sheetlist = stylesheetlist
+ self.top = libglade.GladeXML(const.stylesFile,"styles")
+ self.top.signal_autoconnect({
+ "destroy_passed_object" : utils.destroy_passed_object,
+ "on_list_select_row" : on_list_select_row,
+ "on_ok_clicked" : on_ok_clicked,
+ "on_add_clicked" : on_add_clicked,
+ "on_edit_clicked" : on_edit_clicked
+ })
+ self.list = self.top.get_widget("list")
+ self.dialog = self.top.get_widget("styles")
+ self.dialog.set_data("o",self)
+ self.redraw()
+
+ def redraw(self):
+ self.list.clear()
+
+ self.list.set_data("i",0)
+ box = ListColors.ColorList(self.list,1)
+ box.add_with_data(["default"],("default",self.sheetlist.get_style_sheet("default")))
+
+ for style in self.sheetlist.get_style_names():
+ if style == "default":
+ continue
+ box.add_with_data([style],(style,self.sheetlist.get_style_sheet(style)))
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def on_add_clicked(obj):
+ top = obj.get_data("o")
+
+ style = top.sheetlist.get_style_sheet("default")
+ x = StyleEditor("New Style",style,top)
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def on_ok_clicked(obj):
+ top = obj.get_data("o")
+
+ top.callback(top.object)
+ top.sheetlist.save()
+ utils.destroy_passed_object(obj)
+
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def on_list_select_row(obj,row,a,b):
+ list = obj.get_data("o").list
+ list.set_data("i",row)
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def on_edit_clicked(obj):
+ top = obj.get_data("o")
+
+ index = top.list.get_data("i")
+ (name,style) = top.list.get_row_data(index)
+ x = StyleEditor(name,style,top)
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+class StyleEditor:
+ def __init__(self,name,style,parent):
+ self.original_style = style
+ self.style = StyleSheet(style)
+ self.parent = parent
+ self.top = libglade.GladeXML(const.stylesFile,"editor")
+ self.current_p = None
+
+ self.top.signal_autoconnect({
+ "on_save_style_clicked" : on_save_style_clicked,
+ "destroy_passed_object" : utils.destroy_passed_object
+ })
+
+ self.window = self.top.get_widget("editor")
+ self.window.set_data("obj",self)
+ self.pnames = self.top.get_widget("name")
+
+ self.top.get_widget("style_name").set_text(name)
+ myMenu = gtk.GtkMenu()
+ first = 0
+ for p_name in self.style.get_names():
+ p = self.style.get_style(p_name)
+ if first == 0:
+ self.draw(p)
+ first = 1
+ menuitem = gtk.GtkMenuItem(p_name)
+ menuitem.set_data("o",p)
+ menuitem.set_data("t",self)
+ menuitem.connect("activate",change_display)
+ menuitem.show()
+ myMenu.append(menuitem)
+ self.pnames.set_menu(myMenu)
+
+ def draw(self,p):
+ self.current_p = p
+ font = p.get_font()
+ self.top.get_widget("size").set_value(font.get_size())
+ if font.get_type_face() == FONT_SANS_SERIF:
+ self.top.get_widget("roman").set_active(1)
+ else:
+ self.top.get_widget("swiss").set_active(1)
+ self.top.get_widget("bold").set_active(font.get_bold())
+ self.top.get_widget("italic").set_active(font.get_italic())
+ self.top.get_widget("underline").set_active(font.get_underline())
+ if p.get_alignment() == PARA_ALIGN_LEFT:
+ self.top.get_widget("lalign").set_active(1)
+ elif p.get_alignment() == PARA_ALIGN_RIGHT:
+ self.top.get_widget("ralign").set_active(1)
+ elif p.get_alignment() == PARA_ALIGN_CENTER:
+ self.top.get_widget("calign").set_active(1)
+ else:
+ self.top.get_widget("jalign").set_active(1)
+ self.top.get_widget("rmargin").set_text(str(p.get_right_margin()))
+ self.top.get_widget("lmargin").set_text(str(p.get_left_margin()))
+ self.top.get_widget("pad").set_text(str(p.get_padding()))
+ self.top.get_widget("tborder").set_active(p.get_top_border())
+ self.top.get_widget("lborder").set_active(p.get_left_border())
+ self.top.get_widget("rborder").set_active(p.get_right_border())
+ self.top.get_widget("bborder").set_active(p.get_bottom_border())
+ c = font.get_color()
+ self.top.get_widget("color").set_i8(c[0],c[1],c[2],0)
+ c = p.get_background_color()
+ self.top.get_widget("bgcolor").set_i8(c[0],c[1],c[2],0)
+
+ def save_paragraph(self,p):
+ font = p.get_font()
+ font.set_size(int(self.top.get_widget("size").get_value()))
+
+ if self.top.get_widget("roman").get_active():
+ font.set_type_face(FONT_SANS_SERIF)
+ else:
+ font.set_type_face(FONT_SERIF)
+
+ font.set_bold(self.top.get_widget("bold").get_active())
+ font.set_italic(self.top.get_widget("italic").get_active())
+ font.set_underline(self.top.get_widget("underline").get_active())
+ if self.top.get_widget("lalign").get_active():
+ p.set_alignment(PARA_ALIGN_LEFT)
+ elif self.top.get_widget("ralign").get_active():
+ p.set_alignment(PARA_ALIGN_RIGHT)
+ elif self.top.get_widget("calign").get_active():
+ p.set_alignment(PARA_ALIGN_CENTER)
+ else:
+ p.set_alignment(PARA_ALIGN_JUSTIFY)
+
+ p.set_right_margin(float(self.top.get_widget("rmargin").get_text()))
+ p.set_left_margin(float(self.top.get_widget("lmargin").get_text()))
+ p.set_padding(float(self.top.get_widget("pad").get_text()))
+ p.set_top_border(self.top.get_widget("tborder").get_active())
+ p.set_left_border(self.top.get_widget("lborder").get_active())
+ p.set_right_border(self.top.get_widget("rborder").get_active())
+ p.set_bottom_border(self.top.get_widget("bborder").get_active())
+
+ c = self.top.get_widget("color").get_i8()
+ font.set_color((c[0],c[1],c[2]))
+ c = self.top.get_widget("bgcolor").get_i8()
+ p.set_background_color((c[0],c[1],c[2]))
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def change_display(obj):
+ top = obj.get_data("t")
+ style = obj.get_data("o")
+ p = top.current_p
+
+ top.save_paragraph(p)
+ top.draw(style)
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def on_save_style_clicked(obj):
+ top = obj.get_data("obj")
+ p = top.current_p
+ name = top.top.get_widget("style_name").get_text()
+
+ top.save_paragraph(p)
+ top.parent.sheetlist.set_style_sheet(name,top.style)
+ top.parent.redraw()
+ utils.destroy_passed_object(obj)
+
+
+
diff --git a/src/TextDoc.py b/src/TextDoc.py
index a11b03268..0a50f9520 100644
--- a/src/TextDoc.py
+++ b/src/TextDoc.py
@@ -18,6 +18,23 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+import string
+import os
+import xml.sax
+import xml.sax.saxutils
+
+#-------------------------------------------------------------------------
+#
+# Try to abstract SAX1 from SAX2
+#
+#-------------------------------------------------------------------------
+try:
+ import xml.sax.saxexts
+ sax = 1
+except:
+ sax = 2
+
+
FONT_SANS_SERIF = 0
FONT_SERIF = 1
@@ -29,6 +46,12 @@ PARA_ALIGN_LEFT = 1
PARA_ALIGN_RIGHT = 2
PARA_ALIGN_JUSTIFY= 3
+def cnv2color(text):
+ c0 = string.atoi(text[1:3],16)
+ c1 = string.atoi(text[3:5],16)
+ c2 = string.atoi(text[5:7],16)
+ return (c0,c1,c2)
+
#------------------------------------------------------------------------
#
#
@@ -78,6 +101,20 @@ class FontStyle:
self.color = (0,0,0)
self.under = 0
+ def set(self,face=None,size=None,italic=None,bold=None,underline=None,color=None):
+ if face != None:
+ self.set_type_face(face)
+ if size != None:
+ self.set_size(size)
+ if italic != None:
+ self.set_italic(italic)
+ if bold != None:
+ self.set_bold(bold)
+ if underline != None:
+ self.set_underline(underline)
+ if color != None:
+ self.set_color(color)
+
def set_italic(self,val):
"0 disables italics, 1 enables italics"
self.italic = val
@@ -245,6 +282,30 @@ class ParagraphStyle:
self.pad = 0
self.bgcolor = (255,255,255)
+ def set(self,rmargin=None,lmargin=None,first_indent=None,align=None,\
+ tborder=None,bborder=None,rborder=None,lborder=None,pad=None,
+ bgcolor=None):
+ if pad != None:
+ self.set_padding(pad)
+ if tborder != None:
+ self.set_top_border(tborder)
+ if bborder != None:
+ self.set_bottom_border(bborder)
+ if rborder != None:
+ self.set_right_border(rborder)
+ if lborder != None:
+ self.set_left_border(lborder)
+ if bgcolor != None:
+ self.set_background_color(bgcolor)
+ if align != None:
+ self.set_alignment(align)
+ if rmargin != None:
+ self.set_right_margin(rmargin)
+ if lmargin != None:
+ self.set_left_margin(lmargin)
+ if first_indent != None:
+ self.set_first_indent(first_indent)
+
def set_header_level(self,level):
self.level = level
@@ -255,7 +316,7 @@ class ParagraphStyle:
self.font = FontStyle(font)
def get_font(self):
- return FontStyle(self.font)
+ return self.font
def set_padding(self,val):
self.pad = val
@@ -323,13 +384,174 @@ class ParagraphStyle:
"returns the first indent margin in centimeters"
return self.first_indent
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+class StyleSheetList:
+ def __init__(self,file,default):
+ self.map = { "default" : default }
+ self.file = os.path.expanduser("~/.gramps/" + file)
+ self.parse()
+
+ def get_style_sheet(self,name):
+ return self.map[name]
+
+ def get_style_names(self):
+ return self.map.keys()
+
+ def set_style_sheet(self,name,style):
+ if name != "default":
+ self.map[name] = style
+
+ def save(self):
+ f = open(self.file,"w")
+ f.write("\n")
+ f.write('\n')
+ for name in self.map.keys():
+ if name == "default":
+ continue
+ sheet = self.map[name]
+ f.write('\n' % name)
+ for p_name in sheet.get_names():
+ p = sheet.get_style(p_name)
+ f.write('\n')
+ f.write('\n')
+ f.write('\n')
+ f.close()
+
+
+ def parse(self):
+ try:
+ f = open(self.file,"r")
+ except:
+ return
+
+ if sax == 1:
+ parser = xml.sax.saxexts.make_parser()
+ parser.setDocumentHandler(SheetParser(self))
+ parser.setErrorHandler(xml.sax.saxutils.ErrorRaiser())
+ parser.parseFile(f)
+ else:
+ parser = xml.sax.make_parser()
+ parser.setContentHandler(SheetParser(self))
+ parser.parse(f)
+
+ f.close()
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+class StyleSheet:
+ def __init__(self,obj=None):
+ self.style_list = {}
+ if obj != None:
+ for style_name in obj.style_list.keys():
+ style = obj.style_list[style_name]
+ self.style_list[style_name] = ParagraphStyle(style)
+
+ def clear(self):
+ self.style_list = {}
+
+ def add_style(self,name,style):
+ self.style_list[name] = ParagraphStyle(style)
+
+ def get_names(self):
+ return self.style_list.keys()
+
+ def get_styles(self):
+ return self.style_list
+
+ def get_style(self,name):
+ return self.style_list[name]
+
+#-------------------------------------------------------------------------
+#
+#
+#
+#-------------------------------------------------------------------------
+class SheetParser(xml.sax.handler.ContentHandler):
+ def __init__(self,sheetlist):
+ xml.sax.handler.ContentHandler.__init__(self)
+ self.sheetlist = sheetlist
+ self.f = None
+ self.p = None
+ self.s = None
+ self.sname = None
+ self.pname = None
+
+ def setDocumentLocator(self,locator):
+ self.locator = locator
+
+ def startElement(self,tag,attrs):
+ if tag == "sheet":
+ self.s = StyleSheet()
+ self.sname = attrs['name']
+ elif tag == "font":
+ self.f = FontStyle()
+ self.f.set_type_face(int(attrs['face']))
+ self.f.set_size(int(attrs['size']))
+ self.f.set_italic(int(attrs['italic']))
+ self.f.set_bold(int(attrs['bold']))
+ self.f.set_underline(int(attrs['underline']))
+ self.f.set_color(cnv2color(attrs['color']))
+ elif tag == "para":
+ self.p.set_right_margin(float(attrs['rmargin']))
+ self.p.set_left_margin(float(attrs['lmargin']))
+ self.p.set_first_indent(float(attrs['first']))
+ self.p.set_padding(float(attrs['pad']))
+ self.p.set_alignment(int(attrs['align']))
+ self.p.set_right_border(int(attrs['rborder']))
+ self.p.set_left_border(int(attrs['lborder']))
+ self.p.set_top_border(int(attrs['tborder']))
+ self.p.set_bottom_border(int(attrs['bborder']))
+ self.p.set_background_color(cnv2color(attrs['bgcolor']))
+ elif tag == "style":
+ self.p = ParagraphStyle()
+ self.pname = attrs['name']
+
+ def endElement(self,tag):
+ if tag == "style":
+ self.p.set_font(self.f)
+ self.s.add_style(self.pname,self.p)
+ elif tag == "sheet":
+ self.sheetlist.set_style_sheet(self.sname,self.s)
+
+ if sax == 1:
+ def characters(self, data, offset, length):
+ pass
+ else:
+ def characters(self, data):
+ pass
+
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
class TextDoc:
- def __init__(self,type,orientation=PAPER_PORTRAIT):
+ def __init__(self,styles,type,orientation=PAPER_PORTRAIT):
self.orientation = orientation
if orientation == PAPER_PORTRAIT:
self.width = type.get_width()
@@ -344,7 +566,7 @@ class TextDoc:
self.rmargin = 2.54
self.font = FontStyle()
- self.style_list = {}
+ self.style_list = styles.get_styles()
self.table_styles = {}
self.cell_styles = {}
self.name = ""
@@ -362,9 +584,6 @@ class TextDoc:
def creator(self,name):
self.name = name
- def add_style(self,name,style):
- self.style_list[name] = ParagraphStyle(style)
-
def add_table_style(self,name,style):
self.table_styles[name] = TableStyle(style)
@@ -415,3 +634,4 @@ class TextDoc:
def write_text(self,text):
pass
+
diff --git a/src/const.py b/src/const.py
index cf9a894b0..49f29cbf8 100644
--- a/src/const.py
+++ b/src/const.py
@@ -56,6 +56,7 @@ bookFile = rootDir + os.sep + "bookmarks.glade"
pluginsFile = rootDir + os.sep + "plugins.glade"
editnoteFile = rootDir + os.sep + "editnote.glade"
configFile = rootDir + os.sep + "config.glade"
+stylesFile = rootDir + os.sep + "styles.glade"
pluginsDir = rootDir + os.sep + "plugins"
filtersDir = rootDir + os.sep + "filters"
dataDir = rootDir + os.sep + "data"
diff --git a/src/plugins/AncestorReport.py b/src/plugins/AncestorReport.py
index dcd0e8f8f..439f214a9 100644
--- a/src/plugins/AncestorReport.py
+++ b/src/plugins/AncestorReport.py
@@ -32,6 +32,8 @@ import intl
_ = intl.gettext
from TextDoc import *
+from StyleEditor import *
+
import FindDoc
from gtk import *
@@ -45,6 +47,8 @@ from libglade import *
#------------------------------------------------------------------------
active_person = None
db = None
+styles = StyleSheet()
+style_sheet_list = None
#------------------------------------------------------------------------
#
@@ -97,36 +101,7 @@ class AncestorReport:
self.max_generations = max
self.pgbrk = pgbrk
self.doc = doc
- font = FontStyle()
- font.set_type_face(FONT_SANS_SERIF)
- font.set_size(16)
- font.set_bold(1)
- para = ParagraphStyle()
- para.set_font(font)
- para.set_header_level(1)
- para.set_top_border(0.2)
- para.set_bottom_border(0.2)
- para.set_padding(1)
- self.doc.add_style("Title",para)
- font = FontStyle()
- font.set_type_face(FONT_SANS_SERIF)
- font.set_size(14)
- font.set_bold(1)
- font.set_italic(1)
- para = ParagraphStyle()
- para.set_font(font)
- para.set_header_level(2)
- para.set_top_border(0.15)
- para.set_bottom_border(0.15)
- para.set_padding(1)
- self.doc.add_style("Header",para)
-
- para = ParagraphStyle()
- para.set_first_indent(-0.75)
- para.set_left_margin(1.0)
- para.set_padding(1)
- self.doc.add_style("ListEntry",para)
try:
self.doc.open(output)
except IOError,msg:
@@ -171,13 +146,13 @@ class AncestorReport:
if generation == 0 or key >= 2**generation:
if self.pgbrk and generation > 0:
self.doc.page_break()
- self.doc.start_paragraph("Header")
+ self.doc.start_paragraph("Generation")
t = _("%s Generation") % AncestorReport.gen[generation+1]
self.doc.write_text(t)
self.doc.end_paragraph()
generation = generation + 1
- self.doc.start_paragraph("ListEntry")
+ self.doc.start_paragraph("Entry")
person = self.map[key]
name = person.getPrimaryName().getRegularName()
@@ -307,6 +282,7 @@ def report(database,person):
global topDialog
global glade_file
global db
+ global style_sheet_list
active_person = person
db = database
@@ -321,12 +297,54 @@ def report(database,person):
PaperMenu.make_orientation_menu(topDialog.get_widget("orientation"))
FindDoc.get_text_doc_menu(topDialog.get_widget("format"),0,option_switch)
+ styles.clear()
+ font = FontStyle()
+ font.set(face=FONT_SANS_SERIF,size=16,bold=1)
+ para = ParagraphStyle()
+ para.set_font(font)
+ para.set_header_level(1)
+ para.set(tborder=0.2,bborder=0.2,pad=1)
+ styles.add_style("Title",para)
+
+ font = FontStyle()
+ font.set(face=FONT_SANS_SERIF,size=14,italic=1)
+ para = ParagraphStyle()
+ para.set_font(font)
+ para.set_header_level(2)
+ para.set_top_border(0.15)
+ para.set(tborder=0.15,pad=1)
+ styles.add_style("Generation",para)
+
+ para = ParagraphStyle()
+ para.set(first_indent=-0.75,lmargin=1.0,pad=1)
+ styles.add_style("Entry",para)
+
+ style_sheet_list = StyleSheetList("ancestor_report",styles)
+ build_menu(None)
+
topDialog.get_widget("labelTitle").set_text("Ahnentafel Report for " + name)
topDialog.signal_autoconnect({
"destroy_passed_object" : utils.destroy_passed_object,
+ "on_style_edit_clicked" : on_style_edit_clicked,
"on_save_clicked" : on_save_clicked
})
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def build_menu(object):
+ menu = topDialog.get_widget("style_menu")
+
+ myMenu = GtkMenu()
+ for style in style_sheet_list.get_style_names():
+ menuitem = GtkMenuItem(style)
+ menuitem.set_data("d",style_sheet_list.get_style_sheet(style))
+ menuitem.show()
+ myMenu.append(menuitem)
+ menu.set_menu(myMenu)
+
#------------------------------------------------------------------------
#
#
@@ -339,6 +357,14 @@ def option_switch(obj):
notebook.set_page(0)
else:
notebook.set_page(1)
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def on_style_edit_clicked(obj):
+ StyleListDisplay(style_sheet_list,build_menu,None)
#------------------------------------------------------------------------
#
@@ -363,8 +389,10 @@ def on_save_clicked(obj):
item = topDialog.get_widget("format").get_menu().get_active()
format = item.get_data("name")
+
+ styles = topDialog.get_widget("style_menu").get_menu().get_active().get_data("d")
- doc = FindDoc.make_text_doc(format,paper,orien,template)
+ doc = FindDoc.make_text_doc(styles,format,paper,orien,template)
MyReport = AncestorReport(db,active_person,outputName,max_gen,pgbrk,doc)
MyReport.write_report()
@@ -442,10 +470,3 @@ def get_xpm_image():
" ",
" ",
" "]
-
-
-
-
-
-
-
diff --git a/src/plugins/DescendReport.py b/src/plugins/DescendReport.py
index a8dac158a..8d66cf4b0 100644
--- a/src/plugins/DescendReport.py
+++ b/src/plugins/DescendReport.py
@@ -33,6 +33,7 @@ import const
import utils
import const
from TextDoc import *
+from StyleEditor import *
import FindDoc
from gtk import *
@@ -63,23 +64,6 @@ class DescendantReport:
#
#--------------------------------------------------------------------
def setup(self):
-
- f = FontStyle()
- f.set_size(14)
- f.set_type_face(FONT_SANS_SERIF)
- f.set_bold(1)
- p = ParagraphStyle()
- p.set_font(f)
-
- self.doc.add_style("Title",p)
-
- f = FontStyle()
- for i in range(1,10):
- p = ParagraphStyle()
- p.set_font(f)
- p.set_left_margin(float(i-1))
- self.doc.add_style("Level" + str(i),p)
-
self.doc.open(self.name)
#--------------------------------------------------------------------
@@ -144,7 +128,7 @@ class DesReportWindow:
self.top = GladeXML(glade_file,"dialog1")
self.top.signal_autoconnect({
"destroy_passed_object" : utils.destroy_passed_object,
- "on_html_toggled": on_html_toggled,
+ "on_style_edit_clicked" : on_style_edit_clicked,
"on_save_clicked": on_save_clicked
})
@@ -156,9 +140,46 @@ class DesReportWindow:
mytop = self.top.get_widget("dialog1")
+ f = FontStyle()
+ f.set_size(14)
+ f.set_type_face(FONT_SANS_SERIF)
+ f.set_bold(1)
+ p = ParagraphStyle()
+ p.set_font(f)
+
+ sheet = StyleSheet()
+ sheet.add_style("Title",p)
+
+ f = FontStyle()
+ for i in range(1,10):
+ p = ParagraphStyle()
+ p.set_font(f)
+ p.set_left_margin(float(i-1))
+ sheet.add_style("Level" + str(i),p)
+
+ self.style_sheet_list = StyleSheetList("descend_report",sheet)
+ build_menu(self)
+
mytop.set_data("o",self)
mytop.set_data("d",db)
mytop.show()
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def build_menu(object):
+
+ myMenu = GtkMenu()
+
+ for style in object.style_sheet_list.get_style_names():
+ menuitem = GtkMenuItem(style)
+ menuitem.set_data("d",object.style_sheet_list.get_style_sheet(style))
+ menuitem.show()
+ myMenu.append(menuitem)
+
+ object.top.get_widget("style_menu").set_menu(myMenu)
#------------------------------------------------------------------------
#
@@ -181,6 +202,15 @@ def option_switch(obj):
def report(database,person):
report = DesReportWindow(person,database)
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def on_style_edit_clicked(obj):
+ myobj = obj.get_data("o")
+ StyleListDisplay(myobj.style_sheet_list,build_menu,myobj)
+
#-------------------------------------------------------------------------
#
#
@@ -205,7 +235,8 @@ def on_save_clicked(obj):
item = myobj.top.get_widget("format").get_menu().get_active()
format = item.get_data("name")
- doc = FindDoc.make_text_doc(format,paper,orien,template)
+ styles = myobj.top.get_widget("style_menu").get_menu().get_active().get_data("d")
+ doc = FindDoc.make_text_doc(styles,format,paper,orien,template)
report = DescendantReport(file,myobj.person,db,doc)
report.setup()
@@ -214,22 +245,6 @@ def on_save_clicked(obj):
utils.destroy_passed_object(obj)
-#-------------------------------------------------------------------------
-#
-#
-#
-#-------------------------------------------------------------------------
-def on_html_toggled(obj):
- myobj = obj.get_data("o")
- if myobj.top.get_widget("html").get_active():
- myobj.top.get_widget("htmltemplate").set_sensitive(1)
- myobj.top.get_widget("papersize").set_sensitive(0)
- myobj.top.get_widget("orientation").set_sensitive(0)
- else:
- myobj.top.get_widget("htmltemplate").set_sensitive(0)
- myobj.top.get_widget("papersize").set_sensitive(1)
- myobj.top.get_widget("orientation").set_sensitive(1)
-
#------------------------------------------------------------------------
#
#
@@ -238,6 +253,11 @@ def on_html_toggled(obj):
def get_description():
return _("Generates a list of descendants of the active person")
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
def get_name():
return _("Generate files/Descendant Report")
diff --git a/src/plugins/FamilyGroup.py b/src/plugins/FamilyGroup.py
index 1b50a8d94..3461465fd 100644
--- a/src/plugins/FamilyGroup.py
+++ b/src/plugins/FamilyGroup.py
@@ -29,9 +29,10 @@ import string
import FindDoc
import utils
import intl
+_ = intl.gettext
from TextDoc import *
-_ = intl.gettext
+from StyleEditor import *
from gtk import *
from gnome.ui import *
@@ -44,6 +45,8 @@ from libglade import *
#------------------------------------------------------------------------
active_person = None
db = None
+styles = StyleSheet()
+style_sheet_list = None
#------------------------------------------------------------------------
#
@@ -58,43 +61,6 @@ class FamilyGroup:
self.output = output
self.doc = doc
- para = ParagraphStyle()
- font = FontStyle()
- font.set_size(4)
- para.set_font(font)
- self.doc.add_style('blank',para)
-
- font = FontStyle()
- font.set_type_face(FONT_SANS_SERIF)
- font.set_size(16)
- font.set_bold(1)
- para = ParagraphStyle()
- para.set_font(font)
- self.doc.add_style('Title',para)
-
- font = FontStyle()
- font.set_type_face(FONT_SERIF)
- font.set_size(10)
- font.set_bold(0)
- para = ParagraphStyle()
- para.set_font(font)
- self.doc.add_style('Normal',para)
-
- font = FontStyle()
- font.set_type_face(FONT_SANS_SERIF)
- font.set_size(10)
- font.set_bold(1)
- para = ParagraphStyle()
- para.set_font(font)
- self.doc.add_style('ChildText',para)
-
- font = FontStyle()
- font.set_type_face(FONT_SANS_SERIF)
- font.set_size(12)
- font.set_bold(1)
- para = ParagraphStyle()
- para.set_font(font)
- self.doc.add_style('ParentName',para)
cell = TableCellStyle()
cell.set_padding(0.2)
@@ -383,6 +349,7 @@ def report(database,person):
global topDialog
global glade_file
global db
+ global style_sheet_list
active_person = person
db = database
@@ -398,12 +365,54 @@ def report(database,person):
label.set_text(_("Family Group Report for %s") % name)
topDialog.signal_autoconnect({
"destroy_passed_object" : utils.destroy_passed_object,
+ "on_style_edit_clicked" : on_style_edit_clicked,
"on_save_clicked" : on_save_clicked
})
PaperMenu.make_paper_menu(topDialog.get_widget("papersize"))
PaperMenu.make_orientation_menu(topDialog.get_widget("orientation"))
FindDoc.get_text_doc_menu(topDialog.get_widget("format"),1,option_switch)
+ styles.clear()
+
+ para = ParagraphStyle()
+ font = FontStyle()
+ font.set_size(4)
+ para.set_font(font)
+ styles.add_style('blank',para)
+
+ font = FontStyle()
+ font.set_type_face(FONT_SANS_SERIF)
+ font.set_size(16)
+ font.set_bold(1)
+ para = ParagraphStyle()
+ para.set_font(font)
+ styles.add_style('Title',para)
+
+ font = FontStyle()
+ font.set_type_face(FONT_SERIF)
+ font.set_size(10)
+ font.set_bold(0)
+ para = ParagraphStyle()
+ para.set_font(font)
+ styles.add_style('Normal',para)
+
+ font = FontStyle()
+ font.set_type_face(FONT_SANS_SERIF)
+ font.set_size(10)
+ font.set_bold(1)
+ para = ParagraphStyle()
+ para.set_font(font)
+ styles.add_style('ChildText',para)
+
+ font = FontStyle()
+ font.set_type_face(FONT_SANS_SERIF)
+ font.set_size(12)
+ font.set_bold(1)
+ para = ParagraphStyle()
+ para.set_font(font)
+ styles.add_style('ParentName',para)
+ style_sheet_list = StyleSheetList("family_group",styles)
+ build_menu(None)
frame = topDialog.get_widget("spouse")
option_menu = topDialog.get_widget("spouse_menu")
@@ -425,6 +434,30 @@ def report(database,person):
my_menu.append(item)
option_menu.set_menu(my_menu)
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def on_style_edit_clicked(obj):
+ StyleListDisplay(style_sheet_list,build_menu,None)
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def build_menu(object):
+ menu = topDialog.get_widget("style_menu")
+
+ myMenu = GtkMenu()
+ for style in style_sheet_list.get_style_names():
+ menuitem = GtkMenuItem(style)
+ menuitem.set_data("d",style_sheet_list.get_style_sheet(style))
+ menuitem.show()
+ myMenu.append(menuitem)
+ menu.set_menu(myMenu)
+
#------------------------------------------------------------------------
#
#
diff --git a/src/plugins/IndivSummary.py b/src/plugins/IndivSummary.py
index e86cb85fc..1e8346874 100644
--- a/src/plugins/IndivSummary.py
+++ b/src/plugins/IndivSummary.py
@@ -32,6 +32,7 @@ import intl
_ = intl.gettext
from TextDoc import *
+from StyleEditor import *
import FindDoc
from gtk import *
@@ -45,6 +46,8 @@ from libglade import *
#------------------------------------------------------------------------
active_person = None
db = None
+styles = StyleSheet()
+style_sheet_list = None
#------------------------------------------------------------------------
#
@@ -74,38 +77,6 @@ class IndivSummary:
#
#--------------------------------------------------------------------
def setup(self):
- font = FontStyle()
- font.set_bold(1)
- font.set_type_face(FONT_SANS_SERIF)
- font.set_size(16)
- p = ParagraphStyle()
- p.set_alignment(PARA_ALIGN_CENTER)
- p.set_font(font)
- self.d.add_style("Title",p)
-
- font = FontStyle()
- font.set_bold(1)
- font.set_type_face(FONT_SANS_SERIF)
- font.set_size(12)
- font.set_italic(1)
- p = ParagraphStyle()
- p.set_font(font)
- self.d.add_style("TableTitle",p)
-
- font = FontStyle()
- font.set_bold(1)
- font.set_type_face(FONT_SANS_SERIF)
- font.set_size(12)
- p = ParagraphStyle()
- p.set_font(font)
- self.d.add_style("Spouse",p)
-
- font = FontStyle()
- font.set_size(12)
- p = ParagraphStyle()
- p.set_font(font)
- self.d.add_style("Normal",p)
-
tbl = TableStyle()
tbl.set_width(100)
tbl.set_columns(2)
@@ -361,6 +332,7 @@ def report(database,person):
global topDialog
global glade_file
global db
+ global style_sheet_list
active_person = person
db = database
@@ -376,13 +348,73 @@ def report(database,person):
PaperMenu.make_paper_menu(topDialog.get_widget("papersize"))
PaperMenu.make_orientation_menu(topDialog.get_widget("orientation"))
- FindDoc.get_text_doc_menu(topDialog.get_widget("format"),0,option_switch)
+ FindDoc.get_text_doc_menu(topDialog.get_widget("format"),1,option_switch)
+
+ font = FontStyle()
+ font.set_bold(1)
+ font.set_type_face(FONT_SANS_SERIF)
+ font.set_size(16)
+ p = ParagraphStyle()
+ p.set_alignment(PARA_ALIGN_CENTER)
+ p.set_font(font)
+ styles.add_style("Title",p)
+
+ font = FontStyle()
+ font.set_bold(1)
+ font.set_type_face(FONT_SANS_SERIF)
+ font.set_size(12)
+ font.set_italic(1)
+ p = ParagraphStyle()
+ p.set_font(font)
+ styles.add_style("TableTitle",p)
+
+ font = FontStyle()
+ font.set_bold(1)
+ font.set_type_face(FONT_SANS_SERIF)
+ font.set_size(12)
+ p = ParagraphStyle()
+ p.set_font(font)
+ styles.add_style("Spouse",p)
+
+ font = FontStyle()
+ font.set_size(12)
+ p = ParagraphStyle()
+ p.set_font(font)
+ styles.add_style("Normal",p)
+
+ style_sheet_list = StyleSheetList("individual_summary",styles)
+ build_menu(None)
topDialog.signal_autoconnect({
"destroy_passed_object" : utils.destroy_passed_object,
+ "on_style_edit_clicked" : on_style_edit_clicked,
"on_save_clicked" : on_save_clicked
})
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def build_menu(object):
+ menu = topDialog.get_widget("style_menu")
+
+ myMenu = GtkMenu()
+ for style in style_sheet_list.get_style_names():
+ menuitem = GtkMenuItem(style)
+ menuitem.set_data("d",style_sheet_list.get_style_sheet(style))
+ menuitem.show()
+ myMenu.append(menuitem)
+ menu.set_menu(myMenu)
+
+#------------------------------------------------------------------------
+#
+#
+#
+#------------------------------------------------------------------------
+def on_style_edit_clicked(obj):
+ StyleListDisplay(style_sheet_list,build_menu,None)
+
#------------------------------------------------------------------------
#
#
@@ -418,7 +450,9 @@ def on_save_clicked(obj):
item = topDialog.get_widget("format").get_menu().get_active()
format = item.get_data("name")
- doc = FindDoc.make_text_doc(format,paper,orien,template)
+ styles = topDialog.get_widget("style_menu").get_menu().get_active().get_data("d")
+
+ doc = FindDoc.make_text_doc(styles,format,paper,orien,template)
MyReport = IndivSummary(db,active_person,outputName,doc)
diff --git a/src/plugins/ancestorreport.glade b/src/plugins/ancestorreport.glade
index b42b30d8f..a41a06ed5 100644
--- a/src/plugins/ancestorreport.glade
+++ b/src/plugins/ancestorreport.glade
@@ -16,7 +16,7 @@
GnomeDialog
dialog1
Gramps - Ahnentafel Report
- GTK_WINDOW_DIALOG
+ GTK_WINDOW_TOPLEVEL
GTK_WIN_POS_NONE
False
False
@@ -201,6 +201,62 @@
+
+ GtkFrame
+ frame3
+ 5
+
+ 0
+ GTK_SHADOW_ETCHED_IN
+
+ 0
+ True
+ True
+
+
+
+ GtkHBox
+ hbox4
+ False
+ 0
+
+
+ GtkOptionMenu
+ style_menu
+ 10
+ True
+ default
+
+ 0
+
+ 0
+ True
+ True
+
+
+
+
+ GtkButton
+ style_edit
+ 10
+ True
+
+ clicked
+ on_style_edit_clicked
+
+ Tue, 05 Jun 2001 14:39:29 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 5
+ False
+ False
+
+
+
+
+
GtkFrame
frame2
diff --git a/src/plugins/desreport.glade b/src/plugins/desreport.glade
index f7c02d230..e123cdcd7 100644
--- a/src/plugins/desreport.glade
+++ b/src/plugins/desreport.glade
@@ -15,6 +15,7 @@
GnomeDialog
dialog1
+ Gramps - Descendant Report
GTK_WINDOW_DIALOG
GTK_WIN_POS_NONE
False
@@ -179,6 +180,7 @@
GtkFrame
frame1
+ 5
0
GTK_SHADOW_ETCHED_IN
@@ -211,9 +213,66 @@
+
+ GtkFrame
+ frame3
+ 5
+
+ 0
+ GTK_SHADOW_ETCHED_IN
+
+ 0
+ True
+ True
+
+
+
+ GtkHBox
+ hbox3
+ False
+ 0
+
+
+ GtkOptionMenu
+ style_menu
+ 10
+ True
+ default
+
+ 0
+
+ 0
+ True
+ True
+
+
+
+
+ GtkButton
+ button17
+ 10
+ True
+
+ clicked
+ on_style_edit_clicked
+
+ Tue, 05 Jun 2001 14:39:29 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 5
+ False
+ False
+
+
+
+
+
GtkFrame
frame2
+ 5
0
GTK_SHADOW_ETCHED_IN
@@ -392,7 +451,6 @@
GnomeFileEntry
htmltemplate
- False
HtmlTemplate
10
Choose the HTML template
diff --git a/src/plugins/familygroup.glade b/src/plugins/familygroup.glade
index d1cf865da..fd25ed8c0 100644
--- a/src/plugins/familygroup.glade
+++ b/src/plugins/familygroup.glade
@@ -180,6 +180,7 @@
GtkFrame
spouse
+ 5
False
0
@@ -204,6 +205,7 @@
GtkFrame
frame1
+ 5
0
GTK_SHADOW_ETCHED_IN
@@ -236,9 +238,66 @@
+
+ GtkFrame
+ frame3
+ 5
+
+ 0
+ GTK_SHADOW_ETCHED_IN
+
+ 0
+ True
+ True
+
+
+
+ GtkHBox
+ hbox3
+ False
+ 0
+
+
+ GtkOptionMenu
+ style_menu
+ 10
+ True
+ default
+
+ 0
+
+ 0
+ True
+ True
+
+
+
+
+ GtkButton
+ button17
+ 10
+ True
+
+ clicked
+ on_style_edit_clicked
+
+ Tue, 05 Jun 2001 14:39:29 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 5
+ False
+ False
+
+
+
+
+
GtkFrame
frame2
+ 5
0
GTK_SHADOW_ETCHED_IN
diff --git a/src/plugins/indsum.glade b/src/plugins/indsum.glade
index 87ebd420b..dd5848e9c 100644
--- a/src/plugins/indsum.glade
+++ b/src/plugins/indsum.glade
@@ -180,6 +180,7 @@
GtkFrame
frame1
+ 5
0
GTK_SHADOW_ETCHED_IN
@@ -212,9 +213,66 @@
+
+ GtkFrame
+ frame3
+ 5
+
+ 0
+ GTK_SHADOW_ETCHED_IN
+
+ 0
+ True
+ True
+
+
+
+ GtkHBox
+ hbox3
+ False
+ 0
+
+
+ GtkOptionMenu
+ style_menu
+ 10
+ True
+ default
+
+ 0
+
+ 0
+ True
+ True
+
+
+
+
+ GtkButton
+ button17
+ 10
+ True
+
+ clicked
+ on_style_edit_clicked
+
+ Tue, 05 Jun 2001 14:39:29 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 5
+ False
+ False
+
+
+
+
+
GtkFrame
frame2
+ 5
0
GTK_SHADOW_ETCHED_IN
@@ -393,7 +451,6 @@
GnomeFileEntry
htmltemplate
- False
HtmlTemplate
10
Choose the HTML template
diff --git a/src/styles.glade b/src/styles.glade
new file mode 100644
index 000000000..8bec76683
--- /dev/null
+++ b/src/styles.glade
@@ -0,0 +1,1383 @@
+
+
+
+
+ Styles
+ styles
+
+
+
+ C
+ True
+ True
+ False
+ False
+ False
+
+
+
+ GtkDialog
+ styles
+ Gramps- Document Styles
+ GTK_WINDOW_TOPLEVEL
+ GTK_WIN_POS_NONE
+ False
+ True
+ True
+ False
+
+
+ GtkVBox
+ Dialog:vbox
+ dialog-vbox1
+ 300
+ 250
+ False
+ 0
+
+
+ GtkHBox
+ Dialog:action_area
+ dialog-action_area1
+ 10
+ True
+ 5
+
+ 0
+ False
+ True
+ GTK_PACK_END
+
+
+
+ GtkHButtonBox
+ hbuttonbox1
+ GTK_BUTTONBOX_END
+ 30
+ 85
+ 27
+ 7
+ 0
+
+ 0
+ True
+ True
+
+
+
+ GtkButton
+ button1
+ True
+ True
+
+ clicked
+ on_ok_clicked
+
+ Tue, 05 Jun 2001 13:12:07 GMT
+
+ GNOME_STOCK_BUTTON_OK
+ GTK_RELIEF_NORMAL
+
+
+
+ GtkButton
+ button2
+ True
+ True
+
+ clicked
+ destroy_passed_object
+
+ Tue, 05 Jun 2001 13:11:44 GMT
+
+ GNOME_STOCK_BUTTON_CANCEL
+ GTK_RELIEF_NORMAL
+
+
+
+
+
+ GtkVBox
+ vbox1
+ False
+ 0
+
+ 0
+ True
+ True
+
+
+
+ GtkLabel
+ label1
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 0
+ 10
+
+ 0
+ False
+ False
+
+
+
+
+ GtkHSeparator
+ hseparator1
+
+ 5
+ False
+ True
+
+
+
+
+ GtkHBox
+ hbox1
+ False
+ 0
+
+ 0
+ True
+ True
+
+
+
+ GtkScrolledWindow
+ scrolledwindow1
+ GTK_POLICY_NEVER
+ GTK_POLICY_AUTOMATIC
+ GTK_UPDATE_CONTINUOUS
+ GTK_UPDATE_CONTINUOUS
+
+ 0
+ True
+ True
+
+
+
+ GtkCList
+ list
+ True
+
+ select_row
+ on_list_select_row
+
+ Tue, 05 Jun 2001 13:15:34 GMT
+
+
+ button_press_event
+ on_list_button_press_event
+
+ Tue, 05 Jun 2001 13:15:48 GMT
+
+ 1
+ 80
+ GTK_SELECTION_SINGLE
+ False
+ GTK_SHADOW_IN
+
+
+ GtkLabel
+ CList:title
+ label2
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+
+
+
+ GtkVButtonBox
+ vbuttonbox1
+ GTK_BUTTONBOX_START
+ 10
+ 85
+ 27
+ 7
+ 0
+
+ 0
+ False
+ True
+
+
+
+ GtkButton
+ button3
+ True
+ True
+
+ clicked
+ on_add_clicked
+
+ Tue, 05 Jun 2001 13:14:32 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+
+
+ GtkButton
+ button4
+ True
+ True
+
+ clicked
+ on_edit_clicked
+
+ Tue, 05 Jun 2001 13:14:43 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+
+
+ GtkButton
+ button5
+ True
+ True
+
+ GTK_RELIEF_NORMAL
+
+
+
+
+
+
+
+
+ GtkDialog
+ editor
+ Gramps - Style Editor
+ GTK_WINDOW_TOPLEVEL
+ GTK_WIN_POS_NONE
+ False
+ True
+ True
+ False
+
+
+ GtkVBox
+ Dialog:vbox
+ dialog-vbox2
+ 600
+ False
+ 0
+
+
+ GtkHBox
+ Dialog:action_area
+ dialog-action_area2
+ 10
+ True
+ 5
+
+ 0
+ False
+ True
+ GTK_PACK_END
+
+
+
+ GtkHButtonBox
+ hbuttonbox2
+ GTK_BUTTONBOX_END
+ 30
+ 85
+ 27
+ 7
+ 0
+
+ 0
+ True
+ True
+
+
+
+ GtkButton
+ button7
+ True
+ True
+
+ clicked
+ on_save_style_clicked
+
+ Tue, 05 Jun 2001 18:48:01 GMT
+
+ GNOME_STOCK_BUTTON_OK
+ GTK_RELIEF_NORMAL
+
+
+
+ GtkButton
+ button8
+ True
+ True
+
+ clicked
+ destroy_passed_object
+
+ Tue, 05 Jun 2001 18:47:41 GMT
+
+ GNOME_STOCK_BUTTON_CANCEL
+ GTK_RELIEF_NORMAL
+
+
+
+
+
+ GtkVBox
+ vbox2
+ False
+ 0
+
+ 0
+ True
+ True
+
+
+
+ GtkLabel
+ label3
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 5
+ 5
+
+ 10
+ False
+ True
+
+
+
+
+ GtkHSeparator
+ hseparator2
+
+ 5
+ False
+ True
+
+
+
+
+ GtkHBox
+ hbox5
+ False
+ 0
+
+ 0
+ False
+ False
+
+
+
+ GtkLabel
+ label19
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+ 10
+ False
+ False
+
+
+
+
+ GtkEntry
+ style_name
+ True
+ True
+ True
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+ GtkLabel
+ label18
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 10
+ True
+ True
+
+
+
+
+ GtkOptionMenu
+ name
+ True
+
+
+ 0
+
+ 5
+ True
+ True
+
+
+
+
+
+ GtkHBox
+ hbox4
+ False
+ 0
+
+ 0
+ True
+ True
+
+
+
+ GtkFrame
+ frame1
+ 5
+
+ 0
+ GTK_SHADOW_ETCHED_IN
+
+ 0
+ True
+ True
+
+
+
+ GtkTable
+ table2
+ 6
+ 3
+ False
+ 0
+ 0
+
+
+ GtkLabel
+ label6
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0
+ 0.5
+ 0
+ 0
+
+ 2
+ 3
+ 1
+ 2
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkSpinButton
+ size
+ True
+ 1
+ 0
+ False
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 1
+ 0
+ 100
+ 1
+ 10
+ 10
+
+ 1
+ 2
+ 1
+ 2
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkCheckButton
+ bold
+ True
+
+ False
+ True
+
+ 1
+ 2
+ 3
+ 4
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkCheckButton
+ italic
+ True
+
+ False
+ True
+
+ 1
+ 2
+ 4
+ 5
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkCheckButton
+ underline
+ True
+
+ False
+ True
+
+ 1
+ 2
+ 5
+ 6
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label5
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 1
+ 2
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label8
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 0
+ 0
+
+ 0
+ 1
+ 2
+ 3
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label7
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0
+ 5
+ 5
+
+ 0
+ 1
+ 3
+ 4
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GnomeColorPicker
+ color
+ True
+ True
+ False
+ Pick a color
+
+ 1
+ 2
+ 2
+ 3
+ 5
+ 5
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+
+
+ GtkVBox
+ vbox3
+ False
+ 0
+
+ 1
+ 2
+ 0
+ 1
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ True
+
+
+
+ GtkRadioButton
+ roman
+ True
+
+ False
+ True
+ face
+
+ 5
+ False
+ False
+
+
+
+
+ GtkRadioButton
+ swiss
+ True
+
+ False
+ True
+ face
+
+ 0
+ False
+ False
+
+
+
+
+
+ GtkLabel
+ label4
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0
+ 5
+ 5
+
+ 0
+ 1
+ 0
+ 1
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ True
+
+
+
+
+
+
+ GtkFrame
+ frame2
+ 5
+
+ 0
+ GTK_SHADOW_ETCHED_IN
+
+ 0
+ True
+ True
+
+
+
+ GtkTable
+ table3
+ 6
+ 3
+ False
+ 0
+ 0
+
+
+ GtkLabel
+ label10
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 1
+ 2
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label11
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 2
+ 3
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label12
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 3
+ 4
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label13
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 4
+ 5
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GnomeColorPicker
+ bgcolor
+ True
+ True
+ False
+ Pick a color
+
+ 1
+ 2
+ 1
+ 2
+ 5
+ 5
+ False
+ False
+ False
+ False
+ False
+ False
+
+
+
+
+ GtkLabel
+ label17
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0
+ 0.5
+ 0
+ 0
+
+ 2
+ 3
+ 4
+ 5
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label16
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0
+ 0.5
+ 0
+ 0
+
+ 2
+ 3
+ 3
+ 4
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label15
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0
+ 0.5
+ 0
+ 0
+
+ 2
+ 3
+ 2
+ 3
+ 5
+ 0
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkEntry
+ rmargin
+ True
+ True
+ True
+ 0
+
+
+ 1
+ 2
+ 2
+ 3
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkEntry
+ lmargin
+ True
+ True
+ True
+ 0
+
+
+ 1
+ 2
+ 3
+ 4
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkEntry
+ pad
+ True
+ True
+ True
+ 0
+
+
+ 1
+ 2
+ 4
+ 5
+ 5
+ 5
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkTable
+ table5
+ 2
+ 2
+ True
+ 0
+ 0
+
+ 1
+ 2
+ 5
+ 6
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ True
+
+
+
+ GtkCheckButton
+ lborder
+ True
+
+ False
+ True
+
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkCheckButton
+ tborder
+ True
+
+ False
+ True
+
+ 0
+ 1
+ 1
+ 2
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkCheckButton
+ rborder
+ True
+
+ False
+ True
+
+ 1
+ 2
+ 0
+ 1
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkCheckButton
+ bborder
+ True
+
+ False
+ True
+
+ 1
+ 2
+ 1
+ 2
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+
+ GtkTable
+ table6
+ 2
+ 2
+ True
+ 0
+ 0
+
+ 1
+ 2
+ 0
+ 1
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ True
+
+
+
+ GtkRadioButton
+ lalign
+ True
+
+ False
+ True
+ align
+
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkRadioButton
+ ralign
+ True
+
+ False
+ True
+ align
+
+ 1
+ 2
+ 0
+ 1
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkRadioButton
+ calign
+ True
+
+ False
+ True
+ align
+
+ 0
+ 1
+ 1
+ 2
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkRadioButton
+ jalign
+ True
+
+ False
+ True
+ align
+
+ 1
+ 2
+ 1
+ 2
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+
+ GtkLabel
+ label9
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0
+ 5
+ 5
+
+ 0
+ 1
+ 0
+ 1
+ 5
+ 5
+ False
+ True
+ False
+ False
+ True
+ True
+
+
+
+
+ GtkLabel
+ label14
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0
+ 5
+ 5
+
+ 0
+ 1
+ 5
+ 6
+ 5
+ 5
+ False
+ True
+ False
+ False
+ True
+ True
+
+
+
+
+
+
+
+
+
+