# HG changeset patch
# User cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
# Date 1258809116 0
# Node ID 1115f7cae9a3a257e77f412a12b23d279813c4e4
# Parent 20fa29f376c753cb3c782c9de5f5fa266796194a
Editor:
* The editor will now force filenames to be lowercase, as VFS does not like uppercase path names.
* If a map filename does not have a .xml extension on save, it will be automatically added.
* Log modules set to "all" by default. Only new users will be affected by this without having to modify or remove their configuration file.
* Log level set to LOGLEVEL_WARN
diff -r 20fa29f376c7 -r 1115f7cae9a3 clients/editor/scripts/editor.py
--- a/clients/editor/scripts/editor.py Fri Nov 20 02:04:39 2009 +0000
+++ b/clients/editor/scripts/editor.py Sat Nov 21 13:11:56 2009 +0000
@@ -129,9 +129,21 @@
import fifelog
logModules = self._settings.get("FIFE", "LogModules")
+ loglevel = self._settings.get("FIFE", "LogLevel", "Warn");
+
self.log = fifelog.LogManager(self.engine, self._settings.get("FIFE", "LogToPrompt"), self._settings.get("FIFE", "LogToFile"))
if logModules:
self.log.setVisibleModules(*logModules)
+
+ if loglevel == "Debug":
+ loglevel = fife.LogManager.LEVEL_DEBUG
+ elif loglevel == "Log":
+ loglevel = fife.LogManager.LEVEL_LOG
+ elif loglevel == "Error":
+ loglevel = fife.LogManager.LEVEL_ERROR
+ else:
+ loglevel = fife.LogManager.LEVEL_WARN
+ self.log.lm.setLevelFilter(loglevel)
def _initTools(self):
""" Initializes tools """
@@ -402,7 +414,7 @@
if path in self._open_files:
# Map is already open, ask user if he wants to reload the map
mapview = self.getMapviewByPath(path)
- YesNoDialog("Map is already open. Do you want to reload it?", cbwa(self.reloadMapview, mapview=mapview))
+ YesNoDialog(u"Map is already open. Do you want to reload it?", cbwa(self.reloadMapview, mapview=mapview))
return
""" Opens a file """
diff -r 20fa29f376c7 -r 1115f7cae9a3 clients/editor/scripts/gui/filemanager.py
--- a/clients/editor/scripts/gui/filemanager.py Fri Nov 20 02:04:39 2009 +0000
+++ b/clients/editor/scripts/gui/filemanager.py Sat Nov 21 13:11:56 2009 +0000
@@ -136,6 +136,9 @@
return
fname = '/'.join([path, filename])
+ fname = fname.lower()
+ if os.path.splitext(fname)[1] != ".xml":
+ fname = fname + ".xml"
mapview.saveAs(fname)
def saveAs(self):
diff -r 20fa29f376c7 -r 1115f7cae9a3 clients/editor/settings-dist.xml
--- a/clients/editor/settings-dist.xml Fri Nov 20 02:04:39 2009 +0000
+++ b/clients/editor/settings-dist.xml Sat Nov 21 13:11:56 2009 +0000
@@ -14,10 +14,11 @@
maps/shrine.xml
fonts/FreeSans.ttf
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\"
- controller
+ all
False
1
0
+ Warn
True