Ejemplo n.º 1
0
 def __init__(self, iface, conf, dir):
     self._iface = iface
     self._config = conf
     self.homedir = dir
     inf = conf.get_data('info')
     self._repo = Repository(inf, dir)
     self._repo.con.login(self._repo.owner,
                          self._iface.password('Enter Password'))
     self.latest_com = self._repo.latest_commit()
     menuitems = [(u'Pull Remote Files', u'Update local repository',
                   self.pull),
                  (u'See Changes', u'Working Directory: %s' % dir,
                   self.local_changes),
                  (u'Browse Commits', u'latest: %s' % self.latest_com,
                   self.browse_commits),
                  (u'Switch Branch', u'Current: %s' % inf['branch'],
                   self.switch_branch)]
     prop = {
         'title': unicode(inf['name']),
         'body': self._iface.listbox(menuitems),
         'menu': [(u'See Description', self._list_desc)],
         'exit': self.exit,
         '_lbitems': menuitems,
         '_data': self._iface._lb_data,
         '_lb': self._iface._lb
     }
     self.homescreen = self._iface.create_screen(**prop)
     self.home()