/soc/2013/ankitkv/gobjectification: 11e9cd6fd6a3: Merged soc.201...

Ankit Vani a at nevitus.org
Sun Dec 1 13:10:48 EST 2013


Changeset: 11e9cd6fd6a3e754dc70955f6291c49d8f72cf25
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-12-01 23:40 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/11e9cd6fd6a3

Description:

Merged soc.2013.gobjectification branch

diffstat:

 libpurple/server.c                |  24 +++++++---
 libpurple/status.h                |  89 ++++++++++++++++----------------------
 pidgin/win32/prepare-workspace.sh |   9 +++-
 3 files changed, 61 insertions(+), 61 deletions(-)

diffs (180 lines):

diff --git a/libpurple/server.c b/libpurple/server.c
--- a/libpurple/server.c
+++ b/libpurple/server.c
@@ -779,11 +779,15 @@ void serv_got_chat_left(PurpleConnection
 	PurpleChatConversation *chat = NULL;
 
 	for (bcs = purple_connection_get_active_chats(g); bcs != NULL; bcs = bcs->next) {
-		chat = PURPLE_CHAT_CONVERSATION(bcs->data);
+		if (purple_chat_conversation_get_id(
+				PURPLE_CHAT_CONVERSATION(bcs->data)) == id) {
+			chat = (PurpleChatConversation *)bcs->data;
+			break;
+		}
+	}
 
-		if (purple_chat_conversation_get_id(chat) == id)
-			break;
-	}
+	if (!chat)
+		return;
 
 	purple_debug(PURPLE_DEBUG_INFO, "server", "Leaving room: %s\n",
 			   purple_conversation_get_name(PURPLE_CONVERSATION(chat)));
@@ -813,11 +817,15 @@ void serv_got_chat_in(PurpleConnection *
 	g_return_if_fail(message != NULL);
 
 	for (bcs = purple_connection_get_active_chats(g); bcs != NULL; bcs = bcs->next) {
-		chat = PURPLE_CHAT_CONVERSATION(bcs->data);
+		if (purple_chat_conversation_get_id(
+				PURPLE_CHAT_CONVERSATION(bcs->data)) == id) {
+			chat = (PurpleChatConversation *)bcs->data;
+			break;
+		}
+	}
 
-		if (purple_chat_conversation_get_id(chat) == id)
-			break;
-	}
+	if (!chat)
+		return;
 
 	/* Did I send the message? */
 	if (purple_strequal(purple_chat_conversation_get_nick(chat),
diff --git a/libpurple/status.h b/libpurple/status.h
--- a/libpurple/status.h
+++ b/libpurple/status.h
@@ -26,57 +26,6 @@
 #ifndef _PURPLE_STATUS_H_
 #define _PURPLE_STATUS_H_
 
-/*
- * A brief explanation of the status API:
- *
- * PurpleStatusType's are created by each protocol.  They outline the
- * available statuses of the protocol.  AIM, for example, supports
- * an available state with an optional available message, an away
- * state with a mandatory message, and an invisible state (which is
- * technically "independent" of the other two, but we'll get into
- * that later).  PurpleStatusTypes are very permanent.  They are
- * hardcoded in each protocol and will not change often.  And because
- * they are hardcoded, they do not need to be saved to any XML file.
- *
- * A PurpleStatus can be thought of as an "instance" of a PurpleStatusType.
- * If you're familiar with object-oriented programming languages
- * then this should be immediately clear.  Say, for example, that
- * one of your AIM buddies has set himself as "away."  You have a
- * PurpleBuddy node for this person in your buddy list.  Purple wants
- * to mark this buddy as "away," so it creates a new PurpleStatus.
- * The PurpleStatus has its PurpleStatusType set to the "away" state
- * for the oscar protocol.  The PurpleStatus also contains the buddy's
- * away message.  PurpleStatuses are sometimes saved, depending on
- * the context.  The current PurpleStatuses associated with each of
- * your accounts are saved so that the next time you start Purple,
- * your accounts will be set to their last known statuses.  There
- * is also a list of saved statuses that are written to the
- * status.xml file.  Also, each PurpleStatus has a "saveable" boolean.
- * If "saveable" is set to FALSE then the status is NEVER saved.
- * All PurpleStatuses should be inside a PurplePresence.
- *
- * A PurpleStatus is either "independent" or "exclusive."
- * Independent statuses can be active or inactive and they don't
- * affect anything else.  However, you can only have one exclusive
- * status per PurplePresence.  If you activate one exclusive status,
- * then the previous exclusive status is automatically deactivated.
- *
- * A PurplePresence is like a collection of PurpleStatuses (plus some
- * other random info).
- *
- * @see presence.h
- */
-
-/**
- * PurpleStatusType's are created by each protocol.  They outline the
- * available statuses of the protocol.  AIM, for example, supports
- * an available state with an optional available message, an away
- * state with a mandatory message, and an invisible state (which is
- * technically "independent" of the other two, but we'll get into
- * that later).  PurpleStatusTypes are very permanent.  They are
- * hardcoded in each protocol and will not change often.  And because
- * they are hardcoded, they do not need to be saved to any XML file.
- */
 #define PURPLE_TYPE_STATUS             (purple_status_get_type())
 #define PURPLE_STATUS(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_STATUS, PurpleStatus))
 #define PURPLE_STATUS_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_STATUS, PurpleStatusClass))
@@ -91,6 +40,16 @@ typedef struct _PurpleStatusClass      P
 
 #define PURPLE_TYPE_STATUS_TYPE        (purple_status_type_get_type())
 
+/**
+ * PurpleStatusType's are created by each protocol.  They outline the
+ * available statuses of the protocol.  AIM, for example, supports
+ * an available state with an optional available message, an away
+ * state with a mandatory message, and an invisible state (which is
+ * technically "independent" of the other two, but we'll get into
+ * that later).  PurpleStatusTypes are very permanent.  They are
+ * hardcoded in each protocol and will not change often.  And because
+ * they are hardcoded, they do not need to be saved to any XML file.
+ */
 typedef struct _PurpleStatusType       PurpleStatusType;
 
 #define PURPLE_TYPE_STATUS_ATTRIBUTE   (purple_status_attribute_get_type())
@@ -144,7 +103,33 @@ typedef enum
 #define PURPLE_MOOD_COMMENT	"moodtext"
 
 /**
- * Represents an active status.
+ * A PurpleStatus can be thought of as an "instance" of a PurpleStatusType.
+ * If you're familiar with object-oriented programming languages
+ * then this should be immediately clear.  Say, for example, that
+ * one of your AIM buddies has set himself as "away."  You have a
+ * PurpleBuddy node for this person in your buddy list.  Purple wants
+ * to mark this buddy as "away," so it creates a new PurpleStatus.
+ * The PurpleStatus has its PurpleStatusType set to the "away" state
+ * for the oscar protocol.  The PurpleStatus also contains the buddy's
+ * away message.  PurpleStatuses are sometimes saved, depending on
+ * the context.  The current PurpleStatuses associated with each of
+ * your accounts are saved so that the next time you start Purple,
+ * your accounts will be set to their last known statuses.  There
+ * is also a list of saved statuses that are written to the
+ * status.xml file.  Also, each PurpleStatus has a "saveable" boolean.
+ * If "saveable" is set to FALSE then the status is NEVER saved.
+ * All PurpleStatuses should be inside a PurplePresence.
+ *
+ * A PurpleStatus is either "independent" or "exclusive."
+ * Independent statuses can be active or inactive and they don't
+ * affect anything else.  However, you can only have one exclusive
+ * status per PurplePresence.  If you activate one exclusive status,
+ * then the previous exclusive status is automatically deactivated.
+ *
+ * A PurplePresence is like a collection of PurpleStatuses (plus some
+ * other random info).
+ *
+ * @see presence.h
  */
 struct _PurpleStatus
 {
diff --git a/pidgin/win32/prepare-workspace.sh b/pidgin/win32/prepare-workspace.sh
--- a/pidgin/win32/prepare-workspace.sh
+++ b/pidgin/win32/prepare-workspace.sh
@@ -4,12 +4,19 @@
 #
 # Written by Tomek Wasilczyk <tomkiewicz at cpw.pidgin.im>, licensed under GNU GPL
 
+PLATFORM=`uname -m`
+
 # configuration
 
 BONJOUR_GUID_PACKED="5CA28B3B1DEA7654999C464610C010EB 2EA34582882FE334694F0BCD7D8DE336"
 ACTIVEPERL_GUID_PACKED="BC98F31FB8440B94CB3674649419766C 547A2C684F806164DB756F228DAB5840 5E7EC16051106BB43818746C209BC8D7"
 PERL_DIR_FALLBACK="/cygdrive/c/Perl/bin"
-NSIS_DIR_REGKEY="HKEY_LOCAL_MACHINE/SOFTWARE/NSIS/@"
+if [ "$PLATFORM" == "x86_64" ]; then
+       NSIS_DIR_REGKEY="HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/NSIS/@"
+else
+       NSIS_DIR_REGKEY="HKEY_LOCAL_MACHINE/SOFTWARE/NSIS/@"
+fi
+
 
 DEBUG_SKIP_DOWNLOADING=0
 DEBUG_SKIP_INSTALL=0



More information about the Commits mailing list