From 7af1f7d3f7412f5dc6fd3f048149e9503e57c05a Mon Sep 17 00:00:00 2001 From: Wade Brainerd Date: Sun, 17 Jan 2010 02:34:26 +0000 Subject: Merge branch 'master' of git://git.sugarlabs.org/terminal/mainline --- diff --git a/po/fil.po b/po/fil.po new file mode 100644 index 0000000..4cfa81f --- /dev/null +++ b/po/fil.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-10 00:33-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Translate Toolkit 1.3.0\n" + +#: activity/activity.info:2 +msgid "Terminal" +msgstr "" + +#: terminal.py:89 +msgid "Become root" +msgstr "" + +#: terminal.py:140 +msgid "Fullscreen" +msgstr "" + +#: terminal.py:153 +msgid "Open New Tab" +msgstr "" + +#: terminal.py:160 +msgid "Close Tab" +msgstr "" + +#: terminal.py:168 +msgid "Previous Tab" +msgstr "" + +#: terminal.py:176 +msgid "Next Tab" +msgstr "" diff --git a/po/tvl.po b/po/tvl.po new file mode 100644 index 0000000..4cfa81f --- /dev/null +++ b/po/tvl.po @@ -0,0 +1,45 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-10 00:33-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Translate Toolkit 1.3.0\n" + +#: activity/activity.info:2 +msgid "Terminal" +msgstr "" + +#: terminal.py:89 +msgid "Become root" +msgstr "" + +#: terminal.py:140 +msgid "Fullscreen" +msgstr "" + +#: terminal.py:153 +msgid "Open New Tab" +msgstr "" + +#: terminal.py:160 +msgid "Close Tab" +msgstr "" + +#: terminal.py:168 +msgid "Previous Tab" +msgstr "" + +#: terminal.py:176 +msgid "Next Tab" +msgstr "" diff --git a/terminal.py b/terminal.py index 0e9a818..a0f97ba 100644 --- a/terminal.py +++ b/terminal.py @@ -17,6 +17,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import os +import sys import simplejson import ConfigParser import logging @@ -293,8 +294,12 @@ class TerminalActivity(activity.Activity): # os.environ['TERMINAL_ENV'] = '\n'.join(filtered_env) # Restore the working directory. - if 'cwd' in tab_state: - os.chdir(tab_state['cwd']) + if 'cwd' in tab_state and os.path.exists(tab_state['cwd']): + try: + os.chdir(tab_state['cwd']) + except: + # ACLs may deny access + sys.stdout.write("Could not chdir to " + tab_state['cwd']) # Restore the scrollback buffer. for l in tab_state['scrollback']: -- cgit v0.9.1