Пример #1
0
 def set_label_from_event(self, button, event):
     """ Set the label of tempo button correctly
         even if the event in the self.__song.get_data().get_bar_info(0) is missing """
     if event:
         label = BarInfo.get_tempo_value(event) + ' BPM'
         button.set_label(label)
     else:
         button.set_label(EventTempo.__TEMPO_UNDEFINED)
Пример #2
0
 def init_window(self, button, event):
     # hide back, forward, remove buttons
     if button is self.__togglebutton2: self.__alignment15.hide()
     else: self.__alignment15.show()
     self.__toggled_button = button
     self.__curr_event = event
     self.__new_event = None
     if event:
         self.__spinbutton2.set_value(int(BarInfo.get_tempo_value(event)))
     else:
         self.on_spinbutton2_value_changed_callback(self.__spinbutton2)
     self.__spinbutton2.grab_focus()