OSDN Git Service

LinGui: fix library list for mingw with gstreamer enabled
[handbrake-jp/handbrake-jp-git.git] / win / C# / frmActivityWindow.cs
index 8b2135d..9f9f411 100644 (file)
@@ -33,6 +33,8 @@ namespace Handbrake
             _encodeQueue = eh;\r
             _mainWin = mw;\r
 \r
+            fileNotFoundQuickFix = false;\r
+\r
             if (file == "last_scan_log.txt")\r
                 SetLogView(true);\r
             else\r
@@ -72,11 +74,6 @@ namespace Handbrake
             rtf_actLog.AppendText(String.Format("### Install Dir: {0} \n", Application.StartupPath));\r
             rtf_actLog.AppendText(String.Format("### Data Dir: {0} \n", Application.UserAppDataPath));\r
             rtf_actLog.AppendText("#########################################\n\n");\r
-            if ((!_encodeQueue.LastEncode.IsEmpty) && _encodeQueue.LastEncode.Query != String.Empty)\r
-            {\r
-                rtf_actLog.AppendText("### CLI Query: " + _encodeQueue.LastEncode.Query + "\n\n");\r
-                rtf_actLog.AppendText("#########################################\n\n");\r
-            }\r
 \r
             // Seutp the log file\r
             if (scan)\r
@@ -88,6 +85,13 @@ namespace Handbrake
             {\r
                 _readFile = "last_encode_log.txt";\r
                 txt_log.Text = "Encode Log";\r
+                if (_encodeQueue.isEncoding)\r
+                    if ((!_encodeQueue.LastEncode.IsEmpty) && _encodeQueue.LastEncode.Query != String.Empty)\r
+                    {\r
+                        rtf_actLog.AppendText("### CLI Query: " + _encodeQueue.LastEncode.Query + "\n");\r
+                        rtf_actLog.AppendText("### Custom Query: " + _encodeQueue.LastEncode.CustomQuery + "\n\n");\r
+                        rtf_actLog.AppendText("#########################################\n\n");\r
+                    }\r
             }\r
             _lastUpdate = false;\r
         }\r
@@ -174,7 +178,7 @@ namespace Handbrake
 \r
                 // Copy the log file.\r
                 if (File.Exists(logFile))\r
-                    File.Copy(logFile, logFile2);\r
+                    File.Copy(logFile, logFile2, true);\r
                 else\r
                 {\r
                     if (fileNotFoundQuickFix)\r
@@ -182,9 +186,7 @@ namespace Handbrake
                     fileNotFoundQuickFix = true;\r
                     return "\n\n\nERROR: The log file could not be found. \nMaybe you cleared your system's tempory folder or maybe you just havn't run an encode yet. \nTried to find the log file in: " + logFile;\r
                 }\r
-                   \r
 \r
-                // Open the copied log file for reading\r
                 StreamReader sr = new StreamReader(logFile2);\r
                 string line;\r
                 int i = 1;\r
@@ -204,9 +206,8 @@ namespace Handbrake
             }\r
             catch (Exception exc)\r
             {\r
-                MessageBox.Show("Error in ReadFile() \n Unable to read the log file.\n You may have to restart HandBrake.\n  Error Information: \n\n" + exc, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+                return "Error in ReadFile() \n Unable to read the log file.\n You may have to restart HandBrake. Will try reading the file again in a few seconds... \n  Error Information: \n\n" + exc;\r
             }\r
-            return null;\r
         }\r
 \r
         protected override void OnClosing(CancelEventArgs e)\r