예제 #1
0
	def updateAccountData(self):
		if not metrixCore.isLoggedIn():
			self.picPath = metrixDefaults.PLUGIN_DIR + "images/not-connected.png"
			self["username"].setText(_("Not connected!"))
		else:
			self.picPath = metrixDefaults.PLUGIN_DIR + "images/user.png"
			self["username"].setText(_(config.plugins.MetrixConnect.username.value))
		#self.UpdatePicture()
		self.ShowPicture()
예제 #2
0
	def updateAccountData(self):
		if not metrixCore.isLoggedIn():
			self.picPath = metrixDefaults.PLUGIN_DIR + "images/not-connected.png"
			self["username"].setText(_("Not connected!"))
		else:
			self.picPath = metrixDefaults.PLUGIN_DIR + "images/user.png"
			self["username"].setText(_(config.plugins.MetrixConnect.username.value))
		#self.UpdatePicture()
		self.ShowPicture()
예제 #3
0
def syncActions():
	syncinterval =1200
	while(1):
		if metrixCore.isLoggedIn():
			try:
				getActions()
				syncinterval = getInterval()
			except:
				metrixTools.log("Error getting interval")
		time.sleep(syncinterval)
예제 #4
0
def syncActions():
	syncinterval = 20 * 60
	while(1):
		if metrixCore.isLoggedIn():
			try:
				getActions()
				syncinterval = getInterval()
			except:
				metrixTools.log("Error getting interval")
		time.sleep(syncinterval)
예제 #5
0
def syncGeneral():
	while(1):
		if metrixCore.isLoggedIn():
			try:
				prepareInfoGeneral(global_session)
			except:
				traceback.print_exc()
			try:
				postBackup()
			except:
				traceback.print_exc()
		time.sleep(30*60)
예제 #6
0
def syncGeneral():
	while(1):
		if metrixCore.isLoggedIn():
			try:
				prepareInfoGeneral(global_session)
			except:
				traceback.print_exc()
			try:
				postBackup()
			except:
				traceback.print_exc()
		time.sleep(60*60)
예제 #7
0
def syncHourly():
	while(1):
		try:
			metrixWeatherUpdater.GetWeather()
		except Exception, e:
			metrixTools.log("Error downloading weather!",e)
			traceback.print_exc()
		if metrixCore.isLoggedIn():
			try:
				prepareInfo(global_session)
			except:
				traceback.print_exc()
			try:
				if config.plugins.MetrixCloudSync.SyncPackages.value:
					metrix_PackageTools.syncPackages()
			except:
				traceback.print_exc()
		time.sleep(60*60)
예제 #8
0
def syncHourly():
	while(1):
		try:
			metrixWeatherUpdater.GetWeather()
		except Exception, e:
			metrixTools.log("Error downloading weather!",e)
			traceback.print_exc()
		if metrixCore.isLoggedIn():
			try:
				prepareInfo(global_session)
			except:
				traceback.print_exc()
			try:
				if config.plugins.MetrixCloudSync.SyncPackages.value:
					metrix_PackageTools.syncPackages()
			except:
				traceback.print_exc()
		time.sleep(90*60)
예제 #9
0
	def __init__(self, session, args = None, index = 0):
		self.index = index
		Screen.__init__(self, session)
		self.session = session
		self["buttonGreen"] = Label()
		if metrixCore.isLoggedIn():
			self["buttonGreen"].setText(_("Publish to OpenStore"))
		
		list = []
		list.append(getConfigListEntry(_("Background transparency"), config.plugins.MyMetrix.Color.BackgroundTransparency))
		list.append(getConfigListEntry(_("Selection transparency"), config.plugins.MyMetrix.Color.SelectionTransparency))
		list.append(getConfigListEntry(_("Background text transparency"), config.plugins.MyMetrix.Color.BackgroundTextTransparency))
		
		list.append(getConfigListEntry(_("Selection"), config.plugins.MyMetrix.Color.Selection))
		list.append(getConfigListEntry(_("Progress bars"), config.plugins.MyMetrix.Color.ProgressBar))
		list.append(getConfigListEntry(_("Background"), config.plugins.MyMetrix.Color.Background))
		list.append(getConfigListEntry(_("Background 2"), config.plugins.MyMetrix.Color.Background2))
		list.append(getConfigListEntry(_("Foreground"), config.plugins.MyMetrix.Color.Foreground))
		list.append(getConfigListEntry(_("Background text"), config.plugins.MyMetrix.Color.BackgroundText))
		list.append(getConfigListEntry(_("Accent 1"), config.plugins.MyMetrix.Color.Accent1))
		list.append(getConfigListEntry(_("Accent 2"), config.plugins.MyMetrix.Color.Accent2))
		
		list.append(getConfigListEntry(_("Custom colors (r,g,b):"), ))
		list.append(getConfigListEntry(_("    Selection"), config.plugins.MyMetrix.Color.Selection_Custom))
		list.append(getConfigListEntry(_("    Background"), config.plugins.MyMetrix.Color.Background_Custom))
		list.append(getConfigListEntry(_("    Background 2"), config.plugins.MyMetrix.Color.Background2_Custom))
		list.append(getConfigListEntry(_("    Foreground"), config.plugins.MyMetrix.Color.Foreground_Custom))
		list.append(getConfigListEntry(_("    Background text"), config.plugins.MyMetrix.Color.BackgroundText_Custom))
		list.append(getConfigListEntry(_("    Accent 1"), config.plugins.MyMetrix.Color.Accent1_Custom))
		list.append(getConfigListEntry(_("    Accent 2"), config.plugins.MyMetrix.Color.Accent2_Custom))
		

		ConfigListScreen.__init__(self, list)
		
		self["actions"] = ActionMap(["OkCancelActions","DirectionActions", "InputActions", "ColorActions"], {
																											"left": self.keyLeft,
																											"down": self.keyDown,
																											"up": self.keyUp,
																											"right": self.keyRight,
																											"red": self.exit,
																											"green": self.openSubmitDesignWindow,
																											"yellow":  self.previewInfobar,
																											"blue":  self.previewSecondInfobar,
																											 "cancel": self.save}, -1)
예제 #10
0
	def connect(self):
		if not metrixCore.isLoggedIn():
			self.session.open(store_ConnectDevice.OpenScreen)
		else:
			self.session.open(store_DisconnectDevice.OpenScreen)
		self.updateAccountData()
예제 #11
0
	def openSubmitDesignWindow(self):
		if metrixCore.isLoggedIn():
			self.session.open(metrixSubmitDesign.MyMetrixSubmitDesignWindow)
예제 #12
0
 def connect(self):
     if not metrixCore.isLoggedIn():
         self.session.open(store_ConnectDevice.OpenScreen)
     else:
         self.session.open(store_DisconnectDevice.OpenScreen)
     self.updateAccountData()