Simplify the way in which path prompts keep state

In the past, we kept the last path the user specified for a number of different
path types to pre-seed the path prompt. Now, we no longer distinguish between
types, and pre-seed with the last used directory regardless.
This commit is contained in:
Aldo Cortesi
2015-03-22 14:14:44 +13:00
parent 572000aa03
commit 200498e7aa
7 changed files with 16 additions and 26 deletions

View File

@@ -193,7 +193,6 @@ def raw_format_flow(f, focus, extended, padding):
def save_data(path, data, master, state):
if not path:
return
state.last_saveload = path
path = os.path.expanduser(path)
try:
with file(path, "wb") as f:
@@ -205,7 +204,6 @@ def save_data(path, data, master, state):
def ask_save_path(prompt, data, master, state):
signals.status_prompt_path.send(
prompt = prompt,
text = state.last_saveload,
callback = save_data,
args = (data, master, state)
)