soc.2009.vulture: 87befac3: Perform dynamic menu actions.
gdick at soc.pidgin.im
gdick at soc.pidgin.im
Sat Jul 18 16:50:24 EDT 2009
-----------------------------------------------------------------
Revision: 87befac3a17ba2398b77ef7579d2455d0bff30a6
Ancestor: 8f05892209824acd762d87f1e49366ca3345fd9b
Author: gdick at soc.pidgin.im
Date: 2009-07-18T12:42:11
Branch: im.pidgin.soc.2009.vulture
URL: http://d.pidgin.im/viewmtn/revision/info/87befac3a17ba2398b77ef7579d2455d0bff30a6
Modified files:
vulture/purplequeue.c vulture/purplequeue.h
vulture/vultureblist.c
ChangeLog:
Perform dynamic menu actions.
-------------- next part --------------
============================================================
--- vulture/purplequeue.c 6e81e1a076615cab44d89789b58161abca0e605b
+++ vulture/purplequeue.c 2da33c94be517bd531d0af12f824f61744d64018
@@ -276,6 +276,15 @@ static void DispatchPurpleCall(PURPLE_CA
break;
+
+ case PC_PERFORMMENUACTION:
+ {
+ VULTURE_MENU_ACTION *lpvma = lppurplecall->lpvParam;
+ lpvma->lpfnCallback(lpvma->lpvObject, lpvma->lpvData);
+ }
+
+ break;
+
case PC_QUIT:
purple_core_quit();
g_main_loop_quit(g_lpgmainloop);
============================================================
--- vulture/purplequeue.h 1eb3b67668548d96665910278a93d44e5963fdac
+++ vulture/purplequeue.h 22435e1cfa7ab70997628402e0139fb8b0336b6b
@@ -85,6 +85,9 @@ enum PURPLE_CALL_ID
/* (VULTURE_MAKE_CONTEXT_MENU*) */
PC_MAKEBUDDYMENU,
+
+ /* (VULTURE_MENU_ACTION*) */
+ PC_PERFORMMENUACTION,
};
============================================================
--- vulture/vultureblist.c 8dc08c3607840934ad2f34c5ecd7cafc19de7b4b
+++ vulture/vultureblist.c e7840807a05d053810fd96a9ebab3ac3d355fdc9
@@ -888,5 +888,23 @@ static void RunBuddyMenuCmd(VULTURE_BLIS
{
case IDM_BLIST_CONTEXT_IM:
VultureEnqueueAsyncPurpleCall(PC_BLISTNODEACTIVATED, lpvblistnode);
+ break;
+
+ default:
+ /* Not a static command that we recongise; might be a dynamic
+ * command.
+ */
+ if(iCmd >= IDM_DYNAMIC_FIRST)
+ {
+ MENUITEMINFO mii;
+
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_DATA;
+ GetMenuItemInfo(hmenu, iCmd, FALSE, &mii);
+
+ VultureSingleSyncPurpleCall(PC_PERFORMMENUACTION, (VULTURE_MENU_ACTION*)mii.dwItemData);
+ }
+
+ break;
}
}
More information about the Commits
mailing list