Beispiel #1
0
	def save(self):
		from Components.PluginComponent import plugins
		plugins.reloadPlugins()
		for i in self["config"].list:
			i[1].save()
		configfile.save()
		self.mbox = self.session.open(MessageBox,(_("configuration is saved")), MessageBox.TYPE_INFO, timeout = 4 )
Beispiel #2
0
 def Execute(self):
     if config.plugins.ImageManager.mode.value == 'mboot':
         devBoot = config.plugins.ImageManager.devsFrom.value[config.plugins.ImageManager.devsFrom.value.find('/dev/'):]
         self.reBootAll(devBoot)
     elif config.plugins.ImageManager.mode.value == 'backup':
         self.makeBackup = BIN + 'backup.sh'
         self.makeBackup += ' %s %s %s %s %s' % (config.plugins.ImageManager.devsFrom.value, config.plugins.ImageManager.devsToBackup.value,
          config.plugins.ImageManager.archivetype.value, config.plugins.ImageManager.imagetype.value, config.plugins.ImageManager.emu.value)
         self.session.open(IM_Console, _('Backup Creator'), ['%s' % self.makeBackup])
     elif config.plugins.ImageManager.mode.value == 'copy':
         self.copying()  
     elif config.plugins.ImageManager.mode.value == 'install':
         self.session.openWithCallback(self.createConfigList, Install_IM)
     elif config.plugins.ImageManager.mode.value == 'rename':
         renamepart = config.plugins.ImageManager.devsToCopy.value[config.plugins.ImageManager.devsToCopy.value.find('/dev/'):]
         popen("umount -l %s" % (renamepart))
         popen("tune2fs -L %s %s" % (config.plugins.ImageManager.newName.value, renamepart))
         Refresh('job')
         newname = _('Partition %s\nrenamed in %s') % (renamepart, config.plugins.ImageManager.newName.value)
         self.session.open(MessageBox, newname, type=MessageBox.TYPE_INFO, timeout=5)
         self.createConfigList()
     elif config.plugins.ImageManager.mode.value == 'cfgmenu':
         config.plugins.ImageManager.startmode.save()
         config.plugins.ImageManager.sparkrebootext.save()
         config.plugins.ImageManager.sparkrebootshutdown.save()
         config.plugins.ImageManager.showext.save()
         configfile.save()
         self.session.open(MessageBox, _('Configuration is saved'), MessageBox.TYPE_INFO, timeout=4)
         from Components.PluginComponent import plugins
         plugins.reloadPlugins()
     else:
         self.close()
Beispiel #3
0
	def save(self):
		config.plugins.pecr.keyname.save()
		configfile.save()
		keyfile = open(resolveFilename(SCOPE_PLUGINS, "Extensions/CamRestart/keymap.xml"), "w")
		keyfile.write('<keymap>\n\t<map context="GlobalActions">\n\t\t<key id="%s" mapto="showCamRestart" flags="l" />\n\t</map>\n</keymap>' % config.plugins.pecr.keyname.value)
		keyfile.close()
		self.mbox = self.session.open(MessageBox, (_("Saved")), MessageBox.TYPE_INFO, timeout=3)
		plugins.reloadPlugins()
Beispiel #4
0
 def save(self):
     from Components.PluginComponent import plugins
     plugins.reloadPlugins()
     for i in self["config"].list:
         i[1].save()
     configfile.save()
     self.mbox = self.session.open(MessageBox,
                                   (_("configuration is saved")),
                                   MessageBox.TYPE_INFO,
                                   timeout=4)
Beispiel #5
0
 def save(self):
     what = ''
     if self.softcams.value != self.softcam.current():
         what = 's'
     if what:
         self.restart(what)
     else:
         from Components.PluginComponent import plugins
         plugins.reloadPlugins()
         self.close()
Beispiel #6
0
 def save(self):
     what = ''
     if self.softcams.value != self.softcam.current():
         what = 's'
     if what:
         self.restart(what)
     else:
         from Components.PluginComponent import plugins
         plugins.reloadPlugins()
         self.close()
Beispiel #7
0
    def save(self):
        what = ""
        if self.cardservers.value != self.cardserver.current():
            what = "s"
        if what:
            self.restart(what)
        else:
            from Components.PluginComponent import plugins

            plugins.reloadPlugins()
            self.close()
	def save(self):
		what = ''
		if hasattr(self, 'cardservers') and (self.cardservers.value != self.cardserver.current()):
			what = 'sc'
		elif self.softcams.value != self.softcam.current():
			what = 's'
		if what:
			self.restart(what)
		else:
			from Components.PluginComponent import plugins
			plugins.reloadPlugins()
			config.misc.softcam_setup.extension_menu.save()
			self.close()
Beispiel #9
0
 def save(self):
     what = ''
     if hasattr(self, 'cardservers') and (self.cardservers.value !=
                                          self.cardserver.current()):
         what = 'sc'
     elif self.softcams.value != self.softcam.current():
         what = 's'
     if what:
         self.restart(what)
     else:
         from Components.PluginComponent import plugins
         plugins.reloadPlugins()
         config.misc.softcam_setup.extension_menu.save()
         self.close()
Beispiel #10
0
	def save(self):
		what = ''
		if (self.softcamlistsecondary.value != self.softcam2.current()) and (self.softcamlistprimary.value != self.softcam1.current()):
			what = 'sc'
		elif (self.softcamlistsecondary.value != self.softcam2.current()):
			what = 'c'
		elif (self.softcamlistprimary.value != self.softcam1.current()):
			what = 's'
		else:
			what = ''
		if what:
			self.restart(what)
		else:
			from Components.PluginComponent import plugins
			plugins.reloadPlugins()
			config.misc.softcam_startup.extension_menu.save()
			self.close()
Beispiel #11
0
 def save(self):
     what = ''
     if (self.softcamlistsecondary.value != self.softcam2.current()) and (
             self.softcamlistprimary.value != self.softcam1.current()):
         what = 'sc'
     elif (self.softcamlistsecondary.value != self.softcam2.current()):
         what = 'c'
     elif (self.softcamlistprimary.value != self.softcam1.current()):
         what = 's'
     else:
         what = ''
     if what:
         self.restart(what)
     else:
         from Components.PluginComponent import plugins
         plugins.reloadPlugins()
         config.misc.softcam_startup.extension_menu.save()
         self.close()
Beispiel #12
0
 def save(self):
     config.plugins.qer.keyname.save()
     config.plugins.qer.time.save()
     configfile.save()
     with open(
             resolveFilename(SCOPE_PLUGINS,
                             "Extensions/QuickEmuRestart/keymap.xml"),
             "w") as keyfile:
         keyfile.write(
             '<keymap>\n\t<map context="GlobalActions">\n\t\t<key id="%s" mapto="showEmuRestart" flags="m" />\n\t</map>\n</keymap>'
             % config.plugins.qer.keyname.value)
         keyfile.close()
     self.mbox = self.session.open(MessageBox,
                                   (_("configuration is saved")),
                                   MessageBox.TYPE_INFO,
                                   timeout=4)
     if self.TrueImage():
         from Components.PluginComponent import plugins
         plugins.reloadPlugins()