31 def initActions(self): |
31 def initActions(self): |
32 """ |
32 """ |
33 Public method to generate the action objects. |
33 Public method to generate the action objects. |
34 """ |
34 """ |
35 self.hgPurgeAct = E5Action( |
35 self.hgPurgeAct = E5Action( |
36 self.trUtf8('Purge Files'), |
36 self.tr('Purge Files'), |
37 UI.PixmapCache.getIcon("fileDelete.png"), |
37 UI.PixmapCache.getIcon("fileDelete.png"), |
38 self.trUtf8('Purge Files'), |
38 self.tr('Purge Files'), |
39 0, 0, self, 'mercurial_purge') |
39 0, 0, self, 'mercurial_purge') |
40 self.hgPurgeAct.setStatusTip(self.trUtf8( |
40 self.hgPurgeAct.setStatusTip(self.tr( |
41 'Delete files and directories not known to Mercurial' |
41 'Delete files and directories not known to Mercurial' |
42 )) |
42 )) |
43 self.hgPurgeAct.setWhatsThis(self.trUtf8( |
43 self.hgPurgeAct.setWhatsThis(self.tr( |
44 """<b>Purge Files</b>""" |
44 """<b>Purge Files</b>""" |
45 """<p>This deletes files and directories not known to Mercurial.""" |
45 """<p>This deletes files and directories not known to Mercurial.""" |
46 """ That means that purge will delete:<ul>""" |
46 """ That means that purge will delete:<ul>""" |
47 """<li>unknown files (marked with "not tracked" in the status""" |
47 """<li>unknown files (marked with "not tracked" in the status""" |
48 """ dialog)</li>""" |
48 """ dialog)</li>""" |
49 """<li>empty directories</li>""" |
49 """<li>empty directories</li>""" |
50 """</ul>Note that ignored files will be left untouched.</p>""" |
50 """</ul>Note that ignored files will be left untouched.</p>""" |
51 )) |
51 )) |
52 self.hgPurgeAct.triggered[()].connect(self.__hgPurge) |
52 self.hgPurgeAct.triggered.connect(self.__hgPurge) |
53 self.actions.append(self.hgPurgeAct) |
53 self.actions.append(self.hgPurgeAct) |
54 |
54 |
55 self.hgPurgeAllAct = E5Action( |
55 self.hgPurgeAllAct = E5Action( |
56 self.trUtf8('Purge All Files'), |
56 self.tr('Purge All Files'), |
57 self.trUtf8('Purge All Files'), |
57 self.tr('Purge All Files'), |
58 0, 0, self, 'mercurial_purge_all') |
58 0, 0, self, 'mercurial_purge_all') |
59 self.hgPurgeAllAct.setStatusTip(self.trUtf8( |
59 self.hgPurgeAllAct.setStatusTip(self.tr( |
60 'Delete files and directories not known to Mercurial including' |
60 'Delete files and directories not known to Mercurial including' |
61 ' ignored ones' |
61 ' ignored ones' |
62 )) |
62 )) |
63 self.hgPurgeAllAct.setWhatsThis(self.trUtf8( |
63 self.hgPurgeAllAct.setWhatsThis(self.tr( |
64 """<b>Purge All Files</b>""" |
64 """<b>Purge All Files</b>""" |
65 """<p>This deletes files and directories not known to Mercurial.""" |
65 """<p>This deletes files and directories not known to Mercurial.""" |
66 """ That means that purge will delete:<ul>""" |
66 """ That means that purge will delete:<ul>""" |
67 """<li>unknown files (marked with "not tracked" in the status""" |
67 """<li>unknown files (marked with "not tracked" in the status""" |
68 """ dialog)</li>""" |
68 """ dialog)</li>""" |
69 """<li>empty directories</li>""" |
69 """<li>empty directories</li>""" |
70 """<li>ignored files and directories</li>""" |
70 """<li>ignored files and directories</li>""" |
71 """</ul></p>""" |
71 """</ul></p>""" |
72 )) |
72 )) |
73 self.hgPurgeAllAct.triggered[()].connect(self.__hgPurgeAll) |
73 self.hgPurgeAllAct.triggered.connect(self.__hgPurgeAll) |
74 self.actions.append(self.hgPurgeAllAct) |
74 self.actions.append(self.hgPurgeAllAct) |
75 |
75 |
76 self.hgPurgeListAct = E5Action( |
76 self.hgPurgeListAct = E5Action( |
77 self.trUtf8('List Files to be Purged'), |
77 self.tr('List Files to be Purged'), |
78 UI.PixmapCache.getIcon("fileDeleteList.png"), |
78 UI.PixmapCache.getIcon("fileDeleteList.png"), |
79 self.trUtf8('List Files to be Purged...'), |
79 self.tr('List Files to be Purged...'), |
80 0, 0, self, 'mercurial_purge_list') |
80 0, 0, self, 'mercurial_purge_list') |
81 self.hgPurgeListAct.setStatusTip(self.trUtf8( |
81 self.hgPurgeListAct.setStatusTip(self.tr( |
82 'List files and directories not known to Mercurial' |
82 'List files and directories not known to Mercurial' |
83 )) |
83 )) |
84 self.hgPurgeListAct.setWhatsThis(self.trUtf8( |
84 self.hgPurgeListAct.setWhatsThis(self.tr( |
85 """<b>List Files to be Purged</b>""" |
85 """<b>List Files to be Purged</b>""" |
86 """<p>This lists files and directories not known to Mercurial.""" |
86 """<p>This lists files and directories not known to Mercurial.""" |
87 """ These would be deleted by the "Purge Files" menu entry.</p>""" |
87 """ These would be deleted by the "Purge Files" menu entry.</p>""" |
88 )) |
88 )) |
89 self.hgPurgeListAct.triggered[()].connect(self.__hgPurgeList) |
89 self.hgPurgeListAct.triggered.connect(self.__hgPurgeList) |
90 self.actions.append(self.hgPurgeListAct) |
90 self.actions.append(self.hgPurgeListAct) |
91 |
91 |
92 self.hgPurgeAllListAct = E5Action( |
92 self.hgPurgeAllListAct = E5Action( |
93 self.trUtf8('List All Files to be Purged'), |
93 self.tr('List All Files to be Purged'), |
94 self.trUtf8('List All Files to be Purged...'), |
94 self.tr('List All Files to be Purged...'), |
95 0, 0, self, 'mercurial_purge_all_list') |
95 0, 0, self, 'mercurial_purge_all_list') |
96 self.hgPurgeAllListAct.setStatusTip(self.trUtf8( |
96 self.hgPurgeAllListAct.setStatusTip(self.tr( |
97 'List files and directories not known to Mercurial including' |
97 'List files and directories not known to Mercurial including' |
98 ' ignored ones' |
98 ' ignored ones' |
99 )) |
99 )) |
100 self.hgPurgeAllListAct.setWhatsThis(self.trUtf8( |
100 self.hgPurgeAllListAct.setWhatsThis(self.tr( |
101 """<b>List All Files to be Purged</b>""" |
101 """<b>List All Files to be Purged</b>""" |
102 """<p>This lists files and directories not known to Mercurial""" |
102 """<p>This lists files and directories not known to Mercurial""" |
103 """ including ignored ones. These would be deleted by the""" |
103 """ including ignored ones. These would be deleted by the""" |
104 """ "Purge All Files" menu entry.</p>""" |
104 """ "Purge All Files" menu entry.</p>""" |
105 )) |
105 )) |
106 self.hgPurgeAllListAct.triggered[()].connect(self.__hgPurgeAllList) |
106 self.hgPurgeAllListAct.triggered.connect(self.__hgPurgeAllList) |
107 self.actions.append(self.hgPurgeAllListAct) |
107 self.actions.append(self.hgPurgeAllListAct) |
108 |
108 |
109 def initMenu(self, mainMenu): |
109 def initMenu(self, mainMenu): |
110 """ |
110 """ |
111 Public method to generate the extension menu. |
111 Public method to generate the extension menu. |