+
+
+
+ def LoadSettings(self, config):
+ self.autoComplete = config.ReadBool('Options/AutoComplete', True)
+ self.autoCompleteIncludeMagic = config.ReadBool('Options/AutoCompleteIncludeMagic', True)
+ self.autoCompleteIncludeSingle = config.ReadBool('Options/AutoCompleteIncludeSingle', True)
+ self.autoCompleteIncludeDouble = config.ReadBool('Options/AutoCompleteIncludeDouble', True)
+
+ self.autoCallTip = config.ReadBool('Options/AutoCallTip', True)
+ self.callTipInsert = config.ReadBool('Options/CallTipInsert', True)
+ self.SetWrapMode(config.ReadBool('View/WrapMode', True))
+
+ useAA = config.ReadBool('Options/UseAntiAliasing', self.GetUseAntiAliasing())
+ self.SetUseAntiAliasing(useAA)
+ self.lineNumbers = config.ReadBool('View/ShowLineNumbers', True)
+ self.setDisplayLineNumbers (self.lineNumbers)
+ zoom = config.ReadInt('View/Zoom/Shell', -99)
+ if zoom != -99:
+ self.SetZoom(zoom)
+
+
+
+ def SaveSettings(self, config):
+ config.WriteBool('Options/AutoComplete', self.autoComplete)
+ config.WriteBool('Options/AutoCompleteIncludeMagic', self.autoCompleteIncludeMagic)
+ config.WriteBool('Options/AutoCompleteIncludeSingle', self.autoCompleteIncludeSingle)
+ config.WriteBool('Options/AutoCompleteIncludeDouble', self.autoCompleteIncludeDouble)
+ config.WriteBool('Options/AutoCallTip', self.autoCallTip)
+ config.WriteBool('Options/CallTipInsert', self.callTipInsert)
+ config.WriteBool('Options/UseAntiAliasing', self.GetUseAntiAliasing())
+ config.WriteBool('View/WrapMode', self.GetWrapMode())
+ config.WriteBool('View/ShowLineNumbers', self.lineNumbers)
+ config.WriteInt('View/Zoom/Shell', self.GetZoom())
+
+
+
+## NOTE: The DnD of file names is disabled until I can figure out how
+## best to still allow DnD of text.
+
+
+## #seb : File drag and drop
+## class FileDropTarget(wx.FileDropTarget):
+## def __init__(self, obj):
+## wx.FileDropTarget.__init__(self)
+## self.obj = obj
+## def OnDropFiles(self, x, y, filenames):
+## if len(filenames) == 1:
+## txt = 'r\"%s\"' % filenames[0]
+## else:
+## txt = '( '
+## for f in filenames:
+## txt += 'r\"%s\" , ' % f
+## txt += ')'
+## self.obj.AppendText(txt)
+## pos = self.obj.GetCurrentPos()
+## self.obj.SetCurrentPos( pos )
+## self.obj.SetSelection( pos, pos )
+
+
+
+## class TextAndFileDropTarget(wx.DropTarget):
+## def __init__(self, shell):
+## wx.DropTarget.__init__(self)
+## self.shell = shell
+## self.compdo = wx.DataObjectComposite()
+## self.textdo = wx.TextDataObject()
+## self.filedo = wx.FileDataObject()
+## self.compdo.Add(self.textdo)
+## self.compdo.Add(self.filedo, True)
+
+## self.SetDataObject(self.compdo)
+
+## def OnDrop(self, x, y):
+## return True
+
+## def OnData(self, x, y, result):
+## self.GetData()
+## if self.textdo.GetTextLength() > 1:
+## text = self.textdo.GetText()
+## # *** Do somethign with the dragged text here...
+## self.textdo.SetText('')
+## else:
+## filenames = str(self.filename.GetFilenames())
+## if len(filenames) == 1:
+## txt = 'r\"%s\"' % filenames[0]
+## else:
+## txt = '( '
+## for f in filenames:
+## txt += 'r\"%s\" , ' % f
+## txt += ')'
+## self.shell.AppendText(txt)
+## pos = self.shell.GetCurrentPos()
+## self.shell.SetCurrentPos( pos )
+## self.shell.SetSelection( pos, pos )
+
+## return result
+