146 |
146 |
147 def deactivate(self): |
147 def deactivate(self): |
148 """ |
148 """ |
149 Public method to deactivate this plugin. |
149 Public method to deactivate this plugin. |
150 """ |
150 """ |
151 e5App().getObject("Project").showMenu.disconnect(self.__projectShowMenu) |
151 e5App().getObject("Project").showMenu.disconnect( |
|
152 self.__projectShowMenu) |
152 |
153 |
153 menu = e5App().getObject("Project").getMenu("Apidoc") |
154 menu = e5App().getObject("Project").getMenu("Apidoc") |
154 if menu: |
155 if menu: |
155 menu.removeAction(self.__projectAct) |
156 menu.removeAction(self.__projectAct) |
156 e5App().getObject("Project").removeE5Actions([self.__projectAct]) |
157 e5App().getObject("Project").removeE5Actions([self.__projectAct]) |
187 args, parms = dlg.generateParameters() |
189 args, parms = dlg.generateParameters() |
188 project.setData('DOCUMENTATIONPARMS', "ERIC4DOC", parms) |
190 project.setData('DOCUMENTATIONPARMS', "ERIC4DOC", parms) |
189 |
191 |
190 # add parameter for the eol setting |
192 # add parameter for the eol setting |
191 if not project.useSystemEol(): |
193 if not project.useSystemEol(): |
192 args.append("--eol={0}".format(eolTranslation[project.getEolString()])) |
194 args.append( |
|
195 "--eol={0}".format(eolTranslation[project.getEolString()])) |
193 |
196 |
194 # now do the call |
197 # now do the call |
195 from DocumentationPlugins.Ericdoc.EricdocExecDialog import EricdocExecDialog |
198 from DocumentationPlugins.Ericdoc.EricdocExecDialog import \ |
|
199 EricdocExecDialog |
196 dia = EricdocExecDialog("Ericdoc") |
200 dia = EricdocExecDialog("Ericdoc") |
197 res = dia.start(args, project.ppath) |
201 res = dia.start(args, project.ppath) |
198 if res: |
202 if res: |
199 dia.exec_() |
203 dia.exec_() |
200 |
204 |
208 project.pdata['OTHERS'].append(outdir) |
212 project.pdata['OTHERS'].append(outdir) |
209 project.setDirty(True) |
213 project.setDirty(True) |
210 project.othersAdded(outdir) |
214 project.othersAdded(outdir) |
211 |
215 |
212 if parms['qtHelpEnabled']: |
216 if parms['qtHelpEnabled']: |
213 outdir = Utilities.toNativeSeparators(parms['qtHelpOutputDirectory']) |
217 outdir = Utilities.toNativeSeparators( |
|
218 parms['qtHelpOutputDirectory']) |
214 if outdir == '': |
219 if outdir == '': |
215 outdir = 'help' # that is eric5_docs default QtHelp output dir |
220 outdir = 'help' # that is eric5_docs default QtHelp |
|
221 # output dir |
216 |
222 |
217 # add it to the project data, if it isn't in already |
223 # add it to the project data, if it isn't in already |
218 outdir = project.getRelativePath(outdir) |
224 outdir = project.getRelativePath(outdir) |
219 if outdir not in project.pdata['OTHERS']: |
225 if outdir not in project.pdata['OTHERS']: |
220 project.pdata['OTHERS'].append(outdir) |
226 project.pdata['OTHERS'].append(outdir) |