Commit 445454f2 authored by Niels De Graef's avatar Niels De Graef

settings-backend: use G_DECLARE_DERIVABLE_TYPE

parent b2b61812
......@@ -35,13 +35,6 @@
#include "gdm-settings-backend.h"
#define GDM_SETTINGS_BACKEND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_SETTINGS_BACKEND, GdmSettingsBackendPrivate))
struct GdmSettingsBackendPrivate
{
gpointer dummy;
};
enum {
VALUE_CHANGED,
LAST_SIGNAL
......@@ -156,27 +149,17 @@ gdm_settings_backend_class_init (GdmSettingsBackendClass *klass)
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING);
g_type_class_add_private (klass, sizeof (GdmSettingsBackendPrivate));
}
static void
gdm_settings_backend_init (GdmSettingsBackend *settings_backend)
{
settings_backend->priv = GDM_SETTINGS_BACKEND_GET_PRIVATE (settings_backend);
}
static void
gdm_settings_backend_finalize (GObject *object)
{
GdmSettingsBackend *settings_backend;
g_return_if_fail (object != NULL);
g_return_if_fail (GDM_IS_SETTINGS_BACKEND (object));
settings_backend = GDM_SETTINGS_BACKEND (object);
g_return_if_fail (settings_backend->priv != NULL);
G_OBJECT_CLASS (gdm_settings_backend_parent_class)->finalize (object);
}
......@@ -26,22 +26,10 @@
G_BEGIN_DECLS
#define GDM_TYPE_SETTINGS_BACKEND (gdm_settings_backend_get_type ())
#define GDM_SETTINGS_BACKEND(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_SETTINGS_BACKEND, GdmSettingsBackend))
#define GDM_SETTINGS_BACKEND_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_SETTINGS_BACKEND, GdmSettingsBackendClass))
#define GDM_IS_SETTINGS_BACKEND(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_SETTINGS_BACKEND))
#define GDM_IS_SETTINGS_BACKEND_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_SETTINGS_BACKEND))
#define GDM_SETTINGS_BACKEND_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_SETTINGS_BACKEND, GdmSettingsBackendClass))
#define GDM_TYPE_SETTINGS_BACKEND (gdm_settings_backend_get_type ())
G_DECLARE_DERIVABLE_TYPE (GdmSettingsBackend, gdm_settings_backend, GDM, SETTINGS_BACKEND, GObject)
typedef struct GdmSettingsBackendPrivate GdmSettingsBackendPrivate;
typedef struct
{
GObject parent;
GdmSettingsBackendPrivate *priv;
} GdmSettingsBackend;
typedef struct
struct _GdmSettingsBackendClass
{
GObjectClass parent_class;
......@@ -60,7 +48,7 @@ typedef struct
const char *key,
const char *old_value,
const char **new_value);
} GdmSettingsBackendClass;
};
typedef enum
{
......@@ -71,7 +59,6 @@ typedef enum
#define GDM_SETTINGS_BACKEND_ERROR gdm_settings_backend_error_quark ()
GQuark gdm_settings_backend_error_quark (void);
GType gdm_settings_backend_get_type (void);
gboolean gdm_settings_backend_get_value (GdmSettingsBackend *settings_backend,
const char *key,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment