[glib/new-gsettings] Trivial coding style fixes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/new-gsettings] Trivial coding style fixes
- Date: Thu, 15 Apr 2010 03:15:39 +0000 (UTC)
commit 92f9fb650f50a87fb25dadd40189c7330b118bbb
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Apr 14 23:13:29 2010 -0400
Trivial coding style fixes
gio/gdelayedsettingsbackend.c | 42 ++++++++++++++++++++++++++--------------
gio/gmemorysettingsbackend.c | 12 +++++++---
gio/gsettings.c | 3 +-
gio/gsettingsbackend.c | 15 +++++++------
4 files changed, 45 insertions(+), 27 deletions(-)
---
diff --git a/gio/gdelayedsettingsbackend.c b/gio/gdelayedsettingsbackend.c
index 61371c4..469b2c7 100644
--- a/gio/gdelayedsettingsbackend.c
+++ b/gio/gdelayedsettingsbackend.c
@@ -8,6 +8,10 @@
* See the included COPYING file for more information.
*/
+#include "config.h"
+#include <glib.h>
+#include <glibintl.h>
+
#include "gdelayedsettingsbackend.h"
#include "gsettingsbackendinternal.h"
@@ -22,7 +26,8 @@ enum
PROP_HAS_UNAPPLIED
};
-struct _GDelayedSettingsBackendPrivate {
+struct _GDelayedSettingsBackendPrivate
+{
GSettingsBackend *backend;
guint writable_changed_handler_id;
guint keys_changed_handler_id;
@@ -149,8 +154,10 @@ g_delayed_settings_backend_subscribe (GSettingsBackend *base,
}
static void
-g_delayed_settings_backend_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
+g_delayed_settings_backend_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GDelayedSettingsBackend *delayed = G_DELAYED_SETTINGS_BACKEND (object);
@@ -169,8 +176,10 @@ g_delayed_settings_backend_get_property (GObject *object, guint prop_id,
}
static void
-g_delayed_settings_backend_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
+g_delayed_settings_backend_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GDelayedSettingsBackend *delayed = G_DELAYED_SETTINGS_BACKEND (object);
@@ -229,17 +238,17 @@ g_delayed_settings_backend_constructed (GObject *object)
g_assert (delayed->priv->backend != NULL);
- delayed->priv->changed_handler_id =
+ delayed->priv->changed_handler_id =
g_signal_connect (delayed->priv->backend, "changed",
G_CALLBACK (delayed_backend_changed),
delayed);
- delayed->priv->keys_changed_handler_id =
+ delayed->priv->keys_changed_handler_id =
g_signal_connect (delayed->priv->backend, "keys-changed",
G_CALLBACK (delayed_backend_keys_changed),
delayed);
- delayed->priv->writable_changed_handler_id =
+ delayed->priv->writable_changed_handler_id =
g_signal_connect (delayed->priv->backend, "writable-changed",
G_CALLBACK (delayed_backend_writable_changed),
delayed);
@@ -280,13 +289,19 @@ g_delayed_settings_backend_class_init (GDelayedSettingsBackendClass *class)
object_class->finalize = g_delayed_settings_backend_finalize;
g_object_class_install_property (object_class, PROP_BACKEND,
- g_param_spec_object ("backend", "backend backend", "backend",
- G_TYPE_SETTINGS_BACKEND, G_PARAM_CONSTRUCT_ONLY |
+ g_param_spec_object ("backend",
+ P_("Backend"),
+ P_("The actual backend"),
+ G_TYPE_SETTINGS_BACKEND,
+ G_PARAM_CONSTRUCT_ONLY |
G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_HAS_UNAPPLIED,
- g_param_spec_boolean ("has-unapplied", "has unapplied", "unapplied",
- FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ g_param_spec_boolean ("has-unapplied",
+ P_("Has unapplied"),
+ P_("TRUE if there are unapplied changes"),
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
}
@@ -306,6 +321,3 @@ g_delayed_settings_backend_new (GSettingsBackend *backend)
return g_object_new (G_TYPE_DELAYED_SETTINGS_BACKEND,
"backend", backend, NULL);
}
-
-#define _gsettingsdelayedbackend_c_
-#include "gioaliasdef.c"
diff --git a/gio/gmemorysettingsbackend.c b/gio/gmemorysettingsbackend.c
index 49ce6aa..93af837 100644
--- a/gio/gmemorysettingsbackend.c
+++ b/gio/gmemorysettingsbackend.c
@@ -1,3 +1,6 @@
+
+#include "config.h"
+
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -155,10 +158,11 @@ g_memory_settings_backend_keyfile_reload (GMemorySettingsBackend *memory)
new_checksum = g_compute_checksum_for_string (G_CHECKSUM_SHA256, contents, length);
- if (g_strcmp0 (memory->priv->keyfile_checksum, new_checksum) == 0) {
- g_free (new_checksum);
- return;
- }
+ if (g_strcmp0 (memory->priv->keyfile_checksum, new_checksum) == 0)
+ {
+ g_free (new_checksum);
+ return;
+ }
if (memory->priv->keyfile_checksum != NULL)
g_free (memory->priv->keyfile_checksum);
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 2b482b1..0e4ec55 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -31,7 +31,8 @@
* application settings.
*/
-struct _GSettingsPrivate {
+struct _GSettingsPrivate
+{
GSettingsBackend *backend;
GSettingsSchema *schema;
gchar *schema_name;
diff --git a/gio/gsettingsbackend.c b/gio/gsettingsbackend.c
index 2c5ee3d..af1f407 100644
--- a/gio/gsettingsbackend.c
+++ b/gio/gsettingsbackend.c
@@ -46,7 +46,8 @@ struct _GSettingsBackendPrivate
gchar *context;
};
-enum {
+enum
+{
PROP_0,
PROP_CONTEXT
};
@@ -134,7 +135,7 @@ g_settings_backend_unwatch (GSettingsBackend *backend,
*ptr = tmp->next;
g_slice_free (GSettingsBackendWatch, tmp);
-
+
return;
}
@@ -209,11 +210,11 @@ is_path (const gchar *path)
* value that was passed to that call.
*
* Since: 2.26
- **/
+ **/
void
-g_settings_backend_changed (GSettingsBackend *backend,
- const gchar *key,
- gpointer origin_tag)
+g_settings_backend_changed (GSettingsBackend *backend,
+ const gchar *key,
+ gpointer origin_tag)
{
GSettingsBackendWatch *watch;
@@ -268,7 +269,7 @@ g_settings_backend_keys_changed (GSettingsBackend *backend,
g_return_if_fail (G_IS_SETTINGS_BACKEND (backend));
g_return_if_fail (path[0] == '\0' || is_path (path));
g_return_if_fail (items != NULL);
-
+
for (watch = backend->priv->watches; watch; watch = watch->next)
watch->keys_changed (backend, path, items, origin_tag, watch->user_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]