예제 #1
0
        def puk_req_eb(failure):
            failure.trap(ex.CMEErrorSIMPUKRequired)
            self.model.unregister_observer(self)
            self.view.hide()

            # need to arrange for AskPUK form to be called
            shutdown_core() # just for now when user restarts he'll need PUK
예제 #2
0
        def device_timeout_eb(failure):
            failure.trap(ex.ATTimeout)
            from vmc.gtk import dialogs
            from vmc.common.shutdown import shutdown_core

            message = _('Device not responding')
            details = _("""
Your device took more than 15 seconds to reply to my last command. Unplug it,
plug it again, and try in a moment.""")
            dialogs.open_warning_dialog(message, details)
            shutdown_core(delay=.2)
예제 #3
0
        def device_timeout_eb(failure):
            failure.trap(ex.ATTimeout)
            from PyQt4.QtGui import QMessageBox
            from vmc.common.shutdown import shutdown_core
            
            message = _('Device not responding')
            details = _("""
Your device took more than 15 seconds to reply to my last command. Unplug it,
plug it again, and try in a moment.""")
            QMessageBox.warning(None, message, details)  
            shutdown_core(delay=.2)
예제 #4
0
        def device_timeout_eb(failure):
            failure.trap(ex.ATTimeout)
            from vmc.gtk import dialogs
            from vmc.common.shutdown import shutdown_core

            message = _('Device not responding')
            details = _("""
Your device took more than 15 seconds to reply to my last command. Unplug it,
plug it again, and try in a moment.""")
            dialogs.open_warning_dialog(message, details)
            shutdown_core(delay=.2)
예제 #5
0
        def device_lacks_extractinfo_eb(failure):
            failure.trap(ex.DeviceLacksExtractInfo)
            from vmc.gtk import dialogs
            from vmc.common.shutdown import shutdown_core

            device = failure.value.args[0]
            info = dict(name=device.name, vmc=APP_LONG_NAME)
            message = _('Device setup not completed')
            details = _("""
Your device "%(name)s" is not properly registered with the kernel. %(vmc)s
needs at least two serial ports to communicate with your %(name)s.
The program includes a set of udev rules plus some binaries that make sure
that your device is always recognised properly. If you've installed from
source, then make sure to copy the relevant files in the contrib dir
""") % info
            dialogs.open_warning_dialog(message, details)

            shutdown_core(delay=.2)
예제 #6
0
        def device_lacks_extractinfo_eb(failure):
            failure.trap(ex.DeviceLacksExtractInfo)
            from vmc.gtk import dialogs
            from vmc.common.shutdown import shutdown_core

            device = failure.value.args[0]
            info = dict(name=device.name, vmc=APP_LONG_NAME)
            message = _('Device setup not completed')
            details = _("""
Your device "%(name)s" is not properly registered with the kernel. %(vmc)s
needs at least two serial ports to communicate with your %(name)s.
The program includes a set of udev rules plus some binaries that make sure
that your device is always recognised properly. If you've installed from
source, then make sure to copy the relevant files in the contrib dir
""") % info
            dialogs.open_warning_dialog(message, details)

            shutdown_core(delay=.2)
예제 #7
0
    def on_cancel_button_clicked(self, widget):
        # the user has pressed cancel, we're gonna close the program
        title = _('Shutting down')
        apb = dialogs.ActivityProgressBar(title, self)

        def default_eb():
            pass

        apb.set_default_cb(2, lambda: shutdown_core(delay=.3))
        apb.set_cancel_cb(default_eb)
        apb.init()
 def on_cancel_button_clicked(self, widget):
     # the user has pressed cancel, we're gonna close the program
     title = _('Shutting down')
     apb = dialogs.ActivityProgressBar(title, self)
     
     def default_eb():
         pass
     
     apb.set_default_cb(2, lambda: shutdown_core(delay=.3))
     apb.set_cancel_cb(default_eb)
     apb.init()
예제 #9
0
 def on_cancel_button_clicked(self, widget):
     self.hide_ourselves()
     shutdown_core()
예제 #10
0
 def on_device_selection_window_delete_event(self, widget, userdata):
     self.hide_ourselves()
     shutdown_core()
예제 #11
0
 def on_cancel_button_clicked(self, widget):
     self.hide_ourselves()
     if hasattr(self, 'startup') and self.startup:
         shutdown_core()
 def on_cancel_button_clicked(self, widget):
     self.hide_ourselves()
     if hasattr(self, 'startup') and self.startup:
         shutdown_core()
예제 #13
0
 def on_cancel_button_clicked(self, widget):
     shutdown_core()
 def on_device_selection_window_delete_event(self, widget, userdata):
     self.hide_ourselves()
     shutdown_core()
예제 #15
0
 def on_cancel_button_clicked(self, widget):
     self.view.hide()
     self.model.unregister_observer(self)
     shutdown_core()
예제 #16
0
 def on_cancel_button_clicked(self, widget):
     shutdown_core()
 def on_cancel_button_clicked(self, widget):
     self.hide_ourselves()
     shutdown_core()