mirror of https://github.com/python/cpython.git
Made refile work -- basically set exportselection to 0 for list of
folders, then fix minor bugs and remove debug print statement. Also needs a fix to mhlib.py
This commit is contained in:
parent
74f2565e7c
commit
78b0c82535
|
@ -57,7 +57,7 @@ def main():
|
||||||
folderbar = Scrollbar(right, {'relief': 'sunken', 'bd': 2})
|
folderbar = Scrollbar(right, {'relief': 'sunken', 'bd': 2})
|
||||||
folderbar.pack({'fill': 'y', 'side': 'right'})
|
folderbar.pack({'fill': 'y', 'side': 'right'})
|
||||||
|
|
||||||
folderbox = Listbox(right)
|
folderbox = Listbox(right, {'exportselection': 0})
|
||||||
folderbox.pack({'expand': 1, 'fill': 'both', 'side': 'left'})
|
folderbox.pack({'expand': 1, 'fill': 'both', 'side': 'left'})
|
||||||
|
|
||||||
foldermenu = Menu(root)
|
foldermenu = Menu(root)
|
||||||
|
@ -159,7 +159,7 @@ def scan_unpost(e):
|
||||||
|
|
||||||
scanparser = regex.compile('^ *\([0-9]+\)')
|
scanparser = regex.compile('^ *\([0-9]+\)')
|
||||||
|
|
||||||
def open_folder(*e):
|
def open_folder(e=None):
|
||||||
global folder, mhf
|
global folder, mhf
|
||||||
sel = folderbox.curselection()
|
sel = folderbox.curselection()
|
||||||
if len(sel) != 1:
|
if len(sel) != 1:
|
||||||
|
@ -174,7 +174,7 @@ def open_folder(*e):
|
||||||
mhf = mh.openfolder(folder)
|
mhf = mh.openfolder(folder)
|
||||||
rescan()
|
rescan()
|
||||||
|
|
||||||
def open_message(*e):
|
def open_message(e=None):
|
||||||
global viewer
|
global viewer
|
||||||
sel = scanbox.curselection()
|
sel = scanbox.curselection()
|
||||||
if len(sel) != 1:
|
if len(sel) != 1:
|
||||||
|
@ -202,7 +202,7 @@ def open_message(*e):
|
||||||
def interestingheader(header):
|
def interestingheader(header):
|
||||||
return header != 'received'
|
return header != 'received'
|
||||||
|
|
||||||
def remove_message():
|
def remove_message(e=None):
|
||||||
itop = scanbox.nearest(0)
|
itop = scanbox.nearest(0)
|
||||||
sel = scanbox.curselection()
|
sel = scanbox.curselection()
|
||||||
if not sel:
|
if not sel:
|
||||||
|
@ -220,7 +220,7 @@ def remove_message():
|
||||||
|
|
||||||
lastrefile = ''
|
lastrefile = ''
|
||||||
tofolder = None
|
tofolder = None
|
||||||
def refile_message():
|
def refile_message(e=None):
|
||||||
global lastrefile, tofolder
|
global lastrefile, tofolder
|
||||||
itop = scanbox.nearest(0)
|
itop = scanbox.nearest(0)
|
||||||
sel = scanbox.curselection()
|
sel = scanbox.curselection()
|
||||||
|
@ -242,9 +242,7 @@ def refile_message():
|
||||||
line = scanbox.get(i)
|
line = scanbox.get(i)
|
||||||
if scanparser.match(line) >= 0:
|
if scanparser.match(line) >= 0:
|
||||||
todo.append(string.atoi(scanparser.group(1)))
|
todo.append(string.atoi(scanparser.group(1)))
|
||||||
print 'refile', todo, tofolder
|
|
||||||
if lastrefile != refileto or not tofolder:
|
if lastrefile != refileto or not tofolder:
|
||||||
print 'new folder'
|
|
||||||
lastrefile = refileto
|
lastrefile = refileto
|
||||||
tofolder = None
|
tofolder = None
|
||||||
tofolder = mh.openfolder(lastrefile)
|
tofolder = mh.openfolder(lastrefile)
|
||||||
|
@ -263,7 +261,6 @@ def fixfocus(near, itop):
|
||||||
else:
|
else:
|
||||||
i = 'end'
|
i = 'end'
|
||||||
scanbox.select_from(i)
|
scanbox.select_from(i)
|
||||||
print 'yview', `itop`
|
|
||||||
scanbox.yview(itop)
|
scanbox.yview(itop)
|
||||||
|
|
||||||
def setfolders():
|
def setfolders():
|
||||||
|
|
Loading…
Reference in New Issue