prevent double listsings of apps in widget, thanks Marin

This commit is contained in:
mdipierro
2012-08-07 09:15:58 -05:00
parent 5ff910baa6
commit e7c8b08a43
2 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-08-06 23:01:45) dev
Version 2.00.0 (2012-08-07 09:15:55) dev
+9 -7
View File
@@ -394,13 +394,15 @@ class web2pyDialog(object):
def connect_pages(self):
""" Connect pages """
for arq in os.listdir('applications/'):
if os.path.exists('applications/%s/__init__.py' % arq):
url = self.url + '/' + arq
start_browser = lambda u = url: try_start_browser(u)
self.pagesmenu.add_command(label=url,
command=start_browser)
#reset the menu
available_apps = [arq for arq in os.listdir('applications/')
if os.path.exists('applications/%s/__init__.py' % arq)]
self.pagesmenu.delete(0, len(available_apps))
for arq in available_apps:
url = self.url + '/' + arq
start_browser = lambda u = url: try_start_browser(u)
self.pagesmenu.add_command(label=url,
command=start_browser)
def quit(self, justHide=False):
""" Finish the program execution """