(self, parent=None)
| 93 | self.setCurrentIndex(0) |
| 94 | |
| 95 | def choose_file(self, parent=None): |
| 96 | path, _ = QFileDialog.getOpenFileName(parent, 'Select File to Bundle', '.', 'All Files (*)') |
| 97 | if path: |
| 98 | # Ensure absolute path |
| 99 | path = os.path.abspath(path) |
| 100 | display_name = os.path.basename(path) |
| 101 | bundle_icon = QIcon(os.path.join('gui', 'icons', 'bundle.ico')) if os.path.exists(os.path.join('gui', 'icons', 'bundle.ico')) else QIcon() |
| 102 | for i in range(self.count()): |
| 103 | if self.itemData(i) == path: |
| 104 | self.setCurrentIndex(i) |
| 105 | return |
| 106 | self.addItem(bundle_icon, display_name, path) |
| 107 | self.setCurrentIndex(self.count() - 1) |
nothing calls this directly
no outgoing calls
no test coverage detected