process on mount dir top window

This commit is contained in:
lizhi-rocky
2010-07-27 10:39:59 +08:00
parent 602463a772
commit ea32a7f555
6 changed files with 62 additions and 6 deletions

View File

@@ -64,3 +64,16 @@ def mount_list_modify(*args):
''' modify an item in mount list '''
tw = ri_widget.TopWindow.dict['mount_list_modify']
tw.show()
def mp_top_fs_init():
''' mount dir top window initialize '''
ml_win = ri_widget.Widget.dict['mount.list'].tk_widget
idxs = ml_win.curselection()
if len(idxs) == 1:
idx = int(idxs[0])
s = display.var_dict['mount.list'].get()
if not s: return
tpl = eval(s)
dev, dir, fs = tpl[idx].split()
print dev, dir, fs

View File

@@ -54,7 +54,7 @@ def modify_attributes(attr_dict):
attr_dict[a] = getattr(MyImage, image_var)
elif a == 'command':
attr_dict[a] = getattr(sys.modules["ri_cmd"], attr_dict[a])
elif a == "textvariable" or a == "listvariable":
elif a == "textvariable" or a == "listvariable" or a == 'variable':
attr_dict[a] = var_dict[attr_dict[a]]
def create_widget_sub(w, p_win):