Skip to content

Commit 3bbebed

Browse files
committed
Make ListBox rows for selected files not activatable
See: https://gitlab.gnome.org/Teams/Circle/-/issues/250#note_2517177 > List elements elements can be clicked, but that doesn't do anything - I'd either make this open the file or make the elements not activatable.
1 parent 130f315 commit 3bbebed

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

src/window.rs

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,23 +1354,12 @@ impl PacketApplicationWindow {
13541354
let widget =
13551355
widgets::create_file_card(&imp.obj(), &imp.manage_files_model, model_item);
13561356

1357-
// TODO: Set activatable/focusable to false since they're
1358-
// not being used here.
1359-
//
1360-
// The rows are also adds unnecessary steps in keyboard
1361-
// navigation.
1362-
//
1363-
// Setting parent's property like this seemingly makes the
1364-
// process crash silently
1365-
//
1366-
// widget.connect_parent_notify(|obj| {
1367-
// if let Some(row) = obj.parent().and_downcast_ref::<gtk::ListBoxRow>() {
1368-
// row.set_focusable(false);
1369-
// row.set_activatable(false);
1370-
// }
1371-
// });
1372-
1373-
widget.into()
1357+
// TODO: Should focusable be false too since it adds unnecessary steps in keyboard navigation?
1358+
let row = gtk::ListBoxRow::new();
1359+
row.set_activatable(false);
1360+
row.set_child(Some(&widget));
1361+
1362+
row.into()
13741363
}
13751364
),
13761365
);

0 commit comments

Comments
 (0)