diff --git a/services/console/console.py b/services/console/console.py index 1b2a371a..2a19e9e1 100755 --- a/services/console/console.py +++ b/services/console/console.py @@ -80,8 +80,12 @@ class Service(dbus.service.Object): self._console = Console() @dbus.service.method(CONSOLE_IFACE) - def show(self): - self._console.window.present() + def toggle_visibility(self): + window = self._console.window + if not window.props.visible: + window.present() + else: + window.hide() bus = dbus.SessionBus() name = dbus.service.BusName(CONSOLE_BUS, bus) diff --git a/shell/view/Shell.py b/shell/view/Shell.py index 8a3136cb..f687a2bc 100644 --- a/shell/view/Shell.py +++ b/shell/view/Shell.py @@ -138,7 +138,7 @@ class Shell(gobject.GObject): elif key == 'F8': self._hw_manager.set_display_mode(HardwareManager.B_AND_W_MODE) elif key == 'equal' or key == '0': - gobject.idle_add(self._show_console_cb) + gobject.idle_add(self._toggle_console_visibility_cb) elif key == 'f': self._frame.notify_key_press() elif key == 'o': @@ -158,12 +158,12 @@ class Shell(gobject.GObject): box = self._home_window.get_home_box() box.grab_and_rotate() - def _show_console_cb(self): + def _toggle_console_visibility_cb(self): bus = dbus.SessionBus() proxy = bus.get_object('org.laptop.sugar.Console', '/org/laptop/sugar/Console') - mgr = dbus.Interface(proxy, 'org.laptop.sugar.Console') - mgr.show() + console = dbus.Interface(proxy, 'org.laptop.sugar.Console') + console.toggle_visibility() def _shutdown(self): bus = dbus.SystemBus() diff --git a/tools/build-snapshot.sh b/tools/build-snapshot.sh index 5370f9de..0f8dd815 100755 --- a/tools/build-snapshot.sh +++ b/tools/build-snapshot.sh @@ -1,6 +1,6 @@ VERSION=0.63 DATE=`date +%Y%m%d` -RELEASE=2.6 +RELEASE=2.7 TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2 rm sugar-$VERSION.tar.bz2