Beispiel #1
0
 def save(self):
     "Set the setting values to the display, save the new values."
     for menuEntity in self.repository.menuEntities:
         if menuEntity in self.repository.preferences:
             menuEntity.setToDisplay()
     self.setInsetToDisplay()
     settings.writeSettings(self.repository)
Beispiel #2
0
 def save(self):
     "Set the setting values to the display, save the new values."
     for menuEntity in self.repository.menuEntities:
         if menuEntity in self.repository.archive:
             menuEntity.setToDisplay()
     self.setInsetToDisplay()
     settings.writeSettings(self.repository)
Beispiel #3
0
def forwardDeclartions():
	"Force some functions to be dynamic"
	mockRepository = settings.Repository()
	settings.addListsToRepository(None, None, mockRepository)
	settings.cancelRepository(mockRepository)
	settings.getDisplayedDialogFromConstructor(mockRepository)
	settings.getProfileBaseName(mockRepository)
	settings.getReadRepository(mockRepository)
	settings.readSettingsFromText(mockRepository, '')
	settings.saveRepository(mockRepository)
	settings.startMainLoopFromConstructor(mockRepository)
	settings.writeSettings(mockRepository)
	settings.writeSettingsPrintMessage(mockRepository)
	settings.StringSetting().getFromValue('', mockRepository, '')
	settings.StringSetting().getFromValueOnly('', mockRepository, '')
	settings.StringSetting().getFromValueOnlyAddToRepository('', mockRepository, '')
	settings.FileNameInput().getFromFileName([('','')], '', mockRepository, '')
	settings.GridVertical(0, 0).setExecutablesRepository(mockRepository)
	settings.HelpPage().setToNameRepository('', mockRepository)
	settings.HelpPage().getFromNameAfterWWW('', '', mockRepository)
	settings.HelpPage().getFromNameAfterHTTP('', '', mockRepository)
	settings.HelpPage().getFromNameSubName('', mockRepository, '')
	settings.HelpPageRepository.__init__(settings.HelpPageRepository(), mockRepository)
	settings.LabelDisplay().getFromName('', mockRepository)
	settings.LabelSeparator().getFromRepository(mockRepository)
	settings.MenuButtonDisplay().getFromName('', mockRepository)
	settings.Radio().getFromRadio(None, '', mockRepository, False)
	settings.WindowPosition().getFromValue(mockRepository, '')
	settings.RepositoryDialog(mockRepository, None).addButtons(mockRepository, None)
	settings.RepositoryDialog.__init__(RepositoryDialog(), mockRepository, None)
	gcodec.Plugins.add(settings.Plugin())
	Tkinter.Button.__init__(None, {})
	def clickRadio( self ):
		"Workaround for Tkinter bug, invoke and set the value when clicked."
		if not self.activate:
			return
		self.menuButtonDisplay.radioVar.set( self.valueName )
		pluginModule = getCraftTypePluginModule()
		profilePluginSettings = settings.getReadRepository( pluginModule.getNewRepository() )
		profilePluginSettings.profileListbox.value = self.name
		settings.writeSettings( profilePluginSettings )
		updateProfileSaveListeners()
Beispiel #5
0
 def destroyAllDialogWindows(self):
     "Destroy all the dialog windows."
     settings.writeSettings(self.repository)
     return
     for menuEntity in self.repository.menuEntities:
         lowerName = menuEntity.name.lower()
         if lowerName in settings.globalRepositoryDialogListTable:
             globalRepositoryDialogValues = settings.globalRepositoryDialogListTable[lowerName]
             for globalRepositoryDialogValue in globalRepositoryDialogValues:
                 settings.quitWindow(globalRepositoryDialogValue.root)
Beispiel #6
0
	def destroyAllDialogWindows(self):
		'Destroy all the dialog windows.'
		settings.writeSettings(self.repository)
		return
		for menuEntity in self.repository.menuEntities:
			lowerName = menuEntity.name.lower()
			if lowerName in settings.globalRepositoryDialogListTable:
				globalRepositoryDialogValues = settings.globalRepositoryDialogListTable[ lowerName ]
				for globalRepositoryDialogValue in globalRepositoryDialogValues:
					settings.quitWindow( globalRepositoryDialogValue.root )
	def clickRadio( self ):
		"Workaround for Tkinter bug, invoke and set the value when clicked."
		if not self.activate:
			return
		self.menuButtonDisplay.radioVar.set( self.valueName )
		profileSettings = getReadProfileRepository()
		plugins = profileSettings.craftRadios
		for plugin in plugins:
			plugin.value = ( plugin.name == self.name )
		settings.writeSettings( profileSettings )
		updateProfileSaveListeners()
Beispiel #8
0
 def clickRadio(self):
     "Workaround for Tkinter bug, invoke and set the value when clicked."
     if not self.activate:
         return
     self.menuButtonDisplay.radioVar.set(self.valueName)
     profileSettings = getReadProfileRepository()
     plugins = profileSettings.craftRadios
     for plugin in plugins:
         plugin.value = (plugin.name == self.name)
     settings.writeSettings(profileSettings)
     updateProfileSaveListeners()
Beispiel #9
0
 def clickRadio(self):
     "Workaround for Tkinter bug, invoke and set the value when clicked."
     if not self.activate:
         return
     self.menuButtonDisplay.radioVar.set(self.valueName)
     pluginModule = getCraftTypePluginModule()
     profilePluginSettings = settings.getReadRepository(
         pluginModule.getNewRepository())
     profilePluginSettings.profileListbox.value = self.name
     settings.writeSettings(profilePluginSettings)
     updateProfileSaveListeners()
	def clickRadio(self):
		"Workaround for Tkinter bug, invoke and set the value when clicked."
		if not self.activate:
			return
		self.radioVar.set( self.profileJoinName )
		pluginModule = skeinforge_profile.getCraftTypePluginModule( self.profilePluginFileName )
		profilePluginSettings = settings.getReadRepository( pluginModule.getNewRepository() )
		profilePluginSettings.profileListbox.value = self.name
		settings.writeSettings( profilePluginSettings )
		profileSettings = skeinforge_profile.getReadProfileRepository()
		plugins = profileSettings.craftRadios
		for plugin in plugins:
			plugin.value = ( plugin.name == self.profilePluginFileName )
		settings.writeSettings( profileSettings )
		skeinforge_profile.updateProfileSaveListeners()
Beispiel #11
0
	def moveViewpointGivenCoordinates( self, moveCoordinate, shift, startCoordinate ):
		"Move the viewpoint given the move coordinates."
		if abs( startCoordinate - moveCoordinate ) < 3:
			startCoordinate = None
			self.canvas.delete('mouse_item')
			return
		latitudeLongitude = LatitudeLongitude( startCoordinate, moveCoordinate, self.window, shift )
		self.repository.viewpointLatitude.value = latitudeLongitude.latitude
		self.repository.viewpointLatitude.setStateToValue()
		self.repository.viewpointLongitude.value = latitudeLongitude.longitude
		self.repository.viewpointLongitude.setStateToValue()
		startCoordinate = None
		settings.writeSettings(self.repository)
		self.window.update()
		self.destroyEverything()
Beispiel #12
0
	def clickRadio(self):
		"Workaround for Tkinter bug, invoke and set the value when clicked."
		if not self.activate:
			return
		self.radioVar.set( self.profileJoinName )
		pluginModule = skeinforge_profile.getCraftTypePluginModule( self.profilePluginFileName )
		profilePluginSettings = settings.getReadRepository( pluginModule.getNewRepository() )
		profilePluginSettings.profileListbox.value = self.name
		settings.writeSettings( profilePluginSettings )
		profileSettings = skeinforge_profile.getReadProfileRepository()
		plugins = profileSettings.craftRadios
		for plugin in plugins:
			plugin.value = ( plugin.name == self.profilePluginFileName )
		settings.writeSettings( profileSettings )
		skeinforge_profile.updateProfileSaveListeners()
Beispiel #13
0
 def setToDisplaySave(self, event=None):
     "Set the setting values to the display, save the new values."
     for menuEntity in self.menuEntities:
         if menuEntity in self.preferences:
             menuEntity.setToDisplay()
     settings.writeSettings(self)
Beispiel #14
0
 def setToDisplaySave(self, event=None):
     "Set the setting values to the display, save the new values."
     for menuEntity in self.menuEntities:
         if menuEntity in self.archive:
             menuEntity.setToDisplay()
     settings.writeSettings(self)
Beispiel #15
0
	def save(self):
		'Set the setting values to the display, save the new values.'
		for menuEntity in self.repository.menuEntities:
			if menuEntity in self.repository.preferences:
				menuEntity.setToDisplay()
		settings.writeSettings(self.repository)
Beispiel #16
0
	def setToDisplaySave(self, event=None):
		'Set the setting values to the display, save the new values.'
		for menuEntity in self.menuEntities:
			if menuEntity in self.preferences:
				menuEntity.setToDisplay()
		settings.writeSettings(self)