OSDN Git Service

The source codes are cleaned up
authortoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Sat, 15 Mar 2014 10:31:07 +0000 (10:31 +0000)
committertoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Sat, 15 Mar 2014 10:31:07 +0000 (10:31 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@471 a2be9bc6-48de-4e38-9406-05402d4bc13c

wxSources/MyApp.cpp
wxSources/MyApp.h
wxSources/MyDocument.cpp
xcode-build/Molby.xcodeproj/project.pbxproj

index 3ea3826..51cfce0 100755 (executable)
@@ -85,8 +85,6 @@ IMPLEMENT_APP(MyApp)
 //IMPLEMENT_CLASS(MyApp, wxApp)
 
 BEGIN_EVENT_TABLE(MyApp, wxApp)
-       //EVT_KEY_DOWN(MyApp::OnChar)
-       //EVT_MOUSE_EVENTS(MyApp::OnMouseEvent)
        EVT_COMMAND(MyDocumentEvent_scriptMenuModified, MyDocumentEvent, MyApp::OnScriptMenuModified)
        EVT_COMMAND(MyDocumentEvent_openFilesByIPC, MyDocumentEvent, MyApp::OnOpenFilesByIPC)
        EVT_UPDATE_UI_RANGE(myMenuID_MyFirstMenuItem, myMenuID_MyLastMenuItem, MyApp::OnUpdateUI)
@@ -95,7 +93,6 @@ BEGIN_EVENT_TABLE(MyApp, wxApp)
        EVT_MENU(myMenuID_EmptyConsoleWindow, MyApp::OnEmptyConsoleWindow)
        EVT_MENU(myMenuID_ViewGlobalParameters, MyApp::OnViewGlobalParameters)
        EVT_MENU(myMenuID_ViewParameterFilesList, MyApp::OnViewParameterFilesList)
-//     EVT_MENU(myMenuID_ImportAmberLib, MyApp::OnImportAmberLib)
 #if defined(__WXMAC__)
        EVT_ACTIVATE(MyApp::OnActivate)
 #endif
@@ -432,7 +429,6 @@ MyApp::CreateMenuBar(int kind, wxMenu **out_file_history_menu, wxMenu **out_edit
        show_menu->Append(myMenuID_CenterSelection, _T("Center Selection"));
        show_menu->AppendSeparator();
        show_menu->Append(myMenuID_ShowUnitCell, _T("Show Unit Cell"), _T(""), wxITEM_CHECK);
-/*     show_menu->Append(myMenuID_ShowPeriodicBox, _T("Show Periodic Box"), _T(""), wxITEM_CHECK); */
        show_menu->Append(myMenuID_ShowHydrogens, _T("Show Hydrogen Atoms"), _T(""), wxITEM_CHECK);
        show_menu->Append(myMenuID_ShowDummyAtoms, _T("Show Dummy Atoms"), _T(""), wxITEM_CHECK);
        show_menu->Append(myMenuID_ShowExpandedAtoms, _T("Show Expanded Atoms"), _T(""), wxITEM_CHECK);
@@ -453,31 +449,8 @@ MyApp::CreateMenuBar(int kind, wxMenu **out_file_history_menu, wxMenu **out_edit
        md_menu->Append(myMenuID_Minimize, _T("Minimize..."));
        md_menu->Append(myMenuID_StopMDRun, _T("Stop\tCtrl-."));
        md_menu->AppendSeparator();
-//     md_menu->Append(myMenuID_ReadParameters, _T("Read Parameters..."));
-//     md_menu->Append(myMenuID_RunAntechamber, _T("Auto Guess MM/MD Parameters..."));
-//     md_menu->Append(myMenuID_GuessUFFParameters, _T("Guess UFF Parameters..."));
        md_menu->Append(myMenuID_ViewGlobalParameters, _T("View Global Parameters..."));
        md_menu->Append(myMenuID_ViewParameterFilesList, _T("Load/Unload Global Parameters..."));
-//     md_menu->AppendSeparator();
-//     md_menu->Append(myMenuID_DefinePeriodicBox, _T("Define Unit Cell..."));
-//     md_menu->Append(myMenuID_ShowPeriodicImage, _T("Show Periodic Image..."));
-/*     md_menu->Append(myMenuID_PressureControl, _T("Pressure Control...")); */
-/*     md_menu->Append(myMenuID_DefineSymmetry, _T("Define Symmetry Operations..."));
-       md_menu->Append(myMenuID_ExpandBySymmetry, _T("Expand by Symmetry...")); */
-//     md_menu->AppendSeparator();
-       
-//     wxMenu *md_tools_menu = new wxMenu;
-/*     md_tools_menu->Append(myMenuID_RunAntechamber, _T("Antechamber/parmchk...")); */
-//     md_tools_menu->Append(myMenuID_RunResp, _T("GAMESS/RESP..."));
-//     md_tools_menu->Append(myMenuID_CreateSanderInput, _T("Create SANDER input..."));
-//     md_tools_menu->Append(myMenuID_ImportAmberLib, _T("Import AMBER Lib..."));
-//     md_tools_menu->Append(myMenuID_ImportAmberFrcmod, _T("Import AMBER Frcmod..."));
-//     md_menu->Append(myMenuID_MDTools, _T("Tools"), md_tools_menu);
-
-//     wxMenu *qc_menu = new wxMenu;
-//     qc_menu->Append(myMenuID_CreateGamessInput, _T("Create GAMESS input..."));
-//     qc_menu->Append(myMenuID_CreateMOPACInput, _T("Create MOPAC input..."));
-//     qc_menu->Append(myMenuID_CreateMOCube, _T("Create MO cube..."));
        
        wxMenu *script_menu = new wxMenu;
        script_menu->Append(myMenuID_ExecuteScript, _T("Execute Script..."));
@@ -495,7 +468,6 @@ MyApp::CreateMenuBar(int kind, wxMenu **out_file_history_menu, wxMenu **out_edit
        menu_bar->Append(edit_menu, _T("&Edit"));
        menu_bar->Append(show_menu, _T("Show"));
        menu_bar->Append(md_menu, _T("MM/MD"));
-//     menu_bar->Append(qc_menu, _T("QChem"));
        menu_bar->Append(script_menu, _T("&Script"));
        menu_bar->Append(help_menu, _T("&Help"));
        
@@ -710,29 +682,6 @@ MyApp::IsInterrupted()
        }
 }
 
-/*
-#warning "TODO: Move this to MyDocument and 'import parameters' "
-
- void
-MyApp::OnReadParameters(wxCommandEvent& event)
-{
-       wxFileDialog *dialog = new wxFileDialog(NULL, _T("Choose Parameter File"), _T(""), _T(""), _T("All files (*.*)|*.*"), wxFD_OPEN | wxFD_CHANGE_DIR | wxFD_FILE_MUST_EXIST);
-       if (dialog->ShowModal() == wxID_OK) {
-               char *p = strdup((const char *)(dialog->GetPath().mb_str(wxConvFile)));
-               char *wbuf;
-               ParameterReadFromFile(NULL, p, &wbuf, NULL);
-               if (wbuf != NULL) {
-                       SetConsoleColor(1);
-                       AppendConsoleMessage(wbuf);
-                       SetConsoleColor(0);
-                       free(wbuf);
-               }
-               free(p);
-       }
-       dialog->Destroy();
-}
-*/
-
 void
 MyApp::OnOpenConsoleWindow(wxCommandEvent& event)
 {
@@ -768,14 +717,6 @@ MyApp::OnViewParameterFilesList(wxCommandEvent &event)
        parameterFilesFrame->Raise();
 }
 
-/*
-void
-MyApp::OnImportAmberLib(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(NULL, SCRIPT_ACTION(""), "cmd_import_amberlib");
-}
-*/
-
 int
 MyApp::LookupScriptMenu(const char *title)
 {
@@ -917,7 +858,6 @@ void
 MyApp::OnScriptMenuModified(wxCommandEvent& event)
 {
        scriptMenuModifiedEventPosted = false;
-//     UpdateScriptMenu(GetMainFrame()->GetMenuBar());
        UpdateScriptMenu(consoleFrame->GetMenuBar());
        event.Skip();
 }
@@ -925,27 +865,16 @@ MyApp::OnScriptMenuModified(wxCommandEvent& event)
 void
 MyApp::OnScriptMenuSelected(wxCommandEvent& event)
 {
-//     char *cmd;
-//     int methodType;
        MainView *mview;
        Molecule *mol;
        int index = event.GetId() - myMenuID_CustomScript;
        if (index < 0 || index >= countScriptMenu)
                return;
-//     cmd = scriptMenuCommands[index];
-//     methodType = Ruby_methodType("Molecule", cmd);
-//     if (methodType == 0)
-//             return;
        mview = MainViewCallback_activeView();
        if (mview == NULL)
                mol = NULL;
        else mol = mview->mol;
        MolActionCreateAndPerform(NULL, SCRIPT_ACTION("iM"), "lambda { |n, m| $script_menu_commands[n].call(m) }", index, mol);
-//     if (methodType == 1 && mol != NULL)  /*  Instance method (with no arguments)  */
-//             MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), cmd);
-//     else if (methodType == 2)  /*  Class method (with molecule as an only argument)  */
-//             MolActionCreateAndPerform(NULL, SCRIPT_ACTION("M"), cmd, mol);
-//     else return;
 }
 
 void
@@ -1070,22 +999,6 @@ MyApp::OnUpdateUI(wxUpdateUIEvent& event)
                else mol = mview->mol;
                MolActionCreateAndPerform(NULL, SCRIPT_ACTION("iM;r"), "lambda { |n, m| $script_menu_enablers[n].call(m) }", index, mol, &retval);
                event.Enable(retval != NULL && retval != RubyNil);
-       //      char *cmd;
-       //      int methodType;
-       //      Molecule *mol;
-       //      int index = uid - myMenuID_CustomScript;
-       //      cmd = scriptMenuCommands[index];
-       //      methodType = Ruby_methodType("Molecule", cmd);
-       //      event.Enable(false);
-       //      if (methodType != 0) {
-       //              if (mview == NULL)
-       //                      mol = NULL;
-       //              else mol = mview->mol;
-       //              if (methodType == 1 && mol != NULL)  /*  Instance method (with no arguments)  */
-       //                      event.Enable(true);
-       //              else if (methodType == 2)  /*  Class method (with molecule as an only argument)  */
-       //                      event.Enable(true);
-       //      }
        } else if (uid >= myMenuID_PredefinedFragment && uid <= myMenuID_PredefinedFragment + m_CountNamedFragments) {
                event.Enable(true);
        } else {
@@ -1095,8 +1008,6 @@ MyApp::OnUpdateUI(wxUpdateUIEvent& event)
                        case myMenuID_EmptyConsoleWindow:
                        case myMenuID_ViewParameterFilesList:
                        case myMenuID_ViewGlobalParameters:
-                       case myMenuID_MDTools:
-                       case myMenuID_ImportAmberLib:
                                event.Enable(true);
                                return;
                        default:
@@ -1333,14 +1244,11 @@ MyApp::CallSubProcess(const char *cmdline, const char *procname, int (*callback)
        wxProcess *proc = new wxProcess(this, -1);
        proc->Redirect();
        int flag = wxEXEC_ASYNC;
-//#if !__WXMSW__
        flag |= wxEXEC_MAKE_GROUP_LEADER;
-//#endif
        m_processTerminated = false;
        m_processExitCode = 0;
        long pid = ::wxExecute(cmdstr, flag, proc);
        if (pid == 0) {
-       //      MyAppCallback_errorMessageBox("Cannot start %s", procname);
                proc->Detach();
                if (procname != NULL)
                        HideProgressPanel();
@@ -1415,7 +1323,6 @@ MyApp::CallSubProcess(const char *cmdline, const char *procname, int (*callback)
                if (m_processTerminated || !wxProcess::Exists(pid)) {
                        if (m_processExitCode != 0) {
                                /*  Error from subprocess  */
-                       //      MyAppCallback_errorMessageBox("%s failed with exit code %d.", procname, m_processExitCode);
                                status = (m_processExitCode & 255);
                        } else status = 0;
                        break;
@@ -1527,9 +1434,6 @@ MyApp::CallSubProcess(const char *cmdline, const char *procname, int (*callback)
                *((char **)callback_data) = membuf;
        }
        
-/*     if (len_total > 0)
-               MyAppCallback_showRubyPrompt(); */
-
        return status;
 }
 
@@ -1619,7 +1523,6 @@ MyApp::CheckIfAllWindowsAreGoneHandler(wxCommandEvent &event)
 void
 MyApp::CheckIfAllWindowsAreGone(wxTopLevelWindow *frame)
 {
-#if 1 || defined(__WXMSW__)
        /*  On Windows, we should avoid the situation where all windows are hidden and
            still the program is running. So that we check whether all windows are gone
            and if so ask the user to quit the program. If user chooses not to quit, then
@@ -1627,7 +1530,6 @@ MyApp::CheckIfAllWindowsAreGone(wxTopLevelWindow *frame)
        m_frameToBeDestroyed = frame;
        wxCommandEvent myEvent(MyDocumentEvent, myMenuID_Internal_CheckIfAllWindowsAreGone);
        this->AddPendingEvent(myEvent);
-#endif
 }
 
 #pragma mark ====== MyFrame (top-level window) ======
index a1ae152..da97188 100755 (executable)
@@ -96,23 +96,8 @@ enum {
        myMenuID_MolecularDynamics = 200,
        myMenuID_Minimize = 201,
        myMenuID_StopMDRun = 202,
-       myMenuID_RunAntechamber = 203,
-       myMenuID_GuessUFFParameters = 204,
        myMenuID_ViewGlobalParameters = 205,
        myMenuID_ViewParameterFilesList = 206,
-       myMenuID_DefinePeriodicBox = 207,
-       myMenuID_ShowPeriodicImage = 208,
-       myMenuID_PressureControl = 209,
-       myMenuID_DefineSymmetry = 210,
-       myMenuID_ExpandBySymmetry = 211,
-       myMenuID_MDTools = 212,
-       myMenuID_RunResp = 213,
-       myMenuID_CreateSanderInput = 214,
-       myMenuID_ImportAmberLib = 215,
-       myMenuID_ImportAmberFrcmod = 216,
-       myMenuID_CreateGamessInput = 250,
-       myMenuID_CreateMOPACInput = 251,
-       myMenuID_CreateMOCube = 252,
        myMenuID_ExecuteScript = 300,
        myMenuID_OpenConsoleWindow = 301,
        myMenuID_EmptyConsoleWindow = 302,
@@ -128,8 +113,7 @@ enum {
        myMenuIndex_Edit = 1,
        myMenuIndex_Show = 2,
        myMenuIndex_MMMD = 3,
-       myMenuIndex_QChem = 4,
-       myMenuIndex_Script = 5
+       myMenuIndex_Script = 4
 };
 
 //  Global Setting Keys
@@ -158,8 +142,6 @@ class MyApp: public wxApp
 
        wxMenuBar *CreateMenuBar(int kind, wxMenu **out_file_history_menu = NULL, wxMenu **out_edit_menu = NULL);
 
-//     void OnReadParameters(wxCommandEvent& event);
-
        static wxString FindResourcePath();
        static wxString DefaultSettingsPath();
 
@@ -183,8 +165,6 @@ class MyApp: public wxApp
        void OnViewGlobalParameters(wxCommandEvent &event);
        void OnViewParameterFilesList(wxCommandEvent &event);
 
-//     void OnImportAmberLib(wxCommandEvent &event);
-
        void OnEndProcess(wxProcessEvent &event);
        int CallSubProcess(const char *cmdline, const char *procname, int (*callback)(void *) = NULL, void *callback_data = NULL, FILE *fpout = NULL, FILE *fperr = NULL);
 
index 9d9b568..9833979 100755 (executable)
@@ -96,19 +96,6 @@ BEGIN_EVENT_TABLE(MyDocument, wxDocument)
        EVT_MENU(myMenuID_MolecularDynamics, MyDocument::OnMolecularDynamics)
        EVT_MENU(myMenuID_Minimize, MyDocument::OnMinimize)
        EVT_MENU(myMenuID_StopMDRun, MyDocument::OnStopMDRun)
-//     EVT_MENU(myMenuID_DefinePeriodicBox, MyDocument::OnDefinePeriodicBox)
-//     EVT_MENU(myMenuID_ShowPeriodicImage, MyDocument::OnShowPeriodicImage)
-//     EVT_MENU(myMenuID_PressureControl, MyDocument::OnPressureControl)
-//     EVT_MENU(myMenuID_DefineSymmetry, MyDocument::OnDefineSymmetry)
-//     EVT_MENU(myMenuID_ExpandBySymmetry, MyDocument::OnExpandBySymmetry)
-//     EVT_MENU(myMenuID_RunAntechamber, MyDocument::OnInvokeAntechamber)
-//    EVT_MENU(myMenuID_GuessUFFParameters, MyDocument::OnGuessUFFParameters)
-//     EVT_MENU(myMenuID_RunResp, MyDocument::OnInvokeResp)
-//     EVT_MENU(myMenuID_CreateSanderInput, MyDocument::OnCreateSanderInput)
-//     EVT_MENU(myMenuID_ImportAmberFrcmod, MyDocument::OnImportAmberFrcmod)
-//     EVT_MENU(myMenuID_CreateGamessInput, MyDocument::OnCreateGamessInput)
-//     EVT_MENU(myMenuID_CreateMOPACInput, MyDocument::OnCreateMOPACInput)
-//     EVT_MENU(myMenuID_CreateMOCube, MyDocument::OnCreateMOCube)
        EVT_MENU(myMenuID_ShowAllAtoms, MyDocument::OnShowAllAtoms)
        EVT_MENU(myMenuID_HideReverse, MyDocument::OnHideReverse)
        EVT_MENU(myMenuID_HideSelected, MyDocument::OnHideSelected)
@@ -162,17 +149,6 @@ MyDocument::~MyDocument()
        wxGetApp().DisableTimerForDocument(this);
 }
 
-/*
-MainView *
-MyDocument::GetMainView()
-{
-       MoleculeView *view = (MoleculeView *)GetFirstView();
-       if (view != NULL)
-               return view->mview;
-       else return NULL;
-}
-*/
-
 void
 MyDocument::SetMolecule(Molecule *aMolecule)
 {
@@ -421,7 +397,6 @@ MyDocument::PushUndoAction(MolAction *action)
 void
 MyDocument::UpdateModifyFlag()
 {
-//     printf("isDirty = %d\n", (GetCommandProcessor()->IsDirty()));
        Modify(GetCommandProcessor()->IsDirty());
 }
 
@@ -511,7 +486,6 @@ MyDocument::OnNeedCleanUndoStack(wxCommandEvent& event)
 void
 MyDocument::OnDocumentModified(wxCommandEvent& event)
 {
-//     printf("MyDocument::OnDocumentModified invoked\n");
        isModifyNotificationSent = false;
        MoleculeClearModifyCount(GetMainView()->mol);
        
@@ -523,7 +497,6 @@ void
 MyDocument::OnCopy(wxCommandEvent& event)
 {
        wxWindow *focusWindow = wxWindow::FindFocus();
-/*     printf("focus window class = %ls\n", focusWindow->GetClassInfo()->GetClassName());  */
        if (focusWindow->IsKindOf(CLASSINFO(wxTextCtrl))) {
                event.Skip();
                return;
@@ -629,7 +602,6 @@ MyDocument::OnCreateNewAtom(wxCommandEvent &event)
        IntGroupRelease(ig);
        MainView_refreshTable(mview);
        row = MainView_indexToTableRow(mview, idx);
-/*     MainViewCallback_ensureVisible(mview, row); */ /* Invoked from startEditText */
        MainViewCallback_startEditText(mview, row, 1);
 }
 
@@ -938,14 +910,6 @@ sDoMolecularDynamics(void *argptr, int argnum)
                                                ring->count++;
                                        MoleculeUnlock(mol);
                                        
-                                       /*  Create a new frame and copy the new coordinates  */
-                               /*      MoleculeLock(mol);
-                                       ig = IntGroupNewWithPoints(MoleculeGetNumberOfFrames(mol), 1, -1);
-                                       MolActionCreateAndPerform(mol, gMolActionInsertFrames, ig, 0, NULL);
-                                       IntGroupRelease(ig);                                    
-                                       md_copy_coordinates_from_internal(mol->arena);
-                                       MoleculeUnlock(mol); */
-
                                        if (minimize && mol->arena->minimize_complete) {
                                                r = -2;  /*  Minimization complete  */
                                                break;
@@ -1208,45 +1172,9 @@ MyDocument::OnEndSubProcess(wxProcessEvent &event)
        }       
 }
 
-/*
-void
-MyDocument::OnDefinePeriodicBox(wxCommandEvent &event)
-{
-       MoleculeLock(mol);
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "cmd_define_unit_cell");
-       MoleculeUnlock(mol);
-}
-
-void
-MyDocument::OnShowPeriodicImage(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "cmd_show_periodic_image");
-}
-*/
-/*
-void
-MyDocument::OnPressureControl(wxCommandEvent &event)
-{
-       MoleculeLock(mol);
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "cmd_pressure_control");
-       MoleculeUnlock(mol);
-}
-
-void
-MyDocument::OnDefineSymmetry(wxCommandEvent &event)
-{
-}
-
-void
-MyDocument::OnExpandBySymmetry(wxCommandEvent &event)
-{
-}
-*/
-
 static wxString
 sCreateTemporaryLogDirectoryForAC(const wxString& filename)
 {
-//     char *ante_dir;
        char *log_dir;
        int i, status;
 
@@ -1393,65 +1321,12 @@ sEraseLogFiles(const wxString& tdir, int status)
        }
 }
 
-/*
-void
-MyDocument::OnGuessUFFParameters(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "guess_uff_parameters");
-}
-
-void
-MyDocument::OnInvokeAntechamber(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "cmd_antechamber");
-       MyAppCallback_showRubyPrompt(); 
-}
-
-void
-MyDocument::OnInvokeResp(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "cmd_gamess_resp");
-}
-
-void
-MyDocument::OnCreateSanderInput(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "export_prmtop");
-}
-
-void
-MyDocument::OnImportAmberFrcmod(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "cmd_import_frcmod");
-}
-*/
-/*
-void
-MyDocument::OnCreateGamessInput(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "cmd_create_gamess_input");
-}
-
-void
-MyDocument::OnCreateMOPACInput(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "cmd_create_mopac_input");
-}
-
-void
-MyDocument::OnCreateMOCube(wxCommandEvent &event)
-{
-       MolActionCreateAndPerform(mol, SCRIPT_ACTION(""), "cmd_create_cube");   
-}
-*/
-
 void
 MyDocument::OnUpdateUI(wxUpdateUIEvent& event)
 {
        int uid = event.GetId();
        IntGroup *ig = MoleculeGetSelection(mol);
        Int nselected = (ig == NULL ? 0 : IntGroupGetCount(ig));
-//     wxMenuItem *item = (wxMenuItem *)event.GetEventObject();
        switch (uid) {
                case wxID_COPY:
                case wxID_CUT:
@@ -1526,8 +1401,6 @@ MyDocument::OnUpdateUI(wxUpdateUIEvent& event)
                        return;
                case myMenuID_MolecularDynamics:
                case myMenuID_Minimize:
-               case myMenuID_DefinePeriodicBox:
-               case myMenuID_PressureControl:
                        if (mol != NULL && mol->mutex == NULL)
                                event.Enable(true);
                        else event.Enable(false);
@@ -1537,29 +1410,6 @@ MyDocument::OnUpdateUI(wxUpdateUIEvent& event)
                                event.Enable(true);
                        else event.Enable(false);
                        return;
-               case myMenuID_ShowPeriodicImage:
-                       event.Enable(true);
-                       return;
-               case myMenuID_RunAntechamber:
-               case myMenuID_RunResp:
-               case myMenuID_CreateSanderInput:
-               case myMenuID_GuessUFFParameters:
-                       if (mol != NULL && mol->natoms > 0)
-                               event.Enable(true);
-                       else event.Enable(false);
-                       return;                 
-               case myMenuID_CreateGamessInput:
-               case myMenuID_CreateMOPACInput:
-                       if (mol != NULL && mol->natoms > 0)
-                               event.Enable(true);
-                       else event.Enable(false);
-                       return;
-               case myMenuID_CreateMOCube:
-                       if (mol == NULL || mol->bset == NULL || mol->bset->natoms == 0)
-                               event.Enable(false);
-                       else
-                               event.Enable(true);
-                       return;
        }
        event.Skip();
 }
@@ -1625,26 +1475,6 @@ MoleculeCallback_notifyModification(Molecule *mp, int now_flag)
        }
 }
 
-/*
-static NSString *
-sMoleculePasteboardType(const char *type)
-{
-       static NSMutableArray *array;
-       NSString *str;
-       unsigned int idx;
-       if (array == nil)
-               array = [[NSMutableArray array] retain];
-       str = [NSString stringWithUTF8String: type];
-       idx = [array indexOfObject: str];
-       if (idx == NSNotFound) {
-               [array addObject: str];
-               return str;
-       } else {
-               return [array objectAtIndex: idx];
-       }
-}
-*/
-
 static wxDataObject *
 sMoleculePasteboardObjectOfType(const char *type, const void *data, int length)
 {
index af83e84..f33a37b 100644 (file)
                E420BDF41885749000A2B983 /* listctrl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = listctrl.cpp; sourceTree = "<group>"; };
                E420BDF51885749000A2B983 /* MoleculeView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MoleculeView.cpp; sourceTree = "<group>"; };
                E420BDF61885749000A2B983 /* MoleculeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoleculeView.h; sourceTree = "<group>"; };
-               E420BDF71885749000A2B983 /* MyApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MyApp.cpp; sourceTree = "<group>"; };
+               E420BDF71885749000A2B983 /* MyApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MyApp.cpp; sourceTree = "<group>"; wrapsLines = 1; };
                E420BDF81885749000A2B983 /* MyApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyApp.h; sourceTree = "<group>"; };
                E420BDF91885749000A2B983 /* MyClipboardData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MyClipboardData.cpp; sourceTree = "<group>"; };
                E420BDFA1885749000A2B983 /* MyClipboardData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyClipboardData.h; sourceTree = "<group>"; };