Fix second audit findings and restore crash detection dialog

This commit is contained in:
2026-02-27 22:48:43 +02:00
parent 804ba35a70
commit 011c07820d
21 changed files with 228 additions and 181 deletions

View File

@@ -24,7 +24,7 @@ pub fn build_detail_page(record: &AppImageRecord, db: &Rc<Database>) -> adw::Nav
// Toast overlay for copy actions
let toast_overlay = adw::ToastOverlay::new();
// ViewStack for tabbed content with crossfade transitions.
// ViewStack for tabbed content (transitions disabled for instant switching).
// vhomogeneous=false so the stack sizes to the visible child only,
// preventing shorter tabs from having excess scrollable empty space.
let view_stack = adw::ViewStack::new();
@@ -124,10 +124,10 @@ pub fn build_detail_page(record: &AppImageRecord, db: &Rc<Database>) -> adw::Nav
btn_ref.set_sensitive(true);
match result {
Ok(launcher::LaunchResult::Started { child, method }) => {
let pid = child.id();
Ok(launcher::LaunchResult::Started { pid, method }) => {
log::info!("Launched: {} (PID: {}, method: {})", path, pid, method.as_str());
// App survived startup - do Wayland analysis after a delay
let db_wayland = db_launch.clone();
let path_clone = path.clone();
glib::spawn_future_local(async move {
@@ -488,12 +488,7 @@ fn build_overview_tab(record: &AppImageRecord, db: &Rc<Database>) -> gtk::Box {
spinner_ref.set_visible(false);
if let Ok(Some(data)) = result {
let gbytes = glib::Bytes::from(&data);
let stream = gio::MemoryInputStream::from_bytes(&gbytes);
if let Ok(pixbuf) = gtk::gdk_pixbuf::Pixbuf::from_stream(
&stream,
None::<&gio::Cancellable>,
) {
let texture = gtk::gdk::Texture::for_pixbuf(&pixbuf);
if let Ok(texture) = gtk::gdk::Texture::from_bytes(&gbytes) {
picture_ref.set_paintable(Some(&texture));
if let Some(slot) = textures_load.borrow_mut().get_mut(idx) {
*slot = Some(texture);
@@ -708,8 +703,11 @@ fn build_overview_tab(record: &AppImageRecord, db: &Rc<Database>) -> gtk::Box {
.margin_start(12)
.margin_end(12)
.build();
let label_row = adw::ActionRow::new();
label_row.set_child(Some(&label));
let label_row = gtk::ListBoxRow::builder()
.activatable(false)
.selectable(false)
.child(&label)
.build();
row.add_row(&label_row);
release_group.add(&row);
@@ -2080,12 +2078,7 @@ fn fetch_favicon_async(url: &str, image: &gtk::Image) {
if let Ok(Some(data)) = result {
let gbytes = glib::Bytes::from(&data);
let stream = gio::MemoryInputStream::from_bytes(&gbytes);
if let Ok(pixbuf) = gtk::gdk_pixbuf::Pixbuf::from_stream(
&stream,
None::<&gio::Cancellable>,
) {
let texture = gtk::gdk::Texture::for_pixbuf(&pixbuf);
if let Ok(texture) = gtk::gdk::Texture::from_bytes(&gbytes) {
image_ref.set_paintable(Some(&texture));
}
}