On 17.07.06 21:37:59, Andreas Pakulat wrote:
> On 17.07.06 19:04:21, Detlev Offenbach wrote:
> > PS: For those of you, who are willing to patch it themselves. In the Editor 
> > methods "bindLexer" and "readSettings" (Editor.py) make the lines dealing 
> > with autoindentation settings for Python read
> 
> Thanks, I would have asked for it else ;-)
> 
> For those who are not brave enough to edit the files themselves I attach
> a patch which changes the 2 methods accordingly.
> 
> While we're at it: Using the patch needs a qscintilla snapshot, which
> needs a pyqt3 snapshot (not sure wether that needs a sip snapshot). This
> in turn means hacking install.py because the format of the pyqt
> version string changed in the current snapshots (it's 3-snapshot-date
> now). I hacked my install.py by replacing the pyqtVersion[:9] with
> pyqtVersion[2:11] (and the same for the qscintilla check) but this is
> not really nice. Detlev would you be so kind to post the proper change
> for this?

Forgot to attach the patch and one also needs to change
eric/QScintilla/QextScintillaCompat's QSCINTILLA_VERSION function to use

if 'snapshot' in QSCINTILLA_VERSION_STR:

instead of the .startsWith()

Andreas

-- 
Everything will be just tickety-boo today.
diff -ur eric-3.9.1/eric/QScintilla/Editor.py 
eric-3.9.1.new/eric/QScintilla/Editor.py
--- eric-3.9.1/eric/QScintilla/Editor.py        2006-06-16 16:24:38.000000000 
+0200
+++ eric-3.9.1.new/eric/QScintilla/Editor.py    2006-07-17 21:24:33.000000000 
+0200
@@ -809,7 +809,10 @@
             
self.lexer.setFoldComments(Preferences.getEditor("PythonFoldComment"))
             self.lexer.setFoldQuotes(Preferences.getEditor("PythonFoldString"))
             if Preferences.getEditor("PythonAutoIndent"):
-                self.lexer.setAutoIndentStyle(0)
+               if QSCINTILLA_VERSION() > 0x010600:
+                   self.lexer.setAutoIndentStyle(QextScintilla.AiOpening)
+               else:
+                   self.lexer.setAutoIndentStyle(0)
             else:
                 self.lexer.setAutoIndentStyle(QextScintilla.AiMaintain)
         elif self.apiLanguage in ["C++", "C#", "IDL", "Java", "JavaScript"]:
@@ -2032,7 +2035,10 @@
             self.lexer.readSettings(Preferences.Prefs.settings, 
"/eric3/Scintilla")
             if self.lexer.language() == 'Python':
                 if Preferences.getEditor("PythonAutoIndent"):
-                    self.lexer.setAutoIndentStyle(0)
+                   if QSCINTILLA_VERSION() > 0x010600:
+                        self.lexer.setAutoIndentStyle(QextScintilla.AiOpening)
+                    else:
+                       self.lexer.setAutoIndentStyle(0)
                 else:
                     self.lexer.setAutoIndentStyle(QextScintilla.AiMaintain)
             elif self.lexer.language() in ['C++', 'C#', 'IDL', 'Java', 
'JavaScript']:
_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to