Menu

[r114]: / plugins / Startup.py  Maximize  Restore  History

Download this file

37 lines (32 with data), 1.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import wx
import os
#TODO!!! ausbreiten
#TODO!! korrigieren
def Plugin(DrFrame):
DrFrame.wildcard = "All Files (*)|*|Python Source (*.pyw *.py *.txt)|*.pyw;*.py;*.txt|C/C++ Source (*.c *.cc *.cpp *.cxx *.h *.hh *.hpp *.hxx)|*.c;*.cc;*.cpp;*.cxx;*.h;*.hh;*.hpp;*.hxx|HTML Files (*.htm *.html *.shtm *.shtml *.xml)|*.htm;*.html;*.shtm;*.shtml;*.xml|Backup Files (*.bak)|*.bak|Plain Text (*.txt *.dat *.log)|*.txt;*.dat;*.log"
def MySetStatusText(text, col):
if col == 1:
#text.find
ind1 = text.find ("Col: ")
if ind1 > -1:
ind1 += len ("Col: ")
ind2 = text.find (" ", ind1)
nr = int (text [ind1:ind2]) + 1
text = text [:ind1] + str (nr) + text[ind2:]
ind1 = text.find ("->")
ind2 = text.find (" ", ind1)
if text [ind1:] == "->MIXED":
st = ": SPACES"
if DrFrame.txtDocument.GetUseTabs():
st = ": TABS"
text = text [:ind1+7] + st + text [ind1+7:]
# text = text [:ind1] + str (nr) + text[ind2:]
text = text + " Pos: " + str(DrFrame.txtDocument.GetCurrentPos())
#access = 1
if not os.access(DrFrame.txtDocument.filename, os.W_OK):
text = text + " R/O"
#super(type(DrFrame), DrFrame).SetStatusText(text, col)
#print text, col
DrFrame.OrigStatusText (text, col)
DrFrame.OrigStatusText = DrFrame.SetStatusText
DrFrame.SetStatusText = MySetStatusText