mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-31 03:01:28 +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; | ||||
| 
 | ||||
| // Callback function for SysUtils.OnGetApplicationName;
 | ||||
| function GetApplicationName: string; | ||||
| begin | ||||
|   if Assigned(Application) then | ||||
|     Result := Application.Title; | ||||
| end; | ||||
| 
 | ||||
| {------------------------------------------------------------------------------ | ||||
|        TApplication Constructor | ||||
| ------------------------------------------------------------------------------} | ||||
| @ -107,6 +114,8 @@ begin | ||||
| 
 | ||||
|   FOldExitProc:=ExitProc; | ||||
|   ExitProc:=@BeforeFinalization; | ||||
|    | ||||
|   OnGetApplicationName := @GetApplicationName; | ||||
| end; | ||||
| 
 | ||||
| {------------------------------------------------------------------------------ | ||||
| @ -151,6 +160,7 @@ begin | ||||
|   // restore exception handling
 | ||||
|   CaptureExceptions:=false; | ||||
|   LCLProc.SendApplicationMessageFunction:=nil; | ||||
|   OnGetApplicationName := nil; | ||||
| end; | ||||
| 
 | ||||
| {------------------------------------------------------------------------------ | ||||
|  | ||||
| @ -346,7 +346,7 @@ end; | ||||
| function PromptUser(const DialogMessage : String; DialogType : longint; Buttons : PLongint; | ||||
|   ButtonCount, DefaultIndex, EscapeResult : Longint) : Longint; | ||||
| begin | ||||
|   Result := WidgetSet.PromptUser('', DialogMessage, DialogType, Buttons, ButtonCount, DefaultIndex, EscapeResult); | ||||
|   Result := WidgetSet.PromptUser(ApplicationName, DialogMessage, DialogType, Buttons, ButtonCount, DefaultIndex, EscapeResult); | ||||
| end; | ||||
| 
 | ||||
| function PromptUser(const DialogCaption, DialogMessage : String; DialogType : longint; Buttons : PLongint; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 vincents
						vincents