libpurple/protocols/mxit/actions.c

branch
soc.2013.gobjectification.plugins
changeset 36701
5acd461707ae
parent 36542
30f40ecc4631
parent 34338
c652670afac5
child 36848
7fafdda14844
--- a/libpurple/protocols/mxit/actions.c	Sun Sep 08 12:06:44 2013 +0530
+++ b/libpurple/protocols/mxit/actions.c	Thu Sep 12 19:55:22 2013 +0530
@@ -242,9 +242,9 @@
 			purple_request_field_string_set_editable( field, FALSE );
 
 		/* gender */
-		field = purple_request_field_choice_new( "male", _( "Gender" ), ( profile->male ) ? 1 : 0 );
-		purple_request_field_choice_add( field, _( "Female" ) );		/* 0 */
-		purple_request_field_choice_add( field, _( "Male" ) );			/* 1 */
+		field = purple_request_field_choice_new( "male", _( "Gender" ), GINT_TO_POINTER(profile->male ? 1 : 0));
+		purple_request_field_choice_add( field, _( "Female" ), GINT_TO_POINTER(0));
+		purple_request_field_choice_add( field, _( "Male" ), GINT_TO_POINTER(1));
 		purple_request_field_group_add_field( public_group, field );
 
 		/* first name */
@@ -311,7 +311,7 @@
 
 	/* (reference: "libpurple/request.h") */
 	purple_request_fields( gc, _( "Profile" ), _( "Update your MXit Profile" ), NULL, fields, _( "Set" ),
-			G_CALLBACK( mxit_profile_cb ), _( "Cancel" ), NULL, purple_connection_get_account( gc ), NULL, NULL, gc );
+			G_CALLBACK( mxit_profile_cb ), _( "Cancel" ), NULL, purple_request_cpar_from_connection(gc), gc );
 }
 
 
@@ -408,7 +408,7 @@
 
 	/* (reference: "libpurple/request.h") */
 	purple_request_fields( gc, _( "Change PIN" ), _( "Change MXit PIN" ), NULL, fields, _( "Set" ),
-			G_CALLBACK( mxit_change_pin_cb ), _( "Cancel" ), NULL, purple_connection_get_account( gc ), NULL, NULL, gc );
+			G_CALLBACK( mxit_change_pin_cb ), _( "Cancel" ), NULL, purple_request_cpar_from_connection(gc), gc );
 }
 
 
@@ -499,7 +499,7 @@
 		NULL, FALSE, FALSE, NULL,
 		_( "_Search" ), G_CALLBACK( mxit_user_search_cb ),
 		_( "_Cancel" ), NULL,
-		purple_connection_get_account( gc ), NULL, NULL,
+		purple_request_cpar_from_connection(gc),
 		gc );
 }
 

mercurial