home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / central / prefw.cp < prev    next >
Encoding:
Text File  |  1998-04-08  |  2.9 KB  |  94 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. // prefw.cp
  20. // Preferences dialog box
  21. // Contains all the views/commands for the preferences dialog box
  22. // Created by atotic, July 30th, 1994
  23.  
  24. #include "prefw.h"
  25.  
  26. #include "InternetConfig.h"
  27. #include "CPrefsDialog.h"
  28.  
  29. //-----------------------------------
  30. void FE_EditPreference( PREF_Enum which )
  31. //-----------------------------------
  32. {
  33.     if (CInternetConfigInterface::CurrentlyUsingIC())
  34.     {
  35.         switch ( which )
  36.         {
  37.             case PREF_EmailAddress:
  38.                 CInternetConfigInterface::LaunchInternetConfigApplication(kICEmail);
  39.                 break;
  40.     #ifdef MOZ_MAIL_NEWS
  41.             case PREF_Pop3ID:
  42.                 CInternetConfigInterface::LaunchInternetConfigApplication(kICMailAccount);
  43.                 break;
  44.             case PREF_SMTPHost:
  45.                 CInternetConfigInterface::LaunchInternetConfigApplication(kICSMTPHost);
  46.                 break;
  47.             case PREF_PopHost:
  48.                 CInternetConfigInterface::LaunchInternetConfigApplication(kICMailAccount);
  49.                 break;
  50.             case PREF_NewsHost:
  51.                 CInternetConfigInterface::LaunchInternetConfigApplication(kICNNTPHost);
  52.                 break;
  53.     #endif // MOZ_MAIL_NEWS
  54.             default:
  55.                 XP_ASSERT(FALSE);
  56.         }
  57.     }
  58.     else
  59.     {
  60.         switch ( which )
  61.         {
  62.             case PREF_EmailAddress:
  63.                 CPrefsDialog::EditPrefs(    CPrefsDialog::eExpandMailNews,
  64.                                                 PrefPaneID::eMailNews_Identity,
  65.                                                 CPrefsDialog::eEmailAddress);
  66.                 break;
  67.     #ifdef MOZ_MAIL_NEWS
  68.             case PREF_Pop3ID:
  69.                 CPrefsDialog::EditPrefs(    CPrefsDialog::eExpandMailNews,
  70.                                                 PrefPaneID::eMailNews_MailServer,
  71.                                                 CPrefsDialog::ePOPUserID);
  72.                 break;
  73.             case PREF_SMTPHost:
  74.                 CPrefsDialog::EditPrefs(    CPrefsDialog::eExpandMailNews,
  75.                                                 PrefPaneID::eMailNews_MailServer,
  76.                                                 CPrefsDialog::eSMTPHost);
  77.                 break;
  78.             case PREF_PopHost:
  79.                 CPrefsDialog::EditPrefs(    CPrefsDialog::eExpandMailNews,
  80.                                                 PrefPaneID::eMailNews_MailServer,
  81.                                                 CPrefsDialog::ePOPHost);
  82.                 break;
  83.             case PREF_NewsHost:
  84.                 CPrefsDialog::EditPrefs(    CPrefsDialog::eExpandMailNews,
  85.                                                 PrefPaneID::eMailNews_NewsServer,
  86.                                                 CPrefsDialog::eNewsHost);
  87.                 break;
  88.     #endif // MOZ_MAIL_NEWS
  89.             default:
  90.                 XP_ASSERT(FALSE);
  91.         }
  92.     }
  93. }
  94.