Commit 44cb3e3cf0
Unsigned
Layout: unified · split
src/config.rs +4 −4
| @@ -26,7 +26,7 @@ use weechat::{ | ||
| 26 | 26 | config, |
| 27 | 27 | config::{ |
| 28 | 28 | Conf, ConfigOption, ConfigSection, ConfigSectionSettings, |
| 29 | IntegerOptionSettings, OptionChanged, SectionReadCallback, | |
| 29 | EnumOptionSettings, OptionChanged, SectionReadCallback, | |
| 30 | 30 | }, |
| 31 | 31 | Weechat, |
| 32 | 32 | }; |
| @@ -194,7 +194,7 @@ impl ConfigHandle { | ||
| 194 | 194 | |
| 195 | 195 | let servers = servers.clone(); |
| 196 | 196 | |
| 197 | let settings = IntegerOptionSettings::new("server_buffer") | |
| 197 | let settings = EnumOptionSettings::new("server_buffer") | |
| 198 | 198 | .description("Should the server buffer be merged with other buffers or independent") |
| 199 | 199 | .set_change_callback(move |_, _| { |
| 200 | 200 | for server in servers.borrow().values() { |
| @@ -210,7 +210,7 @@ impl ConfigHandle { | ||
| 210 | 210 | ); |
| 211 | 211 | |
| 212 | 212 | look_section |
| 213 | .new_integer_option(settings) | |
| 213 | .new_enum_option(settings) | |
| 214 | 214 | .expect("Can't create server buffers option"); |
| 215 | 215 | } |
| 216 | 216 | |
| @@ -228,7 +228,7 @@ impl ConfigHandle { | ||
| 228 | 228 | |
| 229 | 229 | impl<'a> LookSection<'a> { |
| 230 | 230 | pub fn server_buffer(&self) -> ServerBuffer { |
| 231 | if let ConfigOption::Integer(o) = | |
| 231 | if let ConfigOption::Enum(o) = | |
| 232 | 232 | self.search_option("server_buffer").unwrap() |
| 233 | 233 | { |
| 234 | 234 | ServerBuffer::from(o.value()) |