Ejemplo n.º 1
0
	def checkNetworkState(self):
		self['tl_red'].hide()
		self['tl_yellow'].hide()
		self['tl_green'].hide()
		self['tl_off'].hide()
		self.trafficLight = feedsstatuscheck.getFeedsBool()
		if self.trafficLight in feedsstatuscheck.feed_status_msgs:
			status_text = feedsstatuscheck.feed_status_msgs[self.trafficLight]
		else:
			status_text = _('Feeds status: Unexpected')
		if self.trafficLight:
			self['feedStatusMSG'].setText(status_text)
		if self.trafficLight == 'stable':
			self['tl_green'].show()
		elif self.trafficLight == 'unstable':
			self['tl_red'].show()
		elif self.trafficLight == 'updating':
			self['tl_yellow'].show()
		else:
			self['tl_off'].show()
		if kernelMismatch():
			self.session.openWithCallback(self.close, MessageBox, _("The Linux kernel has changed, an update is not permitted. \nInstall latest image using USB stick or Image Manager."), type=MessageBox.TYPE_INFO, timeout=30, close_on_any_key=True)
			return
		if (getImageType() != 'release' and self.trafficLight != 'unknown') or (getImageType() == 'release' and self.trafficLight not in ('stable', 'unstable')):
			self.session.openWithCallback(self.close, MessageBox, feedsstatuscheck.getFeedsErrorMessage(), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
		else:
			if getImageType() != 'release' or (config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value) or config.softwareupdate.updateisunstable.value == '0':
				message = statusMessage()
				if message:
					message += "\nDo you want to continue?"
					self.session.openWithCallback(self.statusMessageCallback, MessageBox, message, type=MessageBox.TYPE_YESNO, default=False)
				else:
					self.startCheck()
			else:
				self.session.openWithCallback(self.close, MessageBox, _("Sorry the feeds seem to be in an unstable state, if you wish to use them please enable 'Allow unstable (experimental) updates' in \"Software update settings\"."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
Ejemplo n.º 2
0
	def checkNetworkState(self):
		self['tl_red'].hide()
		self['tl_yellow'].hide()
		self['tl_green'].hide()
		self['tl_off'].hide()
		self.trafficLight = feedsstatuscheck.getFeedsBool() 
		if self.trafficLight in feedsstatuscheck.feed_status_msgs:
			status_text = feedsstatuscheck.feed_status_msgs[self.trafficLight]
		else:
			status_text = _('Feeds status: Unexpected')
		if self.trafficLight:
			self['feedStatusMSG'].setText(status_text)
		if self.trafficLight == 'stable':
			self['tl_green'].show()
		elif self.trafficLight == 'unstable':
			self['tl_red'].show()
		elif self.trafficLight == 'updating':
			self['tl_yellow'].show()
		else:
			self['tl_off'].show()
		if kernelMismatch():
			self.session.openWithCallback(self.close, MessageBox, _("The Linux kernel has changed, an update is not permitted. \nInstall latest image using USB stick or Image Manager."), type=MessageBox.TYPE_INFO, timeout=30, close_on_any_key=True)
			return
		if (getImageType() != 'release' and self.trafficLight != 'unknown') or (getImageType() == 'release' and self.trafficLight not in ('stable', 'unstable')):
			self.session.openWithCallback(self.close, MessageBox, feedsstatuscheck.getFeedsErrorMessage(), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
		else:
			if getImageType() != 'release' or (config.softwareupdate.updateisunstable.value == '1' and config.softwareupdate.updatebeta.value) or config.softwareupdate.updateisunstable.value == '0':
				self.startCheck()
			else:
				self.session.openWithCallback(self.close, MessageBox, _("Sorry the feeds seem to be in an unstable state, if you wish to use them please enable 'Allow unstable (experimental) updates' in \"Software update settings\"."), type=MessageBox.TYPE_INFO, timeout=10, close_on_any_key=True)
Ejemplo n.º 3
0
 def download(self):
     config.misc.pluginbrowser.po.value = True
     if not (feedsstatuscheck.adapterAvailable()
             and feedsstatuscheck.NetworkUp()):
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("Your %s %s has no %s access, please check your network settings and make sure you have network cable connected and try again."
               ) % (getMachineBrand(), getMachineName(),
                    feedsstatuscheck.adapterAvailable() and 'internet'
                    or 'network'),
             type=MessageBox.TYPE_INFO,
             timeout=30,
             close_on_any_key=True)
         return
     if kernelMismatch():
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("The Linux kernel has changed, plugins are not compatible. \nInstall latest image using USB stick or Image Manager."
               ),
             type=MessageBox.TYPE_INFO,
             timeout=30,
             close_on_any_key=True)
         return
     self.session.openWithCallback(
         self.PluginDownloadBrowserClosed,
         PluginDownloadBrowser,
         PluginDownloadBrowser.DOWNLOAD,
         self.firsttime,
         self.menu_path,
     )
     self.firsttime = False
Ejemplo n.º 4
0
	def download(self):
		if not (feedsstatuscheck.adapterAvailable() and feedsstatuscheck.NetworkUp()):
			self.session.openWithCallback(self.close, MessageBox,  _("Your %s %s has no %s access, please check your network settings and make sure you have network cable connected and try again.") % (getMachineBrand(), getMachineName(), feedsstatuscheck.adapterAvailable() and 'internet' or 'network'), type=MessageBox.TYPE_INFO, timeout=30, close_on_any_key=True)
			return
		if kernelMismatch():
			self.session.openWithCallback(self.close, MessageBox, _("The Linux kernel has changed, plugins are not compatible. \nInstall latest image using USB stick or Image Manager."), type=MessageBox.TYPE_INFO, timeout=30, close_on_any_key=True)
			return
		self.session.openWithCallback(self.PluginDownloadBrowserClosed, PluginDownloadBrowser, PluginDownloadBrowser.DOWNLOAD, self.firsttime, self.menu_path,)
		self.firsttime = False
Ejemplo n.º 5
0
 def download(self):
     if kernelMismatch():
         self.session.openWithCallback(
             self.close,
             MessageBox,
             _("The Linux kernel has changed, plugins are not compatible. \nInstall latest image using USB stick or Image Manager."
               ),
             type=MessageBox.TYPE_INFO,
             timeout=30,
             close_on_any_key=True)
         return
     self.session.openWithCallback(self.PluginDownloadBrowserClosed,
                                   PluginDownloadBrowser, self.menu_path,
                                   PluginDownloadBrowser.DOWNLOAD,
                                   self.firsttime)
     self.firsttime = False
Ejemplo n.º 6
0
	def download(self):
		if kernelMismatch():
			self.session.openWithCallback(self.close, MessageBox, _("The Linux kernel has changed, plugins are not compatible. \nInstall latest image using USB stick or Image Manager."), type=MessageBox.TYPE_INFO, timeout=30, close_on_any_key=True)
			return
		self.session.openWithCallback(self.PluginDownloadBrowserClosed, PluginDownloadBrowser, self.menu_path, PluginDownloadBrowser.DOWNLOAD, self.firsttime)
		self.firsttime = False