Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2006-06-13 00:22:12 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2006-06-13 00:22:12 (GMT)
commit20d7582f1d55b6523d1ac041c0ce2d2d8580788b (patch)
tree18fbca59918ec89dceb97d8c39c128d2252db96d /sugar
parent6037caa6918ef720a9687f2276ecb70106b672cc (diff)
Add scrollbars to the console, wrap word
Diffstat (limited to 'sugar')
-rwxr-xr-xsugar/shell/shell.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/sugar/shell/shell.py b/sugar/shell/shell.py
index fae10f8..5ee355d 100755
--- a/sugar/shell/shell.py
+++ b/sugar/shell/shell.py
@@ -337,14 +337,28 @@ class ConsoleLogger(dbus.service.Object):
else:
self._window.show()
+ def _create_console(self, application):
+ sw = gtk.ScrolledWindow()
+ sw.set_policy(gtk.POLICY_AUTOMATIC,
+ gtk.POLICY_AUTOMATIC)
+
+ console = gtk.TextView()
+ console.set_wrap_mode(gtk.WRAP_WORD)
+
+ sw.add(console)
+ console.show()
+
+ self._nb.append_page(sw, gtk.Label(application))
+ sw.show()
+
+ return console
+
@dbus.service.method('com.redhat.Sugar.Logger')
def log(self, application, message):
if self._consoles.has_key(application):
console = self._consoles[application]
else:
- console = gtk.TextView()
- self._nb.append_page(console, gtk.Label(application))
- console.show()
+ console = self._create_console(application)
self._consoles[application] = console
buf = console.get_buffer()