Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWade Brainerd <wadetb@gmail.com>2009-03-02 04:37:06 (GMT)
committer Wade Brainerd <wadetb@gmail.com>2009-03-02 04:37:06 (GMT)
commit38667fa1b6dc733d44ce6dfc21a2d403b3f79579 (patch)
tree2dad6a8eec785c77b25944a00615735940a3aa15
parent04a261a545cbf2230fcd0726c048fed879b9a158 (diff)
Add some comments around disabled code.
-rw-r--r--terminal.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/terminal.py b/terminal.py
index 2c9723a..99dd1f2 100644
--- a/terminal.py
+++ b/terminal.py
@@ -46,6 +46,8 @@ class TerminalActivity(sugar.activity.activity.Activity):
self.data_file = None
self.set_title(_('Terminal Activity'))
+
+ # Non-working attempt to hide the Escape key from Sugar.
#self.connect('key-press-event', self._key_press_cb)
toolbox = sugar.activity.activity.ActivityToolbox(self)
@@ -199,6 +201,9 @@ class TerminalActivity(sugar.activity.activity.Activity):
index = self.notebook.append_page(box, label)
self.notebook.show_all()
+
+ # Uncomment this to only show the tab bar when there is at least one tab.
+ # I think it's useful to always see it, since it displays the 'window title'.
#self.notebook.props.show_tabs = self.notebook.get_n_pages() > 1
# Launch the default shell in the HOME directory.
@@ -251,7 +256,11 @@ class TerminalActivity(sugar.activity.activity.Activity):
self.fullscreen()
def _key_press_cb(self, window, event):
+ # Escape keypresses are routed directly to the vte and then dropped.
+ # This hack prevents Sugar from hijacking them and canceling fullscreen mode.
if gtk.gdk.keyval_name(event.keyval) == 'Escape':
+ vt = self.notebook.get_nth_page(self.notebook.get_current_page()).vt
+ vt.event(event)
return True
return False
@@ -299,6 +308,8 @@ class TerminalActivity(sugar.activity.activity.Activity):
scrollback_lines = scrollback_text.split('\n')
+ # Note- this currently gets the child's initial environment rather than the current
+ # environment, making it not very useful.
environment = open('/proc/%d/environ' % page.pid, 'r').read().split('\0')
cwd = os.readlink('/proc/%d/cwd' % page.pid)