Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv8340/src/gui

Modified Files:
        wxComposeView.cpp wxFolderView.cpp wxHeadersDialogs.cpp 
        wxMFolderDialogs.cpp wxMenuDefs.cpp wxOptionsDlg.cpp 
        wxWizards.cpp 
Log Message:
removed the novice/advanced user mode distinction

Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.310
retrieving revision 1.311
diff -b -u -2 -r1.310 -r1.311
--- wxComposeView.cpp   30 Oct 2002 18:43:34 -0000      1.310
+++ wxComposeView.cpp   6 Nov 2002 00:11:45 -0000       1.311
@@ -107,4 +107,5 @@
 extern const MOption MP_COMPOSE_BCC;
 extern const MOption MP_COMPOSE_CC;
+extern const MOption MP_COMPOSE_SHOW_FROM;
 extern const MOption MP_COMPOSE_TO;
 extern const MOption MP_CURRENT_IDENTITY;
@@ -124,5 +125,4 @@
 extern const MOption MP_SMTPHOST;
 extern const MOption MP_USEOUTGOINGFOLDER;
-extern const MOption MP_USERLEVEL;
 extern const MOption MP_USEVCARD;
 extern const MOption MP_USE_SENDMAIL;
@@ -1556,6 +1556,6 @@
    sizerHeaders->AddGrowableCol(1);
 
-   // add from line but only if user level is advanced
-   if ( READ_CONFIG(m_Profile, MP_USERLEVEL) >= M_USERLEVEL_ADVANCED )
+   // add "From" header if configured to show it
+   if ( READ_CONFIG(m_Profile, MP_COMPOSE_SHOW_FROM) )
    {
       sizerHeaders->Add(new wxStaticText(m_panel, -1, _("&From:")),

Index: wxFolderView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxFolderView.cpp,v
retrieving revision 1.610
retrieving revision 1.611
diff -b -u -2 -r1.610 -r1.611
--- wxFolderView.cpp    14 Sep 2002 22:07:46 -0000      1.610
+++ wxFolderView.cpp    6 Nov 2002 00:11:46 -0000       1.611
@@ -146,5 +146,4 @@
 extern const MOption MP_MSGVIEW_VIEWER;
 extern const MOption MP_PREVIEW_ON_SELECT;
-extern const MOption MP_USERLEVEL;
 extern const MOption MP_USE_TRASH_FOLDER;
 
@@ -1941,39 +1940,9 @@
    }
 
-   // we're going to change the sort order either for this profile in the
-   // advanced mode but the global sort order in the novice mode: otherwise,
-   // it would be surprizing for the novice user as he'd see one thing in the
-   // options dialog and another thing on the screen (the sorting page is not
-   // shown in the folder dialog in this mode)
-   Profile *profile;
-   bool usingGlobalProfile;
-   if ( READ_APPCONFIG(MP_USERLEVEL) == (long)M_USERLEVEL_NOVICE )
-   {
-      profile = mApplication->GetProfile();
-      profile->IncRef();
-
-      usingGlobalProfile = true;
-   }
-   else
-   {
-      profile = m_FolderView->GetFolderProfile();
-
-      usingGlobalProfile = false;
-   }
+   Profile_obj profile = m_FolderView->GetFolderProfile();
 
    // sort by this column: if we already do this, then toggle the sort
    // direction
    long sortOrder = READ_CONFIG(profile, MP_MSGS_SORTBY);
-   if ( usingGlobalProfile )
-   {
-      Profile *profileFolder = m_FolderView->GetProfile();
-      if ( profileFolder &&
-            READ_CONFIG(profileFolder, MP_MSGS_SORTBY) != sortOrder )
-      {
-         // as we're going to change the global one but this profiles settings
-         // will override it!
-         wxLogDebug(_T("Changing the sort order won't take effect."));
-      }
-   }
 
    // There are 2 possibilities when the column Y is clicked and we currently
@@ -2038,6 +2007,4 @@
 
    SetSortOrder(profile, sortOrder, col, GetSortCrit(sortOrder) != orderCol);
-
-   profile->DecRef();
 }
 

Index: wxHeadersDialogs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxHeadersDialogs.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -b -u -2 -r1.36 -r1.37
--- wxHeadersDialogs.cpp        8 Sep 2002 19:23:09 -0000       1.36
+++ wxHeadersDialogs.cpp        6 Nov 2002 00:11:46 -0000       1.37
@@ -83,5 +83,4 @@
 extern const MOption MP_MSGVIEW_HEADERS;
 extern const MOption MP_ORGANIZATION;
-extern const MOption MP_USERLEVEL;
 
 // ----------------------------------------------------------------------------
@@ -372,8 +371,5 @@
    wxStaticBox *box = CreateStdButtonsAndBox(labelBox);
 
-   // for advanced users only: a button to invoke the dialog for configuring
-   // other headers
-   if ( READ_APPCONFIG(MP_USERLEVEL) == (long)M_USERLEVEL_ADVANCED )
-   {
+   // and a button to invoke the dialog for configuring other headers
       wxButton *btnEditCustom = new wxButton(this, Button_EditCustom,
                                              _("&More..."));
@@ -386,5 +382,4 @@
       c->height.Absolute(hBtn);
       btnEditCustom->SetConstraints(c);
-   }
 
    // a static message telling where is what

Index: wxMFolderDialogs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMFolderDialogs.cpp,v
retrieving revision 1.171
retrieving revision 1.172
diff -b -u -2 -r1.171 -r1.172
--- wxMFolderDialogs.cpp        13 Oct 2002 12:24:53 -0000      1.171
+++ wxMFolderDialogs.cpp        6 Nov 2002 00:11:47 -0000       1.172
@@ -113,5 +113,4 @@
 extern const MOption MP_NNTPHOST;
 extern const MOption MP_POPHOST;
-extern const MOption MP_USERLEVEL;
 extern const MOption MP_USERNAME;
 
@@ -546,7 +545,5 @@
    static const char *s_aszImagesAdvanced[];
 
-   wxFolderCreateNotebook(bool isAdvancedUser,
-                          wxWindow *parent,
-                          wxFolderCreateDialog *dlg = NULL);
+   wxFolderCreateNotebook(wxWindow *parent, wxFolderCreateDialog *dlg = NULL);
 };
 
@@ -708,15 +705,6 @@
 void wxFolderBaseDialog::CreateNotebook(wxPanel *panel)
 {
-   // TODO let the user select himself which pages he wants to see... It's not
-   //      as simple as it seems because currently the image list must be known
-   //      statically, so it involves changing wxOptionsPage code (currently,
-   //      it adds itself with the icon corresponding to the position of the
-   //      page in the notebook instead of the fixed number)
-   bool isAdvancedUser =
-       READ_APPCONFIG(MP_USERLEVEL) == (long)M_USERLEVEL_ADVANCED;
-
    m_notebook = new wxFolderCreateNotebook
                     (
-                     isAdvancedUser,
                      panel,
                      wxDynamicCast(this, wxFolderCreateDialog)
@@ -2677,15 +2665,4 @@
 {
    "access",
-   "newmail",
-   "compose",
-   "msgview",
-   "folderview",
-   "foldertree",
-   NULL
-};
-
-const char *wxFolderCreateNotebook::s_aszImagesAdvanced[] =
-{
-   "access",
    "ident",
    "network",
@@ -2702,6 +2679,5 @@
 
 // create the control and add pages too
-wxFolderCreateNotebook::wxFolderCreateNotebook(bool isAdvancedUser,
-                                               wxWindow *parent,
+wxFolderCreateNotebook::wxFolderCreateNotebook(wxWindow *parent,
                                                wxFolderCreateDialog *dlg)
                       : wxNotebookWithImages
@@ -2709,37 +2685,23 @@
                          "FolderCreateNotebook",
                          parent,
-                         isAdvancedUser ? s_aszImagesAdvanced : s_aszImages
+                         s_aszImages
                         )
 {
-   // don't forget to update both the array above and the enum!
-   ASSERT( WXSIZEOF(s_aszImages) == FolderCreatePage_Max + 1 );
-
    // use the parent profile for the default values if we have any
    Profile_obj profile(dlg ? dlg->GetParentFolderName() : String(""));
    CHECK_RET( profile, _T("failed to create profile in wxFolderCreateNotebook") );
 
-   // create and add the pages: some are always present, others are only shown
-   // to "advanced" users (because they're not generally useful and may confuse
-   // the novices)
+   // create and add the pages
    (void)new wxFolderPropertiesPage(this, profile, dlg);
-   if ( isAdvancedUser )
-   {
       (void)new wxOptionsPageIdent(this, profile);
       (void)new wxOptionsPageNetwork(this, profile);
-   }
    (void)new wxOptionsPageNewMail(this, profile);
    (void)new wxOptionsPageCompose(this, profile);
-   if ( isAdvancedUser )
-   {
       (void)new wxOptionsPageFolders(this, profile);
-   }
    (void)new wxOptionsPageMessageView(this, profile);
    (void)new wxOptionsPageFolderView(this, profile);
    (void)new wxOptionsPageFolderTree(this, profile);
-   if ( isAdvancedUser )
-   {
       (void)new wxOptionsPageAdb(this, profile);
       (void)new wxOptionsPageHelpers(this, profile);
-   }
 }
 

Index: wxMenuDefs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMenuDefs.cpp,v
retrieving revision 1.197
retrieving revision 1.198
diff -b -u -2 -r1.197 -r1.198
--- wxMenuDefs.cpp      14 Sep 2002 22:39:57 -0000      1.197
+++ wxMenuDefs.cpp      6 Nov 2002 00:11:47 -0000       1.198
@@ -57,5 +57,4 @@
 extern const MOption MP_MSGVIEW_DEFAULT_ENCODING;
 extern const MOption MP_TBARIMAGES;
-extern const MOption MP_USERLEVEL;
 
 // ----------------------------------------------------------------------------
@@ -718,6 +717,5 @@
 
    // show the identity combo in the main frame
-   if ( frameId == WXFRAME_MAIN &&
-        READ_APPCONFIG(MP_USERLEVEL) >= M_USERLEVEL_ADVANCED )
+   if ( frameId == WXFRAME_MAIN )
    {
       wxControl *combo = CreateIdentCombo(toolbar);

Index: wxOptionsDlg.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxOptionsDlg.cpp,v
retrieving revision 1.345
retrieving revision 1.346
diff -b -u -2 -r1.345 -r1.346
--- wxOptionsDlg.cpp    30 Oct 2002 20:00:26 -0000      1.345
+++ wxOptionsDlg.cpp    6 Nov 2002 00:11:48 -0000       1.346
@@ -147,6 +147,4 @@
    ConfigField_UseVCard,
    ConfigField_VCardFile,
-   ConfigField_UserLevelHelp,
-   ConfigField_UserLevel,
    ConfigField_SetPassword,
    ConfigField_IdentLast = ConfigField_SetPassword,
@@ -281,4 +279,5 @@
    ConfigField_ComposeConfirm,
 
+   ConfigField_ComposeShowFrom,
    ConfigField_ComposeHeaders,
    ConfigField_ComposeTemplates,
@@ -858,9 +857,4 @@
    { gettext_noop("Attach a v&Card to outgoing messages"), Field_Bool,    -1,         
               },
    { gettext_noop("&vCard file"),                  Field_File, ConfigField_UseVCard,  
                      },
-   { gettext_noop("Some more rarely used and less obvious program\n"
-                  "features are only accessible in the so-called\n"
-                  "`advanced' user mode which may be set here."),
-                                                   Field_Message | Field_Global,   
-1,                        },
-   { gettext_noop("User &level:novice:advanced"),  Field_Combo | Field_Global,   -1,  
                      },
    { gettext_noop("Set &global password"),  Field_SubDlg | Field_Global, -1,},
 
@@ -1153,4 +1147,6 @@
                                                   -ConfigField_ComposePreview },
 
+   { gettext_noop("\nShow \"&From\" field:"),        Field_Bool |
+                                                   Field_Advanced,  -1},
    { gettext_noop("Configure &headers..."),        Field_SubDlg,  -1},
    { gettext_noop("Configure &templates..."),      Field_SubDlg,  -1},
@@ -1604,6 +1600,4 @@
    CONFIG_ENTRY(MP_VCARD),
    CONFIG_NONE(),
-   CONFIG_ENTRY(MP_USERLEVEL),
-   CONFIG_NONE(),
 
    // network
@@ -1736,6 +1730,7 @@
    CONFIG_ENTRY(MP_CONFIRM_SEND),
 
-   CONFIG_NONE(),
-   CONFIG_NONE(),
+   CONFIG_ENTRY(MP_COMPOSE_SHOW_FROM),
+   CONFIG_NONE(), // headers button
+   CONFIG_NONE(), // templates button
 
    // folders
@@ -2039,5 +2034,10 @@
 
    // some fields are only shown in 'advanced' mode, so check if we're in it
-   bool isAdvanced = READ_APPCONFIG(MP_USERLEVEL) >= M_USERLEVEL_ADVANCED;
+   //
+   // update: now we don't have 2 modes any more but I still keep
+   // Field_Advanced for now, maybe we're going to emphasize them somehow or
+   // warn the user that he needs to understand what he is doing when changing
+   // them or something like this in the future
+   bool isAdvanced = true;
 
    // some others are not shown when we're inside an identity or folder dialog

Index: wxWizards.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxWizards.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -b -u -2 -r1.37 -r1.38
--- wxWizards.cpp       8 Sep 2002 19:23:11 -0000       1.37
+++ wxWizards.cpp       6 Nov 2002 00:11:48 -0000       1.38
@@ -74,5 +74,4 @@
 extern const MOption MP_NNTPHOST;
 extern const MOption MP_POPHOST;
-extern const MOption MP_USERLEVEL;
 extern const MOption MP_USERNAME;
 
@@ -1388,12 +1387,4 @@
 RunCreateFolderWizard(bool *wantsDialog, MFolder *parent, wxWindow *parentWin)
 {
-   // Never show the wizard for advanced users:
-   if(READ_APPCONFIG(MP_USERLEVEL) >= M_USERLEVEL_ADVANCED)
-   {
-      if ( wantsDialog )
-         *wantsDialog = true;
-      return NULL;
-   }
-
    CreateFolderWizard *wizard = new CreateFolderWizard(parent, parentWin);
    MFolder *newfolder = NULL;



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to