# HG changeset patch # User cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1253646233 0 # Node ID 8b125ec749d74900c822f48db1cc8bd4a795cef3 # Parent dfd48d49c044070f2bc19dd17155da0f151e249e Started cleaning up the editor source code: * Added license header to all files * Cleaned up run.py diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/__init__.py --- a/clients/editor/__init__.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/__init__.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,24 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### __all__ = [ 'plugins', 'scripts' ] diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/plugins/HistoryManager.py --- a/clients/editor/plugins/HistoryManager.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/plugins/HistoryManager.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,4 +1,25 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### import pychan from pychan import widgets, tools, attrs, internal diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/plugins/__init__.py --- a/clients/editor/plugins/__init__.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/plugins/__init__.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,24 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### __all__ = [ 'maploader', 'mapeditor', 'viewer' ] diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/run.py --- a/clients/editor/run.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/run.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,26 +1,52 @@ #!/usr/bin/env python -# coding: utf-8 -# This is the editor client for FIFE. +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### import sys, os, re -def _jp(path): - return os.path.sep.join(path.split('/')) - +# Additional directories for module search path _paths = ('.', '../../engine/swigwrappers/python', '../../engine/extensions') -for p in _paths: - if p not in sys.path: - sys.path.append(_jp(p)) + +def _joinPath(path): + """ Insert correct separators """ + return os.sep.join(path.split('/')) -import fife -import basicapplication -import scripts -from scripts.editor import Editor +def _setupPaths(): + """ Add _paths to module search path """ + for p in _paths: + if p not in sys.path: + sys.path.append(_joinPath(p)) +#--- Main function ---# if __name__ == '__main__': - print sys.argv + _setupPaths() + + # Get command line arguments params = None if len(sys.argv) > 1: params = sys.argv[1] + + # Start editor + from scripts.editor import Editor app = Editor(params) app.run() diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/__init__.py --- a/clients/editor/scripts/__init__.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/__init__.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,4 +1,25 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### """ This folder contains all core script files for FIFEdit. diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/editor.py --- a/clients/editor/scripts/editor.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/editor.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + from basicapplication import ApplicationBase import pychan import fife diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/events/__init__.py --- a/clients/editor/scripts/events/__init__.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/events/__init__.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,2 +1,25 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + from events import * from signal import * diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/events/events.py --- a/clients/editor/scripts/events/events.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/events/events.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,25 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### #from editor import getEditor # Needed to quit application import fife, scripts diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/__init__.py --- a/clients/editor/scripts/gui/__init__.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/__init__.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + from menubar import MenuBar from statusbar import StatusBar from toolbar import ToolBar diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/action.py --- a/clients/editor/scripts/gui/action.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/action.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + from scripts.events.signal import Signal import pychan.internal diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/cameradialog.py --- a/clients/editor/scripts/gui/cameradialog.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/cameradialog.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import fife import pychan diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/dockarea.py --- a/clients/editor/scripts/gui/dockarea.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/dockarea.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import pychan from pychan import widgets import scripts.editor diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/error.py --- a/clients/editor/scripts/gui/error.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/error.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import pychan import pychan.widgets as widgets diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/faketabwidget.py --- a/clients/editor/scripts/gui/faketabwidget.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/faketabwidget.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + from pychan import widgets from pychan.tools import callbackWithArguments as cbwa from resizablebase import ResizableBase diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/filemanager.py --- a/clients/editor/scripts/gui/filemanager.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/filemanager.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import os, math, fife, pychan, filebrowser, traceback, sys import loaders, savers import action diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/input.py --- a/clients/editor/scripts/gui/input.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/input.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import pychan import pychan.widgets as widgets diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/layerdialog.py --- a/clients/editor/scripts/gui/layerdialog.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/layerdialog.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import fife import pychan diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/mainwindow.py --- a/clients/editor/scripts/gui/mainwindow.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/mainwindow.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import pychan from menubar import MenuBar, Menu from panel import Panel diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/mapeditor.py --- a/clients/editor/scripts/gui/mapeditor.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/mapeditor.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + # MapEditor is a plugin for Fifedit. It allows for selection and visual editing of maps. import math, os, time diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/menubar.py --- a/clients/editor/scripts/gui/menubar.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/menubar.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + from pychan import widgets from pychan.tools import callbackWithArguments as cbwa diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/panel.py --- a/clients/editor/scripts/gui/panel.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/panel.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import pychan from pychan import widgets import scripts.editor diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/resizablebase.py --- a/clients/editor/scripts/gui/resizablebase.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/resizablebase.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import fife import scripts import pychan diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/selection.py --- a/clients/editor/scripts/gui/selection.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/selection.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import pychan import pychan.widgets as widgets diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/statusbar.py --- a/clients/editor/scripts/gui/statusbar.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/statusbar.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + from pychan import widgets class StatusBar(widgets.HBox): diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/gui/toolbar.py --- a/clients/editor/scripts/gui/toolbar.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/gui/toolbar.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import pychan from pychan import widgets diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/mapcontroller.py --- a/clients/editor/scripts/mapcontroller.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/mapcontroller.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import editor import pdb diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/mapview.py --- a/clients/editor/scripts/mapview.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/mapview.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import fife import editor import loaders, savers diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/plugin.py --- a/clients/editor/scripts/plugin.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/plugin.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import os import editor diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/settings.py --- a/clients/editor/scripts/settings.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/settings.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import shutil import os from fife_utils import getUserDataDirectory diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/tests/__init__.py --- a/clients/editor/scripts/tests/__init__.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/tests/__init__.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + """ This folder contains unit tests for various parts of the editor. It's mostly here because I don't want to rewrite this code =) """ \ No newline at end of file diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/tests/undotest.py --- a/clients/editor/scripts/tests/undotest.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/tests/undotest.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + import scripts.undomanager as undomanager print "Testing undomanager:" diff -r dfd48d49c044 -r 8b125ec749d7 clients/editor/scripts/undomanager.py --- a/clients/editor/scripts/undomanager.py Mon Sep 21 19:48:00 2009 +0000 +++ b/clients/editor/scripts/undomanager.py Tue Sep 22 19:03:53 2009 +0000 @@ -1,3 +1,26 @@ +# -*- coding: utf-8 -*- + +# #################################################################### +# Copyright (C) 2005-2009 by the FIFE team +# http://www.fifengine.de +# This file is part of FIFE. +# +# FIFE is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# #################################################################### + from events.signal import Signal import collections import pdb