[glib/settings-portal: 20/22] settings: Register the keyfile backend as extension
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/settings-portal: 20/22] settings: Register the keyfile backend as extension
- Date: Tue, 15 Jan 2019 21:13:53 +0000 (UTC)
commit 875fb2246920bd1059093c0cbd512349d043e0fa
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 19 20:03:29 2018 -0500
settings: Register the keyfile backend as extension
This was not done previously because the backend
could not be instantiated without parameters.
gio/gkeyfilesettingsbackend.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
index 8bfe29b21..b1a4d165e 100644
--- a/gio/gkeyfilesettingsbackend.c
+++ b/gio/gkeyfilesettingsbackend.c
@@ -32,7 +32,7 @@
#include "gfilemonitor.h"
#include "gsimplepermission.h"
#include "gsettingsbackendinternal.h"
-#include "giomodule.h"
+#include "giomodule-priv.h"
#define G_TYPE_KEYFILE_SETTINGS_BACKEND (g_keyfile_settings_backend_get_type ())
@@ -72,9 +72,12 @@ typedef struct
GFileMonitor *dir_monitor;
} GKeyfileSettingsBackend;
-G_DEFINE_TYPE (GKeyfileSettingsBackend,
- g_keyfile_settings_backend,
- G_TYPE_SETTINGS_BACKEND)
+G_DEFINE_TYPE_WITH_CODE (GKeyfileSettingsBackend,
+ g_keyfile_settings_backend,
+ G_TYPE_SETTINGS_BACKEND,
+ _g_io_modules_ensure_extension_points_registered ();
+ g_io_extension_point_implement (G_SETTINGS_BACKEND_EXTENSION_POINT_NAME,
+ g_define_type_id, "keyfile", 10))
static void
compute_checksum (guint8 *digest,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]