Preferences.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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. TGroupBox *ExternalAppsGroup;
  82. TLabel *Label2;
  83. TEdit *PuttyPathEdit;
  84. TTabSheet *CustomCommandsSheet;
  85. TGroupBox *CustomCommandsGroup;
  86. TListView *CustomCommandsView;
  87. TButton *AddCommandButton;
  88. TButton *RemoveCommandButton;
  89. TButton *UpCommandButton;
  90. TButton *DownCommandButton;
  91. TButton *EditCommandButton;
  92. TPanel *LeftPanel;
  93. TTreeView *NavigationTree;
  94. TCheckBox *DeleteToRecycleBinCheck;
  95. TButton *RegisterAsUrlHandlerButton;
  96. TTabSheet *DragDropSheet;
  97. TGroupBox *DragDropDownloadsGroup;
  98. TLabel *DDExtEnabledLabel;
  99. TLabel *DDExtDisabledLabel;
  100. TRadioButton *DDExtEnabledButton;
  101. TRadioButton *DDExtDisabledButton;
  102. TPanel *DDExtDisabledPanel;
  103. TCheckBox *DDWarnLackOfTempSpaceCheck;
  104. TCheckBox *DDWarnOnMoveCheck;
  105. TCheckBox *ConfirmExitOnCompletionCheck;
  106. TTabSheet *QueueSheet;
  107. TGroupBox *QueueGroup;
  108. TUpDownEdit *QueueTransferLimitEdit;
  109. TLabel *Label5;
  110. TGroupBox *QueueViewGroup;
  111. TRadioButton *QueueViewShowButton;
  112. TRadioButton *QueueViewHideWhenEmptyButton;
  113. TRadioButton *QueueViewHideButton;
  114. TCheckBox *QueueAutoPopupCheck;
  115. TCheckBox *QueueCheck;
  116. TCheckBox *DDAllowMoveInitCheck;
  117. TCheckBox *RememberPasswordCheck;
  118. TCheckBox *ConfirmResumeCheck;
  119. TTabSheet *StorageSheet;
  120. TGroupBox *StorageGroup;
  121. TRadioButton *RegistryStorageButton;
  122. TRadioButton *IniFileStorageButton2;
  123. TGroupBox *NotificationsGroup;
  124. TCheckBox *BeepOnFinishCheck;
  125. TUpDownEdit *BeepOnFinishAfterEdit;
  126. TLabel *BeepOnFinishAfterText;
  127. TTabSheet *TransferResumeSheet;
  128. TGroupBox *ResumeBox;
  129. TLabel *ResumeThresholdUnitLabel;
  130. TRadioButton *ResumeOnButton;
  131. TRadioButton *ResumeSmartButton;
  132. TRadioButton *ResumeOffButton;
  133. TUpDownEdit *ResumeThresholdEdit;
  134. TCheckBox *ConfirmCommandSessionCheck;
  135. TGroupBox *SingleEditorGroup;
  136. TRadioButton *EditorSingleEditorOnCheck;
  137. TRadioButton *EditorSingleEditorOffCheck;
  138. TGroupBox *TemporaryDirectoryGrouo;
  139. TRadioButton *DDSystemTemporaryDirectoryButton;
  140. TRadioButton *DDCustomTemporaryDirectoryButton;
  141. TDirectoryEdit *DDTemporaryDirectoryEdit;
  142. TLabel *Label6;
  143. TCheckBox *TemporaryDirectoryCleanupCheck;
  144. TCheckBox *ConfirmTemporaryDirectoryCleanupCheck;
  145. TCheckBox *PuttyPasswordCheck;
  146. TGroupBox *OtherStorageGroup;
  147. TLabel *RandomSeedFileLabel;
  148. TFilenameEdit *RandomSeedFileEdit;
  149. TCheckBox *SwappedPanelsCheck;
  150. TCheckBox *PreservePanelStateCheck;
  151. TButton *AddSearchPathButton;
  152. TCheckBox *QueueNoConfirmationCheck;
  153. TCheckBox *EditorWordWrapCheck;
  154. TGroupBox *PathInCaptionGroup;
  155. TRadioButton *PathInCaptionFullButton;
  156. TRadioButton *PathInCaptionShortButton;
  157. TRadioButton *PathInCaptionNoneButton;
  158. TTabSheet *UpdatesSheet;
  159. TGroupBox *UpdatesGroup;
  160. TRadioButton *UpdatesNeverButton;
  161. TRadioButton *UpdatesDailyButton;
  162. TRadioButton *UpdatesWeeklyButton;
  163. TRadioButton *UpdatesMonthlyButton;
  164. TGroupBox *UpdatesProxyGroup;
  165. TLabel *UpdatesProxyHostLabel;
  166. TLabel *UpdatesProxyPortLabel;
  167. TUpDownEdit *UpdatesProxyPortEdit;
  168. TEdit *UpdatesProxyHostEdit;
  169. TCheckBox *UpdatesProxyCheck;
  170. TTabSheet *CopyParamListSheet;
  171. TGroupBox *CopyParamListGroup;
  172. TListView *CopyParamListView;
  173. TButton *AddCopyParamButton;
  174. TButton *RemoveCopyParamButton;
  175. TButton *UpCopyParamButton;
  176. TButton *DownCopyParamButton;
  177. TButton *EditCopyParamButton;
  178. TButton *DuplicateCopyParamButton;
  179. TGroupBox *CopyParamListOptionsGroup;
  180. TCheckBox *CopyParamAutoSelectNoticeCheck;
  181. TButton *HelpButton;
  182. TGroupBox *ThemeGroup;
  183. TLabel *Label7;
  184. TComboBox *ThemeCombo;
  185. TListView *EditorListView;
  186. TButton *AddEditorButton;
  187. TButton *EditEditorButton;
  188. TButton *UpEditorButton;
  189. TButton *DownEditorButton;
  190. TButton *RemoveEditorButton;
  191. TGroupBox *DoubleClickGroup;
  192. TCheckBox *CopyOnDoubleClickConfirmationCheck;
  193. TLabel *DoubleClickActionLabel;
  194. TComboBox *DoubleClickActionCombo;
  195. TLabel *Label8;
  196. TComboBox *NortonLikeModeCombo;
  197. TCheckBox *AutoOpenInPuttyCheck;
  198. TStaticText *ShellIconsText;
  199. TButton *PuttyPathBrowseButton;
  200. TButton *PuttyPathResetButton;
  201. TCheckBox *FullRowSelectCheck;
  202. TGroupBox *SessionReopenGroup;
  203. TLabel *SessionReopenAutoLabel;
  204. TCheckBox *SessionReopenAutoCheck;
  205. TLabel *SessionReopenAutoSecLabel;
  206. TUpDownEdit *SessionReopenAutoEdit;
  207. TTabSheet *WindowSheet;
  208. TCheckBox *AutoReadDirectoryAfterOpCheck;
  209. TCheckBox *ConfirmRecyclingCheck;
  210. TGroupBox *WindowMiscellaneousGroup;
  211. TCheckBox *MinimizeToTrayCheck;
  212. TCheckBox *BalloonNotificationsCheck;
  213. TButton *ExportButton;
  214. void __fastcall FormShow(TObject *Sender);
  215. void __fastcall ControlChange(TObject *Sender);
  216. void __fastcall EditorFontButtonClick(TObject *Sender);
  217. void __fastcall FilenameEditExit(TObject *Sender);
  218. void __fastcall FilenameEditChange(TObject *Sender);
  219. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  220. void __fastcall IconButtonClick(TObject *Sender);
  221. void __fastcall CustomCommandsViewData(TObject *Sender, TListItem *Item);
  222. void __fastcall ListViewSelectItem(TObject *Sender,
  223. TListItem *Item, bool Selected);
  224. void __fastcall CustomCommandsViewKeyDown(TObject *Sender, WORD &Key,
  225. TShiftState Shift);
  226. void __fastcall AddEditCommandButtonClick(TObject *Sender);
  227. void __fastcall RemoveCommandButtonClick(TObject *Sender);
  228. void __fastcall UpDownCommandButtonClick(TObject *Sender);
  229. void __fastcall ListViewStartDrag(TObject *Sender,
  230. TDragObject *&DragObject);
  231. void __fastcall CustomCommandsViewDragDrop(TObject *Sender,
  232. TObject *Source, int X, int Y);
  233. void __fastcall ListViewDragOver(TObject *Sender,
  234. TObject *Source, int X, int Y, TDragState State, bool &Accept);
  235. void __fastcall NavigationTreeChange(TObject *Sender, TTreeNode *Node);
  236. void __fastcall PageControlChange(TObject *Sender);
  237. void __fastcall RegisterAsUrlHandlerButtonClick(TObject *Sender);
  238. void __fastcall DDExtLabelClick(TObject *Sender);
  239. void __fastcall CustomCommandsViewDblClick(TObject *Sender);
  240. void __fastcall AddSearchPathButtonClick(TObject *Sender);
  241. void __fastcall EditorFontLabelDblClick(TObject *Sender);
  242. void __fastcall CopyParamListViewData(TObject *Sender, TListItem *Item);
  243. void __fastcall CopyParamListViewInfoTip(TObject *Sender,
  244. TListItem *Item, AnsiString &InfoTip);
  245. void __fastcall CopyParamListViewDragDrop(TObject *Sender,
  246. TObject *Source, int X, int Y);
  247. void __fastcall UpDownCopyParamButtonClick(TObject *Sender);
  248. void __fastcall RemoveCopyParamButtonClick(TObject *Sender);
  249. void __fastcall CopyParamListViewKeyDown(TObject *Sender, WORD &Key,
  250. TShiftState Shift);
  251. void __fastcall AddEditCopyParamButtonClick(TObject *Sender);
  252. void __fastcall CopyParamListViewDblClick(TObject *Sender);
  253. void __fastcall HelpButtonClick(TObject *Sender);
  254. void __fastcall EditorListViewDragDrop(TObject *Sender, TObject *Source,
  255. int X, int Y);
  256. void __fastcall UpDownEditorButtonClick(TObject *Sender);
  257. void __fastcall RemoveEditorButtonClick(TObject *Sender);
  258. void __fastcall AddEditEditorButtonClick(TObject *Sender);
  259. void __fastcall EditorListViewDblClick(TObject *Sender);
  260. void __fastcall EditorListViewKeyDown(TObject *Sender, WORD &Key,
  261. TShiftState Shift);
  262. void __fastcall EditorListViewData(TObject *Sender, TListItem *Item);
  263. void __fastcall PuttyPathBrowseButtonClick(TObject *Sender);
  264. void __fastcall PuttyPathResetButtonClick(TObject *Sender);
  265. void __fastcall ExportButtonClick(TObject *Sender);
  266. void __fastcall PathEditBeforeDialog(TObject *Sender,
  267. AnsiString &Name, bool &Action);
  268. void __fastcall PathEditAfterDialog(TObject *Sender,
  269. AnsiString &Name, bool &Action);
  270. void __fastcall NavigationTreeCollapsing(TObject *Sender,
  271. TTreeNode *Node, bool &AllowCollapse);
  272. private:
  273. TPreferencesMode FPreferencesMode;
  274. TFont * FEditorFont;
  275. TCustomCommands * FCustomCommands;
  276. TCopyParamList * FCopyParamList;
  277. TEditorList * FEditorList;
  278. bool FCustomCommandChanging;
  279. bool FAfterFilenameEditDialog;
  280. int FListViewDragSource;
  281. int FListViewDragDest;
  282. TPreferencesDialogData * FDialogData;
  283. AnsiString FBeforeDialogPath;
  284. void __fastcall SetPreferencesMode(TPreferencesMode value);
  285. void __fastcall CMDialogKey(TWMKeyDown & Message);
  286. void __fastcall WMHelp(TWMHelp & Message);
  287. public:
  288. virtual __fastcall ~TPreferencesDialog();
  289. bool __fastcall Execute(TPreferencesDialogData * DialogData);
  290. virtual __fastcall TPreferencesDialog(TComponent* AOwner);
  291. __property TPreferencesMode PreferencesMode = { read = FPreferencesMode, write = SetPreferencesMode };
  292. protected:
  293. void __fastcall LoadConfiguration();
  294. void __fastcall SaveConfiguration();
  295. void __fastcall UpdateControls();
  296. void __fastcall UpdateCustomCommandsView();
  297. void __fastcall UpdateCopyParamListView();
  298. void __fastcall UpdateEditorListView();
  299. void __fastcall CustomCommandMove(int Source, int Dest);
  300. void __fastcall CopyParamMove(int Source, int Dest);
  301. void __fastcall EditorMove(int Source, int Dest);
  302. bool __fastcall AllowListViewDrag(TObject * Sender, int X, int Y);
  303. void __fastcall PrepareNavigationTree(TTreeView * Tree);
  304. virtual void __fastcall Dispatch(void * Message);
  305. };
  306. //----------------------------------------------------------------------------
  307. #endif