[gnome-settings-daemon] media-keys: Use g_error_matches() instead of manual comparison
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] media-keys: Use g_error_matches() instead of manual comparison
- Date: Sat, 31 Mar 2018 17:16:52 +0000 (UTC)
commit b54ff390772ade969e7f27ba204196842da20edf
Author: Mantas Mikulėnas <grawity gmail com>
Date: Mon Feb 5 10:57:00 2018 +0200
media-keys: Use g_error_matches() instead of manual comparison
plugins/media-keys/gsd-media-keys-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 3a198415..2e1a64a9 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -444,7 +444,7 @@ grab_accelerators_complete (GObject *object,
&actions, result, &error);
if (error) {
- retry = (error->code == G_DBUS_ERROR_UNKNOWN_METHOD);
+ retry = g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD);
if (!retry && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("Failed to grab accelerators: %s (%d)", error->message, error->code);
else if (retry)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]