From 51a37fa2df3f0f9a232b6ce734b382cde2c22edd Mon Sep 17 00:00:00 2001 From: gbamber Date: Fri, 27 Jan 2017 11:35:59 +0000 Subject: [PATCH] To V0.3.4.0 Stable in Windows git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5715 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../latest_stable/testapp/testapp.lps | 86 +++++++++---------- .../latest_stable/testapp/umainform.lfm | 34 +++++--- .../latest_stable/testapp/umainform.pas | 12 +++ 3 files changed, 77 insertions(+), 55 deletions(-) diff --git a/components/lazautoupdate/latest_stable/testapp/testapp.lps b/components/lazautoupdate/latest_stable/testapp/testapp.lps index 5d0dd6609..85c54bee6 100644 --- a/components/lazautoupdate/latest_stable/testapp/testapp.lps +++ b/components/lazautoupdate/latest_stable/testapp/testapp.lps @@ -19,8 +19,8 @@ - - + + @@ -42,16 +42,15 @@ - - - + + - - + + @@ -186,9 +185,10 @@ + - - + + @@ -237,123 +237,123 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - - + + - + - - + + diff --git a/components/lazautoupdate/latest_stable/testapp/umainform.lfm b/components/lazautoupdate/latest_stable/testapp/umainform.lfm index efb41fc36..d3ece9ab1 100644 --- a/components/lazautoupdate/latest_stable/testapp/umainform.lfm +++ b/components/lazautoupdate/latest_stable/testapp/umainform.lfm @@ -1,12 +1,13 @@ object mainform: Tmainform - Left = 518 - Height = 209 - Top = 285 - Width = 335 + Left = 572 + Height = 237 + Top = 157 + Width = 345 BorderIcons = [biSystemMenu] Caption = 'mainform' - ClientHeight = 209 - ClientWidth = 335 + ClientHeight = 237 + ClientWidth = 345 + Font.Height = -12 OnActivate = FormActivate OnCreate = FormCreate OnDestroy = FormDestroy @@ -16,8 +17,8 @@ object mainform: Tmainform object StatusBar1: TStatusBar Left = 0 Height = 23 - Top = 186 - Width = 335 + Top = 214 + Width = 345 Panels = <> end object cmd_close: TBitBtn @@ -73,7 +74,7 @@ object mainform: Tmainform object lbl_Version: TLabel Left = 24 Height = 15 - Top = 152 + Top = 184 Width = 298 Alignment = taCenter AutoSize = False @@ -94,14 +95,23 @@ object mainform: Tmainform Visible = False end object cmd_MakeDesktopShortcut: TButton - Left = 184 + Left = 24 Height = 25 - Top = 112 - Width = 139 + Top = 144 + Width = 147 Caption = 'Make Desktop Shortcut' OnClick = cmd_MakeDesktopShortcutClick TabOrder = 7 end + object cmd_DeleteDesktopShortcut: TButton + Left = 184 + Height = 25 + Top = 144 + Width = 139 + Caption = 'Delete Desktop Shortcut' + OnClick = cmd_DeleteDesktopShortcutClick + TabOrder = 8 + end object LazAutoUpdate1: TLazAutoUpdate About.Description.Strings = ( 'A component for updating your application'#13#10'Designed for projects hosted by SourceForge'#13#10#13#10'Main methods:'#13#10'Procedure AutoUpdate'#13#10'Function NewVersionAvailable: Boolean'#13#10'Function DownloadNewVersion: Boolean'#13#10'Function UpdateToNewVersion: Boolean'#13#10'Procedure ShowWhatsNewIfAvailable'#13#10'For troubleshooting, set DebugMode=TRUE' diff --git a/components/lazautoupdate/latest_stable/testapp/umainform.pas b/components/lazautoupdate/latest_stable/testapp/umainform.pas index db4083d24..d9b851b3d 100644 --- a/components/lazautoupdate/latest_stable/testapp/umainform.pas +++ b/components/lazautoupdate/latest_stable/testapp/umainform.pas @@ -45,6 +45,7 @@ type { Tmainform } Tmainform = class(TForm) + cmd_DeleteDesktopShortcut: TButton; cmd_MakeDesktopShortcut: TButton; cmd_SilentUpdate: TButton; cmd_AutoUpdate: TButton; @@ -56,6 +57,7 @@ type LazAutoUpdate1: TLazAutoUpdate; StatusBar1: TStatusBar; procedure cmd_AutoUpdateClick(Sender: TObject); + procedure cmd_DeleteDesktopShortcutClick(Sender: TObject); procedure cmd_DownloadNewVersionClick(Sender: TObject); procedure cmd_MakeDesktopShortcutClick(Sender: TObject); procedure cmd_NewVersionAvailableClick(Sender: TObject); @@ -186,6 +188,16 @@ begin {$ENDIF} end; +procedure Tmainform.cmd_DeleteDesktopShortcutClick(Sender: TObject); +begin + LazAutoUpdate1.ShortCut.ShortCutName:='Test Application'; + If LazAutoUpdate1.DeleteShortCut then + ShowMessage('Success! New shortcut is toast') + else + ShowMessage('DeleteShortCut failed'); + +end; + procedure Tmainform.LazAutoUpdate1DebugEvent(Sender: TObject; lauMethodName, lauMessage: string); begin