コード例 #1
0
ファイル: qmon_queue.c プロジェクト: HPCKP/gridengine
/*-------------------------------------------------------------------------*/
void qmonQueuePopup(Widget w, XtPointer cld, XtPointer cad)
{
   lList *alp = NULL;
   
   DENTER(GUI_LAYER, "qmonQueuePopup");

   /* set busy cursor */
   XmtDisplayBusyCursor(w);

   qmonMirrorMultiAnswer(CQUEUE_T | EXECHOST_T | CENTRY_T, &alp);
   if (alp) {
      qmonMessageBox(w, alp, 0);
      lFreeList(&alp);
      /* set busy cursor */
      XmtDisplayDefaultCursor(w);
      DEXIT;
      return;
   }

   if (!qmon_queue) {

      qmonCreateQueueControl(AppShell);

      /*
      ** create queue customize dialog
      */
/*       qmonCreateQCU(qmon_queue, NULL); */

      /* 
      ** set the close button callback 
      ** set the icon and icon name
      */
      XmtCreatePixmapIcon(qmon_queue, qmonGetIcon("toolbar_queue"), None); 
      XtVaSetValues(qmon_queue, XtNiconName, "qmon:Queue Control", NULL);
      XmtAddDeleteCallback(qmon_queue, XmDO_NOTHING, qmonQueuePopdown,  NULL);
      XtAddEventHandler(qmon_queue, StructureNotifyMask, False, 
                        SetMinShellSize, NULL);
      XtAddEventHandler(qmon_queue, StructureNotifyMask, False, 
                        SetMaxShellSize, (XtPointer) SHELL_WIDTH);
      
   }

   xmui_manage(qmon_queue);
/*    ForceUpdate(qmon_queue); */

   updateQueueList();

#if 0
   /*
   ** workaround for display problem of DrawingArea under some WMs
   */
   XtUnmapWidget(queue_da);
   XtMapWidget(queue_da);
#endif   

   /* set busy cursor */
   XmtDisplayDefaultCursor(w);

   DEXIT;
}
コード例 #2
0
/*-------------------------------------------------------------------------*/
void qmonBrowserOpen(Widget w, XtPointer cld, XtPointer cad)
{

    DENTER(TOP_LAYER, "qmonBrowserOpen");

    /* set busy cursor */
    XmtDisplayBusyCursor(w);

    if (!BrowserShell) {
        BrowserShell = qmonBrowserCreateDialog(AppShell, "Qmon Object Browser");
        /*
        ** set the close button callback
        ** set the icon and iconName
        */
        XmtCreatePixmapIcon(BrowserShell, qmonGetIcon("toolbar_browser"), None);
        XtVaSetValues(BrowserShell, XtNiconName, "qmon:Browser", NULL);
        XmtAddDeleteCallback(BrowserShell, XmDO_NOTHING, qmonBrowserClose,  NULL);

    }

    xmui_manage(BrowserShell);

    /* set default cursor */
    XmtDisplayDefaultCursor(w);

    DEXIT;

}
コード例 #3
0
/*-------------------------------------------------------------------------*/
void qmonPopupManopConfig(Widget w, XtPointer cld, XtPointer cad)
{
   Widget shell;
   lList *alp = NULL;
   
   DENTER(GUI_LAYER, "qmonPopupManopConfig");

   /* set busy cursor */
   XmtDisplayBusyCursor(w);

   /*
   ** create the dialog, if it doesn't exist
   */
   if (!qmon_manop) {
      shell = XmtGetTopLevelShell(w);
      qmon_manop = qmonCreateManopConfig(shell);
      XmtAddDeleteCallback(shell, XmDO_NOTHING, 
                              qmonPopdownManopConfig, NULL);
      XtAddEventHandler(XtParent(qmon_manop), StructureNotifyMask, False, 
                        SetMinShellSize, NULL);
      XtAddEventHandler(XtParent(qmon_manop), StructureNotifyMask, False, 
                        SetMaxShellSize, NULL);
   } 
   
   qmonMirrorMultiAnswer(MANAGER_T | OPERATOR_T | USERSET_T | USER_T, &alp);
   if (alp) {
      qmonMessageBox(w, alp, 0);
      lFreeList(&alp);
      /* set default cursor */
      XmtDisplayDefaultCursor(w);
      DEXIT;
      return;
   }
   qmonTimerAddUpdateProc(USERSET_T, "updateUsersetList", updateUsersetList);
   qmonStartTimer(MANAGER_T | OPERATOR_T | USERSET_T | USER_T);
   qmonManopFillList();

   xmui_manage(qmon_manop);

   /*
   ** switch to userset
   */
   if (cld) {
      XmTabSetTabWidget(manop_folder, userset_layout, True);
   }

   /* set default cursor */
   XmtDisplayDefaultCursor(w);

   DEXIT;
}
コード例 #4
0
/*-------------------------------------------------------------------------*/
void qmonRQSPopup(Widget w, XtPointer cld, XtPointer cad) 
{
   Widget shell, rqs_okay, rqs_cancel;
   lList *alp = NULL;
   lList *rqs_list = NULL;

   DENTER(GUI_LAYER, "qmonRQSPopup");

   /* set busy cursor */
   XmtDisplayBusyCursor(w);

   if (!qmon_rqs) {
      shell = XmtGetTopLevelShell(w);
      qmon_rqs = XmtBuildQueryDialog(shell, "rqs_shell", 
                              NULL, 0,
                              "rqs_text", &rqs_text,
                              "rqs_okay", &rqs_okay,
                              "rqs_cancel", &rqs_cancel,
                              NULL);
      XtAddCallback(rqs_okay, XmNactivateCallback,
                     qmonRQSOkay, NULL); 
      XtAddCallback(rqs_cancel, XmNactivateCallback, 
                     qmonRQSCancel, NULL);
   }


   qmonMirrorMultiAnswer(RQS_T, &alp);
   if (alp) {
      qmonMessageBox(w, alp, 0);
      lFreeList(&alp);
      /* set normal cursor */
      XmtDisplayDefaultCursor(w);
      DEXIT;
      return;
   }

   rqs_list = qmonMirrorList(SGE_RQS_LIST);

   xmui_manage(qmon_rqs);

   qmonRQSSetText(rqs_text, rqs_list, &alp);
   if (alp) {
      qmonMessageBox(w, alp, 0);
      lFreeList(&alp);
   }

   /* set default cursor */
   XmtDisplayDefaultCursor(w);

   DEXIT;
}
コード例 #5
0
/*-------------------------------------------------------------------------*/
void qmonPopupCkptConfig(Widget w, XtPointer cld, XtPointer cad)
{
    Widget shell;
    lList *alp = NULL;

    DENTER(GUI_LAYER, "qmonPopupCkptConfig");

    /* set busy cursor */
    XmtDisplayBusyCursor(w);

    if (!qmon_ckpt) {
        shell = XmtGetTopLevelShell(w);
        qmon_ckpt = qmonCreateCkptConfig(shell);
        XmtAddDeleteCallback(shell, XmDO_NOTHING,
                             qmonPopdownCkptConfig, NULL);
        /*
        ** create ask layout
        */
        ckpt_ask_layout = qmonCreateCkptAsk(qmon_ckpt);

    }
    XSync(XtDisplay(qmon_ckpt), 0);
    XmUpdateDisplay(qmon_ckpt);

    qmonMirrorMultiAnswer(CKPT_T, &alp);
    if (alp) {
        qmonMessageBox(w, alp, 0);
        lFreeList(&alp);
        /* set default cursor */
        XmtDisplayDefaultCursor(w);
        DEXIT;
        return;
    }


    qmonTimerAddUpdateProc(CKPT_T, "updateCkptList", updateCkptList);
    qmonStartTimer(CKPT_T);
    updateCkptList();
    XmListSelectPos(ckpt_names, 1, True);

    XtManageChild(qmon_ckpt);
    XRaiseWindow(XtDisplay(XtParent(qmon_ckpt)), XtWindow(XtParent(qmon_ckpt)));

    /* set default cursor */
    XmtDisplayDefaultCursor(w);

    DEXIT;
}
コード例 #6
0
ファイル: qmon_sconf.c プロジェクト: HPCKP/gridengine
/*-------------------------------------------------------------------------*/
void qmonPopupSchedConfig(Widget w, XtPointer cld, XtPointer cad)
{
   Widget shell;
   lList *scl = NULL;
   lListElem *sep = NULL;
   lList *alp = NULL;

   DENTER(TOP_LAYER, "qmonPopupSchedConfig");

   /* set busy cursor */
   XmtDisplayBusyCursor(w);

   if (!qmon_sconf) {
      shell = XmtGetTopLevelShell(w);
      qmon_sconf = qmonCreateSchedConfig(shell);
      XmtAddDeleteCallback(shell, XmDO_NOTHING, 
                              qmonSchedCancel, NULL);
   } 
   qmonMirrorMultiAnswer(SC_T, &alp);
   if (alp) {
      qmonMessageBox(w, alp, 0);
      lFreeList(&alp);
      /* set default cursor */
      XmtDisplayDefaultCursor(w);
      DEXIT;
      return;
   }

   scl = qmonMirrorList(SGE_SC_LIST);
   sep = lFirst(scl);
   qmonSchedSet(sep);
   XSync(XtDisplay(qmon_sconf), 0);
   XmUpdateDisplay(qmon_sconf);

   XtManageChild(qmon_sconf);
   XRaiseWindow(XtDisplay(XtParent(qmon_sconf)), 
                  XtWindow(XtParent(qmon_sconf)));

   /* set default cursor */
   XmtDisplayDefaultCursor(w);

   DEXIT;
}