/*+++++++++++++++++++++++++++++++++++++++*/ void popup_startupBB( Widget shell ) { if (style.startupDialog == NULL) { if (smWindow != NULL) { if (style.smState.smCompatMode) { InfoDialog(((char *)GETMESSAGE(7, 13, "This session was started from an X Window System\n\ startup script. Startup settings are not valid,\n\ since the session cannot be restored.")), style.startupDialog ? style.startupDialog : style.shell, False); return; } _DtTurnOnHourGlass(shell); GetStartupValues(); BuildStartup(shell); XtManageChild(style.startupDialog); _DtTurnOffHourGlass(shell); } else /* SM not running - post error dialog */ {
void DialogShell::busyCursor() { // Do nothing if the widget has not been realized if (XtIsRealized(_w)) { _DtTurnOnHourGlass(_w); } }
/*+++++++++++++++++++++++++++++++++++++++*/ static void ServerHostCB( Widget w, XtPointer client_data, XtPointer call_data ) { char *hostname; _DtTurnOnHourGlass(i18n.inputMethodTB); /* Get the current hostname in the TextField of the ComboBox, as string */ XtVaGetValues(XtNameToWidget(i18n.serverHostCB,"Text"), XmNvalue, &hostname, NULL); /* Update the display and query for new IM on this host. */ UpdateImList(&i18n_env, hostname); }
/*+++++++++++++++++++++++++++++++++++++++*/ void popup_keyboardBB( Widget shell ) { if (style.kbdDialog == NULL) { _DtTurnOnHourGlass(shell); build_keyboardDlg(shell); XtManageChild(style.kbdDialog); _DtTurnOffHourGlass(shell); } else { XtManageChild(style.kbdDialog); raiseWindow(XtWindow(XtParent(style.kbdDialog))); } }
void popup_dtwmBB( Widget shell ) { if (style.dtwmDialog == NULL) { _DtTurnOnHourGlass(shell); build_dtwmDlg(shell); getDtwmValues(); XtManageChild(style.dtwmDialog); _DtTurnOffHourGlass(shell); } else { XtManageChild(style.dtwmDialog); raiseWindow(XtWindow(XtParent(style.dtwmDialog))); } dtwm.systemDefaultFlag = False; }
void popup_i18nBB( Widget shell ) { int ret = NoError; if (style.i18nDialog == NULL) { _DtTurnOnHourGlass(shell); BuildI18nDlg(shell); ret = InitI18nValues(shell); XtManageChild(style.i18nDialog); if (ret != NoError) _DtI18nErrorDialog(ret) ; _DtTurnOffHourGlass(shell); } else { XtManageChild(style.i18nDialog); raiseWindow(XtWindow(XtParent(style.i18nDialog))); } }
extern void day_event(XEvent *event) { static int lastcol, lastrow; static XEvent lastevent; pr_pos xy; int x, y, i, j; int boxw, boxh, margin, id; Calendar *c = calendar; Tick date = c->view->date; Boolean in_mbox = False; /* in month boxes ? */ Editor *e = (Editor*)c->editor; ToDo *t = (ToDo*)c->todo; GEditor *ge = (GEditor*)c->geditor; Day *day_info = (Day *)c->view->day_info; boxw = c->view->boxw; boxh = c->view->boxh; margin = c->view->outside_margin; x = event->xbutton.x; y = event->xbutton.y; /* boundary conditions */ if ((!(in_mbox = in_moboxes(c, x, y)) && x < MOBOX_AREA_WIDTH+2) || (x > MOBOX_AREA_WIDTH+2 && y < c->view->topoffset)) { lastcol=0; lastrow=0; return; } if (in_mbox) { xy.x = (x - margin)/ day_info->col_w; xy.y = (x - c->view->topoffset)/ day_info->row_h; } else { xy.x = boxw; xy.y = (y - c->view->topoffset)/boxh; } switch(event->type) { case MotionNotify: if (!in_mbox) { if (xy.x !=lastcol || xy.y !=lastrow) { calendar_deselect(c); j = day_xytoclock(c, xy.x, xy.y, date); if (j >= 0) { c->view->olddate = c->view->date; c->view->date = j; calendar_select(c, hourSelect, (caddr_t)&xy); } lastcol=xy.x; lastrow=xy.y; } } break; case ButtonPress: if (ds_is_double_click(&lastevent, event)) { _DtTurnOnHourGlass(c->frame); j = day_xytoclock(c, xy.x, xy.y, date); if (lastcol == xy.x && lastrow == xy.y) show_editor(c, j, next_nhours(j, 1), xy.y == 0 ? True : False); if (in_mbox) { monthbox_deselect(c); monthbox_xytodate(c, x, y); monthbox_select(c); } else show_editor(c, j, next_nhours(j, 1), xy.y == 0 ? True : False); _DtTurnOffHourGlass(c->frame); } else { if (in_mbox) { monthbox_deselect(c); monthbox_xytodate(c, x, y); paint_dayview(c, False, NULL, True); calendar_select(c, hourSelect, (caddr_t)NULL); monthbox_select(c); j = day_xytoclock(c, xy.x, xy.y, date); if (editor_showing(e)) { set_editor_defaults(e, j, next_nhours(j, 1), False); add_all_appt(e); } if (todo_showing(t)) { set_todo_defaults(t); add_all_todo(t); } if (geditor_showing(ge)) { set_geditor_defaults(ge, j, next_nhours(j, 1)); add_all_gappt(ge); } } else { calendar_deselect(c); j = day_xytoclock(c, xy.x, xy.y, date); if (j >= 0) { c->view->olddate = c->view->date; c->view->date = j; calendar_select(c, hourSelect, (caddr_t)&xy); if (editor_showing(e)) { set_editor_defaults(e, j, next_nhours(j, 1), xy.y == 0 ? True : False); add_all_appt(e); } if (todo_showing(t)) { set_todo_defaults(t); add_all_todo(t); } if (geditor_showing(ge)) { set_geditor_defaults(ge, j, next_nhours(j, 1)); add_all_gappt(ge); } } } } lastcol=xy.x; lastrow=xy.y; break; default: break; }; /* switch */ lastevent = *event; }
extern void week_event(XEvent *event) { Calendar *c = calendar; Props *p = (Props*)c->properties; static int lastdate; static XEvent lastevent; int x, y, i, j, hr, id; Week *w = (Week *)c->view->week_info; Selection *wsel; Editor *e = (Editor *)c->editor; ToDo *t = (ToDo*)c->todo; GEditor *ge = (GEditor*)c->geditor; static int lastrow, lastcol; int row, col; x = event->xbutton.x; y = event->xbutton.y; wsel = (Selection *)w->current_selection; switch(event->type) { case MotionNotify: j = week_xytoclock(w, x, y); (col = dow(j)) == 0 ? col = 6 : col--; if (inchart(w, x, y)) row = (double)(y - w->chart_y) / (double)(w->chart_hour_height+ w->add_pixels); else row = wsel->row; if (j != lastdate || lastcol != col || lastrow != row) { calendar_deselect(c); wsel->row = row; wsel->col = col; if (j > 0) { c->view->olddate = c->view->date; c->view->date = j; calendar_select(c, weekdaySelect, NULL); } } lastcol = wsel->col; lastrow = wsel->row; lastdate = c->view->date; break; case ButtonPress: j = week_xytoclock(w, x, y); if (j == -1) return; hr = (inchart(w, x, y)) ? week_xytohour(w, x, y) : (wsel->row + w->begin_hour); if (ds_is_double_click(&lastevent, event)) { _DtTurnOnHourGlass(c->frame); if (j == lastdate) { show_editor(c, next_nhours(j, hr), next_nhours(j, hr + 1), False); } else if (editor_showing(e)) { set_editor_defaults(e, next_nhours(j, hr), next_nhours(j, hr + 1), False); add_all_appt(e); } _DtTurnOffHourGlass(c->frame); } else { calendar_deselect(c); (wsel->col = dow(j)) == 0 ? wsel->col = 6 : wsel->col--; if (inchart(w, x, y)) wsel->row = (double)(y - w->chart_y) / (double)(w->chart_hour_height + w->add_pixels); if (j > 0) { c->view->olddate = c->view->date; c->view->date = j; calendar_select(c, weekdaySelect, NULL); } if (editor_showing(e)) { set_editor_defaults(e, next_nhours(j, hr), next_nhours(j, hr + 1), False); add_all_appt(e); } if (todo_showing(t)) { set_todo_defaults(t); add_all_todo(t); } if (geditor_showing(ge)) { set_geditor_defaults(ge, 0, 0); add_all_gappt(ge); } } lastdate = c->view->date; lastcol = wsel->col; lastrow = wsel->row; break; default: break; }; /* switch */ lastevent = *event; }