mirror of
https://gitlab.gnome.org/june/top-bar-organizer.git
synced 2026-01-10 16:26:35 +01: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
2 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue