00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "StdAfx.h"
00023 #include "Shareaza.h"
00024 #include "Settings.h"
00025 #include "PageSettingsCommunity.h"
00026 #include "DlgProfileManager.h"
00027
00028 #ifdef _DEBUG
00029 #define new DEBUG_NEW
00030 #undef THIS_FILE
00031 static char THIS_FILE[] = __FILE__;
00032 #endif
00033
00034 IMPLEMENT_DYNCREATE(CCommunitySettingsPage, CSettingsPage)
00035
00036 BEGIN_MESSAGE_MAP(CCommunitySettingsPage, CSettingsPage)
00037
00038 ON_BN_CLICKED(IDC_EDIT_PROFILE, OnEditProfile)
00039
00040 END_MESSAGE_MAP()
00041
00042
00044
00045
00046 CCommunitySettingsPage::CCommunitySettingsPage() : CSettingsPage(CCommunitySettingsPage::IDD)
00047 {
00048
00049 m_bChatEnable = FALSE;
00050 m_bChatAllNetworks = FALSE;
00051 m_bChatFilter = FALSE;
00052 m_bChatCensor = FALSE;
00053
00054 }
00055
00056 CCommunitySettingsPage::~CCommunitySettingsPage()
00057 {
00058 }
00059
00060 void CCommunitySettingsPage::DoDataExchange(CDataExchange* pDX)
00061 {
00062 CSettingsPage::DoDataExchange(pDX);
00063
00064 DDX_Check(pDX, IDC_CHAT_ENABLE, m_bChatEnable);
00065 DDX_Check(pDX, IDC_CHAT_ALLNETWORKS, m_bChatAllNetworks);
00066 DDX_Check(pDX, IDC_CHAT_FILTER, m_bChatFilter);
00067 DDX_Check(pDX, IDC_CHAT_CENSOR, m_bChatCensor);
00068
00069 }
00070
00072
00073
00074 BOOL CCommunitySettingsPage::OnInitDialog()
00075 {
00076 CSettingsPage::OnInitDialog();
00077
00078 m_bChatEnable = Settings.Community.ChatEnable;
00079 m_bChatAllNetworks = Settings.Community.ChatAllNetworks;
00080 m_bChatFilter = Settings.Community.ChatFilter;
00081 m_bChatCensor = Settings.Community.ChatCensor;
00082
00083 UpdateData( FALSE );
00084
00085 return TRUE;
00086 }
00087
00088 void CCommunitySettingsPage::OnEditProfile()
00089 {
00090 CProfileManagerDlg dlg;
00091 dlg.DoModal();
00092 }
00093
00094 void CCommunitySettingsPage::OnOK()
00095 {
00096 UpdateData();
00097
00098 Settings.Community.ChatEnable = m_bChatEnable;
00099 Settings.Community.ChatAllNetworks = m_bChatAllNetworks;
00100 Settings.Community.ChatFilter = m_bChatFilter;
00101 Settings.Community.ChatCensor = m_bChatCensor;
00102
00103 CSettingsPage::OnOK();
00104 }
00105