monkey-bubble r332 - in trunk: . src/net
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: monkey-bubble r332 - in trunk: . src/net
- Date: Sat, 9 Feb 2008 14:47:30 +0000 (GMT)
Author: herzi
Date: Sat Feb 9 14:47:29 2008
New Revision: 332
URL: http://svn.gnome.org/viewvc/monkey-bubble?rev=332&view=rev
Log:
2008-02-09 Sven Herzberg <sven imendio com>
* src/net/game.c: (network_game_init): use G_DEFINE_TYPE
Modified:
trunk/ChangeLog
trunk/src/net/game.c
Modified: trunk/src/net/game.c
==============================================================================
--- trunk/src/net/game.c (original)
+++ trunk/src/net/game.c Sat Feb 9 14:47:29 2008
@@ -91,6 +91,8 @@
static gboolean
update_client_idle (gpointer d);
+G_DEFINE_TYPE (NetworkGame, network_game, G_TYPE_OBJECT);
+
static void
client_disconnected (NetworkClient * c, struct Client *client)
{
@@ -812,7 +814,7 @@
}
static void
-network_game_instance_init (NetworkGame * self)
+network_game_init (NetworkGame* self)
{
PRIVATE (self) = g_new0 (NetworkGamePrivate, 1);
PRIVATE (self)->clients = NULL;
@@ -938,30 +940,3 @@
}
-
-GType
-network_game_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- {
- const GTypeInfo info = {
- sizeof (NetworkGameClass),
- NULL, /* base initializer */
- NULL, /* base finalizer */
- (GClassInitFunc) network_game_class_init,
- NULL, /* class finalizer */
- NULL, /* class data */
- sizeof (NetworkGame),
- 1,
- (GInstanceInitFunc) network_game_instance_init,
- 0
- };
-
- type = g_type_register_static (G_TYPE_OBJECT,
- "NetworkGame", &info, 0);
- }
-
- return type;
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]