diff options
author | Josh Blum <josh@joshknows.com> | 2009-09-25 00:24:48 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2009-10-03 23:28:53 -0700 |
commit | 02a14678e889b09d41eaf903962733c47791c9cb (patch) | |
tree | 7e1f55be562124f51b87c89a565cc270df4d3351 /grc/gui | |
parent | 74fbff0ed3e93b8103eb01640329a9a37ebe5de2 (diff) |
Added a run options to the "no gui" generate options.
The user can select between run to completion and prompt for exit.
Also fixed the props dialog is changed function to have better hashes.
Now we hash a tuple of all "relevant" items which is "order aware".
Since xoring the individual hashes proved faulty when 2 params alternated hiding.
(cherry picked from commit fd37328c778ea8014e9ea9d932e61e5d229dd012)
Diffstat (limited to 'grc/gui')
-rw-r--r-- | grc/gui/PropsDialog.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py index a7822b2284..cc84fd0888 100644 --- a/grc/gui/PropsDialog.py +++ b/grc/gui/PropsDialog.py @@ -93,15 +93,14 @@ 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 - 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') + #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()])) return self._hash != old_hash def _handle_changed(self, *args): |