/soc/2012/michael/android: 8220e4a3b91b: Fixed node-aliased sign...

Michael Zangl michael at soc.pidgin.im
Tue Aug 7 07:13:33 EDT 2012


Changeset: 8220e4a3b91b180a50d0858ff512ec77544dde38
Author:	 Michael Zangl <michael at soc.pidgin.im>
Date:	 2012-08-07 13:11 +0200
Branch:	 soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/8220e4a3b91b

Description:

Fixed node-aliased signal passing to java.

diffstat:

 android/workspace/im.pidgin.libpurple/native/PurpleBlistManager.c                            |   4 +-
 android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistListener.java |   1 +
 android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistManager.java  |  13 ++++++++++
 3 files changed, 16 insertions(+), 2 deletions(-)

diffs (52 lines):

diff --git a/android/workspace/im.pidgin.libpurple/native/PurpleBlistManager.c b/android/workspace/im.pidgin.libpurple/native/PurpleBlistManager.c
--- a/android/workspace/im.pidgin.libpurple/native/PurpleBlistManager.c
+++ b/android/workspace/im.pidgin.libpurple/native/PurpleBlistManager.c
@@ -166,8 +166,8 @@ node_removed(PurpleBlistNode* node, Java
 }
 
 static void
-node_aliased(PurpleBlistNode* node, JavaObjectReference *blist,
-		const char* oldAlias)
+node_aliased(PurpleBlistNode* node, const char* oldAlias,
+		JavaObjectReference *blist)
 {
 	static JavaMethodIDCache methodCache = METHOD_CACHE("nodeAliased", "(J)V");
 
diff --git a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistListener.java b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistListener.java
--- a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistListener.java
+++ b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistListener.java
@@ -8,5 +8,6 @@ public interface PurpleBlistListener {
 	void nodeRemoved(PurpleBlistNode node);
 	void buddyAdded(PurpleBuddy node);
 	void buddyRemoved(PurpleBuddy node);
+	void nodeAliasChanged(PurpleBlistNode node);
 
 }
diff --git a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistManager.java b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistManager.java
--- a/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistManager.java
+++ b/android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/blist/PurpleBlistManager.java
@@ -134,6 +134,14 @@ public class PurpleBlistManager extends 
 		}
 	}
 
+	private void notifyNodeAliasChanged(PurpleBlistNode node) {
+		synchronized (blistMutex) {
+			for (PurpleBlistListener l : blistListeners) {
+				l.nodeAliasChanged(node);
+			}
+		}
+	}
+	
 	private void notifyBuddyAdded(PurpleBuddy buddy) {
 		synchronized (blistMutex) {
 			for (PurpleBlistListener l : blistListeners) {
@@ -193,4 +201,9 @@ public class PurpleBlistManager extends 
 		notifyNodeRemoved(node);
 	}
 
+	protected void nodeAliased(long node_native) {
+		PurpleBlistNode node = getPeer(node_native);
+		notifyNodeAliasChanged(node);
+	}
+
 }



More information about the Commits mailing list