Example #1
0
    def _btn_shutdown_pressed(self, event=None, button=None):
        shutdown_dialog = KanoDialog(
            title_text='Shutting down..',
            description_text='Are you sure you want to shutdown your Kano now?',
            button_dict=[{
                'label': _('Cancel').upper(),
                'color': 'green',
                'return_value': False
            }, {
                'label': _('SHUTDOWN').upper(),
                'color': 'orange',
                'return_value': True
            }])
        shutdown_dialog.dialog.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
        poweroff = shutdown_dialog.run()

        if poweroff:
            LightDM.shutdown()
Example #2
0
    def _btn_shutdown_pressed(self, event=None, button=None):
        shutdown_dialog = KanoDialog(title_text='Shutting down..',
                                     description_text='Are you sure you want to shutdown your Kano now?',
                                     button_dict=[
                                         {
                                             'label': _('Cancel').upper(),
                                             'color': 'green',
                                             'return_value': False
                                         },
                                         {
                                             'label': _('SHUTDOWN').upper(),
                                             'color': 'orange',
                                             'return_value': True
                                         }
                                     ])
        shutdown_dialog.dialog.set_position(Gtk.WindowPosition.CENTER_ALWAYS)
        poweroff = shutdown_dialog.run()

        if poweroff:
            LightDM.shutdown()
Example #3
0
 def shutdown(self):
     return LightDM.shutdown()