4557 """ |
4557 """ |
4558 self.__loadRecent() |
4558 self.__loadRecent() |
4559 |
4559 |
4560 self.recentMenu.clear() |
4560 self.recentMenu.clear() |
4561 |
4561 |
4562 idx = 1 |
4562 for idx, rp in enumerate(self.recent, start=1): |
4563 for rp in self.recent: |
|
4564 if idx < 10: |
4563 if idx < 10: |
4565 formatStr = '&{0:d}. {1}' |
4564 formatStr = '&{0:d}. {1}' |
4566 else: |
4565 else: |
4567 formatStr = '{0:d}. {1}' |
4566 formatStr = '{0:d}. {1}' |
4568 act = self.recentMenu.addAction( |
4567 act = self.recentMenu.addAction( |
4569 formatStr.format( |
4568 formatStr.format( |
4570 idx, |
4569 idx, |
4571 Utilities.compactPath(rp, self.ui.maxMenuFilePathLen))) |
4570 Utilities.compactPath(rp, self.ui.maxMenuFilePathLen))) |
4572 act.setData(rp) |
4571 act.setData(rp) |
4573 act.setEnabled(QFileInfo(rp).exists()) |
4572 act.setEnabled(QFileInfo(rp).exists()) |
4574 idx += 1 |
|
4575 |
4573 |
4576 self.recentMenu.addSeparator() |
4574 self.recentMenu.addSeparator() |
4577 self.recentMenu.addAction(self.tr('&Clear'), self.clearRecent) |
4575 self.recentMenu.addAction(self.tr('&Clear'), self.clearRecent) |
4578 |
4576 |
4579 def __openRecent(self, act): |
4577 def __openRecent(self, act): |
5401 progress = E5ProgressDialog( |
5399 progress = E5ProgressDialog( |
5402 self.tr("Creating plugin archives..."), self.tr("Abort"), |
5400 self.tr("Creating plugin archives..."), self.tr("Abort"), |
5403 0, len(selectedLists), self.tr("%v/%m Archives")) |
5401 0, len(selectedLists), self.tr("%v/%m Archives")) |
5404 progress.setMinimumDuration(0) |
5402 progress.setMinimumDuration(0) |
5405 progress.setWindowTitle(self.tr("Create Plugin Archives")) |
5403 progress.setWindowTitle(self.tr("Create Plugin Archives")) |
5406 count = 0 |
|
5407 errors = 0 |
5404 errors = 0 |
5408 for pkglist in selectedLists: |
5405 for count, pkglist in enumerate(selectedLists): |
5409 progress.setValue(count) |
5406 progress.setValue(count) |
5410 if progress.wasCanceled(): |
5407 if progress.wasCanceled(): |
5411 break |
5408 break |
5412 |
5409 |
5413 try: |
5410 try: |
5449 """<p>The file <b>{0}</b> is not ready yet.""" |
5445 """<p>The file <b>{0}</b> is not ready yet.""" |
5450 """</p><p>Please rework it and delete the""" |
5446 """</p><p>Please rework it and delete the""" |
5451 """'; initial_list' line of the header.""" |
5447 """'; initial_list' line of the header.""" |
5452 """</p>""").format(os.path.basename(pkglist))) |
5448 """</p>""").format(os.path.basename(pkglist))) |
5453 errors += 1 |
5449 errors += 1 |
5454 count += 1 |
|
5455 listOK = False |
5450 listOK = False |
5456 break |
5451 break |
5457 elif line.strip(): |
5452 elif line.strip(): |
5458 names.append(line.strip()) |
5453 names.append(line.strip()) |
5459 |
5454 |
5517 archiveFile.writestr("VERSION", version.encode("utf-8")) |
5511 archiveFile.writestr("VERSION", version.encode("utf-8")) |
5518 archiveFile.close() |
5512 archiveFile.close() |
5519 |
5513 |
5520 if archive not in self.pdata["OTHERS"]: |
5514 if archive not in self.pdata["OTHERS"]: |
5521 self.appendFile(archive) |
5515 self.appendFile(archive) |
5522 |
|
5523 count += 1 |
|
5524 |
5516 |
5525 progress.setValue(len(selectedLists)) |
5517 progress.setValue(len(selectedLists)) |
5526 |
5518 |
5527 if errors: |
5519 if errors: |
5528 self.ui.showNotification( |
5520 self.ui.showNotification( |