mirror of
https://gitlab.gnome.org/julianschacher/top-bar-organizer.git
synced 2025-10-27 15:19:09 +00:00
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:
parent
979e770057
commit
ff75debabc
@ -86,7 +86,7 @@ export default class PrefsBoxOrderItemRow extends Adw.ActionRow {
|
|||||||
onDrop(_target, value, _x, _y) {
|
onDrop(_target, value, _x, _y) {
|
||||||
// If `this` got dropped onto itself, do nothing.
|
// If `this` got dropped onto itself, do nothing.
|
||||||
if (value === this) {
|
if (value === this) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the GtkListBoxes of `this` and the drop value.
|
// Get the GtkListBoxes of `this` and the drop value.
|
||||||
@ -138,5 +138,7 @@ export default class PrefsBoxOrderItemRow extends Adw.ActionRow {
|
|||||||
valueListBox.saveBoxOrderToSettings();
|
valueListBox.saveBoxOrderToSettings();
|
||||||
valueListBox.determineRowMoveActionEnable();
|
valueListBox.determineRowMoveActionEnable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,5 +31,7 @@ export default class PrefsBoxOrderListEmptyPlaceholder extends Gtk.Box {
|
|||||||
ownListBox.determineRowMoveActionEnable();
|
ownListBox.determineRowMoveActionEnable();
|
||||||
valueListBox.saveBoxOrderToSettings();
|
valueListBox.saveBoxOrderToSettings();
|
||||||
valueListBox.determineRowMoveActionEnable();
|
valueListBox.determineRowMoveActionEnable();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user