9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 import os |
12 import os |
13 |
13 |
14 from PyQt5.QtCore import QObject |
14 from PyQt5.QtCore import QObject, QCoreApplication |
15 from PyQt5.QtWidgets import QDialog |
15 from PyQt5.QtWidgets import QDialog |
16 |
16 |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.E5Application import e5App |
18 |
18 |
19 from UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog |
19 from UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog |
269 items = self.browser.getSelectedItems([ProjectBrowserFileItem]) |
269 items = self.browser.getSelectedItems([ProjectBrowserFileItem]) |
270 names = [itm.fileName() for itm in items] |
270 names = [itm.fileName() for itm in items] |
271 |
271 |
272 dlg = DeleteFilesConfirmationDialog( |
272 dlg = DeleteFilesConfirmationDialog( |
273 self.parent(), |
273 self.parent(), |
274 self.tr("Remove from repository (and disk)"), |
274 QCoreApplication.translate( |
275 self.tr( |
275 "VcsProjectBrowserHelper", |
|
276 "Remove from repository (and disk)"), |
|
277 QCoreApplication.translate( |
|
278 "VcsProjectBrowserHelper", |
276 "Do you really want to remove these translation files from" |
279 "Do you really want to remove these translation files from" |
277 " the repository (and disk)?"), |
280 " the repository (and disk)?"), |
278 names) |
281 names) |
279 else: |
282 else: |
280 items = self.browser.getSelectedItems() |
283 items = self.browser.getSelectedItems() |
289 files = [self.browser.project.getRelativePath(name) |
292 files = [self.browser.project.getRelativePath(name) |
290 for name in names] |
293 for name in names] |
291 |
294 |
292 dlg = DeleteFilesConfirmationDialog( |
295 dlg = DeleteFilesConfirmationDialog( |
293 self.parent(), |
296 self.parent(), |
294 self.tr("Remove from repository (and disk)"), |
297 QCoreApplication.translate( |
295 self.tr( |
298 "VcsProjectBrowserHelper", |
|
299 "Remove from repository (and disk)"), |
|
300 QCoreApplication.translate( |
|
301 "VcsProjectBrowserHelper", |
296 "Do you really want to remove these files/directories" |
302 "Do you really want to remove these files/directories" |
297 " from the repository (and disk)?"), |
303 " from the repository (and disk)?"), |
298 files) |
304 files) |
299 |
305 |
300 if dlg.exec_() == QDialog.Accepted: |
306 if dlg.exec_() == QDialog.Accepted: |