Fixed callback, if callback is none.

svn: r147
This commit is contained in:
Don Allingham 2001-06-16 13:22:16 +00:00
parent 767f0fc48c
commit 6b0705761d
2 changed files with 3 additions and 2 deletions

View File

@ -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)

View File

@ -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()