modified: ri_inst_tk.py
the progress bar wasn't moved
This commit is contained in:
@@ -23,33 +23,35 @@ import os
|
||||
from ri_oper import language, Rate
|
||||
|
||||
def set_task(task_name):
|
||||
lab_operation.configure(text=task_name)
|
||||
lab_operation.update()
|
||||
lab_operation.configure(text=task_name)
|
||||
lab_operation.update()
|
||||
|
||||
def set_sub_task(sub_task):
|
||||
txt_suboperation.insert(END,sub_task)
|
||||
txt_suboperation.see(END)
|
||||
txt_suboperation.insert(END,sub_task)
|
||||
txt_suboperation.see(END)
|
||||
|
||||
def set_task_scale():
|
||||
scl_progress.set(Rate.value)
|
||||
scl_progress.update()
|
||||
scl_progress.configure(state='normal')
|
||||
scl_progress.set(Rate.value)
|
||||
scl_progress.update()
|
||||
scl_progress.configure(state='disable')
|
||||
|
||||
def set_task_over():
|
||||
ret = tkMessageBox.askokcancel(title="Install",message="%s"%(language=='chinese' and "凝思磐石系统安装完成,请重新启动系统"or "Rocky system install completed,plase reboot"))
|
||||
return ret
|
||||
ret = tkMessageBox.askokcancel(title="Install",message="%s"%(language=='chinese' and "凝思磐石系统安装完成,请重新启动系统"or "Rocky system install completed,plase reboot"))
|
||||
return ret
|
||||
|
||||
def root_destroy():
|
||||
root.destroy()
|
||||
|
||||
def error(oper, ret):
|
||||
if language == 'chinese':
|
||||
tkMessageBox.showerror('Error',u"%s:\n 错误值: %d\n %s"%(oper.chinese_name, ret, oper.return_value[ret][1]))
|
||||
else:
|
||||
tkMessageBox.showerror('Error',"%s:\n Error number: %d\n %s"%(oper.english_name, ret, oper.return_value[ret][0]))
|
||||
if language == 'chinese':
|
||||
tkMessageBox.showerror('Error',u"%s:\n 错误值: %d\n %s"%(oper.chinese_name, ret, oper.return_value[ret][1]))
|
||||
else:
|
||||
tkMessageBox.showerror('Error',"%s:\n Error number: %d\n %s"%(oper.english_name, ret, oper.return_value[ret][0]))
|
||||
|
||||
def start(func):
|
||||
root.protocol('WM_TAKE_FOCUS', func)
|
||||
root.mainloop()
|
||||
root.protocol('WM_TAKE_FOCUS', func)
|
||||
root.mainloop()
|
||||
|
||||
#root widget
|
||||
root = Tk()
|
||||
@@ -91,5 +93,3 @@ root.rowconfigure(1,weight=1)
|
||||
root.rowconfigure(3,weight=1)
|
||||
root.rowconfigure(4,weight=1)
|
||||
root.columnconfigure(1,weight=1)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user