コード例 #1
0
ファイル: pin.py プロジェクト: Croosi/vodafone-mobile-connect
        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()
コード例 #8
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()
コード例 #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()
コード例 #12
0
 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()
コード例 #14
0
 def on_device_selection_window_delete_event(self, widget, userdata):
     self.hide_ourselves()
     shutdown_core()
コード例 #15
0
ファイル: pin.py プロジェクト: Croosi/vodafone-mobile-connect
 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()
コード例 #17
0
 def on_cancel_button_clicked(self, widget):
     self.hide_ourselves()
     shutdown_core()