Revert "Merge branch 'grc' of http://gnuradio.org/git/jblum"
authorJohnathan Corgan <jcorgan@corganenterprises.com>
Fri, 25 Sep 2009 19:27:29 +0000 (12:27 -0700)
committerJohnathan Corgan <jcorgan@corganenterprises.com>
Fri, 25 Sep 2009 19:27:29 +0000 (12:27 -0700)
This reverts commit 06281feea16143ca97a77348f72e1c6dd0616c57.

grc/blocks/options.xml
grc/gui/PropsDialog.py
grc/python/flow_graph.tmpl

index 4d0dd28999f4bfbbc8c6c541cc8b6ffbb695553a..1798a69f88a834c9dccd6ad7e878198b2d147372 100644 (file)
@@ -77,37 +77,20 @@ else: self.stop(); self.wait()</callback>
                <type>string</type>
                <hide>#if $generate_options() == 'hb' then 'none' else 'all'#</hide>
        </param>
-       <param>
-               <name>Run Options</name>
-               <key>run_options</key>
-               <value>prompt</value>
-               <type>enum</type>
-               <hide>#if $generate_options() == 'no_gui' then 'none' else 'all'#</hide>
-               <option>
-                       <name>Run to Completion</name>
-                       <key>run</key>
-               </option>
-               <option>
-                       <name>Prompt for Exit</name>
-                       <key>prompt</key>
-               </option>
-       </param>
        <param>
                <name>Run</name>
                <key>run</key>
                <value>True</value>
                <type>bool</type>
-               <hide>
-#if $generate_options() == 'wx_gui'
-       #if $run()
-               part
+               <hide>#if $generate_options() == 'wx_gui'
+       #if str($run) == 'True'
+part#slurp
        #else
-               none
+none#slurp
        #end if
 #else
-       all
-#end if
-               </hide>
+all#slurp
+#end if</hide>
                <option>
                        <name>Autostart</name>
                        <key>True</key>
index cc84fd0888007f14d768b13d71ba7792fcc58818..a7822b22843f0484b3f6a496cb26491e7a180ed7 100644 (file)
@@ -93,14 +93,15 @@ class PropsDialog(gtk.Dialog):
                Ex: Added, removed, type change, hide change...
                To the props dialog, the hide setting of 'none' and 'part' are identical.
                Therfore, the props dialog only cares if the hide setting is/not 'all'.
-               Make a hash that uniquely represents the params' state.
+               Make a hash that uniquely represents the params state.
                @return true if changed
                """
                old_hash = self._hash
-               #create a tuple of things from each param that affects the params box
-               self._hash = hash(tuple([(
-                       hash(param), param.get_type(), param.get_hide() == 'all',
-               ) for param in self._block.get_params()]))
+               self._hash = 0
+               for param in self._block.get_params():
+                       self._hash ^= hash(param)
+                       self._hash ^= hash(param.get_type())
+                       self._hash ^= hash(param.get_hide() == 'all')
                return self._hash != old_hash
 
        def _handle_changed(self, *args):
index 31d99a61c2dde5096e55b120c4f63c720956578a..dce4037d58a4a9cde77cf99ca7bd10120f81b279 100644 (file)
@@ -233,14 +233,9 @@ if __name__ == '__main__':
        #if $generate_options == 'wx_gui'
        tb.Run($flow_graph.get_option('run'))
        #elif $generate_options == 'no_gui'
-               #set $run_options = $flow_graph.get_option('run_options')
-               #if $run_options == 'prompt'
        tb.start()
        raw_input('Press Enter to quit: ')
        tb.stop()
-               #elif $run_options == 'run'
-       tb.run()
-               #end if
        #end if
 #end if