From 6b0705761d7d482405ce2db7807edf6a9f17750e Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 16 Jun 2001 13:22:16 +0000 Subject: [PATCH] Fixed callback, if callback is none. svn: r147 --- gramps/src/FindDoc.py | 3 ++- gramps/src/plugins/AncestorChart.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/src/FindDoc.py b/gramps/src/FindDoc.py index 1c57bac31..42a614f95 100644 --- a/gramps/src/FindDoc.py +++ b/gramps/src/FindDoc.py @@ -148,7 +148,7 @@ def get_text_doc_menu(main_menu,tables,callback,obj=None): # # #------------------------------------------------------------------------- -def get_draw_doc_menu(main_menu,callback,obj=None): +def get_draw_doc_menu(main_menu,callback=None,obj=None): index = 0 myMenu = gtk.GtkMenu() @@ -162,6 +162,7 @@ def get_draw_doc_menu(main_menu,callback,obj=None): myMenu.append(menuitem) if name == Config.output_preference: myMenu.set_active(index) + if callback: callback(menuitem) index = index + 1 main_menu.set_menu(myMenu) diff --git a/gramps/src/plugins/AncestorChart.py b/gramps/src/plugins/AncestorChart.py index c479b7ca0..9015cbcb3 100644 --- a/gramps/src/plugins/AncestorChart.py +++ b/gramps/src/plugins/AncestorChart.py @@ -282,7 +282,7 @@ def report(database,person): PaperMenu.make_paper_menu(topDialog.get_widget("papersize")) PaperMenu.make_orientation_menu(topDialog.get_widget("orientation")) - FindDoc.get_draw_doc_menu(topDialog.get_widget("format"),0,option_switch) + FindDoc.get_draw_doc_menu(topDialog.get_widget("format")) styles.clear() f = FontStyle()