2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
14 #include <afs/param.h>
19 #include "svr_window.h"
20 #include "svr_general.h"
23 #include "agg_general.h"
25 #include "set_general.h"
27 #include "set_repprop.h"
28 #include "set_createrep.h"
35 * RESIZING WINDOWS ___________________________________________________________
39 rwWindowData awdFilesets
[] = {
40 { IDC_SET_DESC
, raSizeX
, 0, 0 },
41 { IDC_SET_LIST
, raSizeX
| raSizeY
, 0, 0 },
42 { IDC_SET_CREATE
, raMoveX
| raMoveY
, 0, 0 },
43 { IDC_SET_DELETE
, raMoveX
| raMoveY
, 0, 0 },
44 { IDC_SET_REP
, raMoveX
| raMoveY
, 0, 0 },
45 { IDC_SET_SETQUOTA
, raMoveX
| raMoveY
, 0, 0 },
46 { idENDLIST
, 0, 0, 0 }
51 * VARIABLES __________________________________________________________________
59 HIMAGELIST hDragImage
;
63 HLISTITEM hItemTarget
;
68 * PROTOTYPES _________________________________________________________________
72 void Filesets_OnView (HWND hDlg
);
73 void Filesets_OnSelect (HWND hDlg
);
74 void Filesets_OnEndTask_Select (HWND hDlg
, LPTASKPACKET ptp
);
75 void Filesets_OnEndTask_BeginDrag (HWND hDlg
, LPTASKPACKET ptp
);
76 void Filesets_OnEndTask_DragMenu (HWND hDlg
, LPTASKPACKET ptp
);
77 void Filesets_OnEndTask_Menu (HWND hDlg
, LPTASKPACKET ptp
);
79 void Filesets_OnNotifyFromDispatch (LPNOTIFYSTRUCT lpns
);
81 LPIDENT
IdentifyPoint (HWND hTarget
, POINT ptClient
, HLISTITEM
*phItemTarget
);
83 void Filesets_SubclassList (HWND hDlg
);
84 void Filesets_Subclass_OnCommand (HWND hList
, UINT msg
, WPARAM wp
, LPARAM lp
);
86 BOOL
Filesets_BeginDrag (HWND hDlg
, BOOL fRightBtn
);
87 void Filesets_ContinueDrag (HWND hDlg
);
88 void Filesets_FinishDrag (HWND hDlg
, BOOL fDropped
, BOOL fMenu
);
89 void Filesets_CancelDrag (HWND hDlg
);
91 void Filesets_ShowPopupMenu (HWND hList
, POINT ptList
, POINT ptScreen
);
95 * ROUTINES ___________________________________________________________________
99 BOOL CALLBACK
Filesets_DlgProc (HWND hDlg
, UINT msg
, WPARAM wp
, LPARAM lp
)
101 if (HandleColumnNotify (hDlg
, msg
, wp
, lp
, &gr
.viewSet
))
109 GetClientRect (GetParent(hDlg
), &rTab
);
110 TabCtrl_AdjustRect (GetParent (hDlg
), FALSE
, &rTab
);
111 ResizeWindow (hDlg
, awdFilesets
, rwaMoveToHere
, &rTab
);
113 FL_RestoreView (GetDlgItem (hDlg
, IDC_SET_LIST
), &gr
.viewSet
);
114 FastList_SetTextCallback (GetDlgItem (hDlg
, IDC_SET_LIST
), GetItemText
, &gr
.viewSet
);
116 Filesets_SubclassList (hDlg
);
118 Filesets_OnView (hDlg
);
119 Filesets_OnSelect (hDlg
);
124 WinHelp (hDlg
, cszHELPFILENAME
, HELP_FINDER
, 0);
128 FL_StoreView (GetDlgItem (hDlg
, IDC_SET_LIST
), &gr
.viewSet
);
129 DontNotifyMeEver (hDlg
);
133 // if (lp==0), we're minimizing--don't call ResizeWindow().
136 ResizeWindow (hDlg
, awdFilesets
, rwaFixupGuts
);
143 ptScreen
.x
= LOWORD(lp
);
144 ptScreen
.y
= HIWORD(lp
);
147 ScreenToClient ((HWND
)wp
, &ptClient
);
149 if ((HWND
)wp
== GetDlgItem (hDlg
, IDC_SET_LIST
))
150 Filesets_ShowPopupMenu ((HWND
)wp
, ptClient
, ptScreen
);
154 case WM_SERVER_CHANGED
:
156 LPIDENT lpiServer
= Server_GetServerForChild (hDlg
);
157 DontNotifyMeEver (hDlg
);
158 NotifyMe (WHEN_OBJECT_CHANGES
, NULL
, hDlg
, 0);
160 // Fix the text at the top of the Aggregates tab:
162 TCHAR szName
[ cchRESOURCE
];
165 if (lpiServer
!= NULL
)
167 LPSERVER_PREF lpsp
= (LPSERVER_PREF
)lpiServer
->GetUserParam();
168 lpiServer
->GetServerName (szName
);
169 if (lpsp
&& !lpsp
->fIsMonitored
)
170 pszText
= FormatString (IDS_FILESET_UNMON
, TEXT("%s"), szName
);
172 pszText
= FormatString (IDS_FILESETS_IN_SERVER
, TEXT("%s"), szName
);
174 else if (g
.lpiCell
!= NULL
)
176 g
.lpiCell
->GetCellName (szName
);
178 pszText
= FormatString (IDS_FILESET_SOME
, TEXT("%s"), szName
);
180 pszText
= FormatString (IDS_FILESETS_IN_CELL
, TEXT("%s"), szName
);
184 pszText
= FormatString (IDS_FILESETS_IN_NOTHING
);
187 SetDlgItemText (hDlg
, IDC_SET_DESC
, pszText
);
188 FreeString (pszText
);
190 UpdateDisplay_Filesets (FALSE
, GetDlgItem (hDlg
, IDC_SET_LIST
), NULL
, 0, NULL
, NULL
, NULL
);
194 case WM_NOTIFY_FROM_DISPATCH
:
195 Filesets_OnNotifyFromDispatch ((LPNOTIFYSTRUCT
)lp
);
196 Delete ((LPNOTIFYSTRUCT
)lp
);
203 SendMessage (GetDlgItem (hDlg
, IDC_SET_LIST
), WM_COMMAND
, M_SET_CREATE
, 0);
207 SendMessage (GetDlgItem (hDlg
, IDC_SET_LIST
), WM_COMMAND
, M_SET_DELETE
, 0);
211 SendMessage (GetDlgItem (hDlg
, IDC_SET_LIST
), WM_COMMAND
, M_SET_REPLICATION
, 0);
214 case IDC_SET_SETQUOTA
:
215 SendMessage (GetDlgItem (hDlg
, IDC_SET_LIST
), WM_COMMAND
, M_SET_SETQUOTA
, 0);
221 Filesets_ContinueDrag (hDlg
);
225 if (l
.fDragging
&& l
.fRightBtn
)
226 Filesets_FinishDrag (hDlg
, FALSE
, FALSE
);
230 if (l
.fDragging
&& !l
.fRightBtn
)
231 Filesets_FinishDrag (hDlg
, FALSE
, FALSE
);
235 if (l
.fDragging
&& !l
.fRightBtn
)
236 Filesets_FinishDrag (hDlg
, TRUE
, FALSE
);
240 if (l
.fDragging
&& l
.fRightBtn
)
241 Filesets_FinishDrag (hDlg
, TRUE
, TRUE
);
246 if ((ptp
= (LPTASKPACKET
)lp
) != NULL
)
248 if (ptp
->idTask
== taskSET_SELECT
)
249 Filesets_OnEndTask_Select (hDlg
, ptp
);
250 else if (ptp
->idTask
== taskSET_BEGINDRAG
)
251 Filesets_OnEndTask_BeginDrag (hDlg
, ptp
);
252 else if (ptp
->idTask
== taskSET_DRAGMENU
)
253 Filesets_OnEndTask_DragMenu (hDlg
, ptp
);
254 else if (ptp
->idTask
== taskSET_MENU
)
255 Filesets_OnEndTask_Menu (hDlg
, ptp
);
256 FreeTaskPacket (ptp
);
261 switch (((LPNMHDR
)lp
)->code
)
264 if (((LPNMHDR
)lp
)->hwndFrom
== GetDlgItem (hDlg
, IDC_SET_LIST
))
266 Filesets_OnSelect (hDlg
);
271 if (((LPNMHDR
)lp
)->hwndFrom
== GetDlgItem (hDlg
, IDC_SET_LIST
))
273 HLISTITEM hItem
= ((LPFLN_ITEMEXPAND_PARAMS
)lp
)->hItem
;
274 LPIDENT lpi
= (LPIDENT
)FastList_GetItemParam (GetDlgItem (hDlg
, IDC_SET_LIST
), hItem
);
275 BOOL fExpanded
= ((LPFLN_ITEMEXPAND_PARAMS
)lp
)->fExpanded
;
277 if (lpi
&& lpi
->fIsServer())
280 if ((lpsp
= (LPSERVER_PREF
)lpi
->GetUserParam()) != NULL
)
282 lpsp
->fExpandTree
= fExpanded
;
283 Server_SavePreferences (lpi
);
286 else if (lpi
&& lpi
->fIsAggregate())
288 LPAGGREGATE_PREF lpap
;
289 if ((lpap
= (LPAGGREGATE_PREF
)lpi
->GetUserParam()) != NULL
)
291 lpap
->fExpandTree
= fExpanded
;
292 Aggregates_SavePreferences (lpi
);
299 return Filesets_BeginDrag (hDlg
, ((LPFLN_DRAG_PARAMS
)lp
)->fRightButton
);
302 if (((LPNMHDR
)lp
)->hwndFrom
== GetDlgItem (hDlg
, IDC_SET_LIST
))
304 BOOL fShowProperties
= TRUE
;
307 if ((hItem
= FastList_GetFocus (GetDlgItem (hDlg
, IDC_SET_LIST
))) != NULL
)
309 if (FastList_FindFirstChild (GetDlgItem (hDlg
, IDC_SET_LIST
), hItem
))
310 fShowProperties
= FALSE
;
313 LPIDENT lpi
= Filesets_GetFocused (hDlg
);
314 if (lpi
&& !lpi
->fIsCell() && fShowProperties
)
316 PostMessage (GetDlgItem (hDlg
, IDC_SET_LIST
), WM_COMMAND
, M_PROPERTIES
, 0);
329 void Filesets_OnSelect (HWND hDlg
)
331 LPIDENT lpi
= Filesets_GetSelected (hDlg
);
333 if (!lpi
|| !lpi
->fIsFileset())
335 EnableWindow (GetDlgItem (hDlg
, IDC_SET_REP
), FALSE
);
336 EnableWindow (GetDlgItem (hDlg
, IDC_SET_DELETE
), FALSE
);
337 EnableWindow (GetDlgItem (hDlg
, IDC_SET_SETQUOTA
), FALSE
);
341 StartTask (taskSET_SELECT
, hDlg
, lpi
);
346 void Filesets_OnEndTask_Select (HWND hDlg
, LPTASKPACKET ptp
)
348 LPIDENT lpi
= (LPIDENT
)(ptp
->lpUser
);
351 EnableWindow (GetDlgItem (hDlg
, IDC_SET_DELETE
), FALSE
);
353 EnableWindow (GetDlgItem (hDlg
, IDC_SET_DELETE
), TRUE
);
355 if ((!ptp
->rc
) || (TASKDATA(ptp
)->fs
.Type
== ftCLONE
))
356 EnableWindow (GetDlgItem (hDlg
, IDC_SET_REP
), FALSE
);
358 EnableWindow (GetDlgItem (hDlg
, IDC_SET_REP
), TRUE
);
360 if ((!ptp
->rc
) || (TASKDATA(ptp
)->fs
.Type
!= ftREADWRITE
))
361 EnableWindow (GetDlgItem (hDlg
, IDC_SET_SETQUOTA
), FALSE
);
363 EnableWindow (GetDlgItem (hDlg
, IDC_SET_SETQUOTA
), TRUE
);
367 void Filesets_OnNotifyFromDispatch (LPNOTIFYSTRUCT lpns
)
371 case evtRefreshFilesetsEnd
:
372 case evtRefreshStatusEnd
:
373 case evtAlertsChanged
:
375 if ( (!lpns
->Params
.lpi1
) ||
376 (lpns
->Params
.lpi1
->fIsServer()) ||
377 (lpns
->Params
.lpi1
->fIsAggregate()) ||
378 (lpns
->Params
.lpi1
->fIsFileset()) )
380 UpdateDisplay_Filesets (FALSE
, GetDlgItem (lpns
->hwndTarget
, IDC_SET_LIST
), lpns
->Params
.lpi1
, lpns
->Params
.status
, NULL
, NULL
, NULL
);
387 static LONG_PTR procFilesetsList
= 0;
389 LRESULT CALLBACK
Filesets_SubclassListProc (HWND hList
, UINT msg
, WPARAM wp
, LPARAM lp
)
393 if (procFilesetsList
== 0)
394 rc
= DefWindowProc (hList
, msg
, wp
, lp
);
396 rc
= (LRESULT
) CallWindowProc ((WNDPROC
)procFilesetsList
, hList
, msg
, wp
, lp
);
401 if (procFilesetsList
!= 0)
402 SetWindowLongPtr (hList
, GWLP_WNDPROC
, procFilesetsList
);
406 Filesets_Subclass_OnCommand (hList
, msg
, wp
, lp
);
414 void Filesets_Subclass_OnCommand (HWND hList
, UINT msg
, WPARAM wp
, LPARAM lp
)
416 HWND hChild
= GetParent (hList
);
417 LPIDENT lpi
= Filesets_GetSelected (hChild
);
422 ShowColumnsDialog (hChild
, &gr
.viewSet
);
425 case M_SET_VIEW_TREELIST
:
426 gr
.viewSet
.lvsView
= FLS_VIEW_TREELIST
;
427 Filesets_OnView (hChild
);
430 case M_SET_VIEW_TREE
:
431 gr
.viewSet
.lvsView
= FLS_VIEW_TREE
;
432 Filesets_OnView (hChild
);
435 case M_SET_VIEW_REPORT
:
436 gr
.viewSet
.lvsView
= FLS_VIEW_LIST
;
437 Filesets_OnView (hChild
);
441 if (l
.lpiDrag
&& l
.lpiDrag
->fIsFileset() && l
.lpiTarget
)
442 Filesets_ShowMoveTo (l
.lpiDrag
, l
.lpiTarget
);
446 if (l
.lpiDrag
&& l
.lpiDrag
->fIsFileset() && l
.lpiTarget
)
448 Filesets_CreateReplica (l
.lpiDrag
, l
.lpiTarget
);
453 StartContextCommand (Server_GetWindowForChild (GetParent(hList
)),
454 Server_GetServerForChild (GetParent(hList
)),
462 void Filesets_SubclassList (HWND hDlg
)
464 HWND hList
= GetDlgItem (hDlg
, IDC_SET_LIST
);
465 procFilesetsList
= GetWindowLongPtr (hList
, GWLP_WNDPROC
);
466 SetWindowLongPtr (hList
, GWLP_WNDPROC
, (LONG_PTR
)Filesets_SubclassListProc
);
470 void Filesets_OnView (HWND hDlg
)
472 HWND hList
= GetDlgItem (hDlg
, IDC_SET_LIST
);
474 DWORD dwStyle
= GetWindowLong (hList
, GWL_STYLE
);
475 dwStyle
&= (~FLS_VIEW_MASK
);
476 dwStyle
|= gr
.viewSet
.lvsView
;
478 SetWindowLong (hList
, GWL_STYLE
, dwStyle
);
482 BOOL
Filesets_BeginDrag (HWND hDlg
, BOOL fRightBtn
)
484 LPIDENT lpi
= Filesets_GetFocused (hDlg
);
486 if (!lpi
|| !lpi
->fIsFileset()) // can only drag filesets!
489 l
.fRightBtn
= fRightBtn
;
490 StartTask (taskSET_BEGINDRAG
, hDlg
, lpi
);
495 void Filesets_OnEndTask_BeginDrag (HWND hDlg
, LPTASKPACKET ptp
)
497 LPIDENT lpi
= (LPIDENT
)(ptp
->lpUser
);
499 if (ptp
->rc
&& TASKDATA(ptp
)->fs
.Type
!= ftCLONE
)
501 HWND hList
= GetDlgItem (hDlg
, IDC_SET_LIST
);
502 HLISTITEM hItem
= FL_GetSelected (hList
);
504 // When creating a drag image, we'll temporarily reset the object's
505 // images so we can be sure it'll draw just the Fileset icon.
507 FastList_Begin (hList
);
508 int iImage1
= FastList_GetItemFirstImage (hList
, hItem
);
509 int iImage2
= FastList_GetItemSecondImage (hList
, hItem
);
510 FastList_SetItemFirstImage (hList
, hItem
, imageFILESET
);
511 FastList_SetItemSecondImage (hList
, hItem
, IMAGE_NOIMAGE
);
516 l
.hDragImage
= FastList_CreateDragImage (hList
, hItem
);
518 FastList_SetItemFirstImage (hList
, hItem
, iImage1
);
519 FastList_SetItemSecondImage (hList
, hItem
, iImage2
);
520 FastList_End (hList
);
522 // Now we've got a drag image; start dragging.
527 DWORD dw
= GetMessagePos();
528 POINT pt
= { LOWORD(dw
), HIWORD(dw
) };
529 ScreenToClient (NULL
, &pt
);
531 ImageList_BeginDrag (l
.hDragImage
, 0, 8, 8);
532 ImageList_DragEnter (NULL
, pt
.x
, pt
.y
);
537 void Filesets_ContinueDrag (HWND hDlg
)
542 HLISTITEM hItemTarget
;
544 DWORD dw
= GetMessagePos();
545 POINT pt
= { LOWORD(dw
), HIWORD(dw
) };
546 HWND hTarget
= WindowFromPoint (pt
);
551 ScreenToClient (hTarget
, &ptClient
);
553 if ((lpi
= IdentifyPoint (hTarget
, ptClient
, &hItemTarget
)) != NULL
)
555 if (!lpi
->fIsServer() && !lpi
->fIsAggregate())
560 if (lpi
!= l
.lpiTarget
)
562 ImageList_DragLeave (NULL
);
566 LPARAM dwFlags
= FastList_GetItemFlags (l
.hwndTarget
, l
.hItemTarget
);
567 FastList_SetItemFlags (l
.hwndTarget
, l
.hItemTarget
, dwFlags
& (~FLIF_DROPHIGHLIGHT
));
568 l
.hItemTarget
= NULL
;
572 if ((l
.lpiTarget
= lpi
) != NULL
)
574 l
.hwndTarget
= hTarget
;
575 l
.hItemTarget
= hItemTarget
;
576 LPARAM dwFlags
= FastList_GetItemFlags (l
.hwndTarget
, l
.hItemTarget
);
577 FastList_SetItemFlags (l
.hwndTarget
, l
.hItemTarget
, dwFlags
| FLIF_DROPHIGHLIGHT
);
580 ScreenToClient (NULL
, &pt
);
581 ImageList_DragEnter (NULL
, pt
.x
, pt
.y
);
584 ImageList_DragMove (LOWORD(dw
), HIWORD(dw
));
589 void Filesets_FinishDrag (HWND hDlg
, BOOL fDropped
, BOOL fMenu
)
593 Filesets_ContinueDrag (hDlg
);
597 ImageList_EndDrag ();
598 ImageList_DragLeave (NULL
);
601 if (l
.lpiTarget
!= NULL
)
605 Filesets_CancelDrag (hDlg
);
607 else if (fDropped
&& !fMenu
)
609 SendMessage (GetDlgItem (hDlg
, IDC_SET_LIST
), WM_COMMAND
, M_SET_MOVEHERE
, 0);
610 Filesets_CancelDrag (hDlg
);
612 else // (fDropped && fMenu)
614 DWORD dw
= GetMessagePos();
615 POINT pt
= { LOWORD(dw
), HIWORD(dw
) };
617 LPMENUTASK lpp
= New (MENUTASK
);
618 lpp
->hParent
= GetDlgItem (hDlg
, IDC_SET_LIST
);
620 lpp
->lpi
= l
.lpiDrag
;
622 StartTask (taskSET_DRAGMENU
, hDlg
, lpp
);
629 void Filesets_OnEndTask_DragMenu (HWND hDlg
, LPTASKPACKET ptp
)
631 HMENU hm
= TaLocale_LoadMenu (MENU_SET_DRAGDROP
);
634 EnableMenu (hm
, M_SET_MOVEHERE
, FALSE
);
636 if (!ptp
->rc
|| (TASKDATA(ptp
)->fs
.Type
!= ftREADWRITE
))
637 EnableMenu (hm
, M_SET_REPHERE
, FALSE
);
639 DisplayContextMenu (hm
, TASKDATA(ptp
)->mt
.ptScreen
, TASKDATA(ptp
)->mt
.hParent
);
640 Filesets_CancelDrag (hDlg
);
644 void Filesets_CancelDrag (HWND hDlg
)
646 if (l
.hItemTarget
!= NULL
)
648 LPARAM dwFlags
= FastList_GetItemFlags (l
.hwndTarget
, l
.hItemTarget
);
649 FastList_SetItemFlags (l
.hwndTarget
, l
.hItemTarget
, dwFlags
& (~FLIF_DROPHIGHLIGHT
));
650 l
.hItemTarget
= NULL
;
655 LPIDENT
IdentifyPoint (HWND hTarget
, POINT ptClient
, HLISTITEM
*phItemTarget
)
657 if ((*phItemTarget
= FastList_ItemFromPoint (hTarget
, &ptClient
, TRUE
)) == NULL
)
660 return (LPIDENT
)FL_GetData (hTarget
, *phItemTarget
);
664 void Filesets_ShowPopupMenu (HWND hList
, POINT ptList
, POINT ptScreen
)
666 if (!ptScreen
.x
&& !ptScreen
.y
)
669 GetWindowRect (hList
, &rWindow
);
670 ptScreen
.x
= rWindow
.left
+ (rWindow
.right
-rWindow
.left
)/2;
671 ptScreen
.y
= rWindow
.top
+ (rWindow
.bottom
-rWindow
.top
)/2;
672 Filesets_ShowParticularPopupMenu (hList
, ptScreen
, NULL
);
674 else if (FL_HitTestForHeaderBar (hList
, ptList
))
676 HMENU hm
= TaLocale_LoadMenu (MENU_COLUMNS
);
677 DisplayContextMenu (hm
, ptScreen
, hList
);
681 LPIDENT lpi
= Filesets_GetFocused (GetParent (hList
), &ptList
);
682 if (lpi
&& (lpi
!= Filesets_GetSelected (GetParent (hList
))))
684 lpi
= NULL
; // right-click on item other than highlighted one?
687 if (lpi
&& lpi
->fIsFileset())
689 Filesets_ShowParticularPopupMenu (hList
, ptScreen
, lpi
);
691 else if (lpi
&& lpi
->fIsAggregate())
693 Aggregates_ShowParticularPopupMenu (hList
, ptScreen
, lpi
);
695 else if (lpi
&& lpi
->fIsServer())
697 Server_ShowParticularPopupMenu (hList
, ptScreen
, lpi
);
699 else if (!lpi
) // display the _NONE menu? (no menu if it's a cell ident)
701 Filesets_ShowParticularPopupMenu (hList
, ptScreen
, lpi
);
707 void Filesets_ShowParticularPopupMenu (HWND hParent
, POINT ptScreen
, LPIDENT lpiFileset
)
710 if ((pmt
= New (MENUTASK
)) != NULL
)
712 pmt
->hParent
= hParent
;
713 pmt
->ptScreen
= ptScreen
;
714 pmt
->lpi
= lpiFileset
;
715 StartTask (taskSET_MENU
, GetParent(hParent
), pmt
);
720 void Filesets_OnEndTask_Menu (HWND hDlg
, LPTASKPACKET ptp
)
722 LPIDENT lpiFileset
= (LPIDENT
)(TASKDATA(ptp
)->mt
.lpi
);
725 if (lpiFileset
!= NULL
)
726 hm
= TaLocale_LoadMenu (MENU_SET
);
728 hm
= TaLocale_LoadMenu (MENU_SET_NONE
);
732 if (lpiFileset
== NULL
)
734 HMENU hmView
= GetSubMenu (hm
, 0);
735 DWORD dwStyle
= GetWindowLong (TASKDATA(ptp
)->mt
.hParent
, GWL_STYLE
);
737 CheckMenuRadioItem (hmView
,
738 M_SET_VIEW_REPORT
, M_SET_VIEW_TREE
,
739 ((dwStyle
& FLS_VIEW_MASK
) == FLS_VIEW_TREELIST
) ? M_SET_VIEW_TREELIST
:
740 ((dwStyle
& FLS_VIEW_MASK
) == FLS_VIEW_TREE
) ? M_SET_VIEW_TREE
: M_SET_VIEW_REPORT
,
743 CheckMenuRadioItem (hmView
,
744 M_VIEW_ONEICON
, M_VIEW_STATUS
,
745 (gr
.ivSet
== ivTWOICONS
) ? M_VIEW_TWOICONS
:
746 (gr
.ivSet
== ivONEICON
) ? M_VIEW_ONEICON
: M_VIEW_STATUS
,
753 EnableMenu (hm
, M_SET_REPLICATION
, FALSE
);
754 EnableMenu (hm
, M_SET_SETQUOTA
, FALSE
);
755 EnableMenu (hm
, M_SET_RELEASE
, FALSE
);
756 EnableMenu (hm
, M_SET_CLONE
, FALSE
);
757 EnableMenu (hm
, M_SET_MOVETO
, FALSE
);
758 EnableMenu (hm
, M_SET_DUMP
, FALSE
);
759 EnableMenu (hm
, M_SET_RESTORE
, FALSE
);
763 if (TASKDATA(ptp
)->fs
.Type
== ftCLONE
)
765 EnableMenu (hm
, M_SET_REPLICATION
, FALSE
);
766 EnableMenu (hm
, M_SET_RELEASE
, FALSE
);
767 EnableMenu (hm
, M_SET_CLONE
, FALSE
);
768 EnableMenu (hm
, M_SET_MOVETO
, FALSE
);
771 if (TASKDATA(ptp
)->fs
.Type
!= ftREADWRITE
)
773 EnableMenu (hm
, M_SET_CLONE
, FALSE
);
774 EnableMenu (hm
, M_SET_RELEASE
, FALSE
);
775 EnableMenu (hm
, M_SET_SETQUOTA
, FALSE
);
776 EnableMenu (hm
, M_SET_RESTORE
, FALSE
);
781 DisplayContextMenu (hm
, TASKDATA(ptp
)->mt
.ptScreen
, TASKDATA(ptp
)->mt
.hParent
);