1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use crate::{InfoBar, ResponseType};
impl InfoBar {
#[doc(alias = "gtk_info_bar_new_with_buttons")]
#[doc(alias = "new_with_buttons")]
pub fn with_buttons(buttons: &[(&str, ResponseType)]) -> Self {
assert_initialized_main_thread!();
let info_bar = InfoBar::new();
info_bar.add_buttons(buttons);
info_bar
}
#[doc(alias = "gtk_info_bar_add_buttons")]
pub fn add_buttons(&self, buttons: &[(&str, ResponseType)]) {
for &(text, id) in buttons {
self.add_button(text, id);
}
}
}