/soc/2013/ankitkv/gobjectification: 06cbd6ed97ed: Merged soc.201...

Ankit Vani a at nevitus.org
Sat Nov 16 06:53:18 EST 2013


Changeset: 06cbd6ed97edb34ea643ab871ba593338baf86a8
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-11-16 17:21 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/06cbd6ed97ed

Description:

Merged soc.2013.gobjectification branch

diffstat:

 libpurple/account.c           |  36 ++++++++++++------------
 libpurple/blistnode.c         |  16 +++++-----
 libpurple/blistnodetypes.c    |  50 ++++++++++++++++----------------
 libpurple/circularbuffer.c    |  18 ++++++++++-
 libpurple/circularbuffer.h    |   7 ++--
 libpurple/connection.c        |  24 ++++++++--------
 libpurple/conversation.c      |  20 ++++++------
 libpurple/conversationtypes.c |  44 ++++++++++++++--------------
 libpurple/plugins.c           |  20 ++++++------
 libpurple/presence.c          |  28 +++++++++---------
 libpurple/roomlist.c          |  12 ++++----
 libpurple/smiley.c            |   8 ++--
 libpurple/status.c            |  12 ++++----
 libpurple/whiteboard.c        |  16 +++++-----
 libpurple/xfer.c              |  64 +++++++++++++++++++++---------------------
 pidgin/gtkblist-theme.c       |  60 ++++++++++++++++++++--------------------
 pidgin/gtkimhtml.c            |  48 ++++++++++++++++----------------
 17 files changed, 248 insertions(+), 235 deletions(-)

diffs (truncated from 1125 to 300 lines):

diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -3022,56 +3022,56 @@ purple_account_class_init(PurpleAccountC
 	obj_class->set_property = purple_account_set_property;
 
 	g_object_class_install_property(obj_class, PROP_USERNAME,
-			g_param_spec_string("username", _("Username"),
-				_("The username for the account."), NULL,
+			g_param_spec_string("username", "Username",
+				"The username for the account.", NULL,
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
 			);
 
 	g_object_class_install_property(obj_class, PROP_PRIVATE_ALIAS,
-			g_param_spec_string("private-alias", _("Private Alias"),
-				_("The private alias for the account."), NULL,
+			g_param_spec_string("private-alias", "Private Alias",
+				"The private alias for the account.", NULL,
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, PROP_USER_INFO,
-			g_param_spec_string("user-info", _("User information"),
-				_("Detailed user information for the account."), NULL,
+			g_param_spec_string("user-info", "User information",
+				"Detailed user information for the account.", NULL,
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, PROP_BUDDY_ICON_PATH,
-			g_param_spec_string("buddy-icon-path", _("Buddy icon path"),
-				_("Path to the buddyicon for the account."), NULL,
+			g_param_spec_string("buddy-icon-path", "Buddy icon path",
+				"Path to the buddyicon for the account.", NULL,
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, PROP_ENABLED,
-			g_param_spec_boolean("enabled", _("Enabled"),
-				_("Whether the account is enabled or not."), FALSE,
+			g_param_spec_boolean("enabled", "Enabled",
+				"Whether the account is enabled or not.", FALSE,
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, PROP_REMEMBER_PASSWORD,
-			g_param_spec_boolean("remember-password", _("Remember password"),
-				_("Whether to remember and store the password for this account."), FALSE,
+			g_param_spec_boolean("remember-password", "Remember password",
+				"Whether to remember and store the password for this account.", FALSE,
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, PROP_CHECK_MAIL,
-			g_param_spec_boolean("check-mail", _("Check mail"),
-				_("Whether to check mails for this account."), FALSE,
+			g_param_spec_boolean("check-mail", "Check mail",
+				"Whether to check mails for this account.", FALSE,
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, PROP_CONNECTION,
-			g_param_spec_object("connection", _("Connection"),
-				_("The connection for the account."), PURPLE_TYPE_CONNECTION,
+			g_param_spec_object("connection", "Connection",
+				"The connection for the account.", PURPLE_TYPE_CONNECTION,
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, PROP_PROTOCOL_ID,
-			g_param_spec_string("protocol-id", _("Protocol ID"),
-				_("ID of the protocol that is responsible for the account."), NULL,
+			g_param_spec_string("protocol-id", "Protocol ID",
+				"ID of the protocol that is responsible for the account.", NULL,
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
 			);
 
diff --git a/libpurple/blistnode.c b/libpurple/blistnode.c
--- a/libpurple/blistnode.c
+++ b/libpurple/blistnode.c
@@ -408,8 +408,8 @@ purple_blist_node_class_init(PurpleBlist
 	obj_class->set_property = purple_blist_node_set_property;
 
 	g_object_class_install_property(obj_class, BLNODE_PROP_TRANSIENT,
-			g_param_spec_boolean("transient", _("Transient"),
-				_("Whether node should not be saved with the buddy list."),
+			g_param_spec_boolean("transient", "Transient",
+				"Whether node should not be saved with the buddy list.",
 				FALSE, G_PARAM_READWRITE)
 			);
 
@@ -603,20 +603,20 @@ purple_counting_node_class_init(PurpleCo
 	obj_class->set_property = purple_counting_node_set_property;
 
 	g_object_class_install_property(obj_class, CNODE_PROP_TOTAL_SIZE,
-			g_param_spec_int("total-size", _("Total size"),
-				_("The number of children under this node."),
+			g_param_spec_int("total-size", "Total size",
+				"The number of children under this node.",
 				G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, CNODE_PROP_CURRENT_SIZE,
-			g_param_spec_int("current-size", _("Current size"),
-				_("The number of children with online accounts."),
+			g_param_spec_int("current-size", "Current size",
+				"The number of children with online accounts.",
 				G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, CNODE_PROP_ONLINE_COUNT,
-			g_param_spec_int("online-count", _("Online count"),
-				_("The number of children that are online."),
+			g_param_spec_int("online-count", "Online count",
+				"The number of children that are online.",
 				G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)
 			);
 
diff --git a/libpurple/blistnodetypes.c b/libpurple/blistnodetypes.c
--- a/libpurple/blistnodetypes.c
+++ b/libpurple/blistnodetypes.c
@@ -676,44 +676,44 @@ static void purple_buddy_class_init(Purp
 	obj_class->constructed = purple_buddy_constructed;
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_NAME,
-			g_param_spec_string("name", _("Name"),
-				_("The name of the buddy."), NULL,
+			g_param_spec_string("name", "Name",
+				"The name of the buddy.", NULL,
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_LOCAL_ALIAS,
-			g_param_spec_string("local-alias", _("Local alias"),
-				_("Local alias of thee buddy."), NULL,
+			g_param_spec_string("local-alias", "Local alias",
+				"Local alias of thee buddy.", NULL,
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_SERVER_ALIAS,
-			g_param_spec_string("server-alias", _("Server alias"),
-				_("Server-side alias of the buddy."), NULL,
+			g_param_spec_string("server-alias", "Server alias",
+				"Server-side alias of the buddy.", NULL,
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_ICON,
-			g_param_spec_pointer("icon", _("Buddy icon"),
-				_("The icon for the buddy."),
+			g_param_spec_pointer("icon", "Buddy icon",
+				"The icon for the buddy.",
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_ACCOUNT,
-			g_param_spec_object("account", _("Account"),
-				_("The account for the buddy."), PURPLE_TYPE_ACCOUNT,
+			g_param_spec_object("account", "Account",
+				"The account for the buddy.", PURPLE_TYPE_ACCOUNT,
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_PRESENCE,
-			g_param_spec_object("presence", _("Presence"),
-				_("The status information for the buddy."), PURPLE_TYPE_PRESENCE,
+			g_param_spec_object("presence", "Presence",
+				"The status information for the buddy.", PURPLE_TYPE_PRESENCE,
 				G_PARAM_READABLE)
 			);
 
 	g_object_class_install_property(obj_class, BUDDY_PROP_MEDIA_CAPS,
-			g_param_spec_enum("media-caps", _("Media capabilities"),
-				_("The media capabilities of the buddy."),
+			g_param_spec_enum("media-caps", "Media capabilities",
+				"The media capabilities of the buddy.",
 				PURPLE_MEDIA_TYPE_CAPS, PURPLE_MEDIA_CAPS_NONE,
 				G_PARAM_READWRITE)
 			);
@@ -1037,14 +1037,14 @@ static void purple_contact_class_init(Pu
 	obj_class->set_property = purple_contact_set_property;
 
 	g_object_class_install_property(obj_class, CONTACT_PROP_ALIAS,
-			g_param_spec_string("alias", _("Alias"),
-				_("The alias for the contact."), NULL,
+			g_param_spec_string("alias", "Alias",
+				"The alias for the contact.", NULL,
 				G_PARAM_READWRITE)
 			);
 
 	g_object_class_install_property(obj_class, CONTACT_PROP_PRIORITY_BUDDY,
 			g_param_spec_object("priority-buddy",
-				_("Priority buddy"), _("The priority buddy of the contact."),
+				"Priority buddy", "The priority buddy of the contact.",
 				PURPLE_TYPE_BUDDY, G_PARAM_READABLE)
 			);
 
@@ -1291,20 +1291,20 @@ static void purple_chat_class_init(Purpl
 	obj_class->constructed = purple_chat_constructed;
 
 	g_object_class_install_property(obj_class, CHAT_PROP_ALIAS,
-			g_param_spec_string("alias", _("Alias"),
-				_("The alias for the chat."), NULL,
+			g_param_spec_string("alias", "Alias",
+				"The alias for the chat.", NULL,
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
 			);
 
 	g_object_class_install_property(obj_class, CHAT_PROP_ACCOUNT,
-			g_param_spec_object("account", _("Account"),
-				_("The account that the chat belongs to."), PURPLE_TYPE_ACCOUNT,
+			g_param_spec_object("account", "Account",
+				"The account that the chat belongs to.", PURPLE_TYPE_ACCOUNT,
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
 			);
 
 	g_object_class_install_property(obj_class, CHAT_PROP_COMPONENTS,
-			g_param_spec_pointer("components", _("Components"),
-				_("The protocol components of the chat."),
+			g_param_spec_pointer("components", "Components",
+				"The protocol components of the chat.",
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)
 			);
 
@@ -1629,8 +1629,8 @@ static void purple_group_class_init(Purp
 	obj_class->set_property = purple_group_set_property;
 
 	g_object_class_install_property(obj_class, GROUP_PROP_NAME,
-			g_param_spec_string("name", _("Name"),
-				_("Name of the group."), NULL,
+			g_param_spec_string("name", "Name",
+				"Name of the group.", NULL,
 				G_PARAM_READWRITE | G_PARAM_CONSTRUCT)
 			);
 
diff --git a/libpurple/circularbuffer.c b/libpurple/circularbuffer.c
--- a/libpurple/circularbuffer.c
+++ b/libpurple/circularbuffer.c
@@ -34,12 +34,26 @@
  * Structs
  *****************************************************************************/
 typedef struct {
+	/** A pointer to the starting address of our chunk of memory. */
 	gchar *buffer;
+
+	/** The incremental amount to increase this buffer by when
+	 *  the buffer is not big enough to hold incoming data, in bytes. */
 	gsize growsize;
+
+	/** The length of this buffer, in bytes. */
 	gsize buflen;
+
+	/** The number of bytes of this buffer that contain unread data. */
 	gsize bufused;
+
+	/** A pointer to the next byte where new incoming data is
+	 *  buffered to. */
 	gchar *input;
-	gchar *output;
+
+	/** A pointer to the next byte of buffered data that should be
+	 *  read by the consumer. */
+	gchar *output;	
 } PurpleCircularBufferPrivate;
 
 /******************************************************************************
@@ -371,7 +385,7 @@ purple_circular_buffer_mark_read(PurpleC
 
 	g_return_val_if_fail(PURPLE_IS_CIRCULAR_BUFFER(buffer), FALSE);
 
-	klass = PURPLE_CIRCULAR_BUFFER_CLASS(buffer);
+	klass = PURPLE_CIRCULAR_BUFFER_GET_CLASS(buffer);
 	if(klass && klass->mark_read)
 		return klass->mark_read(buffer, len);
 
diff --git a/libpurple/circularbuffer.h b/libpurple/circularbuffer.h
--- a/libpurple/circularbuffer.h
+++ b/libpurple/circularbuffer.h
@@ -69,8 +69,7 @@ GType purple_circular_buffer_get_type(vo
  *                 is appended and every time more space is needed.  Pass in
  *                 "0" to use the default of 256 bytes.
  *
- * @return The new PurpleCircBuffer. This should be freed with
- *         purple_circ_buffer_destroy when you are done with it
+ * @return The new PurpleCircBuffer.
  */
 PurpleCircularBuffer *purple_circular_buffer_new(gsize growsize);
 
@@ -88,8 +87,8 @@ void purple_circular_buffer_append(Purpl
  * Determine the maximum number of contiguous bytes that can be read from the
  * PurpleCircBuffer.
  * Note: This may not be the total number of bytes that are buffered - a
- * subsequent call after calling purple_circ_buffer_mark_read() may indicate more
- * data is available to read.
+ * subsequent call after calling purple_circular_buffer_mark_read() may indicate
+ * more data is available to read.
  *
  * @param buf the PurpleCircBuffer for which to determine the maximum contiguous



More information about the Commits mailing list