diff options
author | sr55 <[email protected]> | 2009-06-26 15:12:41 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-06-26 15:12:41 +0000 |
commit | f34a12947c422484c04a7f3bf12120996c7f293e (patch) | |
tree | d30ebff859a5cf3650f3ac97553c059778c73b52 /win/C#/Functions | |
parent | 665406fbd1ff2f3e10f2a85e9d5691e9d4456e89 (diff) |
WinGui:
- Removed the group boxes on the main window to save a bit of space.
- Main Window source display is the source filename or folder only. The text box is no longer used.
- Added two new options: "Clear Log History" and "View Log Directory"
- Changed log file format to "DateTime DestFileName.txt" to "DestFileName DateTime.txt"
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2626 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r-- | win/C#/Functions/Main.cs | 20 | ||||
-rw-r--r-- | win/C#/Functions/QueryGenerator.cs | 8 |
2 files changed, 24 insertions, 4 deletions
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs index 95a17cfb3..04d4d16b4 100644 --- a/win/C#/Functions/Main.cs +++ b/win/C#/Functions/Main.cs @@ -350,5 +350,25 @@ namespace Handbrake.Functions return -1;
}
+ /// <summary>
+ /// Clear all the encode log files.
+ /// </summary>
+ public static void clearLogs()
+ {
+ string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ if (Directory.Exists(logDir))
+ {
+ DirectoryInfo info = new DirectoryInfo(logDir);
+ FileInfo[] logFiles = info.GetFiles("*.txt");
+ foreach (FileInfo file in logFiles)
+ {
+ if (!file.Name.Contains("last_scan_log") && !file.Name.Contains("last_encode_log") && !file.Name.Contains("tmp_appReadable_log.txt"))
+ {
+ File.Delete(file.FullName);
+ }
+ }
+ }
+ }
+
}
}
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs index 373041107..0394df6cf 100644 --- a/win/C#/Functions/QueryGenerator.cs +++ b/win/C#/Functions/QueryGenerator.cs @@ -24,8 +24,8 @@ namespace Handbrake.Functions // Source tab
string query = "";
- if ((mainWindow.text_source.Text != "") && (mainWindow.text_source.Text.Trim() != "Click 'Source' to continue"))
- query = " -i " + '"' + mainWindow.text_source.Text + '"';
+ if ((mainWindow.sourcePath != "") && (mainWindow.sourcePath.Trim() != "Click 'Source' to continue"))
+ query = " -i " + '"' + mainWindow.sourcePath + '"';
if (mainWindow.drp_dvdtitle.Text != "Automatic")
{
@@ -68,8 +68,8 @@ namespace Handbrake.Functions // Source tab
string query = "";
- if ((mainWindow.text_source.Text != "") && (mainWindow.text_source.Text.Trim() != "Click 'Source' to continue"))
- query = " -i " + '"' + mainWindow.text_source.Text + '"';
+ if ((mainWindow.sourcePath != "") && (mainWindow.sourcePath.Trim() != "Click 'Source' to continue"))
+ query = " -i " + '"' + mainWindow.sourcePath + '"';
if (mainWindow.drp_dvdtitle.Text != "Automatic")
{
|