do not add emoji to auto mode
This commit is contained in:
parent
28adf2ca85
commit
fbff13752c
3 changed files with 6 additions and 8 deletions
|
@ -25,7 +25,6 @@ The standard view will show `ssh` and `drun`, for other modes the following pref
|
|||
* `ssh` (optional)
|
||||
* `?` web search
|
||||
* `/`, `$` or `~` for files
|
||||
* `emoji` for emojis
|
||||
|
||||
<img src="images/demo.gif">
|
||||
|
||||
|
|
|
@ -425,6 +425,7 @@ where
|
|||
gtk4::init().map_err(|e| Error::Graphics(e.to_string()))?;
|
||||
log::debug!("Starting GUI");
|
||||
if let Some(ref css) = config.style() {
|
||||
log::debug!("loading css from {css}");
|
||||
let provider = CssProvider::new();
|
||||
let css_file_path = File::for_path(css);
|
||||
provider.load_from_file(&css_file_path);
|
||||
|
@ -498,8 +499,8 @@ fn build_ui<T, P>(
|
|||
.application(&app)
|
||||
.decorated(false)
|
||||
.resizable(false)
|
||||
.default_width(100)
|
||||
.default_height(100)
|
||||
.default_width(1)
|
||||
.default_height(1)
|
||||
.build();
|
||||
|
||||
let ui_elements = Rc::new(UiElements {
|
||||
|
@ -563,7 +564,7 @@ fn build_ui<T, P>(
|
|||
let wait_for_items = Instant::now();
|
||||
let (_changed, provider_elements) = get_provider_elements.join().unwrap();
|
||||
log::debug!("got items after {:?}", wait_for_items.elapsed());
|
||||
build_ui_from_menu_items(&ui_elements, &meta, provider_elements);
|
||||
|
||||
|
||||
let animate_cfg = config.clone();
|
||||
let animate_window = ui_elements.window.clone();
|
||||
|
@ -573,6 +574,8 @@ fn build_ui<T, P>(
|
|||
window_show_resize(&animate_cfg.clone(), w);
|
||||
});
|
||||
|
||||
build_ui_from_menu_items(&ui_elements, &meta, provider_elements);
|
||||
|
||||
// hide the fact that we are starting with a small window
|
||||
ui_elements.window.set_opacity(0.01);
|
||||
let window_start = Instant::now();
|
||||
|
|
|
@ -26,7 +26,6 @@ struct AutoItemProvider {
|
|||
file: FileItemProvider<AutoRunType>,
|
||||
math: MathProvider<AutoRunType>,
|
||||
ssh: SshProvider<AutoRunType>,
|
||||
emoji: EmojiProvider<AutoRunType>,
|
||||
last_mode: Option<AutoRunType>,
|
||||
}
|
||||
|
||||
|
@ -37,7 +36,6 @@ impl AutoItemProvider {
|
|||
file: FileItemProvider::new(AutoRunType::File, config.sort_order()),
|
||||
math: MathProvider::new(AutoRunType::Math),
|
||||
ssh: SshProvider::new(AutoRunType::Ssh, &config.sort_order()),
|
||||
emoji: EmojiProvider::new(AutoRunType::Emoji, &config.sort_order()),
|
||||
last_mode: None,
|
||||
}
|
||||
}
|
||||
|
@ -84,8 +82,6 @@ impl ItemProvider<AutoRunType> for AutoItemProvider {
|
|||
(AutoRunType::File, self.file.get_elements(search_opt))
|
||||
} else if search.starts_with("ssh") {
|
||||
(AutoRunType::Ssh, self.ssh.get_elements(search_opt))
|
||||
} else if search.starts_with("emoji") {
|
||||
(AutoRunType::Emoji, self.emoji.get_elements(search_opt))
|
||||
} else {
|
||||
return self.default_auto_elements(search_opt);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue