Added ?script, ?video and ?audio to standard paths. It's now all done except for encoding, which isn't very important...

Originally committed to SVN as r1276.
This commit is contained in:
Rodrigo Braz Monteiro 2007-06-20 22:23:55 +00:00
parent 4825235896
commit c4d94d4dfa
3 changed files with 15 additions and 0 deletions

View File

@ -37,6 +37,7 @@
/////////// ///////////
// Headers // Headers
#include <wx/tglbtn.h> #include <wx/tglbtn.h>
#include <wx/filename.h>
#include <math.h> #include <math.h>
#include <vector> #include <vector>
#include "audio_display.h" #include "audio_display.h"
@ -56,6 +57,7 @@
#include "hotkeys.h" #include "hotkeys.h"
#include "utils.h" #include "utils.h"
#include "timeedit_ctrl.h" #include "timeedit_ctrl.h"
#include "standard_paths.h"
/////////////// ///////////////
@ -815,6 +817,7 @@ void AudioDisplay::SetFile(wxString file) {
loaded = false; loaded = false;
temporary = false; temporary = false;
StandardPaths::SetPathValue(_T("?audio"),_T(""));
} }
// Load // Load
@ -837,6 +840,8 @@ void AudioDisplay::SetFile(wxString file) {
// Add to recent // Add to recent
wxLogDebug(_T("AudioDisplay::SetFile: add to recent")); wxLogDebug(_T("AudioDisplay::SetFile: add to recent"));
Options.AddToRecentList(file,_T("Recent aud")); Options.AddToRecentList(file,_T("Recent aud"));
wxFileName fn(file);
StandardPaths::SetPathValue(_T("?audio"),fn.GetPath());
// Update // Update
UpdateImage(); UpdateImage();

View File

@ -68,6 +68,7 @@
#include "auto4_base.h" #include "auto4_base.h"
#include "dialog_version_check.h" #include "dialog_version_check.h"
#include "dialog_detached_video.h" #include "dialog_detached_video.h"
#include "standard_paths.h"
///////////////////////// /////////////////////////
@ -571,9 +572,12 @@ void FrameMain::LoadSubtitles (wxString filename,wxString charset) {
if (isFile) { if (isFile) {
AssFile::top->Load(filename,charset); AssFile::top->Load(filename,charset);
SubsBox->LoadFromAss(AssFile::top,false,true); SubsBox->LoadFromAss(AssFile::top,false,true);
wxFileName fn(filename);
StandardPaths::SetPathValue(_T("?script"),fn.GetPath());
} }
else { else {
SubsBox->LoadDefault(AssFile::top); SubsBox->LoadDefault(AssFile::top);
StandardPaths::SetPathValue(_T("?script"),_T(""));
} }
} }
catch (const wchar_t *err) { catch (const wchar_t *err) {

View File

@ -70,6 +70,7 @@
#include "video_box.h" #include "video_box.h"
#include "utils.h" #include "utils.h"
#include "gl_wrap.h" #include "gl_wrap.h"
#include "standard_paths.h"
/////// ///////
@ -153,6 +154,9 @@ void VideoContext::Clear() {
///////// /////////
// Reset // Reset
void VideoContext::Reset() { void VideoContext::Reset() {
// Reset ?video path
StandardPaths::SetPathValue(_T("?video"),_T(""));
// Reset shader // Reset shader
if (yv12shader) { if (yv12shader) {
OpenGLWrapper::DestroyShaderProgram(yv12shader); OpenGLWrapper::DestroyShaderProgram(yv12shader);
@ -314,6 +318,8 @@ void VideoContext::SetVideo(const wxString &filename) {
// Set filename // Set filename
videoName = filename; videoName = filename;
Options.AddToRecentList(filename,_T("Recent vid")); Options.AddToRecentList(filename,_T("Recent vid"));
wxFileName fn(filename);
StandardPaths::SetPathValue(_T("?video"),fn.GetPath());
// Get frame // Get frame
frame_n = 0; frame_n = 0;