soc.2009.vulture: 5188c50e: Always post UI messages to main window, ...
gdick at soc.pidgin.im
gdick at soc.pidgin.im
Fri Jul 3 16:05:26 EDT 2009
-----------------------------------------------------------------
Revision: 5188c50ed3bf88c1d2d51e872f86f4a6ced7e8f6
Ancestor: b2df217243688331bb65fc6bbb4c8dfd9607a9be
Author: gdick at soc.pidgin.im
Date: 2009-07-02T12:07:06
Branch: im.pidgin.soc.2009.vulture
URL: http://d.pidgin.im/viewmtn/revision/info/5188c50ed3bf88c1d2d51e872f86f4a6ced7e8f6
Modified files:
vulture/purpleblist.c vulture/purpleconv.c
vulture/purplemain.c vulture/purplemain.h
vulture/purplestatus.c
ChangeLog:
Always post UI messages to main window, to avoid potential sync problems.
-------------- next part --------------
============================================================
--- vulture/purpleblist.c 0b9e817d256f83b768dcea8c94aa71ef44604af6
+++ vulture/purpleblist.c 93a123a7d454de0af4f5db9b7e0cc5d17b50c318
@@ -116,12 +116,12 @@ void PurpleBlistUpdateNode(PurpleBuddyLi
PurpleBlistUpdateNode(lpbuddylist, lpvbn->lpvbnParent->lpblistnode);
VultureBListNodeAddRef(lpvbn);
- VulturePostUIMessage(g_hwndMain, VUIMSG_UPDATEBLISTNODE, lpvbn);
+ VulturePostUIMessage(VUIMSG_UPDATEBLISTNODE, lpvbn);
}
}
else if(lpvbn->hti)
{
- VulturePostUIMessage(g_hwndMain, VUIMSG_REMOVEBLISTNODE, lpvbn);
+ VulturePostUIMessage(VUIMSG_REMOVEBLISTNODE, lpvbn);
/* The parent may need to go, too. */
if(lpvbn->lpvbnParent && lpvbn->lpvbnParent->hti)
@@ -290,5 +290,5 @@ void PurpleBuddyStatusChanged(PurpleBudd
/* If so, tell the UI to update the status message in the conversation.
*/
if(lpconv)
- VulturePostUIMessage(g_hwndMain, VUIMSG_UPDATEIMSTATUSTEXT, lpconv->ui_data);
+ VulturePostUIMessage(VUIMSG_UPDATEIMSTATUSTEXT, lpconv->ui_data);
}
============================================================
--- vulture/purpleconv.c 2d017fc18e51e06137849b2db68553fcfd88b3f7
+++ vulture/purpleconv.c 71fe111525db627aec38394a42085bd1d0757770
@@ -54,7 +54,7 @@ void PurpleNewConversation(PurpleConvers
*/
lpvconv->convtype = lpconv->type;
- VulturePostUIMessage(g_hwndMain, VUIMSG_NEWCONVERSATION, lpvconv);
+ VulturePostUIMessage(VUIMSG_NEWCONVERSATION, lpvconv);
}
@@ -84,7 +84,7 @@ void PurpleDestroyConversation(PurpleCon
/* This pointer is about to become invalid. */
((VULTURE_CONVERSATION*)lpconv->ui_data)->lpconv = NULL;
- VulturePostUIMessage(g_hwndMain, VUIMSG_DESTROYEDCONVERSATION, (VULTURE_CONVERSATION*)lpconv->ui_data);
+ VulturePostUIMessage(VUIMSG_DESTROYEDCONVERSATION, (VULTURE_CONVERSATION*)lpconv->ui_data);
}
@@ -109,7 +109,7 @@ void PurpleWriteConversation(PurpleConve
lpvcwrite->szMessage = VultureUTF8ToTCHAR(szMessage);
VultureTimetToSystemTime(timeMsg, &lpvcwrite->systimeMsg);
- VulturePostUIMessage(g_hwndMain, VUIMSG_WRITECONVERSATION, lpvcwrite);
+ VulturePostUIMessage(VUIMSG_WRITECONVERSATION, lpvcwrite);
}
@@ -167,7 +167,7 @@ void PurpleConvChanged(PurpleConversatio
lpvcchanged->lpvconv = lpvconv;
lpvcchanged->pcut = pcut;
- VulturePostUIMessage(g_hwndMain, VUIMSG_CONVCHANGED, lpvcchanged);
+ VulturePostUIMessage(VUIMSG_CONVCHANGED, lpvcchanged);
}
============================================================
--- vulture/purplemain.c 85fe69a4692757bb5877c7107efc7307d345487b
+++ vulture/purplemain.c 4f608d0871c2cde8c49e86ae92d1b7db4334a28b
@@ -156,7 +156,7 @@ static int InitLibpurple(void)
if(!purple_core_init(VULTURE_ID))
return 1;
- VulturePostUIMessage(g_hwndMain, VUIMSG_PURPLEINITCOMPLETE, NULL);
+ VulturePostUIMessage(VUIMSG_PURPLEINITCOMPLETE, NULL);
/* Sign in using specified or remembered state. */
if (!purple_prefs_get_bool("/purple/savedstatus/startup_current_status"))
@@ -223,5 +223,5 @@ static void Quitting(void)
static void Quitting(void)
{
/* The core is on its way out, so tell the UI to destroy itself. */
- VulturePostUIMessage(g_hwndMain, VUIMSG_QUIT, NULL);
+ VulturePostUIMessage(VUIMSG_QUIT, NULL);
}
============================================================
--- vulture/purplemain.h 90032a5dbd4f119d66d22621ec897d4ad07986ab
+++ vulture/purplemain.h 709b09087c04d1b31d04a5daf99878a1112141ce
@@ -79,17 +79,15 @@ extern GMainLoop *g_lpgmainloop;
/**
- * Posts a message from libpurple to the Windows message queue of the specified
+ * Posts a message from libpurple to the Windows message queue of the main
* window.
*
- * @param hwnd Window.
* @param iCallID ID of the message.
* @param lpvParam Message-specific data.
*/
-static INLINE void VulturePostUIMessage(HWND hwnd, int iMsg, void *lpvParam)
+static INLINE void VulturePostUIMessage(int iMsg, void *lpvParam)
{
- if(IsWindow(hwnd))
- PostMessage(hwnd, WM_PURPLEUIMSG, iMsg, (LPARAM)lpvParam);
+ PostMessage(g_hwndMain, WM_PURPLEUIMSG, iMsg, (LPARAM)lpvParam);
}
============================================================
--- vulture/purplestatus.c c886ba29816ca7ea8c46504f22d6d0d614044826
+++ vulture/purplestatus.c ab3be17c328f534a2b453b444341670515ce97ad
@@ -179,7 +179,7 @@ void PurpleStatusChanged(PurpleSavedStat
MakeVultureStatusFromPurple(lppssNew, lpvss);
/* The UI will free the status we just allocated. */
- VulturePostUIMessage(g_hwndMain, VUIMSG_STATUSCHANGED, lpvss);
+ VulturePostUIMessage(VUIMSG_STATUSCHANGED, lpvss);
}
More information about the Commits
mailing list