diff options
Diffstat (limited to 'grc/gui')
-rw-r--r-- | grc/gui/ActionHandler.py | 4 | ||||
-rw-r--r-- | grc/gui/Block.py | 4 | ||||
-rw-r--r-- | grc/gui/BlockTreeWindow.py | 4 | ||||
-rw-r--r-- | grc/gui/FlowGraph.py | 2 | ||||
-rw-r--r-- | grc/gui/MainWindow.py | 2 | ||||
-rw-r--r-- | grc/gui/Param.py | 4 | ||||
-rw-r--r-- | grc/gui/ParamWidgets.py | 2 | ||||
-rw-r--r-- | grc/gui/PropsDialog.py | 2 | ||||
-rw-r--r-- | grc/gui/VariableEditor.py | 8 |
9 files changed, 16 insertions, 16 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index d188030c62..b135efdce9 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -245,10 +245,10 @@ class ActionHandler: # If connected block is not in the list of selected blocks create a pad for it if flow_graph.get_block(source_id) not in flow_graph.get_selected_blocks(): - pads.append({'key': connection.sink_port.get_key(), 'coord': connection.source_port.get_coordinate(), 'block_id' : block.get_id(), 'direction': 'source'}) + pads.append({'key': connection.sink_port.key, 'coord': connection.source_port.get_coordinate(), 'block_id' : block.get_id(), 'direction': 'source'}) if flow_graph.get_block(sink_id) not in flow_graph.get_selected_blocks(): - pads.append({'key': connection.source_port.get_key(), 'coord': connection.sink_port.get_coordinate(), 'block_id' : block.get_id(), 'direction': 'sink'}) + pads.append({'key': connection.source_port.key, 'coord': connection.sink_port.get_coordinate(), 'block_id' : block.get_id(), 'direction': 'sink'}) # Copy the selected blocks and paste them into a new page diff --git a/grc/gui/Block.py b/grc/gui/Block.py index fd6612b8c2..0d9bd3e09b 100644 --- a/grc/gui/Block.py +++ b/grc/gui/Block.py @@ -134,7 +134,7 @@ class Block(Element, _Block): #display the params if self.is_dummy_block: markups = ['<span foreground="black" font_desc="{font}"><b>key: </b>{key}</span>'.format( - font=PARAM_FONT, key=self._key + font=PARAM_FONT, key=self.key )] else: markups = [param.format_block_surface_markup() for param in self.get_params() if param.get_hide() not in ('all', 'part')] @@ -180,7 +180,7 @@ class Block(Element, _Block): markups = [] # Show the flow graph complexity on the top block if enabled - if Actions.TOGGLE_SHOW_FLOWGRAPH_COMPLEXITY.get_active() and self.get_key() == "options": + if Actions.TOGGLE_SHOW_FLOWGRAPH_COMPLEXITY.get_active() and self.key == "options": complexity = calculate_flowgraph_complexity(self.parent) markups.append( '<span foreground="#444" size="medium" font_desc="{font}">' diff --git a/grc/gui/BlockTreeWindow.py b/grc/gui/BlockTreeWindow.py index 8522390fc1..f0f81b3757 100644 --- a/grc/gui/BlockTreeWindow.py +++ b/grc/gui/BlockTreeWindow.py @@ -176,7 +176,7 @@ class BlockTreeWindow(Gtk.VBox): categories[parent_category] = iter_ # add block iter_ = treestore.insert_before(categories[category], None) - treestore.set_value(iter_, KEY_INDEX, block.get_key()) + treestore.set_value(iter_, KEY_INDEX, block.key) treestore.set_value(iter_, NAME_INDEX, block.name) treestore.set_value(iter_, DOC_INDEX, _format_doc(block.documentation)) @@ -230,7 +230,7 @@ class BlockTreeWindow(Gtk.VBox): self.expand_module_in_tree() else: matching_blocks = [b for b in list(self.platform.blocks.values()) - if key in b.get_key().lower() or key in b.name.lower()] + if key in b.key.lower() or key in b.name.lower()] self.treestore_search.clear() self._categories_search = {tuple(): None} diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py index d7745a529d..1c4960fed4 100644 --- a/grc/gui/FlowGraph.py +++ b/grc/gui/FlowGraph.py @@ -88,7 +88,7 @@ class FlowGraph(Element, _Flowgraph): return block_id def install_external_editor(self, param): - target = (param.parent_block.get_id(), param.get_key()) + target = (param.parent_block.get_id(), param.key) if target in self._external_updaters: editor = self._external_updaters[target] diff --git a/grc/gui/MainWindow.py b/grc/gui/MainWindow.py index 3236768969..bd07a667d4 100644 --- a/grc/gui/MainWindow.py +++ b/grc/gui/MainWindow.py @@ -60,7 +60,7 @@ class MainWindow(Gtk.Window): gen_opts = platform.blocks['options'].get_param('generate_options') generate_mode_default = gen_opts.get_value() generate_modes = [ - (o.get_key(), o.get_name(), o.get_key() == generate_mode_default) + (o.key, o.get_name(), o.key == generate_mode_default) for o in gen_opts.get_options()] # Load preferences diff --git a/grc/gui/Param.py b/grc/gui/Param.py index a630f5faa3..c888b9ebc0 100644 --- a/grc/gui/Param.py +++ b/grc/gui/Param.py @@ -66,7 +66,7 @@ class Param(Element, _Param): # fixme: using non-public attribute here has_callback = \ hasattr(block, 'get_callbacks') and \ - any(self.get_key() in callback for callback in block._callbacks) + any(self.key in callback for callback in block._callbacks) return '<span underline="{line}" foreground="{color}" font_desc="Sans 9">{label}</span>'.format( line='low' if has_callback else 'none', @@ -78,7 +78,7 @@ class Param(Element, _Param): def format_tooltip_text(self): errors = self.get_error_messages() - tooltip_lines = ['Key: ' + self.get_key(), 'Type: ' + self.get_type()] + tooltip_lines = ['Key: ' + self.key, 'Type: ' + self.get_type()] if self.is_valid(): value = str(self.get_evaluated()) if len(value) > 100: diff --git a/grc/gui/ParamWidgets.py b/grc/gui/ParamWidgets.py index fbbfa93d1d..3ee4c7761d 100644 --- a/grc/gui/ParamWidgets.py +++ b/grc/gui/ParamWidgets.py @@ -270,7 +270,7 @@ class FileParam(EntryParam): file_path = self.param.is_valid() and self.param.get_evaluated() or '' (dirname, basename) = os.path.isfile(file_path) and os.path.split(file_path) or (file_path, '') # check for qss theme default directory - if self.param.get_key() == 'qt_qss_theme': + if self.param.key == 'qt_qss_theme': dirname = os.path.dirname(dirname) # trim filename if not os.path.exists(dirname): config = self.param.parent_platform.config diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py index d7722adff7..1244db3537 100644 --- a/grc/gui/PropsDialog.py +++ b/grc/gui/PropsDialog.py @@ -226,7 +226,7 @@ class PropsDialog(Gtk.Dialog): buf = self._code_text_display.get_buffer() block = self._block - key = block.get_key() + key = block.key if key == 'epy_block': src = block.get_param('_source_code').get_value() diff --git a/grc/gui/VariableEditor.py b/grc/gui/VariableEditor.py index 399e4ec475..11284f5708 100644 --- a/grc/gui/VariableEditor.py +++ b/grc/gui/VariableEditor.py @@ -177,9 +177,9 @@ class VariableEditor(Gtk.VBox): # Block specific values if block: - if block.get_key() == 'import': + if block.key == 'import': value = block.get_param('import').get_value() - elif block.get_key() != "variable": + elif block.key != "variable": value = "<Open Properties>" sp('editable', False) sp('foreground', '#0D47A1') @@ -195,7 +195,7 @@ class VariableEditor(Gtk.VBox): self.set_tooltip_text(error_message[-1]) else: # Evaluate and show the value (if it is a variable) - if block.get_key() == "variable": + if block.key == "variable": evaluated = str(block.get_param('value').evaluate()) self.set_tooltip_text(evaluated) # Always set the text value. @@ -300,7 +300,7 @@ class VariableEditor(Gtk.VBox): # Make sure this has a block (not the import/variable rows) if self._block and event.type == Gdk.EventType._2BUTTON_PRESS: # Open the advanced dialog if it is a gui variable - if self._block.get_key() not in ("variable", "import"): + if self._block.key not in ("variable", "import"): self.handle_action(None, self.OPEN_PROPERTIES, event=event) return True if event.type == Gdk.EventType.BUTTON_PRESS: |