Preferences.h 12 KB

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