コード例 #1
0
  def setup_board_combo(self):
    if self.board_hid is not None:
      self.board.disconnect(self.board_hid)
    model = gtk.ListStore(str)
    model.clear()
    boards = saputils.get_board_names()
    bn = self.sc.get_board_name()
    index = -1
    for i in xrange(len(boards)):
      it = model.append()
      model.set(it, 0, boards[i])
      if bn == boards[i]:
        index = i
      i += 1

    self.board.set_model(model)
    self.board.set_active(index)
    if self.board_hid is not None:
      self.board_hid = self.board.connect("changed", self.on_board_changed)
コード例 #2
0
    def setup_board_combo(self):
        if self.board_hid is not None:
            self.board.disconnect(self.board_hid)
        model = gtk.ListStore(str)
        model.clear()
        boards = saputils.get_board_names()
        bn = self.sc.get_board_name()
        index = -1
        for i in xrange(len(boards)):
            it = model.append()
            model.set(it, 0, boards[i])
            if bn == boards[i]:
                index = i
            i += 1

        self.board.set_model(model)
        self.board.set_active(index)
        if self.board_hid is not None:
            self.board_hid = self.board.connect("changed",
                                                self.on_board_changed)
コード例 #3
0
 def test_get_board_names(self):
     """
 gets all the board names
 """
     boards = saputils.get_board_names(debug=self.dbg)
     self.assertIn("sycamore1", boards)
コード例 #4
0
ファイル: test_saputils.py プロジェクト: CospanDesign/olympus
 def test_get_board_names(self):
   """
   gets all the board names
   """
   boards = saputils.get_board_names(debug = self.dbg)
   self.assertIn("sycamore1", boards)