Drop session.py

SessionManager has been moved to shell, and the other class has
nothing inside.
master
Manuel Quiñones 11 years ago committed by Daniel Narvaez
parent 9a68351485
commit fa7a765f4e

@ -15,7 +15,6 @@ sugar_PYTHON = \
mime.py \ mime.py \
network.py \ network.py \
profile.py \ profile.py \
session.py \
util.py util.py
XDG_MIME_SOURCES = \ XDG_MIME_SOURCES = \

@ -81,7 +81,6 @@ from sugar3.graphics.window import Window
from sugar3.graphics.alert import Alert from sugar3.graphics.alert import Alert
from sugar3.graphics.icon import Icon from sugar3.graphics.icon import Icon
from sugar3.datastore import datastore from sugar3.datastore import datastore
from sugar3.session import XSMPClient
from gi.repository import SugarExt from gi.repository import SugarExt
_ = lambda msg: gettext.dgettext('sugar-toolkit', msg) _ = lambda msg: gettext.dgettext('sugar-toolkit', msg)
@ -109,7 +108,7 @@ class _ActivitySession(GObject.GObject):
def __init__(self): def __init__(self):
GObject.GObject.__init__(self) GObject.GObject.__init__(self)
self._xsmp_client = XSMPClient() self._xsmp_client = SugarExt.ClientXSMP()
self._xsmp_client.connect('quit-requested', self._xsmp_client.connect('quit-requested',
self.__sm_quit_requested_cb) self.__sm_quit_requested_cb)
self._xsmp_client.connect('quit', self.__sm_quit_cb) self._xsmp_client.connect('quit', self.__sm_quit_cb)

@ -1,52 +0,0 @@
# Copyright (C) 2008, Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
"""
UNSTABLE. Used only internally by jarabe.
"""
import os
from gi.repository import SugarExt
class XSMPClient(SugarExt.ClientXSMP):
pass
class SessionManager(object):
def __init__(self):
address = SugarExt.xsmp_init()
os.environ['SESSION_MANAGER'] = address
SugarExt.xsmp_run()
self.session = SugarExt.Session.create_global()
def start(self):
self.session.start()
self.session.connect('shutdown_completed',
self.__shutdown_completed_cb)
def initiate_shutdown(self):
self.session.initiate_shutdown()
def shutdown_completed(self):
SugarExt.xsmp_shutdown()
def __shutdown_completed_cb(self, session):
self.shutdown_completed()
Loading…
Cancel
Save