Ejemplo n.º 1
0
    def finish_initializing(self, builder):  # pylint: disable=E1002
        """Set up the main window"""
        super(BrazoWindow, self).finish_initializing(builder)

        self.AboutDialog = AboutBrazoDialog()
        self.PreferencesDialog = PreferencesBrazoDialog()

        # Code for other initialization actions should be added here.
        self.poses = []
        self.selected_pose = None
        lengths = self.get_lengths()
        self.ikcalc = brazo.InverseKinematics.IKCalculator(lengths)

        # Initialize combo box
        liststore = gtk.ListStore(str)
        self.ui.port_combo_box.set_model(liststore)
        cell = gtk.CellRendererText()
        self.ui.port_combo_box.pack_start(cell, True)
        self.ui.port_combo_box.add_attribute(cell, 'text', 0)
        self.ui.file_selector_combo_box.set_model(gtk.ListStore(str))
        self.ui.file_selector_combo_box.pack_start(cell, True)
        self.ui.file_selector_combo_box.add_attribute(cell, 'text', 0)

        self.armcon = None
        self.enumerate_ports()

        self.enumerate_files()