Exemple #1
0
 def delete_rep(self,sysTrayIcon,delkey):
     dataz = st.get_replist()
     app = wx.PySimpleApp()
     retCode = wx.MessageBox("Are you sure you want to delete the repository?", "Delete",wx.YES_NO | wx.ICON_QUESTION)
     if retCode == 2:
         del dataz[delkey]
         st.put_replist(dataz)
         self.restart(None,None)
Exemple #2
0
 def get_dataz(self):
     #read the Repository dataz
     self.dataz = st.get_replist()
     #setup the system icon menu
     #submenu with repositories list
     repositories = ()
     for key in self.dataz.keys():
         repositories = repositories + ((key+" - "+self.dataz[key]['Location'], None, self.dataz[key]['Location'], self.open_folder),)
     #submenu with delete repositories list
     #gottamake new one to define a delete function to each
     delrep = ()
     for key in self.dataz.keys():
         delrep = delrep + ((key, None, key, self.delete_rep),)
     #the right-click menu
     menu_options = (('Repositories', None, None, repositories),
                     ('Delete', None, None, delrep),
                     ('New', None, None, self.new),
                     ('Restart', None, None, self.restart)
                     )
     return menu_options