~stellarium/stellarium/trunk

« back to all changes in this revision

Viewing changes to src/script_mgr.cpp

  • Committer: digitalises
  • Date: 2005-11-30 04:25:31 UTC
  • Revision ID: vcs-imports@canonical.com-20051130042531-j1za2ndc76g7lin9
script playback features and bugfixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
 
73
73
  } else {
74
74
    delete script;
 
75
        script = NULL;
75
76
        return 0;
76
77
  }
77
78
}
78
79
 
79
80
void ScriptMgr::cancel_script() {
80
 
  // delete script object...
81
 
  delete script;
82
 
  script = NULL;
83
 
  // images loaded are deleted from stel_command_interface directly
84
 
  playing = 0;
85
 
  play_paused = 0;
86
 
 
87
 
  if(RemoveableDirectoryMounted) {
88
 
          system( ( DataDir + "script_unmount_script_disk " ).c_str() );          
89
 
          cout << "UNMOUNT DISK\n";
90
 
          RemoveableDirectoryMounted = 0;
91
 
  }
 
81
        // delete script object...
 
82
        if(script) delete script;
 
83
        script = NULL;
 
84
        // images loaded are deleted from stel_command_interface directly
 
85
        playing = 0;
 
86
        play_paused = 0;
 
87
        
 
88
        if(RemoveableDirectoryMounted) {
 
89
                system( ( DataDir + "script_unmount_script_disk " ).c_str() );    
 
90
                cout << "UNMOUNT DISK\n";
 
91
                RemoveableDirectoryMounted = 0;
 
92
        }
92
93
}
93
94
 
94
95
 
278
279
// look for a script called "startup.sts"
279
280
bool ScriptMgr::play_startup_script() {
280
281
 
281
 
        cout << _("Looking for startup script to run.") << endl;
 
282
        //      cout << _("Looking for startup script to run.") << endl;
282
283
 
283
284
        // first try on removeable directory
284
285
        if(RemoveableScriptDirectory !="" &&