im.pidgin.gobjectification: c1d877667b00fa17307e10829674be738bc85b98

ecoffey at soc.pidgin.im ecoffey at soc.pidgin.im
Thu Jan 24 13:05:49 EST 2008


-----------------------------------------------------------------
Revision: c1d877667b00fa17307e10829674be738bc85b98
Ancestor: dc895e5d909d0b6e7835c5c239c20e5ecf07b053
Author: ecoffey at soc.pidgin.im
Date: 2008-01-24T17:59:58
Branch: im.pidgin.gobjectification

Modified files:
        libpurple/connection.c

ChangeLog: 

Fixed typo in purple_connection_flags_get_gtype.

Also started fixing the "old" functions that are be utilized in [get|set]_property.

No idea if I'm doing this right, but I wanted to at least take a first stab.


-------------- next part --------------
============================================================
--- libpurple/connection.c	2858336ca29de3f1f4e1b770ab61dd0e6d512a3b
+++ libpurple/connection.c	b454b1e6db5009cbf9ca693ceb629b10989bba11
@@ -360,24 +360,27 @@ purple_connection_set_state(PurpleConnec
 purple_connection_set_state(PurpleConnection *gc, PurpleConnectionState state)
 {
 	PurpleConnectionUiOps *ops;
+	PurpleConnectionPrivate *pcp;
 
 	g_return_if_fail(gc != NULL);
+	
+	pcp = gc->priv;
 
-	if (gc->state == state)
+	if (pcp->state == state)
 		return;
 
-	gc->state = state;
+	pcp->state = state;
 
 	ops = purple_connections_get_ui_ops();
 
-	if (gc->state == PURPLE_CONNECTING) {
+	if (pcp->state == PURPLE_CONNECTING) {
 		connections_connecting = g_list_append(connections_connecting, gc);
 	}
 	else {
 		connections_connecting = g_list_remove(connections_connecting, gc);
 	}
 
-	if (gc->state == PURPLE_CONNECTED) {
+	if (pcp->state == PURPLE_CONNECTED) {
 		PurpleAccount *account;
 		PurplePresence *presence;
 
@@ -414,7 +417,7 @@ purple_connection_set_state(PurpleConnec
 
 		update_keepalive(gc, TRUE);
 	}
-	else if (gc->state == PURPLE_DISCONNECTED) {
+	else if (pcp->state == PURPLE_DISCONNECTED) {
 		PurpleAccount *account = purple_connection_get_account(gc);
 
 		if (purple_prefs_get_bool("/purple/logging/log_system"))
@@ -445,7 +448,7 @@ purple_connection_set_account(PurpleConn
 	g_return_if_fail(gc != NULL);
 	g_return_if_fail(account != NULL);
 
-	gc->account = account;
+	gc->priv->account = account;
 }
 
 void
@@ -462,7 +465,7 @@ purple_connection_get_state(const Purple
 {
 	g_return_val_if_fail(gc != NULL, PURPLE_DISCONNECTED);
 
-	return gc->state;
+	return gc->priv->state;
 }
 
 PurpleAccount *
@@ -470,7 +473,7 @@ purple_connection_get_account(const Purp
 {
 	g_return_val_if_fail(gc != NULL, NULL);
 
-	return gc->account;
+	return gc->priv->account;
 }
 
 const char *
@@ -835,7 +838,7 @@ purple_connection_flags_get_gtype(void) 
 			{ 0, NULL, NULL },
 		};
 
-		type = g_flags_register_static("PurpleConnectionState", values);
+		type = g_flags_register_static("PurpleConnectionFlags", values);
 	}
 
 	return type;


More information about the Commits mailing list