コード例 #1
0
ファイル: set_restore.cpp プロジェクト: chanke/openafs-osd
LRESULT CALLBACK Filesets_Restore_SubclassListProc (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
   LRESULT rc;

   if (procFilesetsRestoreList == 0)
      rc = DefWindowProc (hList, msg, wp, lp);
   else
      rc = (LRESULT) CallWindowProc ((WNDPROC)procFilesetsRestoreList, hList, msg, wp, lp);

   switch (msg)
      {
      case WM_DESTROY:
         if (procFilesetsRestoreList != 0)
            SetWindowLongPtr (hList, GWLP_WNDPROC, procFilesetsRestoreList);
         break;

      case WM_COMMAND:
         switch (LOWORD(wp))
            {
            case M_COLUMNS:
               ShowColumnsDialog (GetParent (hList), &gr.viewAggRestore);
               break;
            }
         break;
      }

   return rc;
}
コード例 #2
0
ファイル: set_tab.cpp プロジェクト: maxendpoint/openafs_cvs
void Filesets_Subclass_OnCommand (HWND hList, UINT msg, WPARAM wp, LPARAM lp)
{
   HWND hChild = GetParent (hList);
   LPIDENT lpi = Filesets_GetSelected (hChild);

   switch (LOWORD(wp))
      {
      case M_COLUMNS:
         ShowColumnsDialog (hChild, &gr.viewSet);
         break;

      case M_SET_VIEW_TREELIST:
         gr.viewSet.lvsView = FLS_VIEW_TREELIST;
         Filesets_OnView (hChild);
         break;

      case M_SET_VIEW_TREE:
         gr.viewSet.lvsView = FLS_VIEW_TREE;
         Filesets_OnView (hChild);
         break;

      case M_SET_VIEW_REPORT:
         gr.viewSet.lvsView = FLS_VIEW_LIST;
         Filesets_OnView (hChild);
         break;

      case M_SET_MOVEHERE:
         if (l.lpiDrag && l.lpiDrag->fIsFileset() && l.lpiTarget)
            Filesets_ShowMoveTo (l.lpiDrag, l.lpiTarget);
         break;

      case M_SET_REPHERE:
         if (l.lpiDrag && l.lpiDrag->fIsFileset() && l.lpiTarget)
            {
            Filesets_CreateReplica (l.lpiDrag, l.lpiTarget);
            }
         break;

      default:
         StartContextCommand (Server_GetWindowForChild (GetParent(hList)),
                              Server_GetServerForChild (GetParent(hList)),
                              lpi,
                              LOWORD(wp));
         break;
      }
}
コード例 #3
0
ファイル: command.cpp プロジェクト: maxendpoint/openafs_cvs
void StartContextCommand (HWND hDialog,
                          LPIDENT lpiRepresentedByWindow,
                          LPIDENT lpiChosenByClick,
                          int cmd)
{
   CHILDTAB iTab = Server_GetDisplayedTab (hDialog);
   LPIDENT lpi = (lpiChosenByClick) ? lpiChosenByClick : lpiRepresentedByWindow;

   if (lpi && lpi->fIsCell())
      lpi = NULL;

   switch (cmd)
      {
      case M_COLUMNS:
         if (iTab == tabSERVICES)
            ShowColumnsDialog (hDialog, &gr.viewSvc);
         else if (iTab == tabAGGREGATES)
            ShowColumnsDialog (hDialog, &gr.viewAgg);
         else if (iTab == tabFILESETS)
            ShowColumnsDialog (hDialog, &gr.viewSet);
         else
            ShowColumnsDialog (hDialog, NULL);
         break;

      case M_SVR_VIEW_ONEICON:
      case M_SVR_VIEW_TWOICONS:
      case M_SVR_VIEW_STATUS:
         Command_OnIconView (hDialog, TRUE, iTab, cmd);
         break;

      case M_VIEW_ONEICON:
      case M_VIEW_TWOICONS:
      case M_VIEW_STATUS:
         Command_OnIconView (hDialog, FALSE, iTab, cmd);
         break;

      case M_PROPERTIES:
         if (lpi)
            Command_OnProperties (lpi);
         break;

      case M_SUBSET:
         ShowSubsetsDialog();
         break;

      case M_REFRESHALL:
         if (g.lpiCell)
            StartTask (taskREFRESH, NULL, g.lpiCell);
         break;

      case M_REFRESH:
         if (lpi)
            StartTask (taskREFRESH, NULL, lpi);
         else if (g.lpiCell)
            StartTask (taskREFRESH, NULL, g.lpiCell);
         break;

      case M_SYNCVLDB:
         if (lpi)
            Server_SyncVLDB (lpi);
         break;

      case M_SALVAGE:
         if (lpi)
            Server_Salvage (lpi);
         break;

      case M_SET_CREATE:
         Filesets_Create (lpi);
         break;

      case M_SET_REPLICATION:
         if (lpi && lpi->fIsFileset())
            Filesets_ShowReplication (Server_GetWindowForChild (hDialog), lpi);
         break;

      case M_SET_DELETE:
         if (lpi && lpi->fIsFileset())
            Filesets_Delete (lpi);
         break;

      case M_SET_CLONE:
         Filesets_Clone (lpi);
         break;

      case M_SET_DUMP:
         if (lpi && lpi->fIsFileset())
            Filesets_Dump (lpi);
         break;

      case M_SET_RESTORE:
         Filesets_Restore (lpi);
         break;

      case M_SET_RELEASE:
         if (lpi && lpi->fIsFileset())
            Filesets_Release (lpi);
         break;

      case M_SET_MOVETO:
         if (lpi && lpi->fIsFileset())
            Filesets_ShowMoveTo (lpi, NULL);
         break;

      case M_SET_SETQUOTA:
         if (lpi && lpi->fIsFileset())
            Filesets_SetQuota (lpi);
         break;

      case M_SET_LOCK:
         if (lpi && lpi->fIsFileset())
            StartTask (taskSET_LOCK, NULL, lpi);
         break;

      case M_SET_UNLOCK:
         if (lpi && !lpi->fIsService())
            StartTask (taskSET_UNLOCK, NULL, lpi);
         else if (!lpi && g.lpiCell)
            StartTask (taskSET_UNLOCK, NULL, g.lpiCell);
         break;

      case M_SET_RENAME:
         if (lpi && lpi->fIsFileset())
            Filesets_ShowRename (lpi);
         break;

      case M_SVR_OPEN:
         if (lpi && lpi->fIsServer())
            StartTask (taskSVR_GETWINDOWPOS, g.hMain, lpi);
         break;

      case M_SVR_CLOSE:
         if (lpi && lpi->fIsServer())
            Server_Close (lpi);
         break;

      case M_SVR_CLOSEALL:
         Server_CloseAll (TRUE);
         break;

      case M_SVR_SECURITY:
         Server_Security (lpi);
         break;

      case M_SVR_HOSTS:
         Server_Hosts (lpi);
         break;

      case M_SVR_INSTALL:
         Server_Install (lpi);
         break;

      case M_SVR_UNINSTALL:
         Server_Uninstall (lpi);
         break;

      case M_SVR_PRUNE:
         Server_Prune (lpi);
         break;

      case M_SVR_GETDATES:
         Server_GetDates (lpi);
         break;

      case M_EXECUTE:
         Server_Execute (lpi);
         break;

      case M_VIEWLOG:
         if (lpi && lpi->fIsService())
            Services_ShowServiceLog (lpi);
         else
            Services_ShowServerLog (lpi);
         break;

      case M_SVR_MONITOR:
         if (lpi && lpi->fIsServer())
            StartTask (taskSVR_MONITOR_ONOFF, NULL, lpi);
         break;

      case M_SVC_CREATE:
         if (!lpi)
            Services_Create (NULL);
         else
            Services_Create (lpi->GetServer());
         break;

      case M_SVC_DELETE:
         if (lpi && lpi->fIsService())
            Services_Delete (lpi);
         break;

      case M_SVC_START:
         if (lpi && lpi->fIsService())
            Services_Start (lpi);
         break;

      case M_SVC_STOP:
         if (lpi && lpi->fIsService())
            Services_Stop (lpi);
         break;

      case M_SVC_RESTART:
         if (lpi && lpi->fIsService())
            Services_Restart (lpi);
         break;

      case M_CELL_OPEN:
         OpenCellDialog();
         break;

      case M_CREDENTIALS:
         NewCredsDialog();
         break;

      case M_OPTIONS:
         ShowOptionsDialog();
         break;

      case M_HELP:
         WinHelp (g.hMain, cszHELPFILENAME, HELP_FINDER, 0);
         break;

      case M_HELP_FIND:
         Help_FindCommand();
         break;

      case M_HELP_XLATE:
         Help_FindError();
         break;

      case M_ABOUT:
         Help_About();
         break;
      }
}