Beispiel #1
0
void
Process_Quit( void )
{
  extern int ttMark;
  extern int tt_tmpfile_fd;

  DialogFlag = QUIT;
  if (Dirty)
    DoQueryDialog( GETSTR(16,16, "The current icon has not been saved.\nYour changes will be lost.") );
  else {
#ifdef __TOOLTALK
  edit_notifier(NULL, 0, 1);
  ttdt_session_quit( 0, 0, 1 );
  ttdt_close( 0, 0, 1 );
  tt_release( ttMark );
  if (tt_tmpfile_fd != -1) {
     unlink(last_fname);
     if (fileFormat != FORMAT_XPM ) {
        unlink(dummy);
     } /* if */
  } /* if */
#endif
exit(0);
} /* else */
}
Beispiel #2
0
void
FinalizeToolTalkSession( )
{
  Tt_status ttRc;
  int i;

  for (i = 0; i < view_count; i++)
  {
      if (view_set[i]->msg != 0) {
	 if (view_set[i]->pats != 0) {
	    ttdt_file_quit( view_set[i]->pats, 0 );
	    view_set[i]->pats = 0;
	 }
	 tt_message_reply( view_set[i]->msg );
	 tttk_message_destroy( view_set[i]->msg );
	 view_set[i]->msg = 0;
      }
  }

  if( FileManagerToolTalkPattern &&
      tt_ptr_error( FileManagerToolTalkPattern ) == TT_OK )
  {
    ttRc = ttdt_session_quit( NULL,
                              FileManagerToolTalkPattern,
                              1 );
    if( ProcessToolTalkInputId )
      XtRemoveInput( ProcessToolTalkInputId );
  }
  ttRc = ttdt_close( NULL, NULL, sendStopped );
}
Beispiel #3
0
void
Process_Query_OK( void )
{
  extern int ttMark;
  extern int tt_tmpfile_fd;

  switch (DialogFlag) {
    case QUIT :
#ifdef __TOOLTALK
  edit_notifier(NULL, 0, 1);
  ttdt_session_quit( 0, 0, 1 );
  ttdt_close( 0, 0, 1 );
  tt_release( ttMark );
  if (tt_tmpfile_fd != -1) {
     unlink(last_fname);
     if (fileFormat != FORMAT_XPM ) {
        unlink(dummy);}
  }
#endif
                  exit(0);
    break;
    case NEW  : Process_Resize();
                DialogFlag= NONE;
    break;
    case OPEN :   XtManageChild(fileIODialog);
                  SetFileIODialogInfo();
    break;
    case SAVE_AS : SaveMeNot = False;
                   Do_FileIO(NULL, NULL, NULL);
    break;
    case GRAB :   Do_GrabOp();
    break;
    case DROP :   Do_DropOp();
    break;
   } /* switch */
   XSync(dpy, 0);
}