View Issue Details

IDProjectCategoryView StatusLast Update
0000232Double CommanderDefaultpublic2016-06-26 12:00
Reportervo.x Assigned Tocobines  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
ProjectionnoneETAnone 
Fixed in Version0.5.5 
Summary0000232: [patch] - Remove explicit OnClick events for menu items
DescriptionHello,

It seems that the menu actions has explicitly set the OnClick event. However, I see not reason why the OnExecute event of the action should not be responsible for this. Therefore, the attached patch removes this.
TagsNo tags attached.
Attached Files
remove-explicite-onclick.patch (9,827 bytes)   
Index: fmain.lfm
===================================================================
--- fmain.lfm	(revision 4077)
+++ fmain.lfm	(working copy)
@@ -1259,181 +1259,144 @@
       Caption = '&Files'
       object mnuFilesSymLink: TMenuItem
         Action = actSymLink
-        OnClick = actExecute
       end
       object mnuFilesHardLink: TMenuItem
         Action = actHardLink
-        OnClick = actExecute
       end
       object miLine1: TMenuItem
         Caption = '-'
       end
       object mnuSetFileProperties: TMenuItem
         Action = actSetFileProperties
-        OnClick = actExecute
       end
       object mnuFilesProperties: TMenuItem
         Action = actFileProperties
-        OnClick = actExecute
       end
       object miEditComment: TMenuItem
         Action = actEditComment
-        OnClick = actExecute
       end
       object mnuFilesSpace: TMenuItem
         Action = actCalculateSpace
-        OnClick = actExecute
       end
       object mnuFilesCmpCnt: TMenuItem
         Action = actCompareContents
-        OnClick = actExecute
       end
       object miMultiRename: TMenuItem
         Action = actMultiRename
-        OnClick = actExecute
       end
       object miLine2: TMenuItem
         Caption = '-'
       end
       object mnuPackFiles: TMenuItem
         Action = actPackFiles
-        OnClick = actExecute
       end
       object mnuExtractFiles: TMenuItem
         Action = actExtractFiles
-        OnClick = actExecute
       end
       object mnuTestArchive: TMenuItem
         Action = actTestArchive
-        OnClick = actExecute
       end
       object mnuFilesSplit: TMenuItem
         Action = actFileSpliter
-        OnClick = actExecute
       end
       object mnuFilesCombine: TMenuItem
         Action = actFileLinker
-        OnClick = actExecute
       end
       object mnuCheckSumCalc: TMenuItem
         Action = actCheckSumCalc
-        OnClick = actExecute
       end
       object mnuCheckSumVerify: TMenuItem
         Action = actCheckSumVerify
-        OnClick = actExecute
       end
       object miLine4: TMenuItem
         Caption = '-'
       end
       object miExit: TMenuItem
         Action = actExit
-        OnClick = actExecute
       end
     end
     object mnuMark: TMenuItem
       Caption = '&Mark'
       object mnuMarkSGroup: TMenuItem
         Action = actMarkPlus
-        OnClick = actExecute
       end
       object mnuMarkUGroup: TMenuItem
         Action = actMarkMinus
-        OnClick = actExecute
       end
       object mnuMarkSAll: TMenuItem
         Action = actMarkMarkAll
-        OnClick = actExecute
       end
       object mnuMarkUAll: TMenuItem
         Action = actMarkUnmarkAll
-        OnClick = actExecute
       end
       object mnuMarkInvert: TMenuItem
         Action = actMarkInvert
-        OnClick = actExecute
       end
       object mnuMarkCurrentExtension: TMenuItem
         Action = actMarkCurrentExtension
-        OnClick = actExecute
       end
       object mnuUnmarkCurrentExtension: TMenuItem
         Action = actUnmarkCurrentExtension
-        OnClick = actExecute
       end
       object miLine47: TMenuItem
         Caption = '-'
       end
       object mnuSaveSelection: TMenuItem
         Action = actSaveSelection
-        OnClick = actExecute
       end
       object mnuRestoreSelection: TMenuItem
         Action = actRestoreSelection
-        OnClick = actExecute
       end
       object mnuSaveSelectionToFile: TMenuItem
         Action = actSaveSelectionToFile
-        OnClick = actExecute
       end
       object mnuLoadSelectionFromFile: TMenuItem
         Action = actLoadSelectionFromFile
-        OnClick = actExecute
       end
       object mnuLoadSelectionFromClip: TMenuItem
         Action = actLoadSelectionFromClip
-        OnClick = actExecute
       end
       object miLine5: TMenuItem
         Caption = '-'
       end
       object miCopyNamesToClip: TMenuItem
         Action = actCopyNamesToClip
-        OnClick = actExecute
       end
       object miCopyFullNamesToClip: TMenuItem
         Action = actCopyFullNamesToClip
-        OnClick = actExecute
       end
     end
     object mnuCmd: TMenuItem
       Caption = '&Commands'
       object mnuCmdSearch: TMenuItem
         Action = actSearch
-        OnClick = actExecute
       end
       object mnuCmdDirHotlist: TMenuItem
         Action = actDirHotList
-        OnClick = actExecute
       end
       object miLine6: TMenuItem
         Caption = '-'
       end
       object miRunTerm: TMenuItem
         Action = actRunTerm
-        OnClick = actExecute
       end
       object miLine9: TMenuItem
         Caption = '-'
       end
       object mnuOpenVFSList: TMenuItem
         Action = actOpenVirtualFileSystemList
-        OnClick = actExecute
       end
       object mnuCmdSwapSourceTarget: TMenuItem
         Action = actExchange
-        OnClick = actExecute
       end
       object mnuCmdTargetIsSource: TMenuItem
         Action = actTargetEqualSource
-        OnClick = actExecute
       end
       object miLine22: TMenuItem
         Caption = '-'
       end
       object mnuCountDirContent: TMenuItem
         Action = actCountDirContent
-        OnClick = actExecute
       end
     end
     object mnuNetwork: TMenuItem
@@ -1441,37 +1404,30 @@
       Visible = False
       object miNetworkConnect: TMenuItem
         Action = actNetworkConnect
-        OnClick = actExecute
       end
       object miNetworkQuickConnect: TMenuItem
         Action = actNetworkQuickConnect
-        OnClick = actExecute
       end
       object miNetworkDisconnect: TMenuItem
         Action = actNetworkDisconnect
-        OnClick = actExecute
       end
     end
     object mnuTabs: TMenuItem
       Caption = '&Tabs'
       object mnuNewTab: TMenuItem
         Action = actNewTab
-        OnClick = actExecute
       end
       object mnuOpenDirInNewTab: TMenuItem
         Action = actOpenDirInNewTab
-        OnClick = actExecute
       end
       object miLine15: TMenuItem
         Caption = '-'
       end
       object mnuRemoveTab: TMenuItem
         Action = actRemoveTab
-        OnClick = actExecute
       end
       object mnuRemoveAllTabs: TMenuItem
         Action = actRemoveAllTabs
-        OnClick = actExecute
       end
       object miLine16: TMenuItem
         Caption = '-'
@@ -1480,19 +1436,15 @@
         Caption = '&Options'
         object mnuTabOptionNormal: TMenuItem
           Action = actSetTabOptionNormal
-          OnClick = actExecute
         end
         object mnuTabOptionPathLocked: TMenuItem
           Action = actSetTabOptionPathLocked
-          OnClick = actExecute
         end
         object mnuTabOptionPathResets: TMenuItem
           Action = actSetTabOptionPathResets
-          OnClick = actExecute
         end
         object mnuTabOptionDirsInNewTabs: TMenuItem
           Action = actSetTabOptionDirsInNewTab
-          OnClick = actExecute
         end
       end
       object miLine17: TMenuItem
@@ -1500,59 +1452,48 @@
       end
       object mnuNextTab: TMenuItem
         Action = actNextTab
-        OnClick = actExecute
       end
       object mnuPrevTab: TMenuItem
         Action = actPrevTab
-        OnClick = actExecute
       end
     end
     object mnuShow: TMenuItem
       Caption = '&Show'
       object mnuQuickView: TMenuItem
         Action = actQuickView
-        OnClick = actExecute
       end
       object miLine32: TMenuItem
         Caption = '-'
       end
       object mnuShowName: TMenuItem
         Action = actSortByName
-        OnClick = actExecute
       end
       object mnuShowExtension: TMenuItem
         Action = actSortByExt
-        OnClick = actExecute
       end
       object mnuShowSize: TMenuItem
         Action = actSortBySize
-        OnClick = actExecute
       end
       object mnuShowTime: TMenuItem
         Action = actSortByDate
-        OnClick = actExecute
       end
       object mnuShowAttrib: TMenuItem
         Action = actSortByAttr
-        OnClick = actExecute
       end
       object miLine7: TMenuItem
         Caption = '-'
       end
       object mnuShowReverse: TMenuItem
         Action = actReverseOrder
-        OnClick = actExecute
       end
       object mnuShowReread: TMenuItem
         Action = actRefresh
-        OnClick = actExecute
       end
       object miLine3: TMenuItem
         Caption = '-'
       end
       object mnuFilesShwSysFiles: TMenuItem
         Action = actShowSysFiles
-        OnClick = actExecute
       end
       object miLine20: TMenuItem
         Caption = '-'
@@ -1571,33 +1512,27 @@
       Caption = 'C&onfiguration'
       object mnuConfigOptions: TMenuItem
         Action = actOptions
-        OnClick = actExecute
       end
       object mnuFileAssoc: TMenuItem
         Action = actFileAssoc
-        OnClick = actExecute
       end
     end
     object mnuHelp: TMenuItem
       Caption = '&Help'
       object mnuHelpIndex: TMenuItem
         Action = actHelpIndex
-        OnClick = actExecute
       end
       object mnuHelpKeyboard: TMenuItem
         Action = actKeyboard
-        OnClick = actExecute
       end
       object mnuHelpVisitHomePage: TMenuItem
         Action = actVisitHomePage
-        OnClick = actExecute
       end
       object miLine18: TMenuItem
         Caption = '-'
       end
       object mnuHelpAbout: TMenuItem
         Action = actAbout
-        OnClick = actExecute
       end
     end
     object AllOpPct: TMenuItem
remove-explicite-onclick.patch (9,827 bytes)   
remove-explicite-onclick2.patch (342 bytes)   
Index: src/fviewer.lfm
===================================================================
--- src/fviewer.lfm	(revision 4104)
+++ src/fviewer.lfm	(working copy)
@@ -2272,7 +2272,6 @@
       Caption = 'About'
       object miAbout2: TMenuItem
         Action = actAbout
-        OnClick = miAbout2Click
       end
     end
   end
Fixed in Revision4097,4107
Operating system
Widgetset
Architecture

Activities

cobines

2011-11-19 09:28

administrator   ~0000150

Thanks. Applied to SVN.

vo.x

2011-11-21 00:02

reporter   ~0000162

I found another menu item in viewer which should be fixed. Please apply the patch remove-explicite-onclick2.patch which fixes this issue

cobines

2011-11-22 11:42

administrator   ~0000182

OK, I applied it.

Issue History

Date Modified Username Field Change
2011-11-13 16:32 vo.x New Issue
2011-11-13 16:32 vo.x File Added: remove-explicite-onclick.patch
2011-11-19 08:19 cobines Assigned To => cobines
2011-11-19 08:19 cobines Status new => assigned
2011-11-19 09:28 cobines Fixed in Revision => 4098
2011-11-19 09:28 cobines Note Added: 0000150
2011-11-19 09:28 cobines Status assigned => resolved
2011-11-19 09:28 cobines Fixed in Version => 0.5.5
2011-11-19 09:28 cobines Resolution open => fixed
2011-11-19 09:29 cobines Fixed in Revision 4098 => 4097
2011-11-21 00:01 vo.x File Added: remove-explicite-onclick2.patch
2011-11-21 00:02 vo.x Note Added: 0000162
2011-11-21 00:02 vo.x Status resolved => assigned
2011-11-21 00:02 vo.x Resolution fixed => reopened
2011-11-22 11:42 cobines Fixed in Revision 4097 => 4097,4107
2011-11-22 11:42 cobines Note Added: 0000182
2011-11-22 11:42 cobines Status assigned => resolved
2011-11-22 11:42 cobines Resolution reopened => fixed
2016-06-26 12:00 Alexx2000 Status resolved => closed