Mercurial > pyntnclick
comparison pyntnclick/widgets/filechooser.py @ 718:ab489f7e87f8 pyntnclick
Make filechooser widget presistent, to avoid constantly descending directory trees
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Mon, 06 Aug 2012 11:17:27 +0200 |
parents | f33dd2093f77 |
children | f5e381e819a1 |
comparison
equal
deleted
inserted
replaced
717:3b2d1adca59c | 718:ab489f7e87f8 |
---|---|
33 path = os.path.join(self.curdir, entry) | 33 path = os.path.join(self.curdir, entry) |
34 if os.path.isdir(path): | 34 if os.path.isdir(path): |
35 self.dirs.append(entry) | 35 self.dirs.append(entry) |
36 else: | 36 else: |
37 self.files.append(entry) | 37 self.files.append(entry) |
38 | |
39 def refresh(self): | |
40 self.page = 0 | |
41 self.selected = None | |
42 self.get_lists() | |
43 self.fill_page() | |
38 | 44 |
39 def _dir_button(self, entry): | 45 def _dir_button(self, entry): |
40 widget = TextButton((0, 0), self.gd, entry + '/', | 46 widget = TextButton((0, 0), self.gd, entry + '/', |
41 fontname=self.gd.constants.bold_font, | 47 fontname=self.gd.constants.bold_font, |
42 fontsize=10) | 48 fontsize=10) |