Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-07-15 00:14:00 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-07-15 00:14:00 (GMT)
commit66ea9997cb46d0a42db3a6330e20db89b4421d79 (patch)
treee34d9394b8173f896db80cc81989c5b11e4078a0
parent1d2f84d0af4a88a0abb2a66dbabd56fe55e8f123 (diff)
Do not shutdown on power button.
-rw-r--r--NEWS1
-rw-r--r--shell/view/keyhandler.py16
2 files changed, 1 insertions, 16 deletions
diff --git a/NEWS b/NEWS
index 56a8fe0..4a58dec 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+* #2185 Do not shutdown on power button, ohm does it now. (marco)
* #1888 Choose the correct mime type when adding text from Write to the
clipboard. (tomeu)
* #2149, #2150: fixes for the clipboard palette. (tomeu)
diff --git a/shell/view/keyhandler.py b/shell/view/keyhandler.py
index a3dd27f..e639cab 100644
--- a/shell/view/keyhandler.py
+++ b/shell/view/keyhandler.py
@@ -22,7 +22,6 @@ import dbus
import gobject
import gtk
-from sugar import env
from hardware import hardwaremanager
from model.shellmodel import ShellModel
from sugar._sugarext import KeyGrabber
@@ -49,8 +48,6 @@ _actions_table = {
'0x93' : 'frame',
'<alt>o' : 'overlay',
'0xE0' : 'overlay',
- '0x7C' : 'shutdown',
- '<alt><shift>s' : 'shutdown',
'0xEB' : 'rotate',
'<alt>r' : 'rotate',
'0xEC' : 'keyboard_brightness',
@@ -148,19 +145,6 @@ class KeyHandler(object):
def handle_overlay(self):
self._shell.toggle_chat_visibility()
- def handle_shutdown(self):
- model = self._shell.get_model()
- model.props.state = ShellModel.STATE_SHUTDOWN
-
- if env.is_emulator():
- return
-
- bus = dbus.SystemBus()
- proxy = bus.get_object('org.freedesktop.Hal',
- '/org/freedesktop/Hal/devices/computer')
- mgr = dbus.Interface(proxy, 'org.freedesktop.Hal.Device.SystemPowerManagement')
- mgr.Shutdown()
-
def handle_keyboard_brightness(self):
hw_manager = hardwaremanager.get_manager()
if hw_manager: