Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2012-03-31 13:02:33 +0400
committerUnderground78 <underground78@users.sourceforge.net>2012-03-31 13:02:33 +0400
commit86e2121a5e7665c69a16b67235ce9e44f0a3ed18 (patch)
treedd8f342f40dfe78dd2b723e1242034a1575c9f53 /src/Subtitles
parent927410846f5a915fe5ed36cfb409413d21f5848a (diff)
Refactor r3606 to make the "Undetermined" string translatable and various others minor cosmetic changes.
This commit fixes ticket #2100. git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4221 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/Subtitles')
-rw-r--r--src/Subtitles/STS.cpp43
-rw-r--r--src/Subtitles/STS.h3
2 files changed, 2 insertions, 44 deletions
diff --git a/src/Subtitles/STS.cpp b/src/Subtitles/STS.cpp
index 5a6eeffc2..3231c8cb2 100644
--- a/src/Subtitles/STS.cpp
+++ b/src/Subtitles/STS.cpp
@@ -2,7 +2,7 @@
* $Id$
*
* (C) 2003-2006 Gabest
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2012 see AUTHORS
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,7 +27,6 @@
#include "RealTextParser.h"
#include <fstream>
-#include <regex>
// gathered from http://www.netwave.or.jp/~shikai/shikai/shcolor.htm
@@ -2749,46 +2748,6 @@ void CSimpleTextSubtitle::CreateSegments()
*/
}
-bool CSimpleTextSubtitle::Open(CString videoFn, CString subFn, int charSet, CString name)
-{
- Empty();
-
- CWebTextFile f;
- if (!f.Open(subFn)) {
- return false;
- }
-
- videoFn.Replace('\\', '/');
- subFn.Replace('\\', '/');
- if (name.IsEmpty()) {
-
- // The filname of the video file
- CString videoName = videoFn.Left(videoFn.ReverseFind('.')).Mid(videoFn.ReverseFind('/') + 1);
-
- // The filename of the subtitle file
- CString subName = subFn.Left(subFn.ReverseFind('.')).Mid(subFn.ReverseFind('/') + 1);
-
- if (subName.Find(videoName) != -1 && videoName.CompareNoCase(subName) != 0)
- {
- name = CString(subName);
- if (name.Replace(videoName, _T("")) == 1)
- {
- name = name.TrimLeft('.');
- }
- else
- {
- name = _T("Undetermined");
- }
- }
- else
- {
- name = _T("Undetermined");
- }
- }
-
- return(Open(&f, charSet, name));
-}
-
bool CSimpleTextSubtitle::Open(CString fn, int CharSet, CString name)
{
Empty();
diff --git a/src/Subtitles/STS.h b/src/Subtitles/STS.h
index 9ba713aa6..d72ec29cb 100644
--- a/src/Subtitles/STS.h
+++ b/src/Subtitles/STS.h
@@ -2,7 +2,7 @@
* $Id$
*
* (C) 2003-2006 Gabest
- * (C) 2006-2010 see AUTHORS
+ * (C) 2006-2012 see AUTHORS
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -309,7 +309,6 @@ public:
void Append(CSimpleTextSubtitle& sts, int timeoff = -1);
- bool Open(CString videoFn, CString subFn, int charSet, CString name = _T(""));
bool Open(CString fn, int CharSet, CString name = _T(""));
bool Open(CTextFile* f, int CharSet, CString name);
bool Open(BYTE* data, int len, int CharSet, CString name);