MCPcopy Create free account
hub / github.com/echQoQ/RustSL / refresh

Method refresh

gui/widgets.py:51–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49 self.refresh()
50
51 def refresh(self):
52 self.clear()
53 ico_files = list_ico_files()
54 if not ico_files:
55 icon_path = os.path.join('icons', 'excel.ico')
56 self.addItem(QIcon(icon_path), 'excel.ico', icon_path)
57 else:
58 for f in ico_files:
59 icon_path = os.path.join('icons', f)
60 self.addItem(QIcon(icon_path), f, icon_path)
61 if self.count() > 0 and self.currentIndex() == -1:
62 self.setCurrentIndex(0)
63
64 def choose_file(self, parent=None):
65 path, _ = QFileDialog.getOpenFileName(parent, 'Select Icon File', '.', 'Icon Files (*.ico);;All Files (*)')

Callers 1

__init__Method · 0.95

Calls 1

list_ico_filesFunction · 0.85

Tested by

no test coverage detected