commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10582 - gnuradio/trunk/gr-wxgui/src/python


From: jcorgan
Subject: [Commit-gnuradio] r10582 - gnuradio/trunk/gr-wxgui/src/python
Date: Wed, 11 Mar 2009 14:52:09 -0600 (MDT)

Author: jcorgan
Date: 2009-03-11 14:52:08 -0600 (Wed, 11 Mar 2009)
New Revision: 10582

Modified:
   gnuradio/trunk/gr-wxgui/src/python/gui.py
Log:
Add shutdown hook

Modified: gnuradio/trunk/gr-wxgui/src/python/gui.py
===================================================================
--- gnuradio/trunk/gr-wxgui/src/python/gui.py   2009-03-11 19:07:31 UTC (rev 
10581)
+++ gnuradio/trunk/gr-wxgui/src/python/gui.py   2009-03-11 20:52:08 UTC (rev 
10582)
@@ -52,6 +52,11 @@
         self.SetAutoLayout(True)
         vbox.Fit(self)
 
+    def shutdown(self):
+        try:
+            self.gui.shutdown()
+        except AttributeError:
+            pass
 
 #
 # Top-level window frame with menu and status bars.
@@ -91,6 +96,10 @@
             self.top_block.start()
 
     def OnCloseWindow(self, event):
+        # Give user API a chance to do something
+        self.panel.shutdown()
+
+        # Stop flowgraph as a convenience
         self.SetStatusText("Ensuring flowgraph has completed before 
exiting...")
         if self.top_block is not None:
             self.top_block.stop()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]