void Server_ShowPopupMenu (HWND hList, POINT ptList, POINT ptScreen) { if (!ptScreen.x && !ptScreen.y) { RECT rWindow; GetWindowRect (hList, &rWindow); ptScreen.x = rWindow.left + (rWindow.right -rWindow.left)/2; ptScreen.y = rWindow.top + (rWindow.bottom -rWindow.top)/2; Server_ShowParticularPopupMenu (hList, ptScreen, NULL); } else if (FL_HitTestForHeaderBar (hList, ptList)) { HMENU hm = TaLocale_LoadMenu (MENU_COLUMNS); DisplayContextMenu (hm, ptScreen, hList); } else { LPIDENT lpiServer = NULL; HLISTITEM hItem; if ((hItem = FastList_ItemFromPoint (hList, &ptList, TRUE)) != NULL) lpiServer = (LPIDENT)FL_GetData (hList, hItem); if (lpiServer && (lpiServer != (LPIDENT)FL_GetSelectedData (hList))) lpiServer = NULL; Server_ShowParticularPopupMenu (hList, ptScreen, lpiServer); } }
void Filesets_ShowPopupMenu (HWND hList, POINT ptList, POINT ptScreen) { if (!ptScreen.x && !ptScreen.y) { RECT rWindow; GetWindowRect (hList, &rWindow); ptScreen.x = rWindow.left + (rWindow.right -rWindow.left)/2; ptScreen.y = rWindow.top + (rWindow.bottom -rWindow.top)/2; Filesets_ShowParticularPopupMenu (hList, ptScreen, NULL); } else if (FL_HitTestForHeaderBar (hList, ptList)) { HMENU hm = TaLocale_LoadMenu (MENU_COLUMNS); DisplayContextMenu (hm, ptScreen, hList); } else { LPIDENT lpi = Filesets_GetFocused (GetParent (hList), &ptList); if (lpi && (lpi != Filesets_GetSelected (GetParent (hList)))) { lpi = NULL; // right-click on item other than highlighted one? } if (lpi && lpi->fIsFileset()) { Filesets_ShowParticularPopupMenu (hList, ptScreen, lpi); } else if (lpi && lpi->fIsAggregate()) { Aggregates_ShowParticularPopupMenu (hList, ptScreen, lpi); } else if (lpi && lpi->fIsServer()) { Server_ShowParticularPopupMenu (hList, ptScreen, lpi); } else if (!lpi) // display the _NONE menu? (no menu if it's a cell ident) { Filesets_ShowParticularPopupMenu (hList, ptScreen, lpi); } } }