mirror of
https://github.com/gryf/pygtktalog.git
synced 2026-11-21 18:16:56 +01:00
* Change of behavoiur of standard filechooser dialogs. Now it would for
default open last location, where katalog file was written. If user changes location for some other file, then it stick to that directory.
This commit is contained in:
1 parent
3b95c6a16f
commit
29f1266f8d
2 files changed
+26
-7
No files matched your search
+10
-2
@@ -616,7 +616,11 @@ class MainController(Controller):
|
||||
|
||||
def on_save_as_activate(self, widget):
|
||||
"""Save database to file under different filename."""
|
||||
path = Dialogs.ChooseDBFilename().run()
|
||||
initial_path = None
|
||||
if self.model.config.recent[0]:
|
||||
initial_path = os.path.dirname(self.model.config.recent[0])
|
||||
|
||||
path = Dialogs.ChooseDBFilename(initial_path).run()
|
||||
if path:
|
||||
ret, err = self.model.save(path)
|
||||
if ret:
|
||||
@@ -651,8 +655,12 @@ class MainController(Controller):
|
||||
if not obj.run():
|
||||
return
|
||||
|
||||
initial_path = None
|
||||
if self.model.config.recent[0]:
|
||||
initial_path = os.path.dirname(self.model.config.recent[0])
|
||||
|
||||
if not path:
|
||||
path = Dialogs.LoadDBFile().run()
|
||||
path = Dialogs.LoadDBFile(initial_path).run()
|
||||
|
||||
# cleanup files and details
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user