Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2762/plugins
Modified Files:
shutdown.py
Log Message:
use notifier shutdown function
Index: shutdown.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugins/shutdown.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** shutdown.py 16 Jun 2005 18:26:48 -0000 1.12
--- shutdown.py 4 Jul 2005 15:18:54 -0000 1.13
***************
*** 31,41 ****
#
-----------------------------------------------------------------------------
# freevo imports
import config
from gui.windows import ConfirmBox
from mainmenu import MainMenuItem
from plugin import MainMenuPlugin
- from cleanup import shutdown
--- 31,48 ----
#
-----------------------------------------------------------------------------
+ # python imports
+ import sys
+
+ # kaa imports
+ import kaa.notifier
+
# freevo imports
import config
+ import gui
+ import gui.widgets
from gui.windows import ConfirmBox
from mainmenu import MainMenuItem
from plugin import MainMenuPlugin
***************
*** 96,104 ****
def shutdown_freevo(self, arg=None, menuw=None):
"""
shutdown freevo, don't shutdown the system
"""
! shutdown(menuw=menuw, argshutdown=False, argrestart=False)
--- 103,124 ----
+ def show_gui_message(self, text):
+ """
+ Clear the screen and show the message.
+ """
+ msg = gui.widgets.Text(text, (0, 0), (gui.width, gui.height),
+ gui.theme.font('default'), align_h='center',
+ align_v='center')
+ gui.display.clear()
+ gui.display.add_child(msg)
+ gui.display.update()
+
+
def shutdown_freevo(self, arg=None, menuw=None):
"""
shutdown freevo, don't shutdown the system
"""
! self.show_gui_message(_('shutting down...'))
! kaa.notifier.addTimer(1000, sys.exit, 0)
***************
*** 107,111 ****
shutdown the complete system
"""
! shutdown(menuw=menuw, argshutdown=True, argrestart=False)
--- 127,132 ----
shutdown the complete system
"""
! self.show_gui_message(_('shutting down system...'))
! kaa.notifier.addTimer(1000, os.system, config.SHUTDOWN_SYS_CMD)
***************
*** 114,118 ****
restart the complete system
"""
! shutdown(menuw=menuw, argshutdown=False, argrestart=True)
--- 135,140 ----
restart the complete system
"""
! self.show_gui_message(_('restarting system...'))
! kaa.notifier.addTimer(1000, os.system, config.RESTART_SYS_CMD)
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog