/soc/2013/ankitkv/gobjectification: 377d4d43e0e0: Refactored the...

Ankit Vani a at nevitus.org
Wed Jul 17 13:53:13 EDT 2013


Changeset: 377d4d43e0e00ae68f97aac137e79065fb390666
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-17 23:23 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/377d4d43e0e0

Description:

Refactored the remaining protocols to use GType and GValue instead of PurpleValue

diffstat:

 libpurple/protocols/msn/msn.c           |  22 +++++++++++-----------
 libpurple/protocols/mxit/roster.c       |   4 ++--
 libpurple/protocols/myspace/myspace.c   |   6 +++---
 libpurple/protocols/novell/novell.c     |   6 +++---
 libpurple/protocols/oscar/oscar.c       |  30 +++++++++++++++---------------
 libpurple/protocols/sametime/sametime.c |   6 +++---
 libpurple/protocols/simple/simple.c     |   2 +-
 libpurple/protocols/yahoo/libymsg.c     |   6 +++---
 libpurple/protocols/zephyr/zephyr.c     |   2 +-
 9 files changed, 42 insertions(+), 42 deletions(-)

diffs (truncated from 331 to 300 lines):

diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -1152,35 +1152,35 @@ msn_status_types(PurpleAccount *account)
 
 	status = purple_status_type_new_with_attrs(
 				PURPLE_STATUS_AVAILABLE, NULL, NULL, TRUE, TRUE, FALSE,
-				"message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+				"message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 				NULL);
 	types = g_list_append(types, status);
 
 	status = purple_status_type_new_with_attrs(
 			PURPLE_STATUS_AWAY, NULL, NULL, TRUE, TRUE, FALSE,
-			"message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+			"message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	types = g_list_append(types, status);
 
 	status = purple_status_type_new_with_attrs(
 			PURPLE_STATUS_AWAY, "brb", _("Be Right Back"), TRUE, TRUE, FALSE,
-			"message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+			"message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	types = g_list_append(types, status);
 
 	status = purple_status_type_new_with_attrs(
 			PURPLE_STATUS_UNAVAILABLE, "busy", _("Busy"), TRUE, TRUE, FALSE,
-			"message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+			"message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	types = g_list_append(types, status);
 	status = purple_status_type_new_with_attrs(
 			PURPLE_STATUS_UNAVAILABLE, "phone", _("On the Phone"), TRUE, TRUE, FALSE,
-			"message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+			"message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	types = g_list_append(types, status);
 	status = purple_status_type_new_with_attrs(
 			PURPLE_STATUS_AWAY, "lunch", _("Out to Lunch"), TRUE, TRUE, FALSE,
-			"message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+			"message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	types = g_list_append(types, status);
 
@@ -1198,11 +1198,11 @@ msn_status_types(PurpleAccount *account)
 
 	status = purple_status_type_new_with_attrs(PURPLE_STATUS_TUNE,
 			"tune", NULL, FALSE, TRUE, TRUE,
-			PURPLE_TUNE_ARTIST, _("Tune Artist"), purple_value_new(PURPLE_TYPE_STRING),
-			PURPLE_TUNE_ALBUM, _("Tune Album"), purple_value_new(PURPLE_TYPE_STRING),
-			PURPLE_TUNE_TITLE, _("Tune Title"), purple_value_new(PURPLE_TYPE_STRING),
-			"game", _("Game Title"), purple_value_new(PURPLE_TYPE_STRING),
-			"office", _("Office Title"), purple_value_new(PURPLE_TYPE_STRING),
+			PURPLE_TUNE_ARTIST, _("Tune Artist"), purple_g_value_new(G_TYPE_STRING),
+			PURPLE_TUNE_ALBUM, _("Tune Album"), purple_g_value_new(G_TYPE_STRING),
+			PURPLE_TUNE_TITLE, _("Tune Title"), purple_g_value_new(G_TYPE_STRING),
+			"game", _("Game Title"), purple_g_value_new(G_TYPE_STRING),
+			"office", _("Office Title"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	types = g_list_append(types, status);
 
diff --git a/libpurple/protocols/mxit/roster.c b/libpurple/protocols/mxit/roster.c
--- a/libpurple/protocols/mxit/roster.c
+++ b/libpurple/protocols/mxit/roster.c
@@ -75,7 +75,7 @@ GList* mxit_status_types( PurpleAccount*
 
 		/* add mxit status (reference: "libpurple/status.h") */
 		type = purple_status_type_new_with_attrs( status->primitive, status->id, _( status->name ), TRUE, TRUE, FALSE,
-					"message", _( "Message" ), purple_value_new( PURPLE_TYPE_STRING ),
+					"message", _( "Message" ), purple_g_value_new( G_TYPE_STRING ),
 					NULL );
 
 		statuslist = g_list_append( statuslist, type );
@@ -83,7 +83,7 @@ GList* mxit_status_types( PurpleAccount*
 
 	/* add Mood option */
 	type = purple_status_type_new_with_attrs( PURPLE_STATUS_MOOD, "mood", NULL, FALSE, TRUE, TRUE,
-		PURPLE_MOOD_NAME, _( "Mood Name" ), purple_value_new( PURPLE_TYPE_STRING ),
+		PURPLE_MOOD_NAME, _( "Mood Name" ), purple_g_value_new( G_TYPE_STRING ),
 		NULL );
 	statuslist = g_list_append( statuslist, type );
 
diff --git a/libpurple/protocols/myspace/myspace.c b/libpurple/protocols/myspace/myspace.c
--- a/libpurple/protocols/myspace/myspace.c
+++ b/libpurple/protocols/myspace/myspace.c
@@ -473,7 +473,7 @@ msim_status_types(PurpleAccount *acct)
 	/* Attributes - each status can have a message. */          \
 	"message",                                                  \
 	_("Message"),                                               \
-	purple_value_new(PURPLE_TYPE_STRING),                       \
+	purple_g_value_new(G_TYPE_STRING),                       \
 	NULL);                                                      \
 	                                                            \
 	                                                            \
@@ -494,8 +494,8 @@ msim_status_types(PurpleAccount *acct)
 			TRUE,                   /* should be user_settable some day */
 			TRUE,                   /* independent */
 
-			PURPLE_TUNE_ARTIST, _("Tune Artist"), purple_value_new(PURPLE_TYPE_STRING),
-			PURPLE_TUNE_TITLE, _("Tune Title"), purple_value_new(PURPLE_TYPE_STRING),
+			PURPLE_TUNE_ARTIST, _("Tune Artist"), purple_g_value_new(G_TYPE_STRING),
+			PURPLE_TUNE_TITLE, _("Tune Title"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 
 	types = g_list_append(types, status);
diff --git a/libpurple/protocols/novell/novell.c b/libpurple/protocols/novell/novell.c
--- a/libpurple/protocols/novell/novell.c
+++ b/libpurple/protocols/novell/novell.c
@@ -2982,19 +2982,19 @@ novell_status_types(PurpleAccount *accou
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE, NOVELL_STATUS_TYPE_AVAILABLE,
 										   NULL, TRUE, TRUE, FALSE,
-										   "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+										   "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 										   NULL);
 	status_types = g_list_append(status_types, type);
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_AWAY, NOVELL_STATUS_TYPE_AWAY,
 										   NULL, TRUE, TRUE, FALSE,
-										   "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+										   "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 										   NULL);
 	status_types = g_list_append(status_types, type);
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_UNAVAILABLE, NOVELL_STATUS_TYPE_BUSY,
 										   _("Busy"), TRUE, TRUE, FALSE,
-										   "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+										   "message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 										   NULL);
 	status_types = g_list_append(status_types, type);
 
diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -4720,16 +4720,16 @@ oscar_status_types(PurpleAccount *accoun
 										   OSCAR_STATUS_ID_AVAILABLE,
 										   NULL, TRUE, TRUE, FALSE,
 										   "message", _("Message"),
-										   purple_value_new(PURPLE_TYPE_STRING),
+										   purple_g_value_new(G_TYPE_STRING),
 										   "itmsurl", _("iTunes Music Store Link"),
-										   purple_value_new(PURPLE_TYPE_STRING), NULL);
+										   purple_g_value_new(G_TYPE_STRING), NULL);
 	status_types = g_list_prepend(status_types, type);
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE,
 									 OSCAR_STATUS_ID_FREE4CHAT,
 									 _("Free For Chat"), TRUE, is_icq, FALSE,
 									 "message", _("Message"),
-				purple_value_new(PURPLE_TYPE_STRING), NULL);
+				purple_g_value_new(G_TYPE_STRING), NULL);
 
 	status_types = g_list_prepend(status_types, type);
 
@@ -4737,7 +4737,7 @@ oscar_status_types(PurpleAccount *accoun
 									 OSCAR_STATUS_ID_EVIL,
 									 _("Evil"), TRUE, is_icq, FALSE,
 				 "message", _("Message"),
-				purple_value_new(PURPLE_TYPE_STRING), NULL);
+				purple_g_value_new(G_TYPE_STRING), NULL);
 	status_types = g_list_prepend(status_types, type);
 
 
@@ -4745,7 +4745,7 @@ oscar_status_types(PurpleAccount *accoun
 									 OSCAR_STATUS_ID_DEPRESSION,
 									 _("Depression"), TRUE, is_icq, FALSE,
 				 "message", _("Message"),
-				purple_value_new(PURPLE_TYPE_STRING), NULL);
+				purple_g_value_new(G_TYPE_STRING), NULL);
 	status_types = g_list_prepend(status_types, type);
 
 
@@ -4753,7 +4753,7 @@ oscar_status_types(PurpleAccount *accoun
 									 OSCAR_STATUS_ID_ATHOME,
 									 _("At home"), TRUE, is_icq, FALSE,
 				"message", _("Message"),
-				purple_value_new(PURPLE_TYPE_STRING), NULL);
+				purple_g_value_new(G_TYPE_STRING), NULL);
 	status_types = g_list_prepend(status_types, type);
 
 
@@ -4761,7 +4761,7 @@ oscar_status_types(PurpleAccount *accoun
 									 OSCAR_STATUS_ID_ATWORK,
 									 _("At work"), TRUE, is_icq, FALSE,
 				"message", _("Message"),
-				purple_value_new(PURPLE_TYPE_STRING), NULL);
+				purple_g_value_new(G_TYPE_STRING), NULL);
 
 	status_types = g_list_prepend(status_types, type);
 
@@ -4770,7 +4770,7 @@ oscar_status_types(PurpleAccount *accoun
 									 OSCAR_STATUS_ID_LUNCH,
 									 _("Lunch"), TRUE, is_icq, FALSE,
 				"message", _("Message"),
-				purple_value_new(PURPLE_TYPE_STRING), NULL);
+				purple_g_value_new(G_TYPE_STRING), NULL);
 
 	status_types = g_list_prepend(status_types, type);
 
@@ -4778,14 +4778,14 @@ oscar_status_types(PurpleAccount *accoun
 										   OSCAR_STATUS_ID_AWAY,
 										   NULL, TRUE, TRUE, FALSE,
 										   "message", _("Message"),
-										   purple_value_new(PURPLE_TYPE_STRING), NULL);
+										   purple_g_value_new(G_TYPE_STRING), NULL);
 	status_types = g_list_prepend(status_types, type);
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_INVISIBLE,
 									 OSCAR_STATUS_ID_INVISIBLE,
 									 NULL, TRUE, TRUE, FALSE,
 									 "message", _("Message"),
-									  purple_value_new(PURPLE_TYPE_STRING), NULL);
+									  purple_g_value_new(G_TYPE_STRING), NULL);
 
 	status_types = g_list_prepend(status_types, type);
 
@@ -4797,21 +4797,21 @@ oscar_status_types(PurpleAccount *accoun
 				OSCAR_STATUS_ID_OCCUPIED,
 				_("Occupied"), TRUE, is_icq, FALSE,
 				"message", _("Message"),
-				purple_value_new(PURPLE_TYPE_STRING), NULL);
+				purple_g_value_new(G_TYPE_STRING), NULL);
 	status_types = g_list_prepend(status_types, type);
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_UNAVAILABLE,
 				OSCAR_STATUS_ID_DND,
 				_("Do Not Disturb"), TRUE, is_icq, FALSE,
 				"message", _("Message"),
-				purple_value_new(PURPLE_TYPE_STRING), NULL);
+				purple_g_value_new(G_TYPE_STRING), NULL);
 	status_types = g_list_prepend(status_types, type);
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_EXTENDED_AWAY,
 				OSCAR_STATUS_ID_NA,
 				_("Not Available"), TRUE, is_icq, FALSE,
 				"message", _("Message"),
-				purple_value_new(PURPLE_TYPE_STRING), NULL);
+				purple_g_value_new(G_TYPE_STRING), NULL);
 	status_types = g_list_prepend(status_types, type);
 
 	type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE,
@@ -4821,8 +4821,8 @@ oscar_status_types(PurpleAccount *accoun
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_MOOD,
 			"mood", NULL, TRUE, is_icq, TRUE,
-			PURPLE_MOOD_NAME, _("Mood Name"), purple_value_new(PURPLE_TYPE_STRING),
-			PURPLE_MOOD_COMMENT, _("Mood Comment"), purple_value_new(PURPLE_TYPE_STRING),
+			PURPLE_MOOD_NAME, _("Mood Name"), purple_g_value_new(G_TYPE_STRING),
+			PURPLE_MOOD_COMMENT, _("Mood Comment"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	status_types = g_list_prepend(status_types, type);
 
diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -3341,19 +3341,19 @@ static GList *mw_prpl_status_types(Purpl
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE,
 			MW_STATE_ACTIVE, NULL, TRUE, TRUE, FALSE,
-			MW_STATE_MESSAGE, _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+			MW_STATE_MESSAGE, _("Message"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	types = g_list_append(types, type);
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_AWAY,
 			MW_STATE_AWAY, NULL, TRUE, TRUE, FALSE,
-			MW_STATE_MESSAGE, _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+			MW_STATE_MESSAGE, _("Message"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	types = g_list_append(types, type);
 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_UNAVAILABLE,
 			MW_STATE_BUSY, _("Do Not Disturb"), TRUE, TRUE, FALSE,
-			MW_STATE_MESSAGE, _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+			MW_STATE_MESSAGE, _("Message"), purple_g_value_new(G_TYPE_STRING),
 			NULL);
 	types = g_list_append(types, type);
 
diff --git a/libpurple/protocols/simple/simple.c b/libpurple/protocols/simple/simple.c
--- a/libpurple/protocols/simple/simple.c
+++ b/libpurple/protocols/simple/simple.c
@@ -244,7 +244,7 @@ static GList *simple_status_types(Purple
 
 	type = purple_status_type_new_with_attrs(
 		PURPLE_STATUS_AVAILABLE, NULL, NULL, TRUE, TRUE, FALSE,
-		"message", _("Message"), purple_value_new(PURPLE_TYPE_STRING),
+		"message", _("Message"), purple_g_value_new(G_TYPE_STRING),
 		NULL);
 	types = g_list_append(types, type);
 
diff --git a/libpurple/protocols/yahoo/libymsg.c b/libpurple/protocols/yahoo/libymsg.c
--- a/libpurple/protocols/yahoo/libymsg.c
+++ b/libpurple/protocols/yahoo/libymsg.c
@@ -4795,13 +4795,13 @@ GList *yahoo_status_types(PurpleAccount 
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE, YAHOO_STATUS_TYPE_AVAILABLE,
 	                                       NULL, TRUE, TRUE, FALSE,
 	                                       "message", _("Message"),
-	                                       purple_value_new(PURPLE_TYPE_STRING), NULL);
+	                                       purple_g_value_new(G_TYPE_STRING), NULL);



More information about the Commits mailing list