Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Moved all sub-modules to a root package "tikz_editor".

  • Loading branch information...
commit 5e370681d272abe48fffebdc87ea165534967ce7 1 parent dc521f5
Mickaël Menu authored May 18, 2012

Showing 58 changed files with 909 additions and 848 deletions. Show diff stats Hide diff stats

  1. 4  Makefile
  2. 7  resources/resources.qrc
  3. 44  tikz_editor.pyw
  4. 48  tikz_editor/__init__.py
  5. 8  { → tikz_editor}/controllers/__init__.py
  6. 15  { → tikz_editor}/controllers/about.py
  7. 81  { → tikz_editor}/controllers/app.py
  8. 32  { → tikz_editor}/controllers/document.py
  9. 30  { → tikz_editor}/controllers/documents.py
  10. 39  { → tikz_editor}/controllers/errors.py
  11. 29  { → tikz_editor}/controllers/factory.py
  12. 37  { → tikz_editor}/controllers/preferences.py
  13. 29  { → tikz_editor}/controllers/preview.py
  14. 10  { → tikz_editor}/globals/__init__.py
  15. 8  { → tikz_editor}/globals/actions.py
  16. 12  { → tikz_editor}/globals/defaults.py
  17. 8  { → tikz_editor}/globals/editor.py
  18. 6  { → tikz_editor}/models/__init__.py
  19. 40  { → tikz_editor}/models/document.py
  20. 11  { → tikz_editor}/models/factory.py
  21. 183  { → tikz_editor}/models/preferences.py
  22. 2  { → tikz_editor}/resources/__init__.py
  23. 0  {resources → tikz_editor/resources/html}/about.html
  24. 0  {resources → tikz_editor/resources/images}/icon.icns
  25. 0  {resources → tikz_editor/resources/images}/icon.png
  26. 0  {resources → tikz_editor/resources/images}/icon.pxm
  27. 0  {resources → tikz_editor/resources/images}/icon_about.png
  28. 7  tikz_editor/resources/resources.qrc
  29. 16  { → tikz_editor}/tools/__init__.py
  30. 22  { → tikz_editor}/tools/documentIO/__init__.py
  31. 30  { → tikz_editor}/tools/documentIO/reader.py
  32. 8  { → tikz_editor}/tools/documentIO/tags.py
  33. 16  { → tikz_editor}/tools/documentIO/template.py
  34. 55  { → tikz_editor}/tools/file.py
  35. 6  { → tikz_editor}/tools/latex2image/__init__.py
  36. 44  { → tikz_editor}/tools/latex2image/converter.py
  37. 49  { → tikz_editor}/tools/latex2image/logs_parser.py
  38. 6  { → tikz_editor}/tools/qt/__init__.py
  39. 11  { → tikz_editor}/tools/qt/actions.py
  40. 16  { → tikz_editor}/tools/qt/dialogs.py
  41. 15  { → tikz_editor}/tools/qt/toolbar.py
  42. 20  { → tikz_editor}/tools/temp_dir.py
  43. 6  { → tikz_editor}/views/__init__.py
  44. 21  { → tikz_editor}/views/about.py
  45. 41  { → tikz_editor}/views/document/__init__.py
  46. 35  { → tikz_editor}/views/document/content.py
  47. 35  { → tikz_editor}/views/document/feedback/__init__.py
  48. 22  { → tikz_editor}/views/document/feedback/errors.py
  49. 19  { → tikz_editor}/views/document/feedback/logs.py
  50. 37  { → tikz_editor}/views/document/preview.py
  51. 25  { → tikz_editor}/views/document/properties.py
  52. 147  { → tikz_editor}/views/editor.py
  53. 41  { → tikz_editor}/views/factory.py
  54. 43  { → tikz_editor}/views/preferences/__init__.py
  55. 47  { → tikz_editor}/views/preferences/document.py
  56. 91  { → tikz_editor}/views/preferences/editor.py
  57. 61  { → tikz_editor}/views/preferences/preview.py
  58. 82  { → tikz_editor}/views/preferences/snippets.py
4  Makefile
@@ -15,9 +15,9 @@
15 15
 
16 16
 PYRCC = pyrcc4
17 17
 
18  
-all: resources/__init__.py
  18
+all: tikz_editor/resources/__init__.py
19 19
 
20 20
 # Builds the resources module using PyQt's pyrcc4.
21 21
 # see: http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/resources.html
22  
-resources/__init__.py: resources/resources.qrc
  22
+tikz_editor/resources/__init__.py: tikz_editor/resources/resources.qrc
23 23
 	$(PYRCC) -o $@ $<
7  resources/resources.qrc
... ...
@@ -1,7 +0,0 @@
1  
-<!DOCTYPE RCC>
2  
-<RCC version="1.0">
3  
-	<qresource>
4  
-		<file>icon_about.png</file>
5  
-		<file>about.html</file>
6  
-	</qresource>
7  
-</RCC>
44  tikz_editor.pyw
... ...
@@ -1,53 +1,21 @@
1 1
 #!/usr/bin/env python
2 2
 
3 3
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
4  
-# 
  4
+#
5 5
 # This program is free software; you can redistribute it and/or modify
6 6
 # it under the terms of the GNU General Public License as published by
7 7
 # the Free Software Foundation; either version 2 of the License, or
8 8
 # (at your option) any later version.
9  
-# 
  9
+#
10 10
 # This program is distributed in the hope that it will be useful,
11 11
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 13
 # GNU General Public License for more details.
14  
-# 
  14
+#
15 15
 # You should have received a copy of the GNU General Public License along
16 16
 # with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
 
18  
-import os
19  
-import sys
20  
-import atexit # necessary for pyinstaller deployment
21  
-from PyQt4.QtCore import *
22  
-from PyQt4.QtGui import *
  18
+import tikz_editor
23 19
 
24  
-from controllers import ControllerFactory
25  
-from tools import isMacintoshComputer
26  
-import globals
27  
-
28  
-__version__ = globals.VERSION
29  
-__author__ = globals.AUTHORS
30  
-def main():
31  
-	app = QApplication(sys.argv)
32  
-	app.setOrganizationName(globals.ORGANIZATION_NAME)
33  
-	app.setOrganizationDomain(globals.ORGANIZATION_DOMAIN)
34  
-	app.setApplicationName(globals.APPLICATION_NAME)
35  
-
36  
-	if isMacintoshComputer():
37  
-		# add /opt/local/bin to PATH to find pdflatex binary -- useful for Mac plateform using Macports
38  
-		os.environ['PATH'] = os.environ.get('PATH', '/usr/bin') + ':/opt/local/bin'
39  
-		app.setQuitOnLastWindowClosed(False)
40  
-		
41  
-	app_controller = ControllerFactory.createAppController()
42  
-	
43  
-	args = app.arguments()[1:]
44  
-	if len(args) > 0:
45  
-		for file_path in args:
46  
-			app_controller.open(file_path)
47  
-	else:
48  
-		app_controller.new()
49  
-		
50  
-	app.exec_()
51  
-	app_controller.quit()
52  
-	
53  
-main()
  20
+if __name__ == '__main__':
  21
+	tikz_editor.start()
48  tikz_editor/__init__.py
... ...
@@ -0,0 +1,48 @@
  1
+# Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
  2
+#
  3
+# This program is free software; you can redistribute it and/or modify
  4
+# it under the terms of the GNU General Public License as published by
  5
+# the Free Software Foundation; either version 2 of the License, or
  6
+# (at your option) any later version.
  7
+#
  8
+# This program is distributed in the hope that it will be useful,
  9
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
  10
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11
+# GNU General Public License for more details.
  12
+#
  13
+# You should have received a copy of the GNU General Public License along
  14
+# with this program. If not, see <http://www.gnu.org/licenses/>.
  15
+
  16
+import os
  17
+import sys
  18
+import atexit # necessary for pyinstaller deployment
  19
+from PyQt4.QtCore import *
  20
+from PyQt4.QtGui import *
  21
+
  22
+from tikz_editor.controllers import ControllerFactory
  23
+from tikz_editor.tools import isMacintoshComputer
  24
+import tikz_editor.globals as globals
  25
+
  26
+
  27
+def start():
  28
+	app = QApplication(sys.argv)
  29
+	app.setOrganizationName(globals.ORGANIZATION_NAME)
  30
+	app.setOrganizationDomain(globals.ORGANIZATION_DOMAIN)
  31
+	app.setApplicationName(globals.APPLICATION_NAME)
  32
+
  33
+	if isMacintoshComputer():
  34
+		# add /opt/local/bin to PATH to find pdflatex binary -- useful for Mac plateform using Macports
  35
+		os.environ['PATH'] = os.environ.get('PATH', '/usr/bin') + ':/opt/local/bin'
  36
+		app.setQuitOnLastWindowClosed(False)
  37
+
  38
+	app_controller = ControllerFactory.createAppController()
  39
+
  40
+	args = app.arguments()[1:]
  41
+	if len(args) > 0:
  42
+		for file_path in args:
  43
+			app_controller.open(file_path)
  44
+	else:
  45
+		app_controller.new()
  46
+
  47
+	app.exec_()
  48
+	app_controller.quit()
8  controllers/__init__.py → tikz_editor/controllers/__init__.py
... ...
@@ -1,18 +1,18 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6
 # (at your option) any later version.
7  
-# 
  7
+#
8 8
 # This program is distributed in the hope that it will be useful,
9 9
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 10
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 11
 # GNU General Public License for more details.
12  
-# 
  12
+#
13 13
 # You should have received a copy of the GNU General Public License along
14 14
 # with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
 
16 16
 from factory import ControllerFactory
17 17
 
18  
-__all__ = ['ControllerFactory']
  18
+__all__ = ['ControllerFactory']
15  controllers/about.py → tikz_editor/controllers/about.py
... ...
@@ -1,22 +1,23 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6
 # (at your option) any later version.
7  
-# 
  7
+#
8 8
 # This program is distributed in the hope that it will be useful,
9 9
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 10
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 11
 # GNU General Public License for more details.
12  
-# 
  12
+#
13 13
 # You should have received a copy of the GNU General Public License along
14 14
 # with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
 
16 16
 from PyQt4.QtCore import *
17  
-import resources
18 17
 
19  
-from tools import File
  18
+import tikz_editor.resources
  19
+from tikz_editor.tools import File
  20
+
20 21
 
21 22
 class AboutController(QObject):
22 23
 	"""
@@ -26,7 +27,7 @@ def __init__(self):
26 27
 		super(AboutController, self).__init__()
27 28
 		self.view = None
28 29
 		self.app_controller = None
29  
-	
  30
+
30 31
 	def initController(self):
31 32
 		self.view.setImage(":/icon_about.png")
32 33
 		self.view.setInfoHTML(File.readContentFromFilePath(":/about.html"))
@@ -34,4 +35,4 @@ def initController(self):
34 35
 	@pyqtSlot()
35 36
 	def showAbout(self):
36 37
 		self.view.show()
37  
-		self.view.raise_()
  38
+		self.view.raise_()
81  controllers/app.py → tikz_editor/controllers/app.py
... ...
@@ -1,36 +1,35 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6
 # (at your option) any later version.
7  
-# 
  7
+#
8 8
 # This program is distributed in the hope that it will be useful,
9 9
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 10
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 11
 # GNU General Public License for more details.
12  
-# 
  12
+#
13 13
 # You should have received a copy of the GNU General Public License along
14 14
 # with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
 
16  
-import os
17  
-
18 16
 from PyQt4.QtCore import *
19 17
 from PyQt4.QtGui import *
20 18
 
21  
-import globals.actions as actions
22  
-from models import Preferences
23  
-from views import DocumentView
24  
-from views.editor import EditorView
25  
-from tools import addToClipboard, isMacintoshComputer
26  
-from tools import File, TemporaryDirectory
27  
-from tools.qt import ActionFactory, Dialogs
  19
+import tikz_editor.globals.actions as actions
  20
+from tikz_editor.models import Preferences
  21
+from tikz_editor.views import DocumentView
  22
+from tikz_editor.views.editor import EditorView
  23
+from tikz_editor.tools import addToClipboard, isMacintoshComputer
  24
+from tikz_editor.tools import File, TemporaryDirectory
  25
+from tikz_editor.tools.qt import ActionFactory, Dialogs
  26
+
28 27
 
29 28
 class AppController(QObject):
30 29
 	"""
31 30
 	The application controller is directing all the user actions to sub-controllers.
32 31
 	"""
33  
-	
  32
+
34 33
 	def __init__(self):
35 34
 		super(AppController, self).__init__()
36 35
 		self.about_controller = None
@@ -38,7 +37,7 @@ def __init__(self):
38 37
 		self.preferences_controller = None
39 38
 		self.actions = {}
40 39
 		self.menu_bar = None
41  
-	
  40
+
42 41
 	def initController(self):
43 42
 		self._createActions()
44 43
 		self._createMenuBar()
@@ -63,18 +62,17 @@ def _createActions(self):
63 62
 		self.actions[actions.SAVE_ALL] = ActionFactory.createAction(self, "Save All", "Save all documents", None, self.saveAll)
64 63
 		self.actions[actions.SAVE_AS] = ActionFactory.createAction(self, "Save As...", "Save the document as...", QKeySequence.SaveAs, self.saveAs)
65 64
 		self.actions[actions.UNDO] = ActionFactory.createAction(self, "Undo", "Undo last action", QKeySequence.Undo, self.undo)
66  
-	
  65
+
67 66
 	def _createMenuBar(self):
68 67
 		self.menu_bar = QMenuBar()
69 68
 		self._createFileMenu()
70 69
 		self._createEditMenu()
71  
-		
  70
+
72 71
 		# set menu bar of about and preferences windows if we're not on Mac OS X
73 72
 		if not isMacintoshComputer():
74 73
 			self.preferences_controller.view.setMenuBar(self.menu_bar)
75 74
 			self.about_controller.view.setMenuBar(self.menu_bar)
76 75
 
77  
-	
78 76
 	def _createFileMenu(self):
79 77
 		file_menu = self.menu_bar.addMenu("File")
80 78
 		ordered_actions = (
@@ -93,7 +91,7 @@ def _createFileMenu(self):
93 91
 			self.actions[actions.QUIT]
94 92
 		)
95 93
 		ActionFactory.addActionsToMenu(ordered_actions, file_menu)
96  
-	
  94
+
97 95
 	def _createEditMenu(self):
98 96
 		edit_menu = self.menu_bar.addMenu("Edit")
99 97
 		ordered_actions = (
@@ -102,13 +100,13 @@ def _createEditMenu(self):
102 100
 			None,
103 101
 			self.actions[actions.CUT]
104 102
 		)
105  
-		ActionFactory.addActionsToMenu(ordered_actions, edit_menu)		
  103
+		ActionFactory.addActionsToMenu(ordered_actions, edit_menu)
106 104
 		self._createCopyMenu(edit_menu)
107 105
 		ActionFactory.addActionsToMenu((self.actions[actions.PASTE], None), edit_menu)
108 106
 		self._createSnippetsMenu(edit_menu)
109  
-	
  107
+
110 108
 	def _createCopyMenu(self, edit_menu):
111  
-		copy_menu = edit_menu.addMenu("Copy")		
  109
+		copy_menu = edit_menu.addMenu("Copy")
112 110
 		ordered_actions = (
113 111
 			self.actions[actions.COPY],
114 112
 			self.actions[actions.COPY_SOURCE],
@@ -117,11 +115,11 @@ def _createCopyMenu(self, edit_menu):
117 115
 		)
118 116
 		ActionFactory.addActionsToMenu(ordered_actions, copy_menu)
119 117
 		self.actions[actions.COPY_MENU] = copy_menu
120  
-	
  118
+
121 119
 	def _createSnippetsMenu(self, edit_menu):
122 120
 		self.actions[actions.SNIPPETS_MENU] = edit_menu.addMenu("Insert Snippets")
123 121
 		self.loadSnippets()
124  
-	
  122
+
125 123
 	def loadSnippets(self):
126 124
 		snippets_menu = self.actions[actions.SNIPPETS_MENU]
127 125
 		snippets_menu.clear()
@@ -131,7 +129,7 @@ def loadSnippets(self):
131 129
 			action = ActionFactory.createAction(self, snippet_name, "Insert \"%s\" Snippet" % snippet_name, None, self.insertSnippet)
132 130
 			action.setData(QVariant(snippet_code))
133 131
 			snippets_menu.addAction(action)
134  
-		
  132
+
135 133
 	@property
136 134
 	def focused_document(self):
137 135
 		"""
@@ -147,7 +145,7 @@ def documentHasFocus(self):
147 145
 		"""
148 146
 		active_window = QApplication.activeWindow()
149 147
 		return isinstance(active_window, DocumentView)
150  
-	
  148
+
151 149
 	def _doActionOnFocusedWidget(self, action):
152 150
 		try:
153 151
 			widget = QApplication.focusWidget()
@@ -165,7 +163,7 @@ def about(self):
165 163
 			self.about_controller.showAbout()
166 164
 		except Exception, e:
167 165
 			Dialogs.showError(e)
168  
-		
  166
+
169 167
 	@pyqtSlot()
170 168
 	def close(self):
171 169
 		try:
@@ -174,11 +172,11 @@ def close(self):
174 172
 				active_window.close()
175 173
 		except Exception, e:
176 174
 			Dialogs.showError(e)
177  
-	
  175
+
178 176
 	@pyqtSlot()
179 177
 	def copy(self):
180 178
 		self._doActionOnFocusedWidget("copy")
181  
-	
  179
+
182 180
 	@pyqtSlot()
183 181
 	def copySource(self):
184 182
 		try:
@@ -188,7 +186,7 @@ def copySource(self):
188 186
 				QApplication.beep()
189 187
 		except Exception, e:
190 188
 			Dialogs.showError(e)
191  
-			
  189
+
192 190
 	@pyqtSlot()
193 191
 	def copyPreamble(self):
194 192
 		try:
@@ -198,7 +196,7 @@ def copyPreamble(self):
198 196
 				QApplication.beep()
199 197
 		except Exception, e:
200 198
 			Dialogs.showError(e)
201  
-	
  199
+
202 200
 	@pyqtSlot()
203 201
 	def copyPreambleAndSource(self):
204 202
 		try:
@@ -208,18 +206,18 @@ def copyPreambleAndSource(self):
208 206
 				QApplication.beep()
209 207
 		except Exception, e:
210 208
 			Dialogs.showError(e)
211  
-		
  209
+
212 210
 	@pyqtSlot()
213 211
 	def cut(self):
214 212
 		self._doActionOnFocusedWidget("cut")
215  
-		
  213
+
216 214
 	@pyqtSlot()
217 215
 	def new(self):
218 216
 		try:
219 217
 			self.documents_controller.openEmptyDocument()
220 218
 		except Exception, e:
221 219
 			Dialogs.showError(e)
222  
-			
  220
+
223 221
 	@pyqtSlot()
224 222
 	def open(self, file_path=None):
225 223
 		try:
@@ -236,11 +234,12 @@ def paste(self):
236 234
 
237 235
 	@pyqtSlot()
238 236
 	def showPreferences(self):
  237
+
239 238
 		try:
240 239
 			self.preferences_controller.showPreferences()
241 240
 		except Exception, e:
242 241
 			Dialogs.showError(e)
243  
-		
  242
+
244 243
 	@pyqtSlot()
245 244
 	def preview(self):
246 245
 		try:
@@ -250,11 +249,11 @@ def preview(self):
250 249
 				QApplication.beep()
251 250
 		except Exception, e:
252 251
 			Dialogs.showError(e)
253  
-	
  252
+
254 253
 	@pyqtSlot()
255 254
 	def redo(self):
256 255
 		self._doActionOnFocusedWidget("redo")
257  
-		
  256
+
258 257
 	@pyqtSlot()
259 258
 	def quit(self):
260 259
 		try:
@@ -273,14 +272,14 @@ def save(self):
273 272
 				QApplication.beep()
274 273
 		except Exception, e:
275 274
 			Dialogs.showError(e)
276  
-		
  275
+
277 276
 	@pyqtSlot()
278 277
 	def saveAll(self):
279 278
 		try:
280 279
 			self.documents_controller.saveAllDocuments()
281 280
 		except Exception, e:
282 281
 			Dialogs.showError(e)
283  
-		
  282
+
284 283
 	@pyqtSlot()
285 284
 	def saveAs(self):
286 285
 		try:
@@ -290,11 +289,11 @@ def saveAs(self):
290 289
 				QApplication.beep()
291 290
 		except Exception, e:
292 291
 			Dialogs.showError(e)
293  
-	
  292
+
294 293
 	@pyqtSlot()
295 294
 	def undo(self):
296 295
 		self._doActionOnFocusedWidget("undo")
297  
-	
  296
+
298 297
 	@pyqtSlot()
299 298
 	def insertSnippet(self):
300 299
 		try:
@@ -306,4 +305,4 @@ def insertSnippet(self):
306 305
 			else:
307 306
 				QApplication.beep()
308 307
 		except Exception, e:
309  
-			Dialogs.showError(e)
  308
+			Dialogs.showError(e)
32  controllers/document.py → tikz_editor/controllers/document.py
... ...
@@ -1,23 +1,23 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6
 # (at your option) any later version.
7  
-# 
  7
+#
8 8
 # This program is distributed in the hope that it will be useful,
9 9
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 10
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 11
 # GNU General Public License for more details.
12  
-# 
  12
+#
13 13
 # You should have received a copy of the GNU General Public License along
14 14
 # with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
 
16 16
 from PyQt4.QtCore import *
17 17
 from PyQt4.QtGui import *
18 18
 
19  
-from tools import File
20  
-from tools.qt import Dialogs
  19
+from tikz_editor.tools import File
  20
+
21 21
 
22 22
 class DocumentController(QObject):
23 23
 	"""
@@ -26,22 +26,22 @@ class DocumentController(QObject):
26 26
 	figurePreviewOutOfSyncSignal = pyqtSignal()
27 27
 	figurePreviewChangedSignal = pyqtSignal(str, list)
28 28
 	documentClosedSignal = pyqtSignal(object)
29  
-	
  29
+
30 30
 	def __init__(self):
31 31
 		super(DocumentController, self).__init__()
32  
-		self.app_controller = None	
  32
+		self.app_controller = None
33 33
 		self.errors_controller = None
34 34
 		self.preview_controller = None
35 35
 		self.model = None
36 36
 		self.view = None
37  
-	
  37
+
38 38
 	def initController(self):
39  
-		assert self.model and self.view		
  39
+		assert self.model and self.view
40 40
 		self._connectViewAndModel()
41 41
 		self._syncViewAndModel()
42 42
 		if not self.model.isEmpty():
43 43
 			self.preview_controller.updatePreview()
44  
-				
  44
+
45 45
 	def _connectViewAndModel(self):
46 46
 		self.view.sourceChangedSignal.connect(self.model.setSource)
47 47
 		self.view.preambleChangedSignal.connect(self.model.setPreamble)
@@ -60,15 +60,15 @@ def _syncViewAndModel(self):
60 60
 		self.view.preamble = self.model.preamble
61 61
 		self.view.source = self.model.source
62 62
 		self.view.title = self.model.title
63  
-	
  63
+
64 64
 	def showView(self):
65 65
 		self.view.show()
66 66
 		self.view.raise_()
67  
-		
  67
+
68 68
 	@pyqtSlot()
69 69
 	def preview(self):
70 70
 		self.preview_controller.updatePreview()
71  
-		
  71
+
72 72
 	@pyqtSlot()
73 73
 	def close(self):
74 74
 		self.preview_controller.abortPreview()
@@ -88,9 +88,9 @@ def saveAs(self):
88 88
 		if file_path:
89 89
 			self.model.file_path = file_path
90 90
 			self.model.save()
91  
-	
  91
+
92 92
 	def _getDocumentFileName(self):
93 93
 		file_name = self.model.file_path
94 94
 		if not file_name:
95  
-			file_name =  "%s.tex" % self.model.title
96  
-		return file_name
  95
+			file_name = "%s.tex" % self.model.title
  96
+		return file_name
30  controllers/documents.py → tikz_editor/controllers/documents.py
... ...
@@ -1,40 +1,40 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6
 # (at your option) any later version.
7  
-# 
  7
+#
8 8
 # This program is distributed in the hope that it will be useful,
9 9
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 10
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 11
 # GNU General Public License for more details.
12  
-# 
  12
+#
13 13
 # You should have received a copy of the GNU General Public License along
14 14
 # with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
 
16 16
 from PyQt4.QtCore import *
17 17
 from PyQt4.QtGui import *
18 18
 
19  
-import controllers.factory
20  
-from app import AppController
  19
+import factory
  20
+
21 21
 
22 22
 class DocumentsController(object):
23 23
 	"""
24 24
 	This is the documents manager. It keeps a list of all opened documents and can open
25 25
 	new or existing documents.
26 26
 	"""
27  
-	
  27
+
28 28
 	def __init__(self):
29 29
 		super(DocumentsController, self).__init__()
30 30
 		self.app_controller = None
31 31
 		self.documents = []
32  
-	
  32
+
33 33
 	def openEmptyDocument(self):
34 34
 		doc = self._createDocument()
35 35
 		doc.view.content_view.source_editor_view.goToLine(2)
36 36
 		doc.showView()
37  
-		
  37
+
38 38
 	def openDocument(self, file_path):
39 39
 		"""
40 40
 		Opens an existing document at given file path and closes the startup document if
@@ -44,32 +44,32 @@ def openDocument(self, file_path):
44 44
 		doc = self._createDocument(file_path)
45 45
 		doc.showView()
46 46
 		self._closeEmptyStartupDocument()
47  
-			
  47
+
48 48
 	def _createDocument(self, file_path=None):
49 49
 		"""
50 50
 		Creates a document controller and adds it to the docs list.
51 51
 		"""
52  
-		doc = controllers.factory.ControllerFactory.createDocumentController(self.app_controller, file_path)
  52
+		doc = factory.ControllerFactory.createDocumentController(self.app_controller, file_path)
53 53
 		doc.documentClosedSignal.connect(self._documentClosed)
54 54
 		self.documents.append(doc)
55 55
 		return doc
56  
-	
  56
+
57 57
 	def _closeEmptyStartupDocument(self):
58 58
 		"""
59 59
 		Closes the startup document if it is empty.
60 60
 		"""
61 61
 		if len(self.documents) > 1 and self.documents[0].model.isUntitled() and self.documents[0].model.isEmpty():
62 62
 			self.documents[0].view.close()
63  
-	
  63
+
64 64
 	def saveAllDocuments(self):
65 65
 		for d in self.documents:
66 66
 			if d.isDirty():
67 67
 				d.save()
68  
-	
  68
+
69 69
 	def closeAllDocuments(self):
70 70
 		for d in self.documents:
71 71
 			d.close()
72  
-	
  72
+
73 73
 	@pyqtSlot()
74 74
 	def _documentClosed(self, document):
75 75
 		"""
@@ -77,4 +77,4 @@ def _documentClosed(self, document):
77 77
 		controller after the user closed the view.
78 78
 		"""
79 79
 		if document in self.documents:
80  
-			self.documents.remove(document)
  80
+			self.documents.remove(document)
39  controllers/errors.py → tikz_editor/controllers/errors.py
... ...
@@ -1,60 +1,65 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6
 # (at your option) any later version.
7  
-# 
  7
+#
8 8
 # This program is distributed in the hope that it will be useful,
9 9
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 10
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 11
 # GNU General Public License for more details.
12  
-# 
  12
+#
13 13
 # You should have received a copy of the GNU General Public License along
14 14
 # with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
 
16 16
 from PyQt4.QtCore import *
17 17
 from PyQt4.QtGui import *
18 18
 
19  
-from models import Preferences
20  
-from tools import documentIO
  19
+from tikz_editor.models import Preferences
  20
+from tikz_editor.tools import documentIO
  21
+
21 22
 
22 23
 class ConversionError(object):
23 24
 	def __init__(self, line, error):
24 25
 		super(ConversionError, self).__init__()
25 26
 		self.line = line
26 27
 		self.error = error
  28
+
27 29
 	def __str__(self):
28 30
 		return self.error
29 31
 
  32
+
30 33
 class PreambleError(ConversionError):
31 34
 	def __str__(self):
32 35
 		error = self.error
33 36
 		if self.line is not None:
34 37
 			error = "(preamble l.%d) %s" % (self.line, error)
35 38
 		return error
36  
-		
  39
+
  40
+
37 41
 class SourceError(ConversionError):
38 42
 	def __str__(self):
39 43
 		error = self.error
40 44
 		if self.line is not None:
41 45
 			error = "(source l.%d) %s" % (self.line, error)
42 46
 		return error
43  
-		
  47
+
  48
+
44 49
 class ErrorsController(QObject):
45 50
 	"""
46 51
 	The errors controller populates the errors list and error feedbacks (margin markers
47 52
 	and annotations).
48 53
 	"""
49  
-	
  54
+
50 55
 	# list of instances used to reload preferences
51 56
 	instances = []
52  
-	
  57
+
53 58
 	@staticmethod
54 59
 	def reloadUserPreferences():
55 60
 		for errors in ErrorsController.instances:
56 61
 			errors.loadUserPreferences()
57  
-			
  62
+
58 63
 	def __init__(self):
59 64
 		super(ErrorsController, self).__init__()
60 65
 		self.app_controller = None
@@ -65,7 +70,7 @@ def __init__(self):
65 70
 		self.show_error_markers = None
66 71
 		self.show_error_annotations = None
67 72
 		ErrorsController.instances.append(self)
68  
-	
  73
+
69 74
 	def initController(self):
70 75
 		self.errors_view.errorSelectedSignal.connect(self.errorSelected)
71 76
 		self.loadUserPreferences()
@@ -75,7 +80,7 @@ def loadUserPreferences(self):
75 80
 		self.show_error_annotations = Preferences.getShowErrorAnnotations()
76 81
 		self.clearErrorMarginMarkersAndAnnotations()
77 82
 		self._updateEditorsMarginsAndAnnotations()
78  
-	
  83
+
79 84
 	def errorSelected(self, error):
80 85
 		if isinstance(error, PreambleError):
81 86
 			self.content_view.showPreambleView()
@@ -103,7 +108,7 @@ def clearErrorMarginMarkersAndAnnotations(self):
103 108
 		self.content_view.source_editor_view.removeAllAnnotations()
104 109
 		self.content_view.preamble_editor_view.removeAllErrorMarginMarkers()
105 110
 		self.content_view.preamble_editor_view.removeAllAnnotations()
106  
-		
  111
+
107 112
 	def _matchErrorsToSource(self, errors, latex_source):
108 113
 		"""
109 114
 		Sorts errors between LaTeX sections (preamble and source) according to file
@@ -124,14 +129,14 @@ def _matchErrorsToSource(self, errors, latex_source):
124 129
 			else:
125 130
 				matched_errors.append(ConversionError(None, message))
126 131
 		self.errors = matched_errors
127  
-		
  132
+
128 133
 	def _updateEditorsMarginsAndAnnotations(self):
129 134
 		for error in self.errors:
130 135
 			if isinstance(error, PreambleError):
131 136
 				self._addErrorToViewMarginsAndAnnotations(self.content_view.preamble_editor_view, error)
132 137
 			elif isinstance(error, SourceError) or isinstance(error, ConversionError):
133 138
 				self._addErrorToViewMarginsAndAnnotations(self.content_view.source_editor_view, error)
134  
-	
  139
+
135 140
 	def _addErrorToViewMarginsAndAnnotations(self, view, error):
136 141
 		line = error.line
137 142
 		if not line:
@@ -140,7 +145,7 @@ def _addErrorToViewMarginsAndAnnotations(self, view, error):
140 145
 			view.addErrorMarginMarkerToLine(line)
141 146
 		if self.show_error_annotations:
142 147
 			view.addAnnotationToLine(line, error.error)
143  
-	
  148
+
144 149
 	def _updateErrorsList(self):
145 150
 		for error in self.errors:
146  
-			self.errors_view.addError(error)
  151
+			self.errors_view.addError(error)
29  controllers/factory.py → tikz_editor/controllers/factory.py
... ...
@@ -1,15 +1,15 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6
 # (at your option) any later version.
7  
-# 
  7
+#
8 8
 # This program is distributed in the hope that it will be useful,
9 9
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 10
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 11
 # GNU General Public License for more details.
12  
-# 
  12
+#
13 13
 # You should have received a copy of the GNU General Public License along
14 14
 # with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
 
@@ -21,14 +21,15 @@
21 21
 from errors import ErrorsController
22 22
 from preferences import PreferencesController
23 23
 
24  
-from models import DocumentFactory
25  
-from views import ViewFactory
  24
+from tikz_editor.models import DocumentFactory
  25
+from tikz_editor.views import ViewFactory
  26
+
26 27
 
27 28
 class ControllerFactory(object):
28 29
 	"""
29 30
 	Factory of all controllers.
30 31
 	"""
31  
-	
  32
+
32 33
 	@staticmethod
33 34
 	def createAppController():
34 35
 		app_controller = AppController()
@@ -37,7 +38,7 @@ def createAppController():
37 38
 		app_controller.preferences_controller = ControllerFactory.createPreferencesController(app_controller)
38 39
 		app_controller.initController()
39 40
 		return app_controller
40  
-	
  41
+
41 42
 	@staticmethod
42 43
 	def createAboutController(app_controller):
43 44
 		about_controller = AboutController()
@@ -45,8 +46,8 @@ def createAboutController(app_controller):
45 46
 		about_controller.view = ViewFactory.createAboutView(app_controller)
46 47
 		about_controller.initController()
47 48
 		return about_controller
48  
-		
49  
-	@staticmethod		
  49
+
  50
+	@staticmethod
50 51
 	def createDocumentController(app_controller, file_path=None):
51 52
 		doc_controller = DocumentController()
52 53
 		doc_controller.app_controller = app_controller
@@ -66,7 +67,7 @@ def createDocumentController(app_controller, file_path=None):
66 67
 		doc_controller.model = doc_model
67 68
 		doc_controller.initController()
68 69
 		return doc_controller
69  
-	
  70
+
70 71
 	@staticmethod
71 72
 	def createErrorsController(app_controller, doc_controller, doc_view):
72 73
 		errors_controller = ErrorsController()
@@ -76,7 +77,7 @@ def createErrorsController(app_controller, doc_controller, doc_view):
76 77
 		errors_controller.errors_view = doc_view.feedback_view.errors_view
77 78
 		errors_controller.initController()
78 79
 		return errors_controller
79  
-	
  80
+
80 81
 	@staticmethod
81 82
 	def createPreviewController(app_controller, doc_controller, doc_view):
82 83
 		preview_controller = PreviewController()
@@ -85,17 +86,17 @@ def createPreviewController(app_controller, doc_controller, doc_view):
85 86
 		preview_controller.preview_view = doc_view.preview_view
86 87
 		preview_controller.initController()
87 88
 		return preview_controller
88  
-	
  89
+
89 90
 	@staticmethod
90 91
 	def createDocumentsController(app_controller):
91 92
 		documents_controller = DocumentsController()
92 93
 		documents_controller.app_controller = app_controller
93 94
 		return documents_controller
94  
-		
  95
+
95 96
 	@staticmethod
96 97
 	def createPreferencesController(app_controller):
97 98
 		preferences_controller = PreferencesController()
98 99
 		preferences_controller.app_controller = app_controller
99 100
 		preferences_controller.view = ViewFactory.createPreferencesView(app_controller, preferences_controller)
100 101
 		preferences_controller.initController()
101  
-		return preferences_controller
  102
+		return preferences_controller
37  controllers/preferences.py → tikz_editor/controllers/preferences.py
... ...
@@ -1,35 +1,36 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6
 # (at your option) any later version.
7  
-# 
  7
+#
8 8
 # This program is distributed in the hope that it will be useful,
9 9
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 10
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 11
 # GNU General Public License for more details.
12  
-# 
  12
+#
13 13
 # You should have received a copy of the GNU General Public License along
14 14
 # with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
 
16 16
 from PyQt4.QtCore import *
17 17
 
18  
-from models import Preferences
19  
-from controllers.errors import ErrorsController
20  
-from views.editor import EditorView
  18
+from tikz_editor.models import Preferences
  19
+from errors import ErrorsController
  20
+from tikz_editor.views.editor import EditorView
  21
+
21 22
 
22 23
 class PreferencesController(QObject):
23 24
 	"""
24 25
 	Controller of the "Preferences" dialog. It basically connects and syncs user defaults
25 26
 	with the preferences dialog.
26 27
 	"""
27  
-	
  28
+
28 29
 	def __init__(self):
29 30
 		super(PreferencesController, self).__init__()
30 31
 		self.app_controller = None
31 32
 		self.view = None
32  
-		
  33
+
33 34
 	def initController(self):
34 35
 		assert self.view
35 36
 		self._connectViewAndModel()
@@ -44,7 +45,7 @@ def _connectViewAndModel(self):
44 45
 		self.view.editor.autoWrapChangedSignal.connect(Preferences.setAutoWrap)
45 46
 		self.view.editor.errorMarkersChangedSignal.connect(Preferences.setShowErrorMarkers)
46 47
 		self.view.editor.errorAnnotationsChangedSignal.connect(Preferences.setShowErrorAnnotations)
47  
-		
  48
+
48 49
 		self.view.editor.editorFontChangedSignal.connect(EditorView.reloadUserPreferences)
49 50
 		self.view.editor.fileEncodingChangedSignal.connect(EditorView.reloadUserPreferences)
50 51
 		self.view.editor.lineEndingsChangedSignal.connect(EditorView.reloadUserPreferences)
@@ -53,17 +54,17 @@ def _connectViewAndModel(self):
53 54
 		self.view.editor.autoWrapChangedSignal.connect(EditorView.reloadUserPreferences)
54 55
 		self.view.editor.errorMarkersChangedSignal.connect(ErrorsController.reloadUserPreferences)
55 56
 		self.view.editor.errorAnnotationsChangedSignal.connect(ErrorsController.reloadUserPreferences)
56  
-	
  57
+
57 58
 		self.view.document.preambleTemplateChangedSignal.connect(Preferences.setPreambleTemplate)
58 59
 		self.view.document.latexFileTemplateChangedSignal.connect(Preferences.setLatexFileTemplate)
59  
-		
  60
+
60 61
 		self.view.preview.previewTemplateChangedSignal.connect(Preferences.setPreviewTemplate)
61 62
 		self.view.preview.latexToPDFCommandChangedSignal.connect(Preferences.setLatexToPDFCommand)
62 63
 		self.view.preview.PDFToImageCommandChangedSignal.connect(Preferences.setPDFToImageCommand)
63  
-		
  64
+
64 65
 		self.view.snippets.snippetsChangedSignal.connect(Preferences.setSnippets)
65 66
 		self.view.snippets.snippetsChangedSignal.connect(self.app_controller.loadSnippets)
66  
-		
  67
+
67 68
 	def _syncViewAndModel(self):
68 69
 		self.view.editor.editor_font = Preferences.getEditorFont()
69 70
 		self.view.editor.file_encoding = Preferences.getFileEncoding()
@@ -73,17 +74,17 @@ def _syncViewAndModel(self):
73 74
 		self.view.editor.auto_wrap = Preferences.getAutoWrap()
74 75
 		self.view.editor.error_markers = Preferences.getShowErrorMarkers()
75 76
 		self.view.editor.error_annotations = Preferences.getShowErrorAnnotations()
76  
-		
  77
+
77 78
 		self.view.document.latex_file_template = Preferences.getLatexFileTemplate()
78 79
 		self.view.document.preamble_template = Preferences.getPreambleTemplate()
79  
-		
  80
+
80 81
 		self.view.preview.preview_template = Preferences.getPreviewTemplate()
81 82
 		self.view.preview.latex_to_pdf_command = Preferences.getLatexToPDFCommand()
82 83
 		self.view.preview.pdf_to_image_command = Preferences.getPDFToImageCommand()
83  
-		
  84
+
84 85
 		self.view.snippets.snippets = Preferences.getSnippets()
85  
-	
  86
+
86 87
 	@pyqtSlot()
87 88
 	def showPreferences(self):
88 89
 		self.view.show()
89  
-		self.view.raise_()
  90
+		self.view.raise_()
29  controllers/preview.py → tikz_editor/controllers/preview.py
... ...
@@ -1,15 +1,15 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6
 # (at your option) any later version.
7  
-# 
  7
+#
8 8
 # This program is distributed in the hope that it will be useful,
9 9
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 10
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 11
 # GNU General Public License for more details.
12  
-# 
  12
+#
13 13
 # You should have received a copy of the GNU General Public License along
14 14
 # with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
 
@@ -18,10 +18,11 @@
18 18
 from PyQt4.QtCore import *
19 19
 from PyQt4.QtGui import *
20 20
 
21  
-from models import Preferences
22  
-from tools.latex2image import Converter, LatexToImageConversion
23  
-from tools import documentIO
24  
-from tools import TemporaryDirectory
  21
+from tikz_editor.models import Preferences
  22
+from tikz_editor.tools.latex2image import Converter, LatexToImageConversion
  23
+from tikz_editor.tools import documentIO
  24
+from tikz_editor.tools import TemporaryDirectory
  25
+
25 26
 
26 27
 class PreviewController(QObject):
27 28
 	"""
@@ -31,7 +32,7 @@ class PreviewController(QObject):
31 32
 	willUpdatePreviewSignal = pyqtSignal()
32 33
 	errorsInSourceSignal = pyqtSignal(list, str)
33 34
 	logsSignal = pyqtSignal(str)
34  
-	
  35
+
35 36
 	def __init__(self):
36 37
 		super(PreviewController, self).__init__()
37 38
 		self.app_controller = None
@@ -40,7 +41,7 @@ def __init__(self):
40 41
 		self.latex2image_converter = None
41 42
 		self.request_preview_update = False
42 43
 		self.last_time_content_changed = datetime.now()
43  
-	
  44
+
44 45
 	def initController(self):
45 46
 		temp_dir = TemporaryDirectory.get()
46 47
 		self.latex2image_converter = Converter(temp_dir)
@@ -53,7 +54,7 @@ def documentContentChanged(self, content):
53 54
 		self.preview_view.showWaitingBackground()
54 55
 		if not self.request_preview_update:
55 56
 			self.requestPreviewUpdate()
56  
-		
  57
+
57 58
 	@pyqtSlot()
58 59
 	def conversionAborted(self):
59 60
 		self.preview_view.showErrorBackground()
@@ -79,7 +80,7 @@ def updatePreviewAfterTypingPause(self):
79 80
 		if (datetime.now() - self.last_time_content_changed).microseconds >= 500000:
80 81
 			self.updatePreview()
81 82
 		else:
82  
-			QTimer.singleShot(400, self.updatePreviewAfterTypingPause)		
  83
+			QTimer.singleShot(400, self.updatePreviewAfterTypingPause)
83 84
 
84 85
 	def updatePreview(self):
85 86
 		self.request_preview_update = False
@@ -87,10 +88,10 @@ def updatePreview(self):
87 88
 		template = Preferences.getPreviewTemplate()
88 89
 		source = documentIO.buildFileContentFromDocument(template, doc)
89 90
 		self.latex2image_converter.convertLatexToImage(source)
90  
-	
  91
+
91 92
 	def abortPreview(self):
92 93
 		self.latex2image_converter.stopConversion()
93  
-		
  94
+
94 95
 	@pyqtSlot(LatexToImageConversion)
95 96
 	def previewGenerated(self, conversion):
96 97
 		self.willUpdatePreviewSignal.emit()
@@ -98,4 +99,4 @@ def previewGenerated(self, conversion):
98 99
 			self.preview_view.figure = conversion.image_path
99 100
 		self.preview_view.showNormalBackground()
100 101
 		self.logsSignal.emit(conversion.logs)
101  
-		self.errorsInSourceSignal.emit(conversion.errors, conversion.source)
  102
+		self.errorsInSourceSignal.emit(conversion.errors, conversion.source)
10  globals/__init__.py → tikz_editor/globals/__init__.py
... ...
@@ -1,21 +1,21 @@
1 1
 # Copyright 2012 (C) Mickael Menu <mickael.menu@gmail.com>
2  
-# 
  2
+#
3 3
 # This program is free software; you can redistribute it and/or modify
4 4
 # it under the terms of the GNU General Public License as published by
5 5
 # the Free Software Foundation; either version 2 of the License, or
6 6