mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
endSessionDialog: Use registered D-Bus error
Instead of returning ad-hoc errors, register a custom error domain and return appropriate GLib.Errors. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
This commit is contained in:
parent
9e96e8495b
commit
8f03eec3a3
2 changed files with 14 additions and 5 deletions
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-unused-vars */
|
||||
import GLib from 'gi://GLib';
|
||||
import Gio from 'gi://Gio';
|
||||
|
||||
|
|
@ -27,3 +26,11 @@ function createErrorEnum(errorNames) {
|
|||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
const modalDialogErrorNames = [
|
||||
'UnknownType',
|
||||
'GrabFailed',
|
||||
];
|
||||
export const ModalDialogErrors =
|
||||
registerErrorDomain('ModalDialog', modalDialogErrorNames);
|
||||
export const ModalDialogError = createErrorEnum(modalDialogErrorNames);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue