Use NULL to replace 0 as the last argument of g_object_new.
authorPeng Huang <phuang@phuang.nay.redhat.com>
Tue, 17 Feb 2009 01:37:35 +0000 (09:37 +0800)
committerPeng Huang <phuang@phuang.nay.redhat.com>
Tue, 17 Feb 2009 01:37:35 +0000 (09:37 +0800)
src/ibusattribute.c
src/ibusfactory.c
src/ibushotkey.c
src/ibusproperty.c
src/ibusserializable.c
src/ibustext.c

index 7b41ab2..e52e984 100644 (file)
@@ -181,7 +181,7 @@ ibus_attribute_new (guint type,
         type == IBUS_ATTR_TYPE_FOREGROUND ||
         type == IBUS_ATTR_TYPE_BACKGROUND, NULL);
 
-    IBusAttribute *attr = IBUS_ATTRIBUTE (g_object_new (IBUS_TYPE_ATTRIBUTE, 0));
+    IBusAttribute *attr = IBUS_ATTRIBUTE (g_object_new (IBUS_TYPE_ATTRIBUTE, NULL));
 
     attr->type = type;
     attr->value = value;
@@ -402,7 +402,7 @@ IBusAttrList *
 ibus_attr_list_new ()
 {
     IBusAttrList *attr_list;
-    attr_list = g_object_new (IBUS_TYPE_ATTR_LIST, 0);
+    attr_list = g_object_new (IBUS_TYPE_ATTR_LIST, NULL);
     return attr_list;
 }
 
index af9d887..af26b57 100644 (file)
@@ -99,7 +99,7 @@ ibus_factory_new (IBusConnection *connection)
 
     factory = (IBusFactory *) g_object_new (IBUS_TYPE_FACTORY,
                                             "path", IBUS_PATH_FACTORY,
-                                            0);
+                                            NULL);
     priv = IBUS_FACTORY_GET_PRIVATE (factory);
 
     priv->connection = g_object_ref (connection);
@@ -238,7 +238,7 @@ ibus_factory_ibus_message (IBusFactory    *factory,
                                "name", engine_name,
                                "path", path,
                                "connection", priv->connection,
-                               0);
+                               NULL);
 
         priv->engine_list = g_list_append (priv->engine_list, engine);
         g_signal_connect (engine,
@@ -468,7 +468,7 @@ ibus_factory_info_new (const gchar *path,
 
     IBusFactoryInfo *info;
 
-    info = (IBusFactoryInfo *)g_object_new (IBUS_TYPE_FACTORY_INFO, 0);
+    info = (IBusFactoryInfo *) g_object_new (IBUS_TYPE_FACTORY_INFO, NULL);
 
     info->path = g_strdup (path);
     info->name = g_strdup (name);
index eca7666..81e506c 100644 (file)
@@ -315,7 +315,7 @@ ibus_hotkey_profile_copy (IBusHotkeyProfile       *dest,
 IBusHotkeyProfile *
 ibus_hotkey_profile_new (void)
 {
-    IBusHotkeyProfile *profile = g_object_new (IBUS_TYPE_HOTKEY_PROFILE, 0);
+    IBusHotkeyProfile *profile = g_object_new (IBUS_TYPE_HOTKEY_PROFILE, NULL);
 
     return profile;
 }
index 712bf1f..0976363 100644 (file)
@@ -263,7 +263,7 @@ ibus_property_new (const gchar   *key,
 
     IBusProperty *prop;
 
-    prop = (IBusProperty *)g_object_new (IBUS_TYPE_PROPERTY, 0);
+    prop = (IBusProperty *)g_object_new (IBUS_TYPE_PROPERTY, NULL);
 
     prop->key = g_strdup (key);
     prop->icon = g_strdup (icon != NULL ? icon : "");
index 82a49bc..348be43 100644 (file)
@@ -473,7 +473,7 @@ ibus_serializable_copy (IBusSerializable *object)
 
     type = G_OBJECT_TYPE (object);
 
-    new_object = g_object_new (type, 0);
+    new_object = g_object_new (type, NULL);
     g_return_val_if_fail (new_object != NULL, NULL);
 
     if (IBUS_SERIALIZABLE_GET_CLASS (new_object)->copy (new_object, object)) {
@@ -566,7 +566,7 @@ ibus_serializable_deserialize (IBusMessageIter *iter)
 
     g_return_val_if_fail (g_type_is_a (type, IBUS_TYPE_SERIALIZABLE), NULL);
 
-    object = g_object_new (type, 0);
+    object = g_object_new (type, NULL);
 
     retval = IBUS_SERIALIZABLE_GET_CLASS (object)->deserialize (object, &sub_iter);
     if (retval)
index 9b87701..1725dda 100644 (file)
@@ -176,7 +176,7 @@ ibus_text_new_from_string (const gchar *str)
 
     IBusText *text;
 
-    text= g_object_new (IBUS_TYPE_TEXT, 0);
+    text= g_object_new (IBUS_TYPE_TEXT, NULL);
 
     text->is_static = FALSE;
     text->text = g_strdup (str);
@@ -191,7 +191,7 @@ ibus_text_new_from_ucs4 (const gunichar *str)
 
     IBusText *text;
 
-    text= g_object_new (IBUS_TYPE_TEXT, 0);
+    text= g_object_new (IBUS_TYPE_TEXT, NULL);
 
     text->is_static = FALSE;
     text->text = g_ucs4_to_utf8 (str, -1, NULL, NULL, NULL);
@@ -206,7 +206,7 @@ ibus_text_new_from_static_string (const gchar *str)
 
     IBusText *text;
 
-    text= g_object_new (IBUS_TYPE_TEXT, 0);
+    text= g_object_new (IBUS_TYPE_TEXT, NULL);
 
     text->is_static = TRUE;
     text->text = (gchar *)str;
@@ -231,7 +231,7 @@ ibus_text_new_from_printf (const gchar *format,
     if (str == NULL)
         return NULL;
 
-    text= g_object_new (IBUS_TYPE_TEXT, 0);
+    text= g_object_new (IBUS_TYPE_TEXT, NULL);
 
     text->text = (gchar *)str;
 
@@ -244,7 +244,7 @@ ibus_text_new_from_unichar (gunichar c)
     IBusText *text;
     gint len;
 
-    text= g_object_new (IBUS_TYPE_TEXT, 0);
+    text= g_object_new (IBUS_TYPE_TEXT, NULL);
 
     text->text = (gchar *)g_malloc (12);
     len = g_unichar_to_utf8 (c, text->text);