Index: contrib/prefstore.py ================================================================== --- contrib/prefstore.py +++ contrib/prefstore.py @@ -1,10 +1,10 @@ # encoding: UTF-8 # api: streamtuner2 # title: Config save/import/reset # description: Allows to store, reimport or delete all preferences -# version: 0.2 +# version: 0.2.1 # type: feature # category: config # priority: optional # # Adds a context menu "Staton > Extensions > Config ...", which allows @@ -35,11 +35,11 @@ uikit.add_menu([parent.extensions], "Config restore", self.restore) uikit.add_menu([parent.extensions], "Config delete", self.reset) # Save conf. def save(self, *w): - fn = uikit.save_file(title="Export streamtuner2 config", fn="streatuner2-config.json", formats=[("*.json", "*.json")]) + fn = uikit.save_file(title="Export streamtuner2 config", fn="streamtuner2.config.json", formats=[("*.json", "*.json")]) if not fn: return data = vars(conf) del data["args"] with open(fn, "w") as f: @@ -46,11 +46,11 @@ f.write(json.dumps(data, indent=4, sort_keys=True)) self.parent.status("Settings saved to " + fn) # Save conf. def restore(self, *w): - fn = uikit.save_file(title="Import streamtuner2 config", fn="streatuner2-config.json", formats=[("*.json", "*.json")], action=gtk.FILE_CHOOSER_ACTION_OPEN, action_btn=gtk.STOCK_OPEN) + fn = uikit.save_file(title="Import streamtuner2 config", fn="streamtuner2.config.json", formats=[("*.json", "*.json")], action=gtk.FILE_CHOOSER_ACTION_OPEN, action_btn=gtk.STOCK_OPEN) if not fn: return with open(fn, "r") as f: conf.update(json.load(f)) conf.save()