Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8784/src/gui

Modified Files:
        wxMFrame.cpp 
Log Message:
disable run python script menu item if Python wasn't initialized

Index: wxMFrame.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMFrame.cpp,v
retrieving revision 1.177
retrieving revision 1.178
diff -b -u -2 -r1.177 -r1.178
--- wxMFrame.cpp        16 Jan 2006 20:32:27 -0000      1.177
+++ wxMFrame.cpp        8 Apr 2006 00:35:31 -0000       1.178
@@ -308,12 +308,9 @@
    wxMenuItem *item = mbar->FindItem(WXMENU_FILE_RUN_PYSCRIPT);
 
-   if ( item )
-   {
-      item->Enable(READ_APPCONFIG_BOOL(MP_USEPYTHON));
-   }
-   else
-   {
-      FAIL_MSG( _T("where is \"Run Python script\" menu item?") );
-   }
+   CHECK_RET( item, _T("where is \"Run Python script\" menu item?") );
+
+   extern bool IsPythonInitialized();
+
+   item->Enable(IsPythonInitialized() && READ_APPCONFIG_BOOL(MP_USEPYTHON));
 }
 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to