Preferences.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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 <XPThemes.hpp>
  20. #include "CopyParams.h"
  21. #include "GeneralSettings.h"
  22. #include "LogSettings.h"
  23. #include "UpDownEdit.hpp"
  24. #include "IEComboBox.hpp"
  25. #include "HistoryComboBox.hpp"
  26. #include "PasswordEdit.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. TXPGroupBox *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. TXPGroupBox *PanelsRemoteDirectoryGroup;
  52. TCheckBox *ShowInaccesibleDirectoriesCheck;
  53. TXPGroupBox *PanelsCommonGroup;
  54. TCheckBox *ShowHiddenFilesCheck;
  55. TCheckBox *DefaultDirIsHomeCheck;
  56. TTabSheet *CommanderSheet;
  57. TLabel *Label3;
  58. TXPGroupBox *PanelsGroup;
  59. TCheckBox *PreserveLocalDirectoryCheck;
  60. TXPGroupBox *CommanderMiscGroup;
  61. TCheckBox *UseLocationProfilesCheck;
  62. TXPGroupBox *CompareCriterionsGroup;
  63. TCheckBox *CompareByTimeCheck;
  64. TCheckBox *CompareBySizeCheck;
  65. TTabSheet *ExplorerSheet;
  66. TLabel *Label4;
  67. TXPGroupBox *GroupBox2;
  68. TCheckBox *ShowFullAddressCheck;
  69. TTabSheet *TransferSheet;
  70. TCopyParamsFrame *CopyParamsFrame;
  71. TTabSheet *EditorSheet;
  72. TXPGroupBox *EditorPreferenceGroup;
  73. TXPGroupBox *InternalEditorGroup;
  74. TLabel *EditorFontLabel;
  75. TButton *EditorFontButton;
  76. TTabSheet *IntegrationSheet;
  77. TXPGroupBox *ShellIconsGroup;
  78. TButton *DesktopIconButton;
  79. TButton *QuickLaunchIconButton;
  80. TButton *SendToHookButton;
  81. TXPGroupBox *ExternalAppsGroup;
  82. TLabel *Label2;
  83. TFilenameEdit *PuttyPathEdit;
  84. TTabSheet *CustomCommandsSheet;
  85. TXPGroupBox *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. TXPGroupBox *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. TXPGroupBox *QueueGroup;
  108. TUpDownEdit *QueueTransferLimitEdit;
  109. TLabel *Label5;
  110. TXPGroupBox *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. TXPGroupBox *StorageGroup;
  121. TRadioButton *RegistryStorageButton;
  122. TRadioButton *IniFileStorageButton;
  123. TXPGroupBox *NotificationsGroup;
  124. TCheckBox *BeepOnFinishCheck;
  125. TUpDownEdit *BeepOnFinishAfterEdit;
  126. TLabel *BeepOnFinishAfterText;
  127. TTabSheet *TransferResumeSheet;
  128. TXPGroupBox *ResumeBox;
  129. TLabel *ResumeThresholdUnitLabel;
  130. TRadioButton *ResumeOnButton;
  131. TRadioButton *ResumeSmartButton;
  132. TRadioButton *ResumeOffButton;
  133. TUpDownEdit *ResumeThresholdEdit;
  134. TCheckBox *ConfirmCommandSessionCheck;
  135. TXPGroupBox *SingleEditorGroup;
  136. TRadioButton *EditorSingleEditorOnCheck;
  137. TRadioButton *EditorSingleEditorOffCheck;
  138. TXPGroupBox *TemporaryDirectoryGrouo;
  139. TRadioButton *DDSystemTemporaryDirectoryButton;
  140. TRadioButton *DDCustomTemporaryDirectoryButton;
  141. TDirectoryEdit *DDTemporaryDirectoryEdit;
  142. TLabel *Label6;
  143. TCheckBox *TemporaryDirectoryCleanupCheck;
  144. TCheckBox *ConfirmTemporaryDirectoryCleanupCheck;
  145. TCheckBox *PuttyPasswordCheck;
  146. TXPGroupBox *OtherStorageGroup;
  147. TLabel *RandomSeedFileLabel;
  148. TFilenameEdit *RandomSeedFileEdit;
  149. TCheckBox *SwappedPanelsCheck;
  150. TCheckBox *PreservePanelStateCheck;
  151. TButton *AddSearchPathButton;
  152. TCheckBox *QueueNoConfirmationCheck;
  153. TCheckBox *EditorWordWrapCheck;
  154. TXPGroupBox *PathInCaptionGroup;
  155. TRadioButton *PathInCaptionFullButton;
  156. TRadioButton *PathInCaptionShortButton;
  157. TRadioButton *PathInCaptionNoneButton;
  158. TTabSheet *UpdatesSheet;
  159. TXPGroupBox *UpdatesGroup;
  160. TRadioButton *UpdatesNeverButton;
  161. TRadioButton *UpdatesDailyButton;
  162. TRadioButton *UpdatesWeeklyButton;
  163. TRadioButton *UpdatesMonthlyButton;
  164. TXPGroupBox *UpdatesProxyGroup;
  165. TLabel *Label15;
  166. TLabel *Label18;
  167. TUpDownEdit *UpdatesProxyPortEdit;
  168. TEdit *UpdatesProxyHostEdit;
  169. TCheckBox *UpdatesProxyCheck;
  170. TTabSheet *CopyParamListSheet;
  171. TXPGroupBox *CopyParamListGroup;
  172. TListView *CopyParamListView;
  173. TButton *AddCopyParamButton;
  174. TButton *RemoveCopyParamButton;
  175. TButton *UpCopyParamButton;
  176. TButton *DownCopyParamButton;
  177. TButton *EditCopyParamButton;
  178. TButton *DuplicateCopyParamButton;
  179. TXPGroupBox *CopyParamListOptionsGroup;
  180. TCheckBox *CopyParamAutoSelectNoticeCheck;
  181. TButton *HelpButton;
  182. TXPGroupBox *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. TXPGroupBox *DoubleClickGroup;
  192. TCheckBox *CopyOnDoubleClickConfirmationCheck;
  193. TLabel *DoubleClickActionLabel;
  194. TComboBox *DoubleClickActionCombo;
  195. TLabel *Label8;
  196. TComboBox *NortonLikeModeCombo;
  197. TCheckBox *AutoOpenInPuttyCheck;
  198. TStaticText *ShellIconsText;
  199. void __fastcall FormShow(TObject *Sender);
  200. void __fastcall ControlChange(TObject *Sender);
  201. void __fastcall EditorFontButtonClick(TObject *Sender);
  202. void __fastcall FilenameEditExit(TObject *Sender);
  203. void __fastcall FilenameEditChange(TObject *Sender);
  204. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  205. void __fastcall IconButtonClick(TObject *Sender);
  206. void __fastcall CustomCommandsViewData(TObject *Sender, TListItem *Item);
  207. void __fastcall ListViewSelectItem(TObject *Sender,
  208. TListItem *Item, bool Selected);
  209. void __fastcall CustomCommandsViewKeyDown(TObject *Sender, WORD &Key,
  210. TShiftState Shift);
  211. void __fastcall AddEditCommandButtonClick(TObject *Sender);
  212. void __fastcall RemoveCommandButtonClick(TObject *Sender);
  213. void __fastcall UpDownCommandButtonClick(TObject *Sender);
  214. void __fastcall ListViewStartDrag(TObject *Sender,
  215. TDragObject *&DragObject);
  216. void __fastcall CustomCommandsViewDragDrop(TObject *Sender,
  217. TObject *Source, int X, int Y);
  218. void __fastcall ListViewDragOver(TObject *Sender,
  219. TObject *Source, int X, int Y, TDragState State, bool &Accept);
  220. void __fastcall NavigationTreeChange(TObject *Sender, TTreeNode *Node);
  221. void __fastcall PageControlChange(TObject *Sender);
  222. void __fastcall RegisterAsUrlHandlerButtonClick(TObject *Sender);
  223. void __fastcall DDExtLabelClick(TObject *Sender);
  224. void __fastcall CustomCommandsViewDblClick(TObject *Sender);
  225. void __fastcall AddSearchPathButtonClick(TObject *Sender);
  226. void __fastcall EditorFontLabelDblClick(TObject *Sender);
  227. void __fastcall CopyParamListViewData(TObject *Sender, TListItem *Item);
  228. void __fastcall CopyParamListViewInfoTip(TObject *Sender,
  229. TListItem *Item, AnsiString &InfoTip);
  230. void __fastcall CopyParamListViewDragDrop(TObject *Sender,
  231. TObject *Source, int X, int Y);
  232. void __fastcall UpDownCopyParamButtonClick(TObject *Sender);
  233. void __fastcall RemoveCopyParamButtonClick(TObject *Sender);
  234. void __fastcall CopyParamListViewKeyDown(TObject *Sender, WORD &Key,
  235. TShiftState Shift);
  236. void __fastcall AddEditCopyParamButtonClick(TObject *Sender);
  237. void __fastcall CopyParamListViewDblClick(TObject *Sender);
  238. void __fastcall HelpButtonClick(TObject *Sender);
  239. void __fastcall EditorListViewDragDrop(TObject *Sender, TObject *Source,
  240. int X, int Y);
  241. void __fastcall UpDownEditorButtonClick(TObject *Sender);
  242. void __fastcall RemoveEditorButtonClick(TObject *Sender);
  243. void __fastcall AddEditEditorButtonClick(TObject *Sender);
  244. void __fastcall EditorListViewDblClick(TObject *Sender);
  245. void __fastcall EditorListViewKeyDown(TObject *Sender, WORD &Key,
  246. TShiftState Shift);
  247. void __fastcall EditorListViewData(TObject *Sender, TListItem *Item);
  248. private:
  249. TPreferencesMode FPreferencesMode;
  250. TFont * FEditorFont;
  251. TCustomCommands * FCustomCommands;
  252. TCopyParamList * FCopyParamList;
  253. TEditorList * FEditorList;
  254. bool FCustomCommandChanging;
  255. bool FAfterFilenameEditDialog;
  256. int FListViewDragSource;
  257. int FListViewDragDest;
  258. TPreferencesDialogData * FDialogData;
  259. void __fastcall SetPreferencesMode(TPreferencesMode value);
  260. void __fastcall CMDialogKey(TWMKeyDown & Message);
  261. public:
  262. virtual __fastcall ~TPreferencesDialog();
  263. bool __fastcall Execute(TPreferencesDialogData * DialogData);
  264. virtual __fastcall TPreferencesDialog(TComponent* AOwner);
  265. __property TPreferencesMode PreferencesMode = { read = FPreferencesMode, write = SetPreferencesMode };
  266. protected:
  267. void __fastcall LoadConfiguration();
  268. void __fastcall LoggingGetDefaultLogFileName(System::TObject * Sender, AnsiString & DefaultLogFileName);
  269. void __fastcall SaveConfiguration();
  270. void __fastcall UpdateControls();
  271. void __fastcall UpdateCustomCommandsView();
  272. void __fastcall UpdateCopyParamListView();
  273. void __fastcall UpdateEditorListView();
  274. void __fastcall CustomCommandMove(int Source, int Dest);
  275. void __fastcall CopyParamMove(int Source, int Dest);
  276. void __fastcall EditorMove(int Source, int Dest);
  277. bool __fastcall AllowListViewDrag(TObject * Sender, int X, int Y);
  278. void __fastcall PrepareNavigationTree(TTreeView * Tree);
  279. virtual void __fastcall Dispatch(void * Message);
  280. };
  281. //----------------------------------------------------------------------------
  282. #endif