epiphany r8777 - trunk/src
- From: xan svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r8777 - trunk/src
- Date: Sun, 8 Feb 2009 12:33:36 +0000 (UTC)
Author: xan
Date: Sun Feb 8 12:33:36 2009
New Revision: 8777
URL: http://svn.gnome.org/viewvc/epiphany?rev=8777&view=rev
Log:
And some more style fixes, should now follow the new code guidelines.
Modified:
trunk/src/ephy-seed-extension.c
trunk/src/ephy-seed-extension.h
trunk/src/ephy-seed-loader.c
trunk/src/ephy-seed-loader.h
Modified: trunk/src/ephy-seed-extension.c
==============================================================================
--- trunk/src/ephy-seed-extension.c (original)
+++ trunk/src/ephy-seed-extension.c Sun Feb 8 12:33:36 2009
@@ -142,24 +142,21 @@
dot_path = g_strconcat (dot_dir, "/", name, ".js", NULL);
g_free (dot_dir);
- if (g_file_test (dot_path, G_FILE_TEST_EXISTS))
- {
- return dot_path;
- }
+ if (g_file_test (dot_path, G_FILE_TEST_EXISTS)) {
+ return dot_path;
+ }
system_path = g_strconcat (EXTENSIONS_DIR, name, NULL);
- if (g_file_test (system_path, G_FILE_TEST_EXISTS))
- {
- return system_path;
- }
+ if (g_file_test (system_path, G_FILE_TEST_EXISTS)) {
+ return system_path;
+ }
g_free (system_path);
dirname = g_path_get_dirname (name);
- if (g_path_is_absolute (dirname))
- {
- g_free (dirname);
- return g_strdup (name);
- }
+ if (g_path_is_absolute (dirname)) {
+ g_free (dirname);
+ return g_strdup (name);
+ }
g_free (dirname);
return NULL;
@@ -230,15 +227,14 @@
{
EphySeedExtension *ext = EPHY_SEED_EXTENSION (object);
- switch (prop_id)
- {
+ switch (prop_id) {
case PROP_FILENAME:
ext->priv->filename =
ephy_seed_extension_get_file (g_value_get_string (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
+ }
}
static void
@@ -264,12 +260,11 @@
g_type_class_add_private (object_class, sizeof (EphySeedExtensionPrivate));
- if (global_eng == NULL)
- {
- global_eng = seed_init (NULL, NULL);
- seed_simple_evaluate (global_eng->context,
- "Seed.import_namespace('Gtk');"
- "Seed.import_namespace('Epiphany');");
- }
+ if (global_eng == NULL) {
+ global_eng = seed_init (NULL, NULL);
+ seed_simple_evaluate (global_eng->context,
+ "Seed.import_namespace('Gtk');"
+ "Seed.import_namespace('Epiphany');");
+ }
}
Modified: trunk/src/ephy-seed-extension.h
==============================================================================
--- trunk/src/ephy-seed-extension.h (original)
+++ trunk/src/ephy-seed-extension.h Sun Feb 8 12:33:36 2009
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
/*
* Copyright  2009, Robert Carr <carrr rpi edu>
*
@@ -42,15 +43,15 @@
struct _EphySeedExtensionClass
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
};
struct _EphySeedExtension
{
- GObject parent_instance;
+ GObject parent_instance;
- /*< private >*/
- EphySeedExtensionPrivate *priv;
+ /*< private >*/
+ EphySeedExtensionPrivate *priv;
};
GType ephy_seed_extension_get_type (void);
Modified: trunk/src/ephy-seed-loader.c
==============================================================================
--- trunk/src/ephy-seed-loader.c (original)
+++ trunk/src/ephy-seed-loader.c Sun Feb 8 12:33:36 2009
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
/*
* Copyright  2009, Robert Carr <carrr rpi edu>
*
@@ -30,50 +31,49 @@
struct _EphySeedLoaderPrivate
{
- gpointer dummy;
+ gpointer dummy;
};
static GObject *
impl_get_object (EphyLoader *eloader,
- GKeyFile *keyfile)
+ GKeyFile *keyfile)
{
- char *filename;
- GObject *object;
+ char *filename;
+ GObject *object;
- g_return_val_if_fail (keyfile != NULL, NULL);
+ g_return_val_if_fail (keyfile != NULL, NULL);
- filename = g_key_file_get_string (keyfile, "Loader", "Module", NULL);
- if (filename == NULL)
- {
- g_warning ("NULL module name!\n");
- return NULL;
- }
+ filename = g_key_file_get_string (keyfile, "Loader", "Module", NULL);
+ if (filename == NULL) {
+ g_warning ("NULL module name!\n");
+ return NULL;
+ }
- object = g_object_new (EPHY_TYPE_SEED_EXTENSION,
- "filename", filename,
- NULL);
+ object = g_object_new (EPHY_TYPE_SEED_EXTENSION,
+ "filename", filename,
+ NULL);
- g_free (filename);
+ g_free (filename);
- /* we own one ref */
- return g_object_ref (object);
+ /* we own one ref */
+ return g_object_ref (object);
}
static void
impl_release_object (EphyLoader *eloader,
- GObject *object)
+ GObject *object)
{
- g_return_if_fail (object != NULL);
+ g_return_if_fail (object != NULL);
- g_object_unref (object);
+ g_object_unref (object);
}
static void
ephy_seed_loader_iface_init (EphyLoaderIface *iface)
{
- iface->type = "seed";
- iface->get_object = impl_get_object;
- iface->release_object = impl_release_object;
+ iface->type = "seed";
+ iface->get_object = impl_get_object;
+ iface->release_object = impl_release_object;
}
G_DEFINE_TYPE_WITH_CODE (EphySeedLoader, ephy_seed_loader, G_TYPE_OBJECT,
@@ -82,27 +82,27 @@
static void
ephy_seed_loader_init (EphySeedLoader *loader)
{
- loader->priv = EPHY_SEED_LOADER_GET_PRIVATE (loader);
+ loader->priv = EPHY_SEED_LOADER_GET_PRIVATE (loader);
- LOG ("EphySeedLoader initialising");
+ LOG ("EphySeedLoader initialising");
}
static void
ephy_seed_loader_finalize (GObject *object)
{
- LOG ("EphySeedLoader finalising");
+ LOG ("EphySeedLoader finalising");
- G_OBJECT_CLASS (ephy_seed_loader_parent_class)->finalize (object);
+ G_OBJECT_CLASS (ephy_seed_loader_parent_class)->finalize (object);
}
static void
ephy_seed_loader_class_init (EphySeedLoaderClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = ephy_seed_loader_finalize;
+ object_class->finalize = ephy_seed_loader_finalize;
- g_type_class_add_private (object_class, sizeof (EphySeedLoaderPrivate));
+ g_type_class_add_private (object_class, sizeof (EphySeedLoaderPrivate));
}
Modified: trunk/src/ephy-seed-loader.h
==============================================================================
--- trunk/src/ephy-seed-loader.h (original)
+++ trunk/src/ephy-seed-loader.h Sun Feb 8 12:33:36 2009
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
/*
* Copyright Robert Carr, <carrr rpi edu> 2009
*
@@ -42,15 +43,15 @@
struct _EphySeedLoaderClass
{
- GObjectClass parent_class;
+ GObjectClass parent_class;
};
struct _EphySeedLoader
{
- GObject parent_instance;
+ GObject parent_instance;
- /*< private >*/
- EphySeedLoaderPrivate *priv;
+ /*< private >*/
+ EphySeedLoaderPrivate *priv;
};
GType ephy_seed_loader_get_type (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]