Commit 44186f20 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

Betterr research results

parent fffb2f2e
Pipeline #113866 failed with stages
in 4 minutes and 48 seconds
max_width = 200
max_width = 160
edition = "2018"
......@@ -74,7 +74,8 @@ impl Icon {
// Check if the icon should be shown for the searched string
let mut found_tags = self.tags.clone();
found_tags.retain(|tag| tag.to_lowercase().contains(search_str.as_str()));
icon_terms.contains(&search_str.as_str()) || found_tags.len() != 0
icon_terms.contains(&search_str.as_str()) || found_tags.len() != 0 || icon_name == search_str || icon_name.contains(&search_str.as_str())
}
pub fn save(&self, destination: gio::File) -> Result<(), Error> {
......
......@@ -49,10 +49,12 @@ impl SearchProvider {
});
let sp = s.clone();
self.search_provider.connect_get_initial_result_set(move |terms| sp.borrow().clone().search(terms));
self.search_provider
.connect_get_initial_result_set(move |terms| sp.borrow().clone().search(terms));
let sp = s.clone();
self.search_provider.connect_get_subsearch_result_set(move |_, terms| sp.borrow().clone().search(terms));
self.search_provider
.connect_get_subsearch_result_set(move |_, terms| sp.borrow().clone().search(terms));
let sp = s.clone();
self.search_provider.connect_get_result_metas(move |sp_ids| {
......
......@@ -20,7 +20,11 @@ impl ExportDialog {
is_system_infobar.set_visible(icon.is_system);
is_system_infobar.set_no_show_all(!icon.is_system);
let export_dialog = ExportDialog { widget, builder, icon: Rc::new(icon) };
let export_dialog = ExportDialog {
widget,
builder,
icon: Rc::new(icon),
};
export_dialog.init();
export_dialog.setup_actions();
export_dialog
......
......@@ -23,7 +23,12 @@ impl Window {
widget.get_style_context().add_class("devel");
}
let window = Window { widget, builder, sender, model };
let window = Window {
widget,
builder,
sender,
model,
};
window.init(settings);
window
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment