Preferences.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. //----------------------------------------------------------------------------
  2. #ifndef PreferencesH
  3. #define PreferencesH
  4. //----------------------------------------------------------------------------
  5. #include "ComboEdit.hpp"
  6. #include "GeneralSettings.h"
  7. #include "LogSettings.h"
  8. #include "UpDownEdit.hpp"
  9. #include <System.Classes.hpp>
  10. #include <Vcl.ComCtrls.hpp>
  11. #include <Vcl.Controls.hpp>
  12. #include <Vcl.ExtCtrls.hpp>
  13. #include <Vcl.Forms.hpp>
  14. #include <Vcl.Mask.hpp>
  15. #include <Vcl.StdCtrls.hpp>
  16. //----------------------------------------------------------------------------
  17. #include "GeneralSettings.h"
  18. #include "LogSettings.h"
  19. #include "UpDownEdit.hpp"
  20. #include <Dialogs.hpp>
  21. #include <PasTools.hpp>
  22. //----------------------------------------------------------------------------
  23. class TCustomCommandList;
  24. class TEditorList;
  25. //----------------------------------------------------------------------------
  26. class TPreferencesDialog : public TForm
  27. {
  28. __published:
  29. TButton *OKButton;
  30. TButton *CloseButton;
  31. TPanel *MainPanel;
  32. TPageControl *PageControl;
  33. TTabSheet *PreferencesSheet;
  34. TGroupBox *CommonPreferencesGroup;
  35. TCheckBox *ConfirmOverwritingCheck;
  36. TCheckBox *ConfirmDeletingCheck;
  37. TCheckBox *ConfirmClosingSessionCheck;
  38. TCheckBox *DDTransferConfirmationCheck;
  39. TCheckBox *ContinueOnErrorCheck;
  40. TTabSheet *LogSheet;
  41. TLoggingFrame *LoggingFrame;
  42. TTabSheet *GeneralSheet;
  43. TLabel *Label1;
  44. TGeneralSettingsFrame *GeneralSettingsFrame;
  45. TTabSheet *PanelsSheet;
  46. TGroupBox *PanelsRemoteDirectoryGroup;
  47. TCheckBox *ShowInaccesibleDirectoriesCheck;
  48. TGroupBox *PanelsCommonGroup;
  49. TCheckBox *ShowHiddenFilesCheck;
  50. TCheckBox *DefaultDirIsHomeCheck;
  51. TTabSheet *CommanderSheet;
  52. TLabel *Label3;
  53. TGroupBox *PanelsGroup;
  54. TCheckBox *PreserveLocalDirectoryCheck;
  55. TGroupBox *CommanderMiscGroup;
  56. TCheckBox *UseLocationProfilesCheck;
  57. TGroupBox *CompareCriterionsGroup;
  58. TCheckBox *CompareByTimeCheck;
  59. TCheckBox *CompareBySizeCheck;
  60. TTabSheet *ExplorerSheet;
  61. TLabel *Label4;
  62. TGroupBox *GroupBox2;
  63. TCheckBox *ShowFullAddressCheck;
  64. TTabSheet *TransferSheet;
  65. TTabSheet *EditorSheet;
  66. TGroupBox *EditorPreferenceGroup;
  67. TGroupBox *InternalEditorGroup;
  68. TLabel *EditorFontLabel;
  69. TButton *EditorFontButton;
  70. TTabSheet *IntegrationSheet;
  71. TGroupBox *ShellIconsGroup;
  72. TButton *DesktopIconButton;
  73. TButton *QuickLaunchIconButton;
  74. TButton *SendToHookButton;
  75. TTabSheet *CustomCommandsSheet;
  76. TGroupBox *CustomCommandsGroup;
  77. TListView *CustomCommandsView;
  78. TButton *AddCommandButton;
  79. TButton *RemoveCommandButton;
  80. TButton *UpCommandButton;
  81. TButton *DownCommandButton;
  82. TButton *EditCommandButton;
  83. TPanel *LeftPanel;
  84. TTreeView *NavigationTree;
  85. TCheckBox *DeleteToRecycleBinCheck;
  86. TButton *RegisterAsUrlHandlerButton;
  87. TTabSheet *DragDropSheet;
  88. TGroupBox *DragDropDownloadsGroup;
  89. TLabel *DDExtEnabledLabel;
  90. TLabel *DDExtDisabledLabel;
  91. TRadioButton *DDExtEnabledButton;
  92. TRadioButton *DDExtDisabledButton;
  93. TPanel *DDExtDisabledPanel;
  94. TCheckBox *DDWarnLackOfTempSpaceCheck;
  95. TCheckBox *DDWarnOnMoveCheck;
  96. TCheckBox *ConfirmExitOnCompletionCheck;
  97. TTabSheet *QueueSheet;
  98. TGroupBox *QueueGroup;
  99. TUpDownEdit *QueueTransferLimitEdit;
  100. TLabel *Label5;
  101. TGroupBox *QueueViewGroup;
  102. TRadioButton *QueueViewShowButton;
  103. TRadioButton *QueueViewHideWhenEmptyButton;
  104. TRadioButton *QueueViewHideButton;
  105. TCheckBox *QueueAutoPopupCheck;
  106. TCheckBox *QueueCheck;
  107. TCheckBox *DDAllowMoveInitCheck;
  108. TCheckBox *RememberPasswordCheck;
  109. TCheckBox *ConfirmResumeCheck;
  110. TTabSheet *StorageSheet;
  111. TGroupBox *StorageGroup;
  112. TRadioButton *RegistryStorageButton;
  113. TRadioButton *IniFileStorageButton2;
  114. TGroupBox *NotificationsGroup;
  115. TCheckBox *BeepOnFinishCheck;
  116. TUpDownEdit *BeepOnFinishAfterEdit;
  117. TLabel *BeepOnFinishAfterText;
  118. TTabSheet *TransferEnduranceSheet;
  119. TGroupBox *ResumeBox;
  120. TLabel *ResumeThresholdUnitLabel;
  121. TRadioButton *ResumeOnButton;
  122. TRadioButton *ResumeSmartButton;
  123. TRadioButton *ResumeOffButton;
  124. TUpDownEdit *ResumeThresholdEdit;
  125. TCheckBox *ConfirmCommandSessionCheck;
  126. TGroupBox *TemporaryDirectoryGrouo;
  127. TRadioButton *DDSystemTemporaryDirectoryButton;
  128. TRadioButton *DDCustomTemporaryDirectoryButton;
  129. TDirectoryEdit *DDTemporaryDirectoryEdit;
  130. TLabel *Label6;
  131. TCheckBox *TemporaryDirectoryCleanupCheck;
  132. TCheckBox *ConfirmTemporaryDirectoryCleanupCheck;
  133. TGroupBox *OtherStorageGroup;
  134. TLabel *RandomSeedFileLabel;
  135. TFilenameEdit *RandomSeedFileEdit;
  136. TCheckBox *SwappedPanelsCheck;
  137. TCheckBox *PreservePanelStateCheck;
  138. TButton *AddSearchPathButton;
  139. TCheckBox *QueueNoConfirmationCheck;
  140. TCheckBox *EditorWordWrapCheck;
  141. TGroupBox *PathInCaptionGroup;
  142. TRadioButton *PathInCaptionFullButton;
  143. TRadioButton *PathInCaptionShortButton;
  144. TRadioButton *PathInCaptionNoneButton;
  145. TTabSheet *UpdatesSheet;
  146. TGroupBox *UpdatesGroup;
  147. TGroupBox *UpdatesProxyGroup;
  148. TLabel *UpdatesProxyHostLabel;
  149. TLabel *UpdatesProxyPortLabel;
  150. TUpDownEdit *UpdatesProxyPortEdit;
  151. TEdit *UpdatesProxyHostEdit;
  152. TRadioButton *UpdatesProxyCheck;
  153. TTabSheet *CopyParamListSheet;
  154. TGroupBox *CopyParamListGroup;
  155. TListView *CopyParamListView;
  156. TButton *AddCopyParamButton;
  157. TButton *RemoveCopyParamButton;
  158. TButton *UpCopyParamButton;
  159. TButton *DownCopyParamButton;
  160. TButton *EditCopyParamButton;
  161. TButton *DuplicateCopyParamButton;
  162. TGroupBox *CopyParamListOptionsGroup;
  163. TCheckBox *CopyParamAutoSelectNoticeCheck;
  164. TButton *HelpButton;
  165. TGroupBox *ThemeGroup;
  166. TLabel *Label7;
  167. TComboBox *ThemeCombo;
  168. TListView *EditorListView2;
  169. TButton *AddEditorButton;
  170. TButton *EditEditorButton;
  171. TButton *UpEditorButton;
  172. TButton *DownEditorButton;
  173. TButton *RemoveEditorButton;
  174. TGroupBox *DoubleClickGroup;
  175. TCheckBox *CopyOnDoubleClickConfirmationCheck;
  176. TLabel *DoubleClickActionLabel;
  177. TComboBox *DoubleClickActionCombo;
  178. TLabel *Label8;
  179. TComboBox *NortonLikeModeCombo;
  180. TStaticText *ShellIconsText;
  181. TCheckBox *FullRowSelectCheck;
  182. TGroupBox *SessionReopenGroup;
  183. TLabel *SessionReopenAutoLabel;
  184. TCheckBox *SessionReopenAutoCheck;
  185. TLabel *SessionReopenAutoSecLabel;
  186. TUpDownEdit *SessionReopenAutoEdit;
  187. TTabSheet *WindowSheet;
  188. TCheckBox *AutoReadDirectoryAfterOpCheck;
  189. TCheckBox *ConfirmRecyclingCheck;
  190. TGroupBox *WindowMiscellaneousGroup;
  191. TCheckBox *MinimizeToTrayCheck;
  192. TCheckBox *BalloonNotificationsCheck;
  193. TButton *ExportButton;
  194. TTabSheet *IntegrationAppSheet;
  195. TGroupBox *ExternalAppsGroup;
  196. TLabel *Label2;
  197. TEdit *PuttyPathEdit;
  198. TCheckBox *PuttyPasswordCheck2;
  199. TCheckBox *AutoOpenInPuttyCheck;
  200. TButton *PuttyPathBrowseButton;
  201. TButton *PuttyPathResetButton;
  202. TCheckBox *TelnetForFtpInPuttyCheck;
  203. TRadioButton *UpdatesDirectCheck;
  204. TRadioButton *UpdatesAutoCheck;
  205. TLabel *Label9;
  206. TUpDownEdit *EditorTabSizeEdit;
  207. TCheckBox *ConfirmTransferringCheck;
  208. TGroupBox *UpdatesOptionsGroup;
  209. TCheckBox *QueueIndividuallyCheck;
  210. TCheckBox *SessionReopenAutoIdleCheck;
  211. TCheckBox *RenameWholeNameCheck;
  212. TCheckBox *TreeOnLeftCheck;
  213. TCheckBox *TemporaryDirectoryAppendSessionCheck;
  214. TCheckBox *TemporaryDirectoryAppendPathCheck;
  215. TLabel *SessionReopenTimeoutLabel;
  216. TUpDownEdit *SessionReopenTimeoutEdit;
  217. TLabel *SessionReopenTimeoutSecLabel;
  218. TTabSheet *SecuritySheet;
  219. TGroupBox *MasterPasswordGroup;
  220. TButton *SetMasterPasswordButton;
  221. TCheckBox *UseMasterPasswordCheck;
  222. TTabSheet *NetworkSheet;
  223. TGroupBox *ExternalIpAddressGroupBox;
  224. TRadioButton *RetrieveExternalIpAddressButton;
  225. TRadioButton *CustomExternalIpAddressButton;
  226. TEdit *CustomExternalIpAddressEdit;
  227. TCheckBox *FormatSizeBytesCheck;
  228. TCheckBox *SessionReopenAutoStallCheck;
  229. TLabel *SessionReopenAutoStallLabel;
  230. TUpDownEdit *SessionReopenAutoStallEdit;
  231. TLabel *SessionReopenAutoStallSecLabel;
  232. TCheckBox *EnableQueueByDefaultCheck;
  233. TLabel *Label11;
  234. TComboBox *EditorEncodingCombo;
  235. TGroupBox *CopyParamGroup;
  236. TLabel *CopyParamLabel;
  237. TButton *TransferSettingsButton;
  238. TCheckBox *RefreshRemotePanelCheck;
  239. TUpDownEdit *RefreshRemotePanelIntervalEdit;
  240. TLabel *RefreshRemoteDirectoryUnitLabel;
  241. TLabel *Label12;
  242. TComboBox *UpdatesPeriodCombo;
  243. TLabel *UpdatesBetaVersionsLabel;
  244. TComboBox *UpdatesBetaVersionsCombo;
  245. TCheckBox *CollectUsageCheck;
  246. TButton *UsageViewButton;
  247. TTabSheet *PanelRemoteSheet;
  248. void __fastcall FormShow(TObject *Sender);
  249. void __fastcall ControlChange(TObject *Sender);
  250. void __fastcall EditorFontButtonClick(TObject *Sender);
  251. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  252. void __fastcall IconButtonClick(TObject *Sender);
  253. void __fastcall CustomCommandsViewData(TObject *Sender, TListItem *Item);
  254. void __fastcall ListViewSelectItem(TObject *Sender,
  255. TListItem *Item, bool Selected);
  256. void __fastcall CustomCommandsViewKeyDown(TObject *Sender, WORD &Key,
  257. TShiftState Shift);
  258. void __fastcall AddEditCommandButtonClick(TObject *Sender);
  259. void __fastcall RemoveCommandButtonClick(TObject *Sender);
  260. void __fastcall UpDownCommandButtonClick(TObject *Sender);
  261. void __fastcall ListViewStartDrag(TObject *Sender,
  262. TDragObject *&DragObject);
  263. void __fastcall CustomCommandsViewDragDrop(TObject *Sender,
  264. TObject *Source, int X, int Y);
  265. void __fastcall ListViewDragOver(TObject *Sender,
  266. TObject *Source, int X, int Y, TDragState State, bool &Accept);
  267. void __fastcall NavigationTreeChange(TObject *Sender, TTreeNode *Node);
  268. void __fastcall PageControlChange(TObject *Sender);
  269. void __fastcall RegisterAsUrlHandlerButtonClick(TObject *Sender);
  270. void __fastcall DDExtLabelClick(TObject *Sender);
  271. void __fastcall CustomCommandsViewDblClick(TObject *Sender);
  272. void __fastcall AddSearchPathButtonClick(TObject *Sender);
  273. void __fastcall EditorFontLabelDblClick(TObject *Sender);
  274. void __fastcall CopyParamListViewData(TObject *Sender, TListItem *Item);
  275. void __fastcall CopyParamListViewInfoTip(TObject *Sender,
  276. TListItem *Item, UnicodeString &InfoTip);
  277. void __fastcall CopyParamListViewDragDrop(TObject *Sender,
  278. TObject *Source, int X, int Y);
  279. void __fastcall UpDownCopyParamButtonClick(TObject *Sender);
  280. void __fastcall RemoveCopyParamButtonClick(TObject *Sender);
  281. void __fastcall CopyParamListViewKeyDown(TObject *Sender, WORD &Key,
  282. TShiftState Shift);
  283. void __fastcall AddEditCopyParamButtonClick(TObject *Sender);
  284. void __fastcall CopyParamListViewDblClick(TObject *Sender);
  285. void __fastcall HelpButtonClick(TObject *Sender);
  286. void __fastcall EditorListView2DragDrop(TObject *Sender, TObject *Source,
  287. int X, int Y);
  288. void __fastcall UpDownEditorButtonClick(TObject *Sender);
  289. void __fastcall RemoveEditorButtonClick(TObject *Sender);
  290. void __fastcall AddEditEditorButtonClick(TObject *Sender);
  291. void __fastcall EditorListView2DblClick(TObject *Sender);
  292. void __fastcall EditorListView2KeyDown(TObject *Sender, WORD &Key,
  293. TShiftState Shift);
  294. void __fastcall EditorListView2Data(TObject *Sender, TListItem *Item);
  295. void __fastcall PuttyPathBrowseButtonClick(TObject *Sender);
  296. void __fastcall PuttyPathResetButtonClick(TObject *Sender);
  297. void __fastcall ExportButtonClick(TObject *Sender);
  298. void __fastcall PathEditBeforeDialog(TObject *Sender,
  299. UnicodeString &Name, bool &Action);
  300. void __fastcall PathEditAfterDialog(TObject *Sender,
  301. UnicodeString &Name, bool &Action);
  302. void __fastcall NavigationTreeCollapsing(TObject *Sender,
  303. TTreeNode *Node, bool &AllowCollapse);
  304. void __fastcall ListViewEndDrag(TObject *Sender,
  305. TObject *Target, int X, int Y);
  306. void __fastcall RandomSeedFileEditCreateEditDialog(TObject *Sender,
  307. TFileDialogKind DialogKind, TOpenDialog *&Dialog);
  308. void __fastcall SessionReopenTimeoutEditSetValue(TObject *Sender,
  309. Extended Value, UnicodeString &Text, bool &Handed);
  310. void __fastcall SessionReopenTimeoutEditGetValue(TObject *Sender,
  311. UnicodeString Text, Extended &Value, bool &Handed);
  312. void __fastcall UseMasterPasswordCheckClick(TObject *Sender);
  313. void __fastcall SetMasterPasswordButtonClick(TObject *Sender);
  314. void __fastcall CopyParamGroupClick(TObject *Sender);
  315. void __fastcall UsageViewButtonClick(TObject *Sender);
  316. private:
  317. TPreferencesMode FPreferencesMode;
  318. TFont * FEditorFont;
  319. TCustomCommandList * FCustomCommandList;
  320. TCopyParamList * FCopyParamList;
  321. TEditorList * FEditorList;
  322. bool FCustomCommandChanging;
  323. bool FAfterFilenameEditDialog;
  324. int FListViewDragSource;
  325. int FListViewDragDest;
  326. TPreferencesDialogData * FDialogData;
  327. UnicodeString FBeforeDialogPath;
  328. TCopyParamType FCopyParams;
  329. TListViewScrollOnDragOver * FCustomCommandsScrollOnDragOver;
  330. TListViewScrollOnDragOver * FCopyParamScrollOnDragOver;
  331. TListViewScrollOnDragOver * FEditorScrollOnDragOver;
  332. bool FNoUpdate;
  333. void __fastcall SetPreferencesMode(TPreferencesMode value);
  334. void __fastcall CMDialogKey(TWMKeyDown & Message);
  335. void __fastcall WMHelp(TWMHelp & Message);
  336. UnicodeString __fastcall TabSample(UnicodeString Values);
  337. public:
  338. virtual __fastcall ~TPreferencesDialog();
  339. bool __fastcall Execute(TPreferencesDialogData * DialogData);
  340. virtual __fastcall TPreferencesDialog(TComponent* AOwner);
  341. __property TPreferencesMode PreferencesMode = { read = FPreferencesMode, write = SetPreferencesMode };
  342. protected:
  343. void __fastcall LoadConfiguration();
  344. void __fastcall SaveConfiguration();
  345. void __fastcall UpdateControls();
  346. void __fastcall UpdateCustomCommandsView();
  347. void __fastcall UpdateCopyParamListView();
  348. void __fastcall UpdateEditorListView();
  349. void __fastcall CustomCommandMove(int Source, int Dest);
  350. void __fastcall CopyParamMove(int Source, int Dest);
  351. void __fastcall EditorMove(int Source, int Dest);
  352. bool __fastcall AllowListViewDrag(TObject * Sender, int X, int Y);
  353. void __fastcall PrepareNavigationTree(TTreeView * Tree);
  354. virtual void __fastcall Dispatch(void * Message);
  355. TListViewScrollOnDragOver * __fastcall ScrollOnDragOver(TObject * ListView);
  356. };
  357. //----------------------------------------------------------------------------
  358. #endif