예제 #1
0
	def OnOK(self):
		for name, defVal in self.autooptions:
			SetEditorOption(name, self[name])

		SetEditorOption("Use Tabs", self.GetDlgItem(win32ui.IDC_USE_TABS).GetCheck())

		SetEditorOption("Use Tab Timmy", self.GetDlgItem(win32ui.IDC_TABTIMMY_IND).GetCheck())
		c = paletteVGA[self.cbo.GetCurSel()]
		SetEditorOption("Tab Timmy Color", win32api.RGB(c[1], c[2], c[3]))

		return 1
예제 #2
0
	def OnOK(self):
		for name, defVal in self.autooptions:
			SetEditorOption(name, self[name])
		# Margin width gets handled differently.
		if self['MarkersInMargin'] == 0:
			SetEditorOption("Marker Margin Width", self["Marker Margin Width"])
		else:
			SetEditorOption("Marker Margin Width", 0)
		if self.edgeColor != self.initialEdgeColor:
			SetEditorOption("Right Edge Color", self.edgeColor)
		if self['bVSS']:
			SetEditorOption("Source Control Module", "pywin.framework.editor.vss")
		else:
			if GetEditorOption("Source Control Module", "")=='pywin.framework.editor.vss':
				SetEditorOption("Source Control Module", "")
		# Keyboard config
		configname = self.GetDlgItem(win32ui.IDC_KEYBOARD_CONFIG).GetWindowText()
		if configname:
			if configname == "default":
				DeleteEditorOption("Keyboard Config")
			else:
				SetEditorOption("Keyboard Config", configname)

			import pywin.scintilla.view
			pywin.scintilla.view.LoadConfiguration()

		# Now tell all views we have changed.
##		for doc in editorTemplate.GetDocumentList():
##			for view in doc.GetAllViews():
##				try:
##					fn = view.OnConfigChange
##				except AttributeError:
##					continue
##				fn()
		return 1