/*-------------------------------------------------------------------------*/ 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; }
/*-------------------------------------------------------------------------*/ 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; }
/*-------------------------------------------------------------------------*/ 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; }
/*-------------------------------------------------------------------------*/ 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; }
/*-------------------------------------------------------------------------*/ 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; }
/*-------------------------------------------------------------------------*/ 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; }
/*-------------------------------------------------------------------------*/ void qmonRequestPopup(Widget w, XtPointer cld, XtPointer cad) { Widget request_hardsoft, parent, request_clear, request_okay, request_cancel; lList *hrl = NULL; lList *srl = NULL; lList *rll = NULL; lListElem *ep = NULL; lListElem *rp = NULL; lList *alp = NULL; DENTER(GUI_LAYER, "qmonRequestPopup"); parent = XmtGetShell(w); DPRINTF(("parent = %s\n", XtName(parent) )); if (!request_dialog) { request_dialog = XmtBuildQueryDialog(parent, "request_shell", NULL, 0, "request_rtype", &request_rtype, "request_rr", &request_rr, "request_hr", &request_hr, "request_sr", &request_sr, "request_hardsoft", &request_hardsoft, "request_clear", &request_clear, "request_okay", &request_okay, "request_cancel", &request_cancel, NULL); XtAddCallback(request_rr, XmNactivateCallback, qmonRequestEditResource, (XtPointer)0); XtAddCallback(request_hr, XmNactivateCallback, qmonRequestEditResource, (XtPointer)1); XtAddCallback(request_hr, XmNremoveCallback, qmonRequestRemoveResource, NULL); XtAddCallback(request_sr, XmNactivateCallback, qmonRequestEditResource, (XtPointer)1); XtAddCallback(request_sr, XmNremoveCallback, qmonRequestRemoveResource, NULL); XtAddCallback(request_hardsoft, XmtNvalueChangedCallback, qmonToggleHardSoft2, NULL); XtAddCallback(request_clear, XmNactivateCallback, qmonRequestClear, NULL); XtAddCallback(request_okay, XmNactivateCallback, qmonRequestOkay, NULL); XtAddCallback(request_cancel, XmNactivateCallback, qmonRequestCancel, NULL); XtAddEventHandler(XtParent(request_dialog), StructureNotifyMask, False, SetMinShellSize, NULL); } /* ** set the type labelString */ XtVaSetValues(request_rtype, XmtNlabel, qmonSubmitRequestType(), NULL); qmonMirrorMultiAnswer(CENTRY_T, &alp); if (alp) { qmonMessageBox(w, alp, 0); lFreeList(&alp); /* set normal cursor */ XmtDisplayDefaultCursor(w); DEXIT; return; } rll = qmonGetResources(qmonMirrorList(SGE_CE_LIST), REQUESTABLE_RESOURCES); hrl = qmonSubmitHR(); lFreeList(&hard_requests); if (hrl) { hard_requests = lCopyList("hr", hrl); for_each(ep, hard_requests) { rp = lGetElemStr(rll, CE_name, lGetString(ep, CE_name)); if (!rp) rp = lGetElemStr(rll, CE_shortcut, lGetString(ep, CE_name)); if (rp) { lSetString(ep, CE_name, lGetString(rp, CE_name)); lSetString(ep, CE_default, NULL); lSetUlong(ep, CE_valtype, lGetUlong(rp, CE_valtype)); } } }