Aggiunto is_cancelled e fatto funzionare cancel_hook in printapp
git-svn-id: svn://10.65.10.50/trunk@1012 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									f5f0ef30d8
								
							
						
					
					
						commit
						5c3978e234
					
				| @ -1,4 +1,4 @@ | ||||
| //      $Id: maskfld.cpp,v 1.80 1995-02-15 08:53:41 guy Exp $
 | ||||
| //      $Id: maskfld.cpp,v 1.81 1995-02-17 09:16:51 villa Exp $
 | ||||
| #include <xvt.h> | ||||
| 
 | ||||
| #include <applicat.h> | ||||
| @ -2592,9 +2592,7 @@ bool TReal_field::on_key(KEY key) | ||||
|       if (_flags.firm) | ||||
|       {                          | ||||
|         const long f = atol(n); | ||||
|         if (!prefhndl->exist(f)) | ||||
|           return error_box("Ditta non utilizzabile in contabilita'"); | ||||
|         else | ||||
|         if (prefhndl->exist(f)) | ||||
|           main_app().set_firm(f); | ||||
|       }   | ||||
|     } | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| //      $Id: printapp.cpp,v 1.16 1994-12-02 10:48:30 villa Exp $      
 | ||||
| //      $Id: printapp.cpp,v 1.17 1995-02-17 09:16:57 villa Exp $      
 | ||||
| #include <ctype.h> | ||||
| #include <stdarg.h> | ||||
| 
 | ||||
| @ -781,6 +781,8 @@ void TPrint_application::set_translation (int lognum, const char *field, | ||||
| 
 | ||||
| void TPrint_application::print() | ||||
| { | ||||
|   _cancelled = FALSE; | ||||
| 
 | ||||
|   // open printer if needed
 | ||||
|   if (!(printer().isopen ())) | ||||
|     if (!printer().open ()) | ||||
| @ -856,6 +858,7 @@ void TPrint_application::print() | ||||
|       printer().resetfooter(); | ||||
|     } | ||||
|   postclose_print ();   | ||||
|   return; | ||||
| } | ||||
| 
 | ||||
| bool TPrint_application::print_tree (link_item * head) | ||||
| @ -910,7 +913,7 @@ bool TPrint_application::print_one (int file) | ||||
|   int i = 0; | ||||
| 
 | ||||
|   if ((_prind && _prind->iscancelled ()) || printer ().frozen ()) | ||||
|     return FALSE; | ||||
|     if (_cancelled = cancel_hook()) return FALSE; | ||||
| 
 | ||||
|   if (!_print_defined) | ||||
|     return TRUE; | ||||
|  | ||||
| @ -74,6 +74,7 @@ class TPrint_application : public TApplication | ||||
|   MENU_TAG    _last_choice; | ||||
|   int         _ncopies; | ||||
|   bool        _repeat_print; | ||||
|   bool        _cancelled; | ||||
|    | ||||
|   // set the printer
 | ||||
|   void  set_printer() { printer().set(); } | ||||
| @ -467,10 +468,13 @@ public: | ||||
|   void        merge_export_file(const char* file, bool header = TRUE, bool direct = FALSE); | ||||
| 
 | ||||
|    | ||||
|   void set_n_copies(int n) { _ncopies = n;         } | ||||
|   int  get_n_copies()      { return _ncopies;      } | ||||
|   void set_n_copies(int n)  { _ncopies = n;         } | ||||
|   int  get_n_copies()       const { return _ncopies;      } | ||||
|   void repeat_print()      { _repeat_print = TRUE; } | ||||
|    | ||||
|   bool is_cancelled() const { return _cancelled;    } | ||||
|    | ||||
|    | ||||
|   TPrint_application(); | ||||
|   virtual ~TPrint_application(); | ||||
| }; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user