1   /************************************************************************
  2           Copy Handler 1.x - program for copying data in Microsoft Windows
  3                                                    systems.
  4           Copyright (C) 2001-2004 Ixen Gerthannes (copyhandler@o2.pl)
  5  
  6           This program is free software; you can redistribute it and/or modify
  7           it under the terms of the GNU General Public License as published by
  8           the Free Software Foundation; either version 2 of the License, or
  9           (at your option) any later version.
  10  
  11           This program is distributed in the hope that it will be useful,
  12           but WITHOUT ANY WARRANTY; without even the implied warranty of
  13           MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14           GNU General Public License for more details.
  15  
  16           You should have received a copy of the GNU General Public License
  17           along with this program; if not, write to the Free Software
  18           Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19   *************************************************************************/
  20   #include "stdafx.h"
  21   #include "CfgProperties.h"
  22  
  23   bool RegisterProperties(CConfigManager* pManager)
  24   {
  25           pManager->RegisterBoolProperty(_T("Program"),   _T("Enabled clipboard monitoring"), false);
  26           pManager->RegisterIntProperty(_T("Program"),    _T("Monitor scan interval"), 1000);
  27           pManager->RegisterBoolProperty(_T("Program"),   _T("Reload after restart"), false);
  28           pManager->RegisterBoolProperty(_T("Program"),   _T("Shutdown system after finished"), false);
  29           pManager->RegisterIntProperty(_T("Program"),    _T("Time before shutdown"), 10000);
  30           pManager->RegisterBoolProperty(_T("Program"),   _T("Force shutdown"), false);
  31           pManager->RegisterIntProperty(_T("Program"),    _T("Autosave interval"), 30000);
  32           pManager->RegisterIntProperty(_T("Program"),    _T("Process priority class"), NORMAL_PRIORITY_CLASS);
  33           pManager->RegisterStringProperty(_T("Program"), _T("Autosave directory"), _T("<TEMP>\\"), RF_PATH);
  34           pManager->RegisterStringProperty(_T("Program"), _T("Plugins directory"), _T("<PROGRAM>\\Plugins\\"), RF_PATH);
  35           pManager->RegisterStringProperty(_T("Program"), _T("Help directory"), _T("<PROGRAM>\\Help\\"), RF_PATH);
  36           pManager->RegisterStringProperty(_T("Program"), _T("Language"), _T("<PROGRAM>\\Langs\\English.lng"));
  37           pManager->RegisterStringProperty(_T("Program"), _T("Languages directory"), _T("<PROGRAM>\\Langs\\"), RF_PATH);
  38  
  39           pManager->RegisterIntProperty(_T("Status dialog"), _T("Status refresh interval"), 1000);
  40           pManager->RegisterBoolProperty(_T("Status dialog"), _T("Show details"), true);
  41           pManager->RegisterBoolProperty(_T("Status dialog"), _T("Auto remove finished"), false);
  42  
  43           pManager->RegisterIntProperty(_T("Folder dialog"), _T("Dialog width"), -1);
  44           pManager->RegisterIntProperty(_T("Folder dialog"), _T("Dialog height"), -1);
  45           pManager->RegisterIntProperty(_T("Folder dialog"), _T("Shortcut list style"), 1);
  46           pManager->RegisterBoolProperty(_T("Folder dialog"), _T("Extended view"), true);
  47           pManager->RegisterBoolProperty(_T("Folder dialog"), _T("Ignore shell dialogs"), false);
  48  
  49           pManager->RegisterBoolProperty(_T("Mini view"), _T("Show filenames"), true);
  50           pManager->RegisterBoolProperty(_T("Mini view"), _T("Show single tasks"), true);
  51           pManager->RegisterIntProperty(_T("Mini view"), _T("Miniview refresh interval"), 200);
  52           pManager->RegisterBoolProperty(_T("Mini view"), _T("Autoshow when run"), true);
  53           pManager->RegisterBoolProperty(_T("Mini view"), _T("Autohide when empty"), true);
  54           pManager->RegisterBoolProperty(_T("Mini view"), _T("Use smooth progress"), true);
  55  
  56           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Use auto-complete files"), true);
  57           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Always set destination attributes"), true);
  58           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Always set destination time"), true);
  59           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Protect read-only files"), false);
  60           pManager->RegisterIntProperty(_T("Copying/moving"), _T("Limit max operations"), 1);
  61           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Read tasks size before blocking"), true);
  62           pManager->RegisterIntProperty(_T("Copying/moving"), _T("Show visual feedback"), 2);
  63           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Use timed feedback dialogs"), false);
  64           pManager->RegisterIntProperty(_T("Copying/moving"), _T("Feedback time"), 60000);
  65           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Auto retry on error"), true);
  66           pManager->RegisterIntProperty(_T("Copying/moving"), _T("Auto retry interval"), 10000);
  67           pManager->RegisterIntProperty(_T("Copying/moving"), _T("Default priority"), THREAD_PRIORITY_NORMAL);
  68           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Disable priority boost"), false);
  69           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Delete files after finished"), true);
  70           pManager->RegisterBoolProperty(_T("Copying/moving"), _T("Create log file"), true);
  71  
  72           pManager->RegisterBoolProperty(_T("Shell"), _T("Show 'Copy' command"), true);
  73           pManager->RegisterBoolProperty(_T("Shell"), _T("Show 'Move' command"), true);
  74           pManager->RegisterBoolProperty(_T("Shell"), _T("Show 'Copy/move special' command"), true);
  75           pManager->RegisterBoolProperty(_T("Shell"), _T("Show 'Paste' command"), true);
  76           pManager->RegisterBoolProperty(_T("Shell"), _T("Show 'Paste special' command"), true);
  77           pManager->RegisterBoolProperty(_T("Shell"), _T("Show 'Copy to' command"), true);
  78           pManager->RegisterBoolProperty(_T("Shell"), _T("Show 'Move to' command"), true);
  79           pManager->RegisterBoolProperty(_T("Shell"), _T("Show 'Copy to/Move to special' command"), true);
  80           pManager->RegisterBoolProperty(_T("Shell"), _T("Show free space along with shortcut"), true);
  81           pManager->RegisterBoolProperty(_T("Shell"), _T("Show shell icons in shortcuts menu"), false);
  82           pManager->RegisterBoolProperty(_T("Shell"), _T("Use drag&drop default menu item override"), true);
  83           pManager->RegisterIntProperty(_T("Shell"), _T("Default action when dragging"), 3);
  84  
  85           pManager->RegisterBoolProperty(_T("Buffer"), _T("Use only default buffer"), false);
  86           pManager->RegisterIntProperty(_T("Buffer"), _T("Default buffer size"), 2097152);
  87           pManager->RegisterIntProperty(_T("Buffer"), _T("One physical disk buffer size"), 4194304);
  88           pManager->RegisterIntProperty(_T("Buffer"), _T("Two different hard disks buffer size"), 524288);
  89           pManager->RegisterIntProperty(_T("Buffer"), _T("CD buffer size"), 262144);
  90           pManager->RegisterIntProperty(_T("Buffer"), _T("LAN buffer size"), 131072);
  91           pManager->RegisterBoolProperty(_T("Buffer"), _T("Use no buffering for large files"), true);
  92           pManager->RegisterIntProperty(_T("Buffer"), _T("Large files lower boundary limit"), 2097152);
  93  
  94           pManager->RegisterStringProperty(_T("Log file"), _T("Path to main log file"), _T("<PROGRAM>\\ch.log"));
  95           pManager->RegisterBoolProperty(_T("Log file"), _T("Enable logging"), true);
  96           pManager->RegisterBoolProperty(_T("Log file"), _T("Enable log size limitation"), true);
  97           pManager->RegisterIntProperty(_T("Log file"), _T("Max log size limit"), 65535);
  98           pManager->RegisterBoolProperty(_T("Log file"), _T("Precise log size limiting"), false);
  99           pManager->RegisterIntProperty(_T("Log file"), _T("Truncation buffer size"), 65535, PDL_PARANOID);
  100  
  101           pManager->RegisterBoolProperty(_T("Sounds"), _T("Play sounds"), true);
  102           pManager->RegisterStringProperty(_T("Sounds"), _T("Error sound path"), _T("<WINDOWS>\\media\\chord.wav"));
  103           pManager->RegisterStringProperty(_T("Sounds"), _T("Finished sound path"), _T("<WINDOWS>\\media\\ding.wav"));
  104  
  105           pManager->RegisterStringArrayProperty(_T("Shortcuts"));
  106           pManager->RegisterStringArrayProperty(_T("Recent paths"));
  107  
  108           return true;
  109   }