fix: have onDrop handler methods correctly return booleans

Have the onDrop methods, used as handlers for Gtk.DropTarget drop
signals, return booleans as required by Gtk.DropTarget.
https://docs.gtk.org/gtk4/signal.DropTarget.drop.html
This change doesn't seem to have a practical impact, but its good to
follow the API correctly anyway.
This commit is contained in:
June 2025-06-11 00:55:10 +02:00
parent 979e770057
commit ff75debabc
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions

View File

@ -86,7 +86,7 @@ export default class PrefsBoxOrderItemRow extends Adw.ActionRow {
onDrop(_target, value, _x, _y) {
// If `this` got dropped onto itself, do nothing.
if (value === this) {
return;
return false;
}
// Get the GtkListBoxes of `this` and the drop value.
@ -138,5 +138,7 @@ export default class PrefsBoxOrderItemRow extends Adw.ActionRow {
valueListBox.saveBoxOrderToSettings();
valueListBox.determineRowMoveActionEnable();
}
return true;
}
}

View File

@ -31,5 +31,7 @@ export default class PrefsBoxOrderListEmptyPlaceholder extends Gtk.Box {
ownListBox.determineRowMoveActionEnable();
valueListBox.saveBoxOrderToSettings();
valueListBox.determineRowMoveActionEnable();
return true;
}
}