monkey-bubble r329 - in trunk: . src/ui



Author: herzi
Date: Sat Feb  9 14:47:10 2008
New Revision: 329
URL: http://svn.gnome.org/viewvc/monkey-bubble?rev=329&view=rev

Log:
2008-02-09  Sven Herzberg  <sven imendio com>

	* src/ui/game-sound.c: (mb_game_sound_init): use G_DEFINE_TYPE


Modified:
   trunk/ChangeLog
   trunk/src/ui/game-sound.c

Modified: trunk/src/ui/game-sound.c
==============================================================================
--- trunk/src/ui/game-sound.c	(original)
+++ trunk/src/ui/game-sound.c	Sat Feb  9 14:47:10 2008
@@ -32,6 +32,8 @@
   
 };
 
+G_DEFINE_TYPE (MbGameSound, mb_game_sound, G_TYPE_OBJECT);
+
 MbGameSound *
 mb_game_sound_new (void) {
 	MbGameSound * self;
@@ -112,9 +114,10 @@
 }
 
 
-static void 
-mb_game_sound_instance_init(MbGameSound * self) {
-	self->priv = g_new0(MbGameSoundPrivate, 1);			
+static void
+mb_game_sound_init (MbGameSound * self)
+{
+	self->priv = g_new0 (MbGameSoundPrivate, 1);
 }
 
 
@@ -143,31 +146,3 @@
 	g_object_class->dispose = mb_game_sound_dispose;
 }
 
-
-GType mb_game_sound_get_type (void) {
-	static GType	type = 0;
-
-	if (!type) {
-		const GTypeInfo info = {
-			sizeof (MbGameSoundClass),
-			NULL,	/* base initializer */
-			NULL,	/* base finalizer */
-			(GClassInitFunc)mb_game_sound_class_init,
-			NULL,	/* class finalizer */
-			NULL,	/* class data */
-			sizeof (MbGameSound),
-			1,
-			(GInstanceInitFunc) mb_game_sound_instance_init,
-			0
-		};
-
-		type = g_type_register_static (
-				G_TYPE_OBJECT,
-				"MbGameSound",
-				&info,
-				0);
-	}
-
-	return type;
-}
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]