From 86238994bb0733c1c44116c57241fdc21fcdbd6f Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Mon, 15 Mar 2010 22:05:26 +0000 Subject: [PATCH] 3721: RuntimeWarning on Event comparison tool svn: r14839 --- src/plugins/tool/EventCmp.py | 20 ++++++++++++++++---- src/plugins/tool/eventcmp.glade | 4 ++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/plugins/tool/EventCmp.py b/src/plugins/tool/EventCmp.py index 98ca1d97c..f70539b44 100644 --- a/src/plugins/tool/EventCmp.py +++ b/src/plugins/tool/EventCmp.py @@ -126,10 +126,9 @@ class EventComparison(Tool.Tool,ManagedWindow.ManagedWindow): self.filterDialog.connect_signals({ "on_apply_clicked" : self.on_apply_clicked, "on_editor_clicked" : self.filter_editor_clicked, - "on_filters_delete_event": self.close, "on_help_clicked" : self.on_help_clicked, "destroy_passed_object" : self.close, - "on_delete_event" : self.close, + "on_write_table" : self.__dummy, }) window = self.filterDialog.toplevel @@ -143,8 +142,13 @@ class EventComparison(Tool.Tool,ManagedWindow.ManagedWindow): uistate.connect('filters-changed', self.on_filters_changed) self.show() - - + + def __dummy(self, obj): + """dummy callback, needed because widget is in same glade file + as another widget, so callbacks must be defined to avoid warnings. + """ + pass + def on_filters_changed(self, name_space): if name_space == 'Person': all_filter = GenericFilter() @@ -227,6 +231,8 @@ class DisplayChart(ManagedWindow.ManagedWindow): "on_write_table" : self.on_write_table, "destroy_passed_object" : self.close, "on_help_clicked" : self.on_help_clicked, + "on_apply_clicked" : self.__dummy, + "on_editor_clicked" : self.__dummy, }) window = self.topDialog.toplevel @@ -250,6 +256,12 @@ class DisplayChart(ManagedWindow.ManagedWindow): self.draw_display() self.show() + def __dummy(self, obj): + """dummy callback, needed because widget is in same glade file + as another widget, so callbacks must be defined to avoid warnings. + """ + pass + def on_help_clicked(self, obj): """Display the relevant portion of GRAMPS manual""" GrampsDisplay.help(webpage=WIKI_HELP_PAGE, section=WIKI_HELP_SEC) diff --git a/src/plugins/tool/eventcmp.glade b/src/plugins/tool/eventcmp.glade index 16b0adf37..2b9f6d2cb 100644 --- a/src/plugins/tool/eventcmp.glade +++ b/src/plugins/tool/eventcmp.glade @@ -13,10 +13,10 @@ 400 dialog False - True + vertical 8 @@ -129,10 +129,10 @@ 400 dialog False - True + vertical 8