Beispiel #1
0
 def show_about(self, widget):
     sw_version, fw_version, os_version = get_versions()
     if fw_version is None:
         fw_version = "No connection to PiJuice"
     message = "\n".join([
         "Software version: %s" % sw_version,
         "Firmware version: %s" % fw_version,
         "OS version: %s" % os_version,
     ])
     dialog = gtk.MessageDialog(
         None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
         gtk.MESSAGE_INFO, gtk.BUTTONS_OK, message)
     dialog.set_title("About")
     dialog.run()
     dialog.destroy()
Beispiel #2
0
 def show_about(self, widget):
     widget.set_sensitive(False)
     sw_version, fw_version, os_version = get_versions()
     if fw_version is None:
         fw_version = "No connection to PiJuice"
     message = "\n".join([
         "Software version: %s" % sw_version,
         "Firmware version: %s" % fw_version,
         "OS version: %s" % os_version,
     ])
     dialog = gtk.MessageDialog(None, gtk.DialogFlags.MODAL,
                                gtk.MessageType.INFO, gtk.ButtonsType.OK,
                                message)
     dialog.set_title("About")
     dialog.run()
     dialog.destroy()
     widget.set_sensitive(True)
Beispiel #3
0
 def show_about(self, widget):
     widget.set_sensitive(False)
     sw_version, fw_version, os_version = get_versions()
     if fw_version is None:
         fw_version = "No connection to PiJuice"
     message = "\n".join([
         "Software version: %s" % sw_version,
         "Firmware version: %s" % fw_version,
         "OS version: %s" % os_version,
     ])
     dialog = gtk.MessageDialog(
         None,
         gtk.DialogFlags.MODAL,
         gtk.MessageType.INFO,
         gtk.ButtonsType.OK,
         message
     )
     dialog.set_title("About")
     dialog.run()
     dialog.destroy()
     widget.set_sensitive(True)
Beispiel #4
0
 def show_about(self, widget):
     widget.set_sensitive(False)
     sw_version, fw_version, os_version = get_versions()
     if fw_version is None:
         fw_version = "No connection to PiJuice"
     message = "\n".join([
         "Software version: %s" % sw_version,
         "Firmware version: %s" % fw_version,
         "OS version: %s" % os_version,
     ])
     if py3 == False:
         # Python 2
         dialog = gtk.MessageDialog(
             None, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
             gtk.MESSAGE_INFO, gtk.BUTTONS_OK, message)
     else:
         # Python 3
         dialog = gtk.MessageDialog(None, gtk.DialogFlags.MODAL,
                                    gtk.MessageType.INFO,
                                    gtk.ButtonsType.OK, message)
     dialog.set_title("About")
     dialog.run()
     dialog.destroy()
     widget.set_sensitive(True)