SF.net SVN: mahogany:[7533] trunk/M/src/gui/wxComposeView.cpp

[email protected] Thu, 07 Aug 2008 20:25:51 +0000
Newsgroups gmane.mail.mahogany.cvs
Message-ID <[email protected]>
Revision: 7533
          http://mahogany.svn.sourceforge.net/mahogany/?rev=7533&view=rev
Author:   vadz
Date:     2008-08-07 20:25:50 +0000 (Thu, 07 Aug 2008)

Log Message:
-----------
don't start editing directly when pressing Enter in an empty main recipient control any more, with the new layout this should switch to the subject instead

Modified Paths:
--------------
    trunk/M/src/gui/wxComposeView.cpp

Modified: trunk/M/src/gui/wxComposeView.cpp
===================================================================
--- trunk/M/src/gui/wxComposeView.cpp	2008-08-07 20:15:25 UTC (rev 7532)
+++ trunk/M/src/gui/wxComposeView.cpp	2008-08-07 20:25:50 UTC (rev 7533)
@@ -502,6 +502,9 @@
 
    void OnEnter(wxCommandEvent& WXUNUSED(event))
    {
+      // starting to edit the message after the subject is entered is more
+      // useful than going (back, i.e. above, as we're near the beginning of
+      // the TAB chain) to the recipient controls
       m_composeView->SetFocusToComposer();
    }
 
@@ -1561,14 +1564,12 @@
 // wxMainAddressTextCtrl
 // ----------------------------------------------------------------------------
 
-void wxMainAddressTextCtrl::OnEnter(wxCommandEvent& /* event */)
+void wxMainAddressTextCtrl::OnEnter(wxCommandEvent& event)
 {
-   // if there is nothing in the address field, start editing instead, this is
-   // handy to be able to switch to the composer window rapidly - tabbing to it
-   // can take ages if there are a lot of recipient controls below us
    if ( GetValue().empty() )
    {
-      GetComposer()->SetFocusToComposer();
+      // let Enter act like TAB and so go to the subject field
+      event.Skip();
    }
    else // add the contents of the control as a new recipient
    {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/