Bug 2950. Made subgraph optional for Relationship Graph as discussed in bug report. Moved the option to GraphvizReportDialog and refactored FamilyLines to use it.

svn: r12596
This commit is contained in:
Gary Burton
2009-05-30 12:12:58 +00:00
parent ed13f340d5
commit cc38a53add
3 changed files with 81 additions and 60 deletions

View File

@@ -3,6 +3,7 @@
#
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2007-2009 Stephane Charette
# Copyright (C) 2009 Gary Burton
#
# 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
@@ -52,7 +53,8 @@ import Config
from ReportBase import CATEGORY_GRAPHVIZ
from _ReportDialog import ReportDialog
from _PaperMenu import PaperFrame
from gen.plug.menu import NumberOption, TextOption, EnumeratedListOption
from gen.plug.menu import NumberOption, TextOption, EnumeratedListOption, \
BooleanOption
#-------------------------------------------------------------------------------
#
@@ -158,19 +160,20 @@ class GVDocBase(BaseDoc, GVDoc):
menu = options.menu
self.dpi = menu.get_option_by_name('dpi').get_value()
self.fontfamily = menu.get_option_by_name('font_family').get_value()
self.fontsize = menu.get_option_by_name('font_size').get_value()
self.hpages = menu.get_option_by_name('h_pages').get_value()
self.nodesep = menu.get_option_by_name('nodesep').get_value()
self.noteloc = menu.get_option_by_name('noteloc').get_value()
self.notesize = menu.get_option_by_name('notesize').get_value()
self.note = menu.get_option_by_name('note').get_value()
self.pagedir = menu.get_option_by_name('page_dir').get_value()
self.rankdir = menu.get_option_by_name('rank_dir').get_value()
self.ranksep = menu.get_option_by_name('ranksep').get_value()
self.ratio = menu.get_option_by_name('ratio').get_value()
self.vpages = menu.get_option_by_name('v_pages').get_value()
self.dpi = menu.get_option_by_name('dpi').get_value()
self.fontfamily = menu.get_option_by_name('font_family').get_value()
self.fontsize = menu.get_option_by_name('font_size').get_value()
self.hpages = menu.get_option_by_name('h_pages').get_value()
self.nodesep = menu.get_option_by_name('nodesep').get_value()
self.noteloc = menu.get_option_by_name('noteloc').get_value()
self.notesize = menu.get_option_by_name('notesize').get_value()
self.note = menu.get_option_by_name('note').get_value()
self.pagedir = menu.get_option_by_name('page_dir').get_value()
self.rankdir = menu.get_option_by_name('rank_dir').get_value()
self.ranksep = menu.get_option_by_name('ranksep').get_value()
self.ratio = menu.get_option_by_name('ratio').get_value()
self.vpages = menu.get_option_by_name('v_pages').get_value()
self.usesubgraphs = menu.get_option_by_name('usesubgraphs').get_value()
paper_size = paper_style.get_size()
@@ -1019,6 +1022,13 @@ class GraphvizReportDialog(ReportDialog):
"between columns."))
self.options.add_menu_option(category, "ranksep", ranksep)
use_subgraphs = BooleanOption(_('Use subgraphs'), True)
use_subgraphs.set_help(_("Subgraphs can help GraphViz position "
"spouses together, but with non-trivial "
"graphs will result in longer lines and "
"larger graphs."))
self.options.add_menu_option(category, "usesubgraphs", use_subgraphs)
################################
category = _("Note")
################################