def removeall_clicked(self, button, store):
"""
@description: Same as the past function but remove all lines of the
treeview
"""
# if there is still an entry in the model
old = expanduser('~') + '/.config/mama/mama.xml'
new = expanduser('~') + '/.config/mama/.mama.bak'
if os.path.exists(old):
os.rename(old, new)
if len(store) != 0:
# remove all the entries in the model
self.labelState.set_text('Remove all commands')
for i in range(len(store)):
iter = store.get_iter(0)
store.remove(iter)
self.saveTree(store)
print("Empty list")
评论列表
文章目录