/*
* Copyright (C) 2001-2006 Jacek Sieka, arnetheduck on gmail point com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "stdafx.h"
#include "../client/DCPlusPlus.h"
#include "Resource.h"
#include "AdvancedPage.h"
#include "CommandDlg.h"
#include "../client/SettingsManager.h"
#include "../client/FavoriteManager.h"
#include "WinUtil.h"
PropPage::Item AdvancedPage::items[] = { { 0, 0, PropPage::T_END } };
AdvancedPage::ListItem AdvancedPage::listItems[] = {
{ SettingsManager::GET_UPDATE_INFO, ResourceManager::SETMcDC_GET_DC_UPDATE },
{ SettingsManager::COMPRESS_TRANSFERS, ResourceManager::SETTINGS_COMPRESS_TRANSFERS },
{ SettingsManager::SMALL_SEND_BUFFER, ResourceManager::SETTINGS_SMALL_SEND_BUFFER },
{ SettingsManager::CLEAR_SEARCH, ResourceManager::SETTINGS_CLEAR_SEARCH },
{ SettingsManager::FILTER_SEARCH, ResourceManager::SETMcDC_FILTER_SEARCH },
{ SettingsManager::USE_EXTENSION_DOWNTO, ResourceManager::SETTINGS_USE_EXTENSION_DOWNTO },
{ SettingsManager::SETTINGS_USE_CTRL_FOR_LINE_HISTORY, ResourceManager::SETTINGS_USE_CTRL_FOR_LINE_HISTORY },
{ SettingsManager::AUTO_AWAY, ResourceManager::SETTINGS_AUTO_AWAY },
{ SettingsManager::AUTO_FOLLOW, ResourceManager::SETTINGS_AUTO_FOLLOW },
{ SettingsManager::ADLS_BREAK_ON_FIRST, ResourceManager::SETTINGS_ADLS_BREAK_ON_FIRST },
{ SettingsManager::LIST_DUPES, ResourceManager::SETTINGS_LIST_DUPES },
{ SettingsManager::URL_HANDLER, ResourceManager::SETTINGS_URL_HANDLER },
{ SettingsManager::MAGNET_REGISTER, ResourceManager::SETTINGS_URL_MAGNET },
{ SettingsManager::SEND_UNKNOWN_COMMANDS, ResourceManager::SETTINGS_SEND_UNKNOWN_COMMANDS },
{ SettingsManager::KEEP_LISTS, ResourceManager::SETTINGS_KEEP_LISTS },
{ SettingsManager::TTH_CHECK, ResourceManager::SETMcDC_TTH_CHECK },
{ SettingsManager::SFV_CHECK, ResourceManager::SETTINGS_SFV_CHECK },
{ SettingsManager::HUB_USER_COMMANDS, ResourceManager::SETTINGS_HUB_USER_COMMANDS },
{ SettingsManager::SEARCH_PASSIVE, ResourceManager::SETMcDC_PASSIVE_SEARCH },
{ SettingsManager::ADD_FINISHED_INSTANTLY, ResourceManager::SETTINGS_ADD_FINISHED_INSTANTLY },
{ SettingsManager::MAGNET_ASK, ResourceManager::SETTINGS_MAGNET_ASK },
{ SettingsManager::REMEMBER_SEARCH_SETTINGS, ResourceManager::REMEMBER_SEARCH_SETTINGS },
{ SettingsManager::SHOW_LASTLINEMSG, ResourceManager::SHOW_LASTLINEMSG },
{ 0, ResourceManager::SETTINGS_AUTO_AWAY }
};
LRESULT AdvancedPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
PropPage::read((HWND)*this, items, listItems, GetDlgItem(IDC_ADVANCED_BOOLEANS));
// Do specialized reading here
return TRUE;
}
void AdvancedPage::write() {
PropPage::write((HWND)*this, items, listItems, GetDlgItem(IDC_ADVANCED_BOOLEANS));
}
LRESULT AdvancedPage::onHelpInfo(LPNMHDR /*pnmh*/) {
HtmlHelp(m_hWnd, WinUtil::getHelpFile().c_str(), HH_HELP_CONTEXT, IDD_ADVANCEDPAGE);
return 0;
}
LRESULT AdvancedPage::onHelp(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
HtmlHelp(m_hWnd, WinUtil::getHelpFile().c_str(), HH_HELP_CONTEXT, IDD_ADVANCEDPAGE);
return 0;
}
/**
* @file
* $Id: AdvancedPage.cpp 109 2006-10-31 03:21:46Z crakter $
*/