mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-31 08:41:42 +01:00 
			
		
		
		
	LCL:
* Application sets SysUtils.OnGetApplicationName callback * ApplicationName is default MessageDialog Caption git-svn-id: trunk@11317 -
This commit is contained in:
		
							parent
							
								
									2ae22b6cfe
								
							
						
					
					
						commit
						a7e79f00ce
					
				| @ -73,6 +73,13 @@ begin | |||||||
|   end; |   end; | ||||||
| end; | end; | ||||||
| 
 | 
 | ||||||
|  | // Callback function for SysUtils.OnGetApplicationName;
 | ||||||
|  | function GetApplicationName: string; | ||||||
|  | begin | ||||||
|  |   if Assigned(Application) then | ||||||
|  |     Result := Application.Title; | ||||||
|  | end; | ||||||
|  | 
 | ||||||
| {------------------------------------------------------------------------------ | {------------------------------------------------------------------------------ | ||||||
|        TApplication Constructor |        TApplication Constructor | ||||||
| ------------------------------------------------------------------------------} | ------------------------------------------------------------------------------} | ||||||
| @ -107,6 +114,8 @@ begin | |||||||
| 
 | 
 | ||||||
|   FOldExitProc:=ExitProc; |   FOldExitProc:=ExitProc; | ||||||
|   ExitProc:=@BeforeFinalization; |   ExitProc:=@BeforeFinalization; | ||||||
|  |    | ||||||
|  |   OnGetApplicationName := @GetApplicationName; | ||||||
| end; | end; | ||||||
| 
 | 
 | ||||||
| {------------------------------------------------------------------------------ | {------------------------------------------------------------------------------ | ||||||
| @ -151,6 +160,7 @@ begin | |||||||
|   // restore exception handling
 |   // restore exception handling
 | ||||||
|   CaptureExceptions:=false; |   CaptureExceptions:=false; | ||||||
|   LCLProc.SendApplicationMessageFunction:=nil; |   LCLProc.SendApplicationMessageFunction:=nil; | ||||||
|  |   OnGetApplicationName := nil; | ||||||
| end; | end; | ||||||
| 
 | 
 | ||||||
| {------------------------------------------------------------------------------ | {------------------------------------------------------------------------------ | ||||||
|  | |||||||
| @ -346,7 +346,7 @@ end; | |||||||
| function PromptUser(const DialogMessage : String; DialogType : longint; Buttons : PLongint; | function PromptUser(const DialogMessage : String; DialogType : longint; Buttons : PLongint; | ||||||
|   ButtonCount, DefaultIndex, EscapeResult : Longint) : Longint; |   ButtonCount, DefaultIndex, EscapeResult : Longint) : Longint; | ||||||
| begin | begin | ||||||
|   Result := WidgetSet.PromptUser('', DialogMessage, DialogType, Buttons, ButtonCount, DefaultIndex, EscapeResult); |   Result := WidgetSet.PromptUser(ApplicationName, DialogMessage, DialogType, Buttons, ButtonCount, DefaultIndex, EscapeResult); | ||||||
| end; | end; | ||||||
| 
 | 
 | ||||||
| function PromptUser(const DialogCaption, DialogMessage : String; DialogType : longint; Buttons : PLongint; | function PromptUser(const DialogCaption, DialogMessage : String; DialogType : longint; Buttons : PLongint; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 vincents
						vincents