[gedit] Bump glib requisite and use G_DEFINE_BOXED_TYPE.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Bump glib requisite and use G_DEFINE_BOXED_TYPE.
- Date: Wed, 18 Aug 2010 21:21:29 +0000 (UTC)
commit f80303e34297dacb71100509fdfcf7eefd503f31
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Aug 18 23:21:05 2010 +0200
Bump glib requisite and use G_DEFINE_BOXED_TYPE.
configure.ac | 2 +-
gedit/gedit-encodings.c | 26 ++++----------------------
gedit/gedit-message-type.c | 26 ++++----------------------
3 files changed, 9 insertions(+), 45 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 679a42f..fd0deec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -268,7 +268,7 @@ dnl ================================================================
PKG_CHECK_MODULES(GEDIT, [
libxml-2.0 >= 2.5.0
- glib-2.0 >= 2.25.12
+ glib-2.0 >= 2.25.15
gthread-2.0 >= 2.13.0
gio-2.0 >= 2.25.11
gtk+-3.0 >= 2.90.6
diff --git a/gedit/gedit-encodings.c b/gedit/gedit-encodings.c
index 2e055c5..af65ead 100644
--- a/gedit/gedit-encodings.c
+++ b/gedit/gedit-encodings.c
@@ -46,6 +46,10 @@ struct _GeditEncoding
const gchar *name;
};
+G_DEFINE_BOXED_TYPE (GeditEncoding, gedit_encoding,
+ gedit_encoding_copy,
+ gedit_encoding_free)
+
/*
* The original versions of the following tables are taken from profterm
*
@@ -449,28 +453,6 @@ gedit_encoding_free (GeditEncoding *enc)
g_return_if_fail (enc != NULL);
}
-/**
- * gedit_encoding_get_type:
- *
- * Retrieves the GType object which is associated with the
- * #GeditEncoding class.
- *
- * Return value: the GType associated with #GeditEncoding.
- **/
-GType
-gedit_encoding_get_type (void)
-{
- static GType our_type = 0;
-
- if (!our_type)
- our_type = g_boxed_type_register_static (
- "GeditEncoding",
- (GBoxedCopyFunc) gedit_encoding_copy,
- (GBoxedFreeFunc) gedit_encoding_free);
-
- return our_type;
-}
-
static gboolean
data_exists (GSList *list,
const gpointer data)
diff --git a/gedit/gedit-message-type.c b/gedit/gedit-message-type.c
index 1087e81..9407b6b 100644
--- a/gedit/gedit-message-type.c
+++ b/gedit/gedit-message-type.c
@@ -79,6 +79,10 @@ struct _GeditMessageType
GHashTable *arguments; /* mapping of key -> ArgumentInfo */
};
+G_DEFINE_BOXED_TYPE (GeditMessageType, gedit_message_type,
+ gedit_message_type_ref,
+ gedit_message_type_unref)
+
/**
* gedit_message_type_ref:
* @message_type: the #GeditMessageType
@@ -121,28 +125,6 @@ gedit_message_type_unref (GeditMessageType *message_type)
}
/**
- * gedit_message_type_get_type:
- *
- * Retrieves the GType object which is associated with the
- * #GeditMessageType class.
- *
- * Return value: the GType associated with #GeditMessageType.
- **/
-GType
-gedit_message_type_get_type (void)
-{
- static GType our_type = 0;
-
- if (!our_type)
- our_type = g_boxed_type_register_static (
- "GeditMessageType",
- (GBoxedCopyFunc) gedit_message_type_ref,
- (GBoxedFreeFunc) gedit_message_type_unref);
-
- return our_type;
-}
-
-/**
* gedit_message_type_identifier:
* @object_path: (allow-none): the object path
* @method: (allow-none): the method
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]