commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10809 - in gnuradio/branches/developers/jblum/grc/grc


From: jblum
Subject: [Commit-gnuradio] r10809 - in gnuradio/branches/developers/jblum/grc/grc/src: gui platforms/gui
Date: Sun, 12 Apr 2009 13:06:31 -0600 (MDT)

Author: jblum
Date: 2009-04-12 13:06:31 -0600 (Sun, 12 Apr 2009)
New Revision: 10809

Modified:
   gnuradio/branches/developers/jblum/grc/grc/src/gui/ActionHandler.py
   gnuradio/branches/developers/jblum/grc/grc/src/gui/ParamsDialog.py
   gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/FlowGraph.py
Log:
Call params dialog from action handler, not fg.



Modified: gnuradio/branches/developers/jblum/grc/grc/src/gui/ActionHandler.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/gui/ActionHandler.py 
2009-04-12 16:29:58 UTC (rev 10808)
+++ gnuradio/branches/developers/jblum/grc/grc/src/gui/ActionHandler.py 
2009-04-12 19:06:31 UTC (rev 10809)
@@ -32,6 +32,7 @@
 import random
 from .. platforms.gui.Platform import Platform
 from MainWindow import MainWindow
+from ParamsDialog import ParamsDialog
 import Dialogs
 from FileDialogs import OpenFlowGraphFileDialog, SaveFlowGraphFileDialog, 
SaveImageFileDialog
 
@@ -245,7 +246,8 @@
                # Param Modifications
                ##################################################
                elif state == Actions.BLOCK_PARAM_MODIFY:
-                       if self.get_flow_graph().param_modify_selected():
+                       selected_block = 
self.get_flow_graph().get_selected_block()
+                       if selected_block and 
ParamsDialog(selected_block).run():
                                self.get_flow_graph().update()
                                
self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data())
                                self.get_page().set_saved(False)

Modified: gnuradio/branches/developers/jblum/grc/grc/src/gui/ParamsDialog.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/gui/ParamsDialog.py  
2009-04-12 16:29:58 UTC (rev 10808)
+++ gnuradio/branches/developers/jblum/grc/grc/src/gui/ParamsDialog.py  
2009-04-12 19:06:31 UTC (rev 10809)
@@ -45,9 +45,11 @@
                SignalBlockParamsDialog contructor.
                @param block the signal block
                """
-               gtk.Dialog.__init__(self, buttons=('gtk-close', 
gtk.RESPONSE_CLOSE))
+               gtk.Dialog.__init__(self,
+                       title='Properties: %s'%block.get_name(),
+                       buttons=('gtk-close', gtk.RESPONSE_CLOSE),
+               )
                self.block = block
-               self.set_title('Properties: %s'%block.get_name())
                self.set_size_request(MIN_DIALOG_WIDTH, MIN_DIALOG_HEIGHT)
                vbox = gtk.VBox()
                #Add the title label

Modified: 
gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/FlowGraph.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/FlowGraph.py   
2009-04-12 16:29:58 UTC (rev 10808)
+++ gnuradio/branches/developers/jblum/grc/grc/src/platforms/gui/FlowGraph.py   
2009-04-12 19:06:31 UTC (rev 10809)
@@ -27,7 +27,6 @@
        ELEMENT_DELETE
 import Colors
 import Utils
-from ... gui.ParamsDialog import ParamsDialog
 from Element import Element
 from .. base import FlowGraph as _FlowGraph
 import pygtk
@@ -188,14 +187,6 @@
                """
                return any([sb.port_controller_modify(direction) for sb in 
self.get_selected_blocks()])
 
-       def param_modify_selected(self):
-               """
-               Create and show a param modification dialog for the selected 
block.
-               @return true if parameters were changed
-               """
-               if not self.get_selected_block(): return False
-               return ParamsDialog(self.get_selected_block()).run()
-
        def enable_selected(self, enable):
                """
                Enable/disable the selected blocks.





reply via email to

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