def _add_infobar(self, message, message_type): infobar = MessageBar(message, message_type) infobar.show() self.main_box.pack_start(infobar, False, False, 0) self.main_box.reorder_child(infobar, 0) return infobar
def add_info_bar(self, message_type, label, action_widget=None): infobar = MessageBar(label, message_type) assert infobar is not None if action_widget: infobar.add_action_widget(action_widget, 0) action_widget.show() infobar.show() self.main_vbox.pack_start(infobar, False, False, 0) self.main_vbox.reorder_child(infobar, 2) return infobar
def add_info_bar(self, message_type, label, action_widget=None): """Show an information bar to the user. :param message_type: message type, a Gtk.MessageType :param label: label to display :param action_widget: optional, most likely a button :returns: the infobar """ infobar = MessageBar(label, message_type) if action_widget: infobar.add_action_widget(action_widget, 0) action_widget.show() infobar.show() self.main_vbox.pack_start(infobar, False, False, 0) self.main_vbox.reorder_child(infobar, 0) return infobar