[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/08: grc: update all flowgraphs when hidi
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/08: grc: update all flowgraphs when hiding port labels |
Date: |
Wed, 1 Oct 2014 19:32:58 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit b7e16990195c93f677dde7de77371518fc8f3869
Author: Sebastian Koslowski <address@hidden>
Date: Tue Sep 2 12:24:52 2014 +0200
grc: update all flowgraphs when hiding port labels
---
grc/gui/ActionHandler.py | 3 ++-
grc/gui/MainWindow.py | 12 ++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index e20a54a..f8963fa 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -397,7 +397,8 @@ class ActionHandler:
Actions.NOTHING_SELECT()
elif action == Actions.TOGGLE_AUTO_HIDE_PORT_LABELS:
action.save_to_preferences()
- self.main_window.get_flow_graph().create_shapes()
+ for page in self.main_window.get_pages():
+ page.get_flow_graph().create_shapes()
elif action == Actions.TOGGLE_SNAP_TO_GRID:
action.save_to_preferences()
##################################################
diff --git a/grc/gui/MainWindow.py b/grc/gui/MainWindow.py
index 75d9dce..d1cf866 100644
--- a/grc/gui/MainWindow.py
+++ b/grc/gui/MainWindow.py
@@ -209,7 +209,7 @@ class MainWindow(gtk.Window):
open_files = filter(lambda file: file, self._get_files()) #filter
blank files
open_file = self.get_page().get_file_path()
#close each page
- for page in self._get_pages():
+ for page in self.get_pages():
self.page_to_be_closed = page
self.close_page(False)
if self.notebook.get_n_pages(): return False
@@ -271,7 +271,7 @@ class MainWindow(gtk.Window):
)
)
#set tab titles
- for page in self._get_pages(): page.set_markup(
+ for page in self.get_pages(): page.set_markup(
Utils.parse_template(PAGE_TITLE_MARKUP_TMPL,
#get filename and strip out file extension
title=os.path.splitext(os.path.basename(page.get_file_path()))[0],
@@ -280,13 +280,13 @@ class MainWindow(gtk.Window):
)
)
#show/hide notebook tabs
- self.notebook.set_show_tabs(len(self._get_pages()) > 1)
+ self.notebook.set_show_tabs(len(self.get_pages()) > 1)
def update_pages(self):
"""
Forces a reload of all the pages in this notebook.
"""
- for page in self._get_pages():
+ for page in self.get_pages():
success = page.get_flow_graph().reload()
if success: # Only set saved if errors occurred during import
page.set_saved(False)
@@ -351,9 +351,9 @@ class MainWindow(gtk.Window):
Returns:
list of file paths
"""
- return map(lambda page: page.get_file_path(), self._get_pages())
+ return map(lambda page: page.get_file_path(), self.get_pages())
- def _get_pages(self):
+ def get_pages(self):
"""
Get a list of all pages in the notebook.
- [Commit-gnuradio] [gnuradio] branch maint updated (ff7e74b -> 1edeff1), git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 08/08: Merge remote-tracking branch 'gnuradio-wg-grc/maint_grcwg' into maint, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 06/08: grc: fix missing xterm (Bug #725), git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 01/08: grc: yet another py26 incompatibility, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 07/08: grc: fix lagging drag and drop, round two, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 03/08: grc: update all flowgraphs when hiding port labels,
git <=
- [Commit-gnuradio] [gnuradio] 05/08: grc: fix lagging drag and drop, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 02/08: grc: fix search entry box for old PyGTK versions, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 04/08: grc: no icon in search entry box for old PyGTK versions, git, 2014/10/01