PluginProjectDjangoTagsMenu.py

changeset 47
825bf5861f89
parent 44
3ea572ed13b6
child 49
ef6c805ae218
equal deleted inserted replaced
46:1e62de075091 47:825bf5861f89
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the Django tags menu plugin. 7 Module implementing the Django tags menu plugin.
8 """ 8 """
9
10 from __future__ import unicode_literals
11 9
12 import os 10 import os
13 11
14 from PyQt5.QtCore import QObject, QTranslator 12 from PyQt5.QtCore import QObject, QTranslator
15 from PyQt5.QtWidgets import QMenu 13 from PyQt5.QtWidgets import QMenu
21 # Start-of-Header 19 # Start-of-Header
22 name = "Django Tags Menu Plugin" 20 name = "Django Tags Menu Plugin"
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 21 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
24 autoactivate = True 22 autoactivate = True
25 deactivateable = True 23 deactivateable = True
26 version = "2.0.4" 24 version = "3.0.0"
27 className = "ProjectDjangoTagsMenuPlugin" 25 className = "ProjectDjangoTagsMenuPlugin"
28 packageName = "ProjectDjangoTagsMenu" 26 packageName = "ProjectDjangoTagsMenu"
29 shortDescription = "Tags menu for Django projects." 27 shortDescription = "Tags menu for Django projects."
30 longDescription = \ 28 longDescription = (
31 """This plug-in adds a menu to select various tag templates to the""" \ 29 """This plug-in adds a menu to select various tag templates to the"""
32 """ Django menu.""" 30 """ Django menu."""
31 )
33 needsRestart = False 32 needsRestart = False
34 pyqtApi = 2 33 pyqtApi = 2
35 python2Compatible = True
36 # End-of-Header 34 # End-of-Header
37 35
38 error = "" 36 error = ""
39 37
40 38
79 except KeyError: 77 except KeyError:
80 pluginObject = None 78 pluginObject = None
81 79
82 if pluginObject: 80 if pluginObject:
83 djangoMenu = pluginObject.getMenu("main") 81 djangoMenu = pluginObject.getMenu("main")
84 djangoDatabaseMenuAction = \ 82 djangoDatabaseMenuAction = pluginObject.getMenu(
85 pluginObject.getMenu("database").menuAction() 83 "database").menuAction()
86 self.__menuAction = djangoMenu.insertMenu( 84 self.__menuAction = djangoMenu.insertMenu(
87 djangoDatabaseMenuAction, self.__menu) 85 djangoDatabaseMenuAction, self.__menu)
88 self.__menuSeparator = djangoMenu.insertSeparator( 86 self.__menuSeparator = djangoMenu.insertSeparator(
89 djangoDatabaseMenuAction) 87 djangoDatabaseMenuAction)
90 self.__menuAttached = True 88 self.__menuAttached = True

eric ide

mercurial