commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10801 - gnuradio/branches/developers/jblum/grc/grc/sr


From: jblum
Subject: [Commit-gnuradio] r10801 - gnuradio/branches/developers/jblum/grc/grc/src/gui
Date: Fri, 10 Apr 2009 21:45:39 -0600 (MDT)

Author: jblum
Date: 2009-04-10 21:45:38 -0600 (Fri, 10 Apr 2009)
New Revision: 10801

Modified:
   gnuradio/branches/developers/jblum/grc/grc/src/gui/ActionHandler.py
   gnuradio/branches/developers/jblum/grc/grc/src/gui/Actions.py
   gnuradio/branches/developers/jblum/grc/grc/src/gui/Bars.py
   gnuradio/branches/developers/jblum/grc/grc/src/gui/Dialogs.py
Log:
Added help dialog with usage tips.



Modified: gnuradio/branches/developers/jblum/grc/grc/src/gui/ActionHandler.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/gui/ActionHandler.py 
2009-04-10 04:24:16 UTC (rev 10800)
+++ gnuradio/branches/developers/jblum/grc/grc/src/gui/ActionHandler.py 
2009-04-11 03:45:38 UTC (rev 10801)
@@ -1,5 +1,5 @@
 """
-Copyright 2007 Free Software Foundation, Inc.
+Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
 This file is part of GNU Radio
 
 GNU Radio Companion is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@
 import random
 from .. platforms.gui.Platform import Platform
 from MainWindow import MainWindow
-from Dialogs import AboutDialog
+import Dialogs
 from FileDialogs import OpenFlowGraphFileDialog, SaveFlowGraphFileDialog, 
SaveImageFileDialog
 
 gobject.threads_init()
@@ -138,7 +138,7 @@
                                Actions.APPLICATION_QUIT, 
Actions.FLOW_GRAPH_NEW,
                                Actions.FLOW_GRAPH_OPEN, 
Actions.FLOW_GRAPH_SAVE_AS,
                                Actions.FLOW_GRAPH_CLOSE, 
Actions.ABOUT_WINDOW_DISPLAY,
-                               Actions.FLOW_GRAPH_SCREEN_CAPTURE,
+                               Actions.FLOW_GRAPH_SCREEN_CAPTURE, 
Actions.HELP_WINDOW_DISPLAY,
                        ): 
Actions.get_action_from_name(action).set_sensitive(True)
                        if not self.init_file_paths:
                                self.init_file_paths = Preferences.files_open()
@@ -238,7 +238,9 @@
                # Window stuff
                ##################################################
                elif state == Actions.ABOUT_WINDOW_DISPLAY:
-                       AboutDialog()
+                       Dialogs.AboutDialog()
+               elif state == Actions.HELP_WINDOW_DISPLAY:
+                       Dialogs.HelpDialog()
                ##################################################
                # Param Modifications
                ##################################################

Modified: gnuradio/branches/developers/jblum/grc/grc/src/gui/Actions.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/gui/Actions.py       
2009-04-10 04:24:16 UTC (rev 10800)
+++ gnuradio/branches/developers/jblum/grc/grc/src/gui/Actions.py       
2009-04-11 03:45:38 UTC (rev 10801)
@@ -1,5 +1,5 @@
 """
-Copyright 2007 Free Software Foundation, Inc.
+Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
 This file is part of GNU Radio
 
 GNU Radio Companion is free software; you can redistribute it and/or
@@ -56,6 +56,7 @@
 FLOW_GRAPH_KILL = 'flow graph kill'
 FLOW_GRAPH_SCREEN_CAPTURE = 'flow graph screen capture'
 ABOUT_WINDOW_DISPLAY = 'about window display'
+HELP_WINDOW_DISPLAY = 'help window display'
 
 
######################################################################################################
 # Action Key Map
@@ -88,28 +89,29 @@
 # Actions
 
######################################################################################################
 _actions_list = (
-       gtk.Action(FLOW_GRAPH_NEW, '_New', 'Create a new flow graph', 
'gtk-new'),
-       gtk.Action(FLOW_GRAPH_OPEN, '_Open', 'Open an existing flow graph', 
'gtk-open'),
-       gtk.Action(FLOW_GRAPH_SAVE, '_Save', 'Save the current flow graph', 
'gtk-save'),
-       gtk.Action(FLOW_GRAPH_SAVE_AS, 'Save _As', 'Save the current flow graph 
as...', 'gtk-save-as'),
-       gtk.Action(FLOW_GRAPH_CLOSE, '_Close', 'Close the current flow graph', 
'gtk-close'),
-       gtk.Action(APPLICATION_QUIT, '_Quit', 'Quit program', 'gtk-quit'),
-       gtk.Action(FLOW_GRAPH_UNDO, '_Undo', 'Undo a change to the flow graph', 
'gtk-undo'),
-       gtk.Action(FLOW_GRAPH_REDO, '_Redo', 'Redo a change to the flow graph', 
'gtk-redo'),
-       gtk.Action(ELEMENT_DELETE, '_Delete', 'Delete the selected blocks', 
'gtk-delete'),
-       gtk.Action(BLOCK_ROTATE_LEFT, 'Rotate _Left', 'Rotate the selected 
blocks 90 degrees', 'gtk-go-back'),
-       gtk.Action(BLOCK_ROTATE_RIGHT, 'Rotate _Right', 'Rotate the selected 
blocks -90 degrees', 'gtk-go-forward'),
-       gtk.Action(BLOCK_PARAM_MODIFY, '_Properties', 'Modify params for the 
selected block', 'gtk-properties'),
-       gtk.Action(BLOCK_ENABLE, 'E_nable', 'Enable the selected blocks', 
'gtk-connect'),
-       gtk.Action(BLOCK_DISABLE, 'D_isable', 'Disable the selected blocks', 
'gtk-disconnect'),
-       gtk.Action(BLOCK_CUT, 'Cu_t', 'Cut', 'gtk-cut'),
-       gtk.Action(BLOCK_COPY, '_Copy', 'Copy', 'gtk-copy'),
-       gtk.Action(BLOCK_PASTE, '_Paste', 'Paste', 'gtk-paste'),
-       gtk.Action(ABOUT_WINDOW_DISPLAY, '_About', 'About this program', 
'gtk-about'),
-       gtk.Action(FLOW_GRAPH_GEN, '_Generate', 'Generate the flow graph', 
'gtk-convert'),
-       gtk.Action(FLOW_GRAPH_EXEC, '_Execute', 'Execute the flow graph', 
'gtk-execute'),
-       gtk.Action(FLOW_GRAPH_KILL, '_Kill', 'Kill the flow graph', 'gtk-stop'),
-       gtk.Action(FLOW_GRAPH_SCREEN_CAPTURE, 'S_creen Capture', 'Create a 
screen capture of the flow graph', 'gtk-print'),
+       gtk.Action(FLOW_GRAPH_NEW, '_New', 'Create a new flow graph', 
gtk.STOCK_NEW),
+       gtk.Action(FLOW_GRAPH_OPEN, '_Open', 'Open an existing flow graph', 
gtk.STOCK_OPEN),
+       gtk.Action(FLOW_GRAPH_SAVE, '_Save', 'Save the current flow graph', 
gtk.STOCK_SAVE),
+       gtk.Action(FLOW_GRAPH_SAVE_AS, 'Save _As', 'Save the current flow graph 
as...', gtk.STOCK_SAVE_AS),
+       gtk.Action(FLOW_GRAPH_CLOSE, '_Close', 'Close the current flow graph', 
gtk.STOCK_CLOSE),
+       gtk.Action(APPLICATION_QUIT, '_Quit', 'Quit program', gtk.STOCK_QUIT),
+       gtk.Action(FLOW_GRAPH_UNDO, '_Undo', 'Undo a change to the flow graph', 
gtk.STOCK_UNDO),
+       gtk.Action(FLOW_GRAPH_REDO, '_Redo', 'Redo a change to the flow graph', 
gtk.STOCK_REDO),
+       gtk.Action(ELEMENT_DELETE, '_Delete', 'Delete the selected blocks', 
gtk.STOCK_DELETE),
+       gtk.Action(BLOCK_ROTATE_LEFT, 'Rotate _Left', 'Rotate the selected 
blocks 90 degrees', gtk.STOCK_GO_BACK),
+       gtk.Action(BLOCK_ROTATE_RIGHT, 'Rotate _Right', 'Rotate the selected 
blocks -90 degrees', gtk.STOCK_GO_FORWARD),
+       gtk.Action(BLOCK_PARAM_MODIFY, '_Properties', 'Modify params for the 
selected block', gtk.STOCK_PROPERTIES),
+       gtk.Action(BLOCK_ENABLE, 'E_nable', 'Enable the selected blocks', 
gtk.STOCK_CONNECT),
+       gtk.Action(BLOCK_DISABLE, 'D_isable', 'Disable the selected blocks', 
gtk.STOCK_DISCONNECT),
+       gtk.Action(BLOCK_CUT, 'Cu_t', 'Cut', gtk.STOCK_CUT),
+       gtk.Action(BLOCK_COPY, '_Copy', 'Copy', gtk.STOCK_COPY),
+       gtk.Action(BLOCK_PASTE, '_Paste', 'Paste', gtk.STOCK_PASTE),
+       gtk.Action(ABOUT_WINDOW_DISPLAY, '_About', 'About this program', 
gtk.STOCK_ABOUT),
+       gtk.Action(HELP_WINDOW_DISPLAY, '_Help', 'Usage Tips', gtk.STOCK_HELP),
+       gtk.Action(FLOW_GRAPH_GEN, '_Generate', 'Generate the flow graph', 
gtk.STOCK_CONVERT),
+       gtk.Action(FLOW_GRAPH_EXEC, '_Execute', 'Execute the flow graph', 
gtk.STOCK_EXECUTE),
+       gtk.Action(FLOW_GRAPH_KILL, '_Kill', 'Kill the flow graph', 
gtk.STOCK_STOP),
+       gtk.Action(FLOW_GRAPH_SCREEN_CAPTURE, 'S_creen Capture', 'Create a 
screen capture of the flow graph', gtk.STOCK_PRINT),
 )
 def get_all_actions(): return _actions_list
 

Modified: gnuradio/branches/developers/jblum/grc/grc/src/gui/Bars.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/gui/Bars.py  2009-04-10 
04:24:16 UTC (rev 10800)
+++ gnuradio/branches/developers/jblum/grc/grc/src/gui/Bars.py  2009-04-11 
03:45:38 UTC (rev 10801)
@@ -1,5 +1,5 @@
 """
-Copyright 2007 Free Software Foundation, Inc.
+Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
 This file is part of GNU Radio
 
 GNU Radio Companion is free software; you can redistribute it and/or
@@ -87,6 +87,8 @@
                Actions.FLOW_GRAPH_KILL,
        ]),
        (gtk.Action('Help', '_Help', None, None), [
+               Actions.HELP_WINDOW_DISPLAY,
+               None,
                Actions.ABOUT_WINDOW_DISPLAY,
        ]),
 )

Modified: gnuradio/branches/developers/jblum/grc/grc/src/gui/Dialogs.py
===================================================================
--- gnuradio/branches/developers/jblum/grc/grc/src/gui/Dialogs.py       
2009-04-10 04:24:16 UTC (rev 10800)
+++ gnuradio/branches/developers/jblum/grc/grc/src/gui/Dialogs.py       
2009-04-11 03:45:38 UTC (rev 10801)
@@ -1,5 +1,5 @@
 """
-Copyright 2008 Free Software Foundation, Inc.
+Copyright 2008, 2009 Free Software Foundation, Inc.
 This file is part of GNU Radio
 
 GNU Radio Companion is free software; you can redistribute it and/or
@@ -20,7 +20,6 @@
 import pygtk
 pygtk.require('2.0')
 import gtk
-from Constants import MIN_DIALOG_WIDTH, MIN_DIALOG_HEIGHT
 from .. platforms.base.Constants import PACKAGE, VERSION
 import Preferences
 
@@ -82,3 +81,18 @@
 -----""")
                self.run()
                self.destroy()
+
+def HelpDialog():
+       MessageDialogHelper(
+               type=gtk.MESSAGE_INFO,
+               buttons=gtk.BUTTONS_CLOSE,
+               title='Help',
+               markup="""
+<b>Usage Tips</b>
+ * <u>Add block</u>: double click on a block in the block selection window.
+ * <u>Make connection</u>: click on the source port of one block, then click 
on the sink port of another block.
+ * <u>Remove connection</u>: select the connection and press delete, or drag 
the connection.
+ * <u>Edit parameters</u>: double click on a block in the flow graph.
+ * <u>Type Change</u>: Select a block, press up/down on the keyboard.
+ * <u>Rotation</u>: Select a block, press left/right on the keyboard.
+""")





reply via email to

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