From b62e0a70a272a8e63b308cc1602f3973790a240e Mon Sep 17 00:00:00 2001 From: jblum Date: Sun, 19 Oct 2008 07:51:24 +0000 Subject: simplification git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9809 221aa14e-8319-0410-a670-987f0aec2ac5 --- grc/src/gui/MainWindow.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'grc/src/gui') diff --git a/grc/src/gui/MainWindow.py b/grc/src/gui/MainWindow.py index 95a362688..ce1eb274e 100644 --- a/grc/src/gui/MainWindow.py +++ b/grc/src/gui/MainWindow.py @@ -19,8 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA from Constants import \ MIN_WINDOW_WIDTH, MIN_WINDOW_HEIGHT, \ - NEW_FLOGRAPH_TITLE, REPORTS_WINDOW_HEIGHT, \ - FLOW_GRAPH_FILE_EXTENSION + NEW_FLOGRAPH_TITLE, REPORTS_WINDOW_HEIGHT from Actions import \ APPLICATION_QUIT, FLOW_GRAPH_KILL, \ FLOW_GRAPH_SAVE @@ -253,13 +252,8 @@ class MainWindow(gtk.Window): gtk.Window.set_title(self, title) #set tab titles for page in self._get_pages(): - title = os.path.basename(page.get_file_path()) - #strip file extension #TEMP - if title.endswith('.xml'): - title = title[0:-len('.xml')] - #strip file extension - if title.endswith(FLOW_GRAPH_FILE_EXTENSION): - title = title[0:-len(FLOW_GRAPH_FILE_EXTENSION)] + #get filename and strip out file extension + title = os.path.splitext(os.path.basename(page.get_file_path()))[0] page.set_text(''.join(( (title or NEW_FLOGRAPH_TITLE), (page.get_saved() and ' ' or '*'), #blank must be non empty -- cgit