diff options
author | jblum | 2008-11-28 06:51:21 +0000 |
---|---|---|
committer | jblum | 2008-11-28 06:51:21 +0000 |
commit | d01692fa60eb6b08b6b7b5369d2a08cee912395f (patch) | |
tree | baccdedeea2fa35d24ee9f9c3488f2b9caa85de3 /grc/src/platforms | |
parent | 277aa8d20c9db1c3de915d284db9e420f3d9f2f6 (diff) | |
download | gnuradio-d01692fa60eb6b08b6b7b5369d2a08cee912395f.tar.gz gnuradio-d01692fa60eb6b08b6b7b5369d2a08cee912395f.tar.bz2 gnuradio-d01692fa60eb6b08b6b7b5369d2a08cee912395f.zip |
new preferences
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10081 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src/platforms')
-rw-r--r-- | grc/src/platforms/gui/Block.py | 14 | ||||
-rw-r--r-- | grc/src/platforms/gui/FlowGraph.py | 20 | ||||
-rw-r--r-- | grc/src/platforms/python/Platform.py | 4 |
3 files changed, 8 insertions, 30 deletions
diff --git a/grc/src/platforms/gui/Block.py b/grc/src/platforms/gui/Block.py index a2b5048ec..ab6a6d0b2 100644 --- a/grc/src/platforms/gui/Block.py +++ b/grc/src/platforms/gui/Block.py @@ -17,7 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA """ -from ... gui import Preferences from Element import Element import Utils import Colors @@ -137,13 +136,12 @@ class Block(Element): layout.set_font_description(desc) self.label_width, self.label_height = layout.get_pixel_size() #display the params - if Preferences.show_params(): - for param in filter(lambda p: p.get_hide() not in ('all', 'part'), self.get_params()): - layout = param.get_layout() - layouts.append(layout) - w,h = layout.get_pixel_size() - self.label_width = max(w, self.label_width) - self.label_height = self.label_height + h + LABEL_SEPARATION + for param in filter(lambda p: p.get_hide() not in ('all', 'part'), self.get_params()): + layout = param.get_layout() + layouts.append(layout) + w,h = layout.get_pixel_size() + self.label_width = max(w, self.label_width) + self.label_height = self.label_height + h + LABEL_SEPARATION width = self.label_width height = self.label_height #setup the pixmap diff --git a/grc/src/platforms/gui/FlowGraph.py b/grc/src/platforms/gui/FlowGraph.py index e387ccc9b..22113037e 100644 --- a/grc/src/platforms/gui/FlowGraph.py +++ b/grc/src/platforms/gui/FlowGraph.py @@ -17,7 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA """ -from ... gui import Preferences from ... gui.Constants import \ DIR_LEFT, DIR_RIGHT, \ SCROLL_PROXIMITY_SENSITIVITY, SCROLL_DISTANCE, \ @@ -302,15 +301,6 @@ class FlowGraph(Element): #draw the background self.get_gc().foreground = Colors.BACKGROUND_COLOR self.get_pixmap().draw_rectangle(self.get_gc(), True, 0, 0, W, H) - #draw grid (depends on prefs) - if Preferences.show_grid(): - grid_size = Preferences.get_grid_size() - points = list() - for i in range(W/grid_size): - for j in range(H/grid_size): - points.append((i*grid_size, j*grid_size)) - self.get_gc().foreground = Colors.TXT_COLOR - self.get_pixmap().draw_points(self.get_gc(), points) #draw multi select rectangle if self.mouse_pressed and (not self.get_selected_elements() or self.get_ctrl_mask()): #coordinates @@ -507,16 +497,6 @@ class FlowGraph(Element): self.time = 0 self.mouse_pressed = False if self.element_moved: - if Preferences.snap_to_grid(): - grid_size = Preferences.get_grid_size() - X,Y = self.get_selected_element().get_coordinate() - deltaX = X%grid_size - if deltaX < grid_size/2: deltaX = -1 * deltaX - else: deltaX = grid_size - deltaX - deltaY = Y%grid_size - if deltaY < grid_size/2: deltaY = -1 * deltaY - else: deltaY = grid_size - deltaY - self.move_selected((deltaX, deltaY)) self.handle_states(BLOCK_MOVE) self.element_moved = False self.update_selected_elements() diff --git a/grc/src/platforms/python/Platform.py b/grc/src/platforms/python/Platform.py index d1c8a36a8..9b0b3bb30 100644 --- a/grc/src/platforms/python/Platform.py +++ b/grc/src/platforms/python/Platform.py @@ -52,8 +52,8 @@ class Platform(_Platform): #init _Platform.__init__( self, - name='GNURadio Python', - key='gnuradio_python', + name='GRC', + key='grc', block_paths=block_paths, block_dtd=BLOCK_DTD, block_tree=BLOCK_TREE, |