/soc/2013/ankitkv/gobjectification: f7ff90f6c9c6: Removed purple...

Ankit Vani a at nevitus.org
Mon Sep 30 19:58:00 EDT 2013


Changeset: f7ff90f6c9c6a087c1bf228668a5a58873a5268e
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-10-01 04:43 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/f7ff90f6c9c6

Description:

Removed purple_connection_set_account()

diffstat:

 ChangeLog.API                               |   1 +
 libpurple/connection.c                      |  15 ++-------------
 libpurple/connection.h                      |   8 --------
 libpurple/plugins/perl/common/Connection.xs |   5 -----
 4 files changed, 3 insertions(+), 26 deletions(-)

diffs (83 lines):

diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -302,6 +302,7 @@ version 3.0.0 (??/??/????):
 		* purple_connection_new
 		* purple_connection_new_unregister
 		* purple_connection_destroy
+		* purple_connection_set_account
 		* purple_contact_set_alias
 		* purple_conv_chat_set_users
 		* PurpleConversationType
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -259,17 +259,6 @@ purple_connection_set_flags(PurpleConnec
 }
 
 void
-purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account)
-{
-	PurpleConnectionPrivate *priv = PURPLE_CONNECTION_GET_PRIVATE(gc);
-
-	g_return_if_fail(priv != NULL);
-	g_return_if_fail(PURPLE_IS_ACCOUNT(account));
-
-	priv->account = account;
-}
-
-void
 purple_connection_set_display_name(PurpleConnection *gc, const char *name)
 {
 	PurpleConnectionPrivate *priv = PURPLE_CONNECTION_GET_PRIVATE(gc);
@@ -630,7 +619,7 @@ purple_connection_set_property(GObject *
 			purple_connection_set_state(gc, g_value_get_enum(value));
 			break;
 		case PROP_ACCOUNT:
-			purple_connection_set_account(gc, g_value_get_object(value));
+			priv->account = g_value_get_object(value);
 			break;
 		case PROP_PASSWORD:
 			g_free(priv->password);
@@ -825,7 +814,7 @@ static void purple_connection_class_init
 	g_object_class_install_property(obj_class, PROP_ACCOUNT,
 			g_param_spec_object(PROP_ACCOUNT_S, _("Account"),
 				_("The account using the connection."), PURPLE_TYPE_ACCOUNT,
-				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
+				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
 			);
 
 	g_object_class_install_property(obj_class, PROP_PASSWORD,
diff --git a/libpurple/connection.h b/libpurple/connection.h
--- a/libpurple/connection.h
+++ b/libpurple/connection.h
@@ -293,14 +293,6 @@ void purple_connection_set_state(PurpleC
 void purple_connection_set_flags(PurpleConnection *gc, PurpleConnectionFlags flags);
 
 /**
- * Sets the connection's account.
- *
- * @param gc      The connection.
- * @param account The account.
- */
-void purple_connection_set_account(PurpleConnection *gc, PurpleAccount *account);
-
-/**
  * Sets the connection's displayed name.
  *
  * @param gc   The connection.
diff --git a/libpurple/plugins/perl/common/Connection.xs b/libpurple/plugins/perl/common/Connection.xs
--- a/libpurple/plugins/perl/common/Connection.xs
+++ b/libpurple/plugins/perl/common/Connection.xs
@@ -51,11 +51,6 @@ purple_connection_set_state(gc, state)
 	Purple::ConnectionState state
 
 void
-purple_connection_set_account(gc, account)
-	Purple::Connection gc
-	Purple::Account account
-
-void
 purple_connection_set_display_name(gc, name)
 	Purple::Connection gc
 	const char *name



More information about the Commits mailing list