/soc/2012/michael/android: 856756316634: Added code to create a ...

Michael Zangl michael at soc.pidgin.im
Wed Aug 15 06:14:14 EDT 2012


Changeset: 856756316634875e8721a0b0715063646f01b78d
Author:	 Michael Zangl <michael at soc.pidgin.im>
Date:	 2012-08-11 11:03 +0200
Branch:	 soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/856756316634

Description:

Added code to create a new conversation for a buddy.

diffstat:

 android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/buddy/PurpleBuddy.java                |  5 +++++
 android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/conversation/ConversationManager.java |  4 ++--
 android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/CoreManager.java                 |  4 ++++
 3 files changed, 11 insertions(+), 2 deletions(-)

diffs (46 lines):

diff --git a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/buddy/PurpleBuddy.java b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/buddy/PurpleBuddy.java
--- a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/buddy/PurpleBuddy.java
+++ b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/buddy/PurpleBuddy.java
@@ -4,6 +4,7 @@ import im.pidgin.libpurple.account.Purpl
 import im.pidgin.libpurple.blist.PurpleBlistManager;
 import im.pidgin.libpurple.blist.PurpleBlistNode;
 import im.pidgin.libpurple.blist.PurpleContact;
+import im.pidgin.libpurple.conversation.PurpleConversation;
 import im.pidgin.libpurple.core.CoreManager;
 
 import java.util.LinkedList;
@@ -139,4 +140,8 @@ public class PurpleBuddy extends PurpleB
 	}
 
 	private native long getContact_native();
+	
+	public PurpleConversation newConversation() {
+		return getManager().getConversationManager().newConversation(this);
+	}
 }
diff --git a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/conversation/ConversationManager.java b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/conversation/ConversationManager.java
--- a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/conversation/ConversationManager.java
+++ b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/conversation/ConversationManager.java
@@ -34,8 +34,8 @@ public class ConversationManager extends
 	}
 	
 	protected void createConversation(long conv) { 
-		PurpleConversation conversation = getPeer(conv);
-		conversations.put(conversation.getNativePointer(), conversation);
+		//PurpleConversation conversation = getPeer(conv);
+		//conversations.put(conversation.getNativePointer(), conversation);
 	}
 
 	protected void destroyConversation(long conv) { 
diff --git a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/CoreManager.java b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/CoreManager.java
--- a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/CoreManager.java
+++ b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/CoreManager.java
@@ -83,4 +83,8 @@ public class CoreManager {
 	public PurpleBlistManager getBlist() {
 		return blist;
 	}
+	
+	public ConversationManager getConversationManager() {
+		return conversationManager;
+	}
 }



More information about the Commits mailing list