7 Module implementing the gpg extension project helper. |
7 Module implementing the gpg extension project helper. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtWidgets import QMenu |
10 from PyQt6.QtWidgets import QMenu |
11 |
11 |
12 from EricGui.EricAction import EricAction |
12 from eric7.EricGui.EricAction import EricAction |
13 |
13 |
14 from ..HgExtensionProjectHelper import HgExtensionProjectHelper |
14 from ..HgExtensionProjectHelper import HgExtensionProjectHelper |
15 |
15 |
16 import UI.PixmapCache |
16 from eric7.EricGui import EricPixmapCache |
17 |
17 |
18 |
18 |
19 class GpgProjectHelper(HgExtensionProjectHelper): |
19 class GpgProjectHelper(HgExtensionProjectHelper): |
20 """ |
20 """ |
21 Class implementing the gpg extension project helper. |
21 Class implementing the gpg extension project helper. |
31 """ |
31 """ |
32 Public method to generate the action objects. |
32 Public method to generate the action objects. |
33 """ |
33 """ |
34 self.hgGpgListAct = EricAction( |
34 self.hgGpgListAct = EricAction( |
35 self.tr("List Signed Changesets"), |
35 self.tr("List Signed Changesets"), |
36 UI.PixmapCache.getIcon("changesetSignList"), |
36 EricPixmapCache.getIcon("changesetSignList"), |
37 self.tr("List Signed Changesets..."), |
37 self.tr("List Signed Changesets..."), |
38 0, |
38 0, |
39 0, |
39 0, |
40 self, |
40 self, |
41 "mercurial_gpg_list", |
41 "mercurial_gpg_list", |
50 self.hgGpgListAct.triggered.connect(self.__hgGpgSignatures) |
50 self.hgGpgListAct.triggered.connect(self.__hgGpgSignatures) |
51 self.actions.append(self.hgGpgListAct) |
51 self.actions.append(self.hgGpgListAct) |
52 |
52 |
53 self.hgGpgVerifyAct = EricAction( |
53 self.hgGpgVerifyAct = EricAction( |
54 self.tr("Verify Signatures"), |
54 self.tr("Verify Signatures"), |
55 UI.PixmapCache.getIcon("changesetSignVerify"), |
55 EricPixmapCache.getIcon("changesetSignVerify"), |
56 self.tr("Verify Signatures"), |
56 self.tr("Verify Signatures"), |
57 0, |
57 0, |
58 0, |
58 0, |
59 self, |
59 self, |
60 "mercurial_gpg_verify", |
60 "mercurial_gpg_verify", |
72 self.hgGpgVerifyAct.triggered.connect(self.__hgGpgVerifySignatures) |
72 self.hgGpgVerifyAct.triggered.connect(self.__hgGpgVerifySignatures) |
73 self.actions.append(self.hgGpgVerifyAct) |
73 self.actions.append(self.hgGpgVerifyAct) |
74 |
74 |
75 self.hgGpgSignAct = EricAction( |
75 self.hgGpgSignAct = EricAction( |
76 self.tr("Sign Revision"), |
76 self.tr("Sign Revision"), |
77 UI.PixmapCache.getIcon("changesetSign"), |
77 EricPixmapCache.getIcon("changesetSign"), |
78 self.tr("Sign Revision"), |
78 self.tr("Sign Revision"), |
79 0, |
79 0, |
80 0, |
80 0, |
81 self, |
81 self, |
82 "mercurial_gpg_sign", |
82 "mercurial_gpg_sign", |
99 |
99 |
100 @param mainMenu reference to the main menu (QMenu) |
100 @param mainMenu reference to the main menu (QMenu) |
101 @return populated menu (QMenu) |
101 @return populated menu (QMenu) |
102 """ |
102 """ |
103 menu = QMenu(self.menuTitle(), mainMenu) |
103 menu = QMenu(self.menuTitle(), mainMenu) |
104 menu.setIcon(UI.PixmapCache.getIcon("changesetSign")) |
104 menu.setIcon(EricPixmapCache.getIcon("changesetSign")) |
105 menu.setTearOffEnabled(True) |
105 menu.setTearOffEnabled(True) |
106 |
106 |
107 menu.addAction(self.hgGpgListAct) |
107 menu.addAction(self.hgGpgListAct) |
108 menu.addAction(self.hgGpgVerifyAct) |
108 menu.addAction(self.hgGpgVerifyAct) |
109 menu.addAction(self.hgGpgSignAct) |
109 menu.addAction(self.hgGpgSignAct) |