From 66b4542bb653c79fc2d4b3865607c28f8a89d235 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Mon, 8 Sep 2008 18:00:38 +0000 Subject: [PATCH] Fix of issue 2373 for trunk. svn: r11040 --- src/plugins/GVRelGraph.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/plugins/GVRelGraph.py b/src/plugins/GVRelGraph.py index 096923092..f1ddbcefa 100644 --- a/src/plugins/GVRelGraph.py +++ b/src/plugins/GVRelGraph.py @@ -58,9 +58,11 @@ import ThumbNails # Constant options items # #------------------------------------------------------------------------ -_COLORS = [ { 'name' : _("B&W outline"), 'value' : "outline" }, - { 'name' : _("Colored outline"), 'value' : "colored" }, - { 'name' : _("Color fill"), 'value' : "filled" }] +_COLORS = [ { 'name' : _("B&W outline"), 'value' : 0 }, + { 'name' : _("Colored outline"), 'value' : 1 }, + { 'name' : _("Color fill"), 'value' : 2 }] + +_COLORS_TAB =['outlined','colored','filled'] _ARROWS = [ { 'name' : _("Descendants <- Ancestors"), 'value' : 0 }, { 'name' : _("Descendants -> Ancestors"), 'value' : 1 }, @@ -134,7 +136,7 @@ class RelGraphReport(Report): self.show_families = menu.get_option_by_name('showfamily').get_value() self.just_years = menu.get_option_by_name('justyears').get_value() self.use_place = menu.get_option_by_name('use_place').get_value() - self.colorize = menu.get_option_by_name('color').get_value() + self.colorize = _COLORS_TAB[menu.get_option_by_name('color').get_value()] if self.colorize == 'colored': self.colors = colored elif self.colorize == 'filled': @@ -494,7 +496,7 @@ class RelGraphOptions(MenuReportOptions): category_name = _("Graph Style") ################################ - color = EnumeratedListOption(_("Graph coloring"), "filled") + color = EnumeratedListOption(_("Graph coloring"), 0) for i in range( 0, len(_COLORS) ): color.add_item(_COLORS[i]["value"], _COLORS[i]["name"]) color.set_help(_("Males will be shown with blue, females " @@ -502,7 +504,7 @@ class RelGraphOptions(MenuReportOptions): "is unknown it will be shown with gray.")) menu.add_option(category_name, "color", color) - arrow = EnumeratedListOption(_("Arrowhead direction"), 'd') + arrow = EnumeratedListOption(_("Arrowhead direction"), 0) for i in range( 0, len(_ARROWS) ): arrow.add_item(_ARROWS[i]["value"], _ARROWS[i]["name"]) arrow.set_help(_("Choose the direction that the arrows point."))