]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/samples/ide/activegrid/tool/PHPEditor.py
Docview and IDE patch from Morag Hua with fix for bug #1217890
[wxWidgets.git] / wxPython / samples / ide / activegrid / tool / PHPEditor.py
index bf16594d3f76c0fcd7aeb43067ead960513fb262..bd8fa0602980fe5dada2ab46532c422ebc3f290b 100644 (file)
@@ -151,9 +151,9 @@ class PHPService(CodeEditor.CodeService):
 class PHPCtrl(CodeEditor.CodeCtrl):
 
 
-    def __init__(self, parent, ID = -1, style = wx.NO_FULL_REPAINT_ON_RESIZE):
-        CodeEditor.CodeCtrl.__init__(self, parent, ID, style)
-        self.SetLexer(wx.stc.STC_LEX_HTML)
+    def __init__(self, parent, id=-1, style=wx.NO_FULL_REPAINT_ON_RESIZE):
+        CodeEditor.CodeCtrl.__init__(self, parent, id, style)
+        self.SetLexer(wx.stc.STC_LEX_PHP)
         self.SetStyleBits(7)
         self.SetKeyWords(4, string.join(PHPKEYWORDS))
         self.SetProperty("fold.html", "1")
@@ -269,7 +269,6 @@ PHPKEYWORDS = [
 # Icon Bitmaps - generated by encode_bitmaps.py
 #----------------------------------------------------------------------------
 from wx import ImageFromStream, BitmapFromImage
-from wx import EmptyIcon
 import cStringIO
 
 
@@ -292,6 +291,4 @@ def getPHPImage():
     return ImageFromStream(stream)
 
 def getPHPIcon():
-    icon = EmptyIcon()
-    icon.CopyFromBitmap(getPHPBitmap())
-    return icon
+    return wx.IconFromBitmap(getPHPBitmap())