[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7758 - in grc/branches/grc_reloaded/src/grc: . gui
From: |
jblum |
Subject: |
[Commit-gnuradio] r7758 - in grc/branches/grc_reloaded/src/grc: . gui |
Date: |
Wed, 20 Feb 2008 18:12:30 -0700 (MST) |
Author: jblum
Date: 2008-02-20 18:12:29 -0700 (Wed, 20 Feb 2008)
New Revision: 7758
Removed:
grc/branches/grc_reloaded/src/grc/gui/USRPDiagnostics.py
Modified:
grc/branches/grc_reloaded/src/grc/ActionHandler.py
grc/branches/grc_reloaded/src/grc/Actions.py
grc/branches/grc_reloaded/src/grc/gui/Bars.py
grc/branches/grc_reloaded/src/grc/gui/Dialogs.py
grc/branches/grc_reloaded/src/grc/gui/__init__.py
Log:
removed some deprecated dialogs
Modified: grc/branches/grc_reloaded/src/grc/ActionHandler.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/ActionHandler.py 2008-02-21 00:35:05 UTC
(rev 7757)
+++ grc/branches/grc_reloaded/src/grc/ActionHandler.py 2008-02-21 01:12:29 UTC
(rev 7758)
@@ -158,10 +158,9 @@
if state == APPLICATION_INITIALIZE:
for action in ACTIONS_LIST: action.set_sensitive(False)
#set all actions disabled
# enable a select few actions
- gui.enable_usrp_diagnostics() #try to enable usrp
diagnostics
for action in (
APPLICATION_QUIT, FLOW_GRAPH_NEW,
FLOW_GRAPH_OPEN, FLOW_GRAPH_SAVE_AS, FLOW_GRAPH_CLOSE,
- ABOUT_WINDOW_DISPLAY,
DATA_TYPES_WINDOW_DISPLAY, HOTKEYS_WINDOW_DISPLAY, MATH_EXPR_WINDOW_DISPLAY,
+ ABOUT_WINDOW_DISPLAY, HOTKEYS_WINDOW_DISPLAY,
PREFS_WINDOW_DISPLAY, FLOW_GRAPH_SCREEN_CAPTURE,
): get_action_from_name(action).set_sensitive(True)
if not self.init_file_paths and
Preferences.restore_files(): self.init_file_paths = Preferences.files_open()
@@ -228,19 +227,13 @@
##############################################################################################
# Window stuff
##############################################################################################
- elif state == USRP_DIAGNOSTICS_DISPLAY:
- gui.USRPDiagnosticsDialog()
elif state == PREFS_WINDOW_DISPLAY:
gui.PreferencesDialog()
self.get_flow_graph().update()
elif state == ABOUT_WINDOW_DISPLAY:
gui.AboutDialog()
- elif state == DATA_TYPES_WINDOW_DISPLAY:
- gui.DataTypesDialog()
elif state == HOTKEYS_WINDOW_DISPLAY:
gui.HotKeysDialog()
- elif state == MATH_EXPR_WINDOW_DISPLAY:
- gui.MathExprDialog()
##############################################################################################
# Param Modifications
##############################################################################################
Modified: grc/branches/grc_reloaded/src/grc/Actions.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/Actions.py 2008-02-21 00:35:05 UTC
(rev 7757)
+++ grc/branches/grc_reloaded/src/grc/Actions.py 2008-02-21 01:12:29 UTC
(rev 7758)
@@ -65,11 +65,8 @@
FLOW_GRAPH_SCREEN_CAPTURE = 'flow graph screen capture'
ABOUT_WINDOW_DISPLAY = 'about window display'
-DATA_TYPES_WINDOW_DISPLAY = 'data types window display'
HOTKEYS_WINDOW_DISPLAY = 'hotkeys window display'
-USRP_DIAGNOSTICS_DISPLAY = 'usrp diagnostics display'
PREFS_WINDOW_DISPLAY = 'prefs window display'
-MATH_EXPR_WINDOW_DISPLAY = 'expression window display'
######################################################################################################
# actions
@@ -88,12 +85,9 @@
gtk.Action(BLOCK_ROTATE_LEFT, 'Rotate _Left', 'Rotate the block 90
degrees', 'gtk-go-back'),
gtk.Action(BLOCK_ROTATE_RIGHT, 'Rotate _Right', 'Rotate the block -90
degrees', 'gtk-go-forward'),
gtk.Action(BLOCK_PARAM_MODIFY, '_Properties', 'Modify params for the
selected block', 'gtk-properties'),
- gtk.Action(USRP_DIAGNOSTICS_DISPLAY, '_USRP Diagnostics', 'Analyze the
USRP', 'gtk-dialog-info'),
gtk.Action(PREFS_WINDOW_DISPLAY, '_Preferences', 'Configure
Preferences', 'gtk-preferences'),
gtk.Action(ABOUT_WINDOW_DISPLAY, '_About', 'About this program',
'gtk-about'),
- gtk.Action(DATA_TYPES_WINDOW_DISPLAY, '_Data Types', 'Data Types',
'gtk-connect'),
gtk.Action(HOTKEYS_WINDOW_DISPLAY, '_HotKeys', 'Hot Keys', 'gtk-info'),
- gtk.Action(MATH_EXPR_WINDOW_DISPLAY, '_Math Expressions', 'Mathematical
Expressions', 'gtk-convert'),
gtk.Action(FLOW_GRAPH_EXEC, '_Execute', 'Execute the flow graph',
'gtk-execute'),
gtk.Action(FLOW_GRAPH_STOP, '_Stop', 'Stop the flow graph', 'gtk-stop'),
gtk.Action(FLOW_GRAPH_SCREEN_CAPTURE, 'S_creen Capture', 'Create a
screen capture of the flow graph', 'gtk-print'),
Modified: grc/branches/grc_reloaded/src/grc/gui/Bars.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/gui/Bars.py 2008-02-21 00:35:05 UTC
(rev 7757)
+++ grc/branches/grc_reloaded/src/grc/gui/Bars.py 2008-02-21 01:12:29 UTC
(rev 7758)
@@ -76,10 +76,7 @@
]),
(gtk.Action('Help', '_Help', None, None), [
ABOUT_WINDOW_DISPLAY,
- HOTKEYS_WINDOW_DISPLAY,
- DATA_TYPES_WINDOW_DISPLAY,
- MATH_EXPR_WINDOW_DISPLAY,
- USRP_DIAGNOSTICS_DISPLAY,
+ HOTKEYS_WINDOW_DISPLAY,
]),
)
Modified: grc/branches/grc_reloaded/src/grc/gui/Dialogs.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/gui/Dialogs.py 2008-02-21 00:35:05 UTC
(rev 7757)
+++ grc/branches/grc_reloaded/src/grc/gui/Dialogs.py 2008-02-21 01:12:29 UTC
(rev 7758)
@@ -106,44 +106,8 @@
--""")
self.run()
self.destroy()
-
+
######################################################################################################
-class DataTypesDialog(gtk.Dialog):
- """Display each data type with its associated color."""
-
- def __init__(self):
- """DataTypesDialog constructor."""
- gtk.Dialog.__init__(self, buttons=('gtk-close',
gtk.RESPONSE_CLOSE))
- self.set_title('Data Types')
- self.set_size_request(170, -1)
- markup = ''
- for color_spec in (
- 'Regular Types:',
- ('Complex', Colors.COMPLEX_COLOR_SPEC),
- ('Float', Colors.FLOAT_COLOR_SPEC),
- ('Int', Colors.INT_COLOR_SPEC),
- ('Short', Colors.SHORT_COLOR_SPEC),
- ('Byte', Colors.BYTE_COLOR_SPEC),
- 'Vector Types:',
- ('Complex Vector', Colors.COMPLEX_VECTOR_COLOR_SPEC),
- ('Float Vector', Colors.FLOAT_VECTOR_COLOR_SPEC),
- ('Int Vector', Colors.INT_VECTOR_COLOR_SPEC),
- ('Short Vector', Colors.SHORT_VECTOR_COLOR_SPEC),
- ('Byte Vector', Colors.BYTE_VECTOR_COLOR_SPEC),
- ):
- width = 20 #width in monospace characters
- if type(color_spec) == type(str()): markup =
'%s\n\n<b>%s</b>'%(markup, color_spec.center(width, ' '))
- else:
- tag,spec = color_spec
- markup = '%s\n<span
background="%s">%s</span>'%(markup, spec, tag.center(width, ' '))
- label = gtk.Label()
- label.set_markup('<tt>%s</tt>\n'%markup[1:]) #strip 1st
newline, append newline
- self.vbox.pack_start(label, False)
- self.show_all()
- self.run()
- self.destroy()
-
-######################################################################################################
class HotKeysDialog(gtk.Dialog):
"""Display each action with the associated hotkey."""
@@ -178,69 +142,3 @@
self.show_all()
self.run()
self.destroy()
-
-######################################################################################################
-class MathExprDialog(gtk.Dialog):
- """A dialog to test math expressions for the parser."""
-
- ##the help message
- HELP_MSG = """\
-<b>Operators - Complex <i>(complex arguments)</i></b>
- + - * / ^
-<b>Trigonometric Functions <i>(complex arguments, radians)</i></b>
- sin(z) cos(z) tan(z) asin(z) acos(z) atan(z)
- sinh(z) cosh(z) tanh(z) asinh(z) acosh(z) atanh(z)
-<b>Complex Components <i>(complex arguments)</i></b>
- mag(z*) real(z*) imag(z*) conj(z*) arg(z)
-<b>Misc Functions <i>(complex arguments)</i></b>
- abs(z*) pow(b, p) sqrt(z) log10(z) log(z, [b=e]) ln(z) exp(z)
-<b>Misc Functions <i>(floating point arguments)</i></b>
- floor(f) ceil(f) radians(deg) degrees(rad) mod(f1, f2) atan2(y, x)
sgn(f) min(f*) max(f*)
-<b>Filter Taps Generators <i>(floating point arguments, rates and
frequencies in Hz)</i></b>
- low_pass(gain, samp_rate, cutoff_freq, width, [window=hamming],
[beta=6.76])
- high_pass(gain, samp_rate, cutoff_freq, width, [window=hamming],
[beta=6.76])
- band_pass(gain, samp_rate, low_cutoff_freq, high_cutoff_freq, width,
[window=hamming], [beta=6.76])
- complex_band_pass(gain, samp_rate, low_cutoff_freq, high_cutoff_freq,
width, [window=hamming], [beta=6.76])
- band_reject(gain, samp_rate, low_cutoff_freq, high_cutoff_freq, width,
[window=hamming], [beta=6.76])
- gaussian(gain, spb, bt, int ntaps)
- hilbert(int ntaps, [window=rectangular], [beta=6.76])
- root_raised_cosine(gain, samp_rate, symbol_rate, alpha, int ntaps)
- window(window, int ntaps, beta)
-<b>Window Types for Filters</b>
- hamming hann blackman rectangular kaiser
-<b>Other Constants</b>
- pi e j
-<b>Using Vectors</b>
- () (num1,) (num2, num2, ...)
-<b>Test Your Expressions Below:</b>\
-"""
-
- def __init__(self):
- """MathExprDialog constrcutor. Create a new gtk Dialog with a
close button, an extry box, and an output text box."""
- gtk.Dialog.__init__(self, buttons=('gtk-close',
gtk.RESPONSE_CLOSE))
- # Create the title and label #
- self.set_title('Mathematical Expressions')
- label = gtk.Label()
- label.set_markup(self.HELP_MSG)
- self.vbox.pack_start(label, False)
- self.set_size_request(800, 600)
- # create a text box for parser output #
- self.text_box = TextDisplay()
- self.text_box.set_text('')
- # create the entry box and give it the change handler #
- self.param = GraphicalParam('Expression', RawExpr(''))
- self.input_obj =
self.param.get_input_object(self._handle_changed)
- self.vbox.pack_start(self.input_obj, False)
- # add the scrolled window for the text box #
- scrolled_window = gtk.ScrolledWindow()
- scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,
gtk.POLICY_AUTOMATIC)
- scrolled_window.add_with_viewport(self.text_box)
- self.vbox.pack_start(scrolled_window, True)
- self.show_all()
- self.run()
- self.destroy()
-
- def _handle_changed(self, param=None):
- """Handle changed in the param's entry box by updating the text
box."""
- self.text_box.set_text(str(self.param.get_data_type()))
-
Deleted: grc/branches/grc_reloaded/src/grc/gui/USRPDiagnostics.py
Modified: grc/branches/grc_reloaded/src/grc/gui/__init__.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/gui/__init__.py 2008-02-21 00:35:05 UTC
(rev 7757)
+++ grc/branches/grc_reloaded/src/grc/gui/__init__.py 2008-02-21 01:12:29 UTC
(rev 7758)
@@ -23,5 +23,4 @@
#only import the modules that need external access
from MainWindow import MainWindow
from FileDialogs import
OpenFlowGraphFileDialog,SaveFlowGraphFileDialog,SaveImageFileDialog
-from Dialogs import
PreferencesDialog,MessageDialogHelper,AboutDialog,DataTypesDialog,HotKeysDialog,MathExprDialog
-from USRPDiagnostics import USRPDiagnosticsDialog,enable_usrp_diagnostics
+from Dialogs import
PreferencesDialog,MessageDialogHelper,AboutDialog,HotKeysDialog
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7758 - in grc/branches/grc_reloaded/src/grc: . gui,
jblum <=