Merge with 3.5
This commit is contained in:
commit
a8a6419d4e
|
@ -156,6 +156,7 @@ class EditorWindow(object):
|
||||||
'name': 'text',
|
'name': 'text',
|
||||||
'padx': 5,
|
'padx': 5,
|
||||||
'wrap': 'none',
|
'wrap': 'none',
|
||||||
|
'highlightthickness': 0,
|
||||||
'width': self.width,
|
'width': self.width,
|
||||||
'height': idleConf.GetOption('main', 'EditorWindow',
|
'height': idleConf.GetOption('main', 'EditorWindow',
|
||||||
'height', type='int')}
|
'height', type='int')}
|
||||||
|
@ -380,6 +381,7 @@ class EditorWindow(object):
|
||||||
|
|
||||||
def set_status_bar(self):
|
def set_status_bar(self):
|
||||||
self.status_bar = self.MultiStatusBar(self.top)
|
self.status_bar = self.MultiStatusBar(self.top)
|
||||||
|
sep = Frame(self.top, height=1, borderwidth=1, background='grey75')
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
# Insert some padding to avoid obscuring some of the statusbar
|
# Insert some padding to avoid obscuring some of the statusbar
|
||||||
# by the resize widget.
|
# by the resize widget.
|
||||||
|
@ -387,6 +389,7 @@ class EditorWindow(object):
|
||||||
self.status_bar.set_label('column', 'Col: ?', side=RIGHT)
|
self.status_bar.set_label('column', 'Col: ?', side=RIGHT)
|
||||||
self.status_bar.set_label('line', 'Ln: ?', side=RIGHT)
|
self.status_bar.set_label('line', 'Ln: ?', side=RIGHT)
|
||||||
self.status_bar.pack(side=BOTTOM, fill=X)
|
self.status_bar.pack(side=BOTTOM, fill=X)
|
||||||
|
sep.pack(side=BOTTOM, fill=X)
|
||||||
self.text.bind("<<set-line-and-column>>", self.set_line_and_column)
|
self.text.bind("<<set-line-and-column>>", self.set_line_and_column)
|
||||||
self.text.event_add("<<set-line-and-column>>",
|
self.text.event_add("<<set-line-and-column>>",
|
||||||
"<KeyRelease>", "<ButtonRelease>")
|
"<KeyRelease>", "<ButtonRelease>")
|
||||||
|
|
|
@ -8,13 +8,15 @@ class MultiStatusBar(Frame):
|
||||||
Frame.__init__(self, master, **kw)
|
Frame.__init__(self, master, **kw)
|
||||||
self.labels = {}
|
self.labels = {}
|
||||||
|
|
||||||
def set_label(self, name, text='', side=LEFT):
|
def set_label(self, name, text='', side=LEFT, width=0):
|
||||||
if name not in self.labels:
|
if name not in self.labels:
|
||||||
label = Label(self, bd=1, relief=SUNKEN, anchor=W)
|
label = Label(self, borderwidth=0, anchor=W)
|
||||||
label.pack(side=side)
|
label.pack(side=side, pady=0, padx=4)
|
||||||
self.labels[name] = label
|
self.labels[name] = label
|
||||||
else:
|
else:
|
||||||
label = self.labels[name]
|
label = self.labels[name]
|
||||||
|
if width != 0:
|
||||||
|
label.config(width=width)
|
||||||
label.config(text=text)
|
label.config(text=text)
|
||||||
|
|
||||||
def _multistatus_bar(parent):
|
def _multistatus_bar(parent):
|
||||||
|
|
Loading…
Reference in New Issue