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

Modified Files:
        ClickURL.cpp MImport.cpp wxComposeView.cpp wxDialogLayout.cpp 
        wxFolderView.cpp wxMApp.cpp wxMDialogs.cpp wxMsgCmdProc.cpp 
        wxSubfoldersDialog.cpp 
Log Message:
Prevented recursion in MEvent::DispatchPending due to idle loop and wxYield in busy 
cursor

Index: ClickURL.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/ClickURL.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -b -u -2 -r1.12 -r1.13
--- ClickURL.cpp        22 Jul 2003 22:01:40 -0000      1.12
+++ ClickURL.cpp        14 Sep 2003 16:10:47 -0000      1.13
@@ -281,5 +281,5 @@
    wxLogStatus(frame, _("Opening URL '%s'..."), m_url.c_str());
 
-   wxBusyCursor bc;
+   MBusyCursor bc;
 
    // the command to execute

Index: MImport.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/MImport.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -b -u -2 -r1.17 -r1.18
--- MImport.cpp 22 Jul 2003 22:01:40 -0000      1.17
+++ MImport.cpp 14 Sep 2003 16:10:47 -0000      1.18
@@ -264,5 +264,5 @@
          if ( m_check##what->GetValue() ) \
          { \
-            wxBusyCursor bc; \
+            MBusyCursor bc; \
             m_check##what->Disable(); \
             wxLogMessage(_("Importing %s %s"), progname, desc); \
@@ -325,5 +325,5 @@
          flags |= MImporter::ImportFolder_SystemUseParent;
 
-         wxBusyCursor bc;
+         MBusyCursor bc;
 
          wxLogMessage(_("Importing %s %s"), progname, _("folders"));

Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.340
retrieving revision 1.341
diff -b -u -2 -r1.340 -r1.341
--- wxComposeView.cpp   22 Aug 2003 13:03:50 -0000      1.340
+++ wxComposeView.cpp   14 Sep 2003 16:10:47 -0000      1.341
@@ -3860,5 +3860,5 @@
    m_sending = true;
 
-   wxBusyCursor bc;
+   MBusyCursor bc;
    wxLogStatus(this, m_mode == Mode_News ? _("Posting message")
                                          : _("Sending message..."));

Index: wxDialogLayout.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxDialogLayout.cpp,v
retrieving revision 1.98
retrieving revision 1.99
diff -b -u -2 -r1.98 -r1.99
--- wxDialogLayout.cpp  22 Aug 2003 22:15:29 -0000      1.98
+++ wxDialogLayout.cpp  14 Sep 2003 16:10:48 -0000      1.99
@@ -1467,5 +1467,5 @@
 
       // allow the event to be processed before we are gone
-      MEventManager::DispatchPending();
+      MEventManager::ForceDispatchPending();
    }
 

Index: wxFolderView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxFolderView.cpp,v
retrieving revision 1.641
retrieving revision 1.642
diff -b -u -2 -r1.641 -r1.642
--- wxFolderView.cpp    14 Sep 2003 14:10:12 -0000      1.641
+++ wxFolderView.cpp    14 Sep 2003 16:10:48 -0000      1.642
@@ -1709,8 +1709,8 @@
 
    // constructing the menu may take a long time
-   wxBeginBusyCursor();
+   MBeginBusyCursor();
    m_menu->Insert(0, WXMENU_POPUP_FOLDER_MENU, _("&Quick move"),
                   m_menuFolders->GetMenu());
-   wxEndBusyCursor();
+   MEndBusyCursor();
 
    m_isInPopupMenu = true;
@@ -3780,5 +3780,5 @@
    // For now, let it process the event if there is any and if not, update
    // manually
-   MEventManager::DispatchPending();
+   MEventManager::ForceDispatchPending();
 
    // the connection to the folder might have been lost in the meanwhile
@@ -3939,5 +3939,5 @@
    }
 
-   wxBeginBusyCursor();
+   MBeginBusyCursor();
 
    DoClear(false /* don't keep the viewer */);
@@ -3954,5 +3954,5 @@
    }
 
-   wxEndBusyCursor();
+   MEndBusyCursor();
 
    if ( !mf )

Index: wxMApp.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMApp.cpp,v
retrieving revision 1.271
retrieving revision 1.272
diff -b -u -2 -r1.271 -r1.272
--- wxMApp.cpp  4 Aug 2003 23:04:21 -0000       1.271
+++ wxMApp.cpp  14 Sep 2003 16:10:49 -0000      1.272
@@ -2541,2 +2541,17 @@
 }
 
+int g_busyCursorYield;
+
+extern void MBeginBusyCursor()
+{
+   ++g_busyCursorYield;
+   wxBeginBusyCursor();
+   --g_busyCursorYield;
+}
+
+extern void MEndBusyCursor()
+{
+   ++g_busyCursorYield;
+   wxEndBusyCursor();
+   --g_busyCursorYield;
+}

Index: wxMDialogs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMDialogs.cpp,v
retrieving revision 1.399
retrieving revision 1.400
diff -b -u -2 -r1.399 -r1.400
--- wxMDialogs.cpp      1 Sep 2003 00:31:02 -0000       1.399
+++ wxMDialogs.cpp      14 Sep 2003 16:10:49 -0000      1.400
@@ -337,5 +337,5 @@
          m_countBusy++;
 
-         wxEndBusyCursor();
+         MEndBusyCursor();
       }
    }
@@ -345,5 +345,5 @@
       while ( m_countBusy-- > 0 )
       {
-         wxBeginBusyCursor();
+         MBeginBusyCursor();
       }
    }

Index: wxMsgCmdProc.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMsgCmdProc.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -b -u -2 -r1.42 -r1.43
--- wxMsgCmdProc.cpp    7 Aug 2003 11:14:06 -0000       1.42
+++ wxMsgCmdProc.cpp    14 Sep 2003 16:10:49 -0000      1.43
@@ -25,6 +25,4 @@
 
 #ifndef USE_PCH
-   #include <wx/utils.h>      // for wxBeginBusyCursor()
-
    #include <wx/layout.h>
    #include <wx/statbox.h>
@@ -499,5 +497,5 @@
 
    wxLogStatus(GetFrame(), m_msgInitial);
-   wxBeginBusyCursor();
+   MBeginBusyCursor();
 }
 
@@ -557,5 +555,5 @@
    }
 
-   wxEndBusyCursor();
+   MEndBusyCursor();
 }
 
@@ -1697,15 +1695,4 @@
                      // delete right now
 
-                     {
-                        // Reentrancy hotfix. This function can be called
-                        // recursively from idle loop. IMO, locking should
-                        // go to MEventManager::DispatchPending to prevent
-                        // nesting of any event. However there are about ten
-                        // calls to DispatchPending, that won't like it right
-                        // now. These calls can and should be replaced with
-                        // cleaner alternatives. Then we can lock
-                        // DispatchPending itself and remove this line.
-                        MEventManagerSuspender eventSuspender;
-                        
                         // don't copy the messages to the trash, they
                         // had been already copied somewhere
@@ -1727,5 +1714,4 @@
                            wxLogError(_("Failed to delete messages after "
                                         "moving them."));
-                        }
                      }
 

Index: wxSubfoldersDialog.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxSubfoldersDialog.cpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -b -u -2 -r1.74 -r1.75
--- wxSubfoldersDialog.cpp      13 Aug 2003 23:10:38 -0000      1.74
+++ wxSubfoldersDialog.cpp      14 Sep 2003 16:10:50 -0000      1.75
@@ -452,5 +452,5 @@
       m_reference += reference;
 
-      wxBusyCursor bc;
+      MBusyCursor bc;
 
       // now OnNewFolder() and OnNoMoreFolders() will be called
@@ -470,5 +470,5 @@
       do
       {
-         MEventManager::DispatchPending();
+         MEventManager::ForceDispatchPending();
       }
       while ( m_idParent.IsOk() );
@@ -1097,5 +1097,5 @@
                                         MEventFolderTreeChangeData::CreateUnder)
          );
-      MEventManager::DispatchPending();
+      MEventManager::ForceDispatchPending();
    }
 
@@ -1136,5 +1136,5 @@
    do
    {
-      MEventManager::DispatchPending();
+      MEventManager::ForceDispatchPending();
    }
    while ( !m_finished );
@@ -1162,5 +1162,5 @@
                                         MEventFolderTreeChangeData::CreateUnder)
          );
-      MEventManager::DispatchPending();
+      MEventManager::ForceDispatchPending();
    }
 }



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to