40 self.__activeCompleter = self.__archiveFileCompleter |
40 self.__activeCompleter = self.__archiveFileCompleter |
41 self.archiveEdit.setCompleter(self.__activeCompleter) |
41 self.archiveEdit.setCompleter(self.__activeCompleter) |
42 self.__activeCompleter.model().setNameFilters([]) |
42 self.__activeCompleter.model().setNameFilters([]) |
43 |
43 |
44 self.typeComboBox.addItem( |
44 self.typeComboBox.addItem( |
45 self.trUtf8("Detect Automatically"), "") |
45 self.tr("Detect Automatically"), "") |
46 self.typeComboBox.addItem( |
46 self.typeComboBox.addItem( |
47 self.trUtf8("Directory of Files"), "files") |
47 self.tr("Directory of Files"), "files") |
48 self.typeComboBox.addItem( |
48 self.typeComboBox.addItem( |
49 self.trUtf8("Uncompressed TAR-Archive"), "tar") |
49 self.tr("Uncompressed TAR-Archive"), "tar") |
50 self.typeComboBox.addItem( |
50 self.typeComboBox.addItem( |
51 self.trUtf8("Bzip2 compressed TAR-Archive"), "tbz2") |
51 self.tr("Bzip2 compressed TAR-Archive"), "tbz2") |
52 self.typeComboBox.addItem( |
52 self.typeComboBox.addItem( |
53 self.trUtf8("Gzip compressed TAR-Archive"), "tgz") |
53 self.tr("Gzip compressed TAR-Archive"), "tgz") |
54 self.typeComboBox.addItem( |
54 self.typeComboBox.addItem( |
55 self.trUtf8("Uncompressed ZIP-Archive"), "uzip") |
55 self.tr("Uncompressed ZIP-Archive"), "uzip") |
56 self.typeComboBox.addItem( |
56 self.typeComboBox.addItem( |
57 self.trUtf8("Compressed ZIP-Archive"), "zip") |
57 self.tr("Compressed ZIP-Archive"), "zip") |
58 |
58 |
59 self.__unixFileFilters = [ |
59 self.__unixFileFilters = [ |
60 self.trUtf8("Bzip2 compressed TAR-Archive (*.tar.bz2)"), |
60 self.tr("Bzip2 compressed TAR-Archive (*.tar.bz2)"), |
61 self.trUtf8("Gzip compressed TAR-Archive (*.tar.gz)"), |
61 self.tr("Gzip compressed TAR-Archive (*.tar.gz)"), |
62 self.trUtf8("Uncompressed TAR-Archive (*.tar)"), |
62 self.tr("Uncompressed TAR-Archive (*.tar)"), |
63 ] |
63 ] |
64 self.__windowsFileFilters = [ |
64 self.__windowsFileFilters = [ |
65 self.trUtf8("Compressed ZIP-Archive (*.zip)"), |
65 self.tr("Compressed ZIP-Archive (*.zip)"), |
66 self.trUtf8("Uncompressed ZIP-Archive (*.uzip)") |
66 self.tr("Uncompressed ZIP-Archive (*.uzip)") |
67 ] |
67 ] |
68 if Utilities.isWindowsPlatform(): |
68 if Utilities.isWindowsPlatform(): |
69 self.__fileFilters = ";;".join( |
69 self.__fileFilters = ";;".join( |
70 self.__windowsFileFilters + self.__unixFileFilters) |
70 self.__windowsFileFilters + self.__unixFileFilters) |
71 else: |
71 else: |
72 self.__fileFilters = ";;".join( |
72 self.__fileFilters = ";;".join( |
73 self.__unixFileFilters + self.__windowsFileFilters) |
73 self.__unixFileFilters + self.__windowsFileFilters) |
74 self.__fileFilters += ";;" + self.trUtf8("All Files (*)") |
74 self.__fileFilters += ";;" + self.tr("All Files (*)") |
75 |
75 |
76 self.__typeFilters = { |
76 self.__typeFilters = { |
77 "tar": ["*.tar"], |
77 "tar": ["*.tar"], |
78 "tbz2": ["*.tar.bz2", "*.tbz2"], |
78 "tbz2": ["*.tar.bz2", "*.tbz2"], |
79 "tgz": ["*.tar.gz", "*.tgz"], |
79 "tgz": ["*.tar.gz", "*.tgz"], |
109 archive = self.__projectPath |
109 archive = self.__projectPath |
110 |
110 |
111 if type_ == "files": |
111 if type_ == "files": |
112 archive = E5FileDialog.getExistingDirectory( |
112 archive = E5FileDialog.getExistingDirectory( |
113 self, |
113 self, |
114 self.trUtf8("Select Archive Directory"), |
114 self.tr("Select Archive Directory"), |
115 archive, |
115 archive, |
116 E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) |
116 E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) |
117 else: |
117 else: |
118 archive, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
118 archive, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
119 self, |
119 self, |
120 self.trUtf8("Select Archive File"), |
120 self.tr("Select Archive File"), |
121 archive, |
121 archive, |
122 self.__fileFilters, |
122 self.__fileFilters, |
123 None, |
123 None, |
124 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) |
124 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) |
125 if archive: |
125 if archive: |