[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9513 - in gnuradio/branches/developers/jblum/grc_reor
From: |
jblum |
Subject: |
[Commit-gnuradio] r9513 - in gnuradio/branches/developers/jblum/grc_reorganize/grc/src: gui platforms/gui platforms/python utils |
Date: |
Sat, 6 Sep 2008 21:50:35 -0600 (MDT) |
Author: jblum
Date: 2008-09-06 21:50:35 -0600 (Sat, 06 Sep 2008)
New Revision: 9513
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/MainWindow.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Colors.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Constants.py.in
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/converter.py
Log:
import and @package cleanup, bug fix with hier lib dir
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py
2008-09-07 03:41:43 UTC (rev 9512)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/ActionHandler.py
2008-09-07 03:50:35 UTC (rev 9513)
@@ -170,9 +170,9 @@
@param state a string describing the state change
"""
#print state
-
##############################################################################################
+ ##################################################
# Initalize/Quit
-
##############################################################################################
+ ##################################################
if state == Actions.APPLICATION_INITIALIZE:
for action in Actions.ACTIONS_LIST:
action.set_sensitive(False) #set all actions disabled
# enable a select few actions
@@ -195,17 +195,17 @@
if self.main_window.close_pages():
gtk.main_quit()
exit(0)
-
##############################################################################################
+ ##################################################
# Selections
-
##############################################################################################
+ ##################################################
elif state == Actions.ELEMENT_SELECT:
self.get_flow_graph().update()
elif state == Actions.NOTHING_SELECT:
self.get_flow_graph().unselect()
self.get_flow_graph().update()
-
##############################################################################################
+ ##################################################
# Enable/Disable
-
##############################################################################################
+ ##################################################
elif state == Actions.BLOCK_ENABLE:
if self.get_flow_graph().enable_selected(True):
self.get_flow_graph().update()
@@ -216,9 +216,9 @@
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)
-
##############################################################################################
+ ##################################################
# Cut/Copy/Paste
-
##############################################################################################
+ ##################################################
elif state == Actions.BLOCK_CUT:
self.handle_states(BLOCK_COPY)
self.handle_states(ELEMENT_DELETE)
@@ -230,9 +230,9 @@
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)
-
##############################################################################################
+ ##################################################
# Move/Rotate/Delete/Create
-
##############################################################################################
+ ##################################################
elif state == Actions.BLOCK_MOVE:
self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data())
self.get_page().set_saved(False)
@@ -277,9 +277,9 @@
self.get_flow_graph().update() #2 times
self.get_page().get_state_cache().save_new_state(self.get_flow_graph().export_data())
self.get_page().set_saved(False)
-
##############################################################################################
+ ##################################################
# Window stuff
-
##############################################################################################
+ ##################################################
elif state == Actions.PREFS_WINDOW_DISPLAY:
PreferencesDialog()
self.get_flow_graph().update()
@@ -287,17 +287,17 @@
AboutDialog()
elif state == Actions.HOTKEYS_WINDOW_DISPLAY:
HotKeysDialog()
-
##############################################################################################
+ ##################################################
# Param Modifications
-
##############################################################################################
+ ##################################################
elif state == Actions.BLOCK_PARAM_MODIFY:
if self.get_flow_graph().param_modify_selected():
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)
-
##############################################################################################
+ ##################################################
# Undo/Redo
-
##############################################################################################
+ ##################################################
elif state == Actions.FLOW_GRAPH_UNDO:
n = self.get_page().get_state_cache().get_prev_state()
if n:
@@ -312,9 +312,9 @@
self.get_flow_graph().import_data(n)
self.get_flow_graph().update()
self.get_page().set_saved(False)
-
##############################################################################################
+ ##################################################
# New/Open/Save/Close
-
##############################################################################################
+ ##################################################
elif state == Actions.FLOW_GRAPH_NEW:
self.main_window.new_page()
elif state == Actions.FLOW_GRAPH_OPEN:
@@ -346,9 +346,9 @@
pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,
0, 8, width, height)
pixbuf.get_from_drawable(pixmap,
pixmap.get_colormap(), 0, 0, 0, 0, width, height)
pixbuf.save(file_path, IMAGE_FILE_EXTENSION[1:])
-
##############################################################################################
+ ##################################################
# Gen/Exec/Stop
-
##############################################################################################
+ ##################################################
elif state == Actions.FLOW_GRAPH_GEN:
if not self.get_page().get_pid():
if not self.get_page().get_saved() or not
self.get_page().get_file_path():
@@ -372,9 +372,9 @@
elif state == '': #pass and run the global actions
pass
else: print '!!! State "%s" not handled !!!'%state
-
##############################################################################################
+ ##################################################
# Global Actions for all States
-
##############################################################################################
+ ##################################################
#update general buttons
Actions.get_action_from_name(Actions.ELEMENT_DELETE).set_sensitive(bool(self.get_flow_graph().get_selected_elements()))
Actions.get_action_from_name(Actions.BLOCK_PARAM_MODIFY).set_sensitive(bool(self.get_flow_graph().get_selected_block()))
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/MainWindow.py
===================================================================
--- gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/MainWindow.py
2008-09-07 03:41:43 UTC (rev 9512)
+++ gnuradio/branches/developers/jblum/grc_reorganize/grc/src/gui/MainWindow.py
2008-09-07 03:50:35 UTC (rev 9513)
@@ -16,8 +16,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
address@hidden grc.gui.MainWindow
-#The main window, containing all windows, tool bars, and menu bars.
from Constants import \
MIN_WINDOW_WIDTH, MIN_WINDOW_HEIGHT, \
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Colors.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Colors.py
2008-09-07 03:41:43 UTC (rev 9512)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/gui/Colors.py
2008-09-07 03:50:35 UTC (rev 9513)
@@ -16,8 +16,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
address@hidden grc.gui.elements.Colors
-#Global Colors for the gui
import pygtk
pygtk.require('2.0')
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Constants.py.in
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Constants.py.in
2008-09-07 03:41:43 UTC (rev 9512)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Constants.py.in
2008-09-07 03:50:35 UTC (rev 9513)
@@ -16,9 +16,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
address@hidden grc_gnuradio.Constants
-#Global constants for grc gnuradio package
address@hidden Josh Blum
import os
import sys
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py
2008-09-07 03:41:43 UTC (rev 9512)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/platforms/python/Generator.py
2008-09-07 03:50:35 UTC (rev 9513)
@@ -21,7 +21,10 @@
import subprocess
from Cheetah.Template import Template
from utils import expr_utils
-from Constants import *
+from Constants import \
+ TOP_BLOCK_FILE_MODE, HIER_BLOCK_FILE_MODE, \
+ HIER_BLOCKS_LIB_DIR, PYEXEC, \
+ FLOW_GRAPH_TEMPLATE
from utils import convert_hier
class Generator(object):
@@ -37,7 +40,7 @@
self._generate_options =
self._flow_graph.get_option('generate_options')
if self._generate_options == 'hb':
self._mode = HIER_BLOCK_FILE_MODE
- dirname = HIER_BLOCKS_LIB_PATH
+ dirname = HIER_BLOCKS_LIB_DIR
else:
self._mode = TOP_BLOCK_FILE_MODE
dirname = os.path.dirname(file_path)
Modified:
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/converter.py
===================================================================
---
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/converter.py
2008-09-07 03:41:43 UTC (rev 9512)
+++
gnuradio/branches/developers/jblum/grc_reorganize/grc/src/utils/converter.py
2008-09-07 03:50:35 UTC (rev 9513)
@@ -16,8 +16,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
address@hidden grc.converter
-#convert old flow graph file format to new format
from .. platforms.base.Constants import FLOW_GRAPH_DTD
import ParseXML
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9513 - in gnuradio/branches/developers/jblum/grc_reorganize/grc/src: gui platforms/gui platforms/python utils,
jblum <=