Do not shutdown on power button.

This commit is contained in:
Marco Pesenti Gritti 2007-07-15 02:14:00 +02:00
parent 1d2f84d0af
commit 66ea9997cb
2 changed files with 1 additions and 16 deletions

1
NEWS
View File

@ -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)

View File

@ -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: