Skip to content

Commit 1befae8

Browse files
committed
log message cleanup and import window default btn..
- cleaned up some log message strings. - fixed focus issue in wallpaper import window and Ok btn set as default. - added Hebrew language and updated attribution doc. - minor refactoring.
1 parent 36cfa31 commit 1befae8

File tree

12 files changed

+1106
-256
lines changed

12 files changed

+1106
-256
lines changed

src/livelywpf/livelywpf/Core/SetupDesktop.cs

+35-54
Large diffs are not rendered by default.

src/livelywpf/livelywpf/Core/Wallpapers/VideoMpvPlayer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ private void Proc_OutputDataReceived(object sender, DataReceivedEventArgs e)
432432
{
433433
if (!string.IsNullOrEmpty(e.Data))
434434
{
435-
Logger.Info("Mpv{0}:{1}", uniqueId, e.Data);
435+
Logger.Info($"Mpv{uniqueId}: {e.Data}");
436436
}
437437
}
438438

src/livelywpf/livelywpf/Core/Wallpapers/WebProcess.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ private void Proc_OutputDataReceived(object sender, DataReceivedEventArgs e)
250250
//When the redirected stream is closed, a null line is sent to the event handler.
251251
if (!string.IsNullOrEmpty(e.Data))
252252
{
253-
Logger.Info($"Cef{uniqueId}:{e.Data}");
253+
Logger.Info($"Cef{uniqueId}: {e.Data}");
254254
if (!_initialized || !isLoaded)
255255
{
256256
IpcMessage obj;

src/livelywpf/livelywpf/Core/Watchdog/WatchdogProcess.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void Start()
3030
if (livelySubProcess != null)
3131
return;
3232

33-
Logger.Info("Starting watchdog service..");
33+
Logger.Info("Starting watchdog service...");
3434
ProcessStartInfo start = new ProcessStartInfo()
3535
{
3636
Arguments = Process.GetCurrentProcess().Id.ToString(System.Globalization.CultureInfo.InvariantCulture),
@@ -50,19 +50,19 @@ public void Start()
5050
}
5151
catch (Exception e)
5252
{
53-
Logger.Error("Failed to start watchdog service:" + e.Message);
53+
Logger.Error("Failed to start watchdog service: " + e.Message);
5454
}
5555
}
5656

5757
public void Add(int pid)
5858
{
59-
Logger.Info("Adding program to watchdog:" + pid);
59+
Logger.Info("Adding program to watchdog: " + pid);
6060
SendMessage("lively:add-pgm " + pid);
6161
}
6262

6363
public void Remove(int pid)
6464
{
65-
Logger.Info("Removing program to watchdog:" + pid);
65+
Logger.Info("Removing program to watchdog: " + pid);
6666
SendMessage("lively:rmv-pgm " + pid);
6767
}
6868

@@ -80,7 +80,7 @@ private void SendMessage(string text)
8080
}
8181
catch (Exception e)
8282
{
83-
Logger.Error("Failed to communicate with watchdog service:" + e.Message);
83+
Logger.Error("Failed to communicate with watchdog service: " + e.Message);
8484
}
8585
}
8686
}

src/livelywpf/livelywpf/Docs/attribution.rtf

+182-179
Large diffs are not rendered by default.

src/livelywpf/livelywpf/Helpers/Hardware/SystemInfo.cs

+12-5
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,20 @@ public static List<string> GetGpu()
4747

4848
public static string GetCpuInfo()
4949
{
50-
var sb = new StringBuilder();
51-
var gpu = GetCpu();
52-
foreach (var item in gpu)
50+
try
51+
{
52+
using ManagementObjectSearcher myProcessorObject = new ManagementObjectSearcher("select * from Win32_Processor");
53+
var sb = new StringBuilder();
54+
foreach (ManagementObject obj in myProcessorObject.Get())
55+
{
56+
sb.AppendLine("CPU: " + obj["Name"]);
57+
}
58+
return sb.ToString().TrimEnd();
59+
}
60+
catch (Exception e)
5361
{
54-
sb.AppendLine("CPU: " + item);
62+
return "CPU: " + e.Message;
5563
}
56-
return sb.ToString().TrimEnd();
5764
}
5865

5966
public static List<string> GetCpu()

0 commit comments

Comments
 (0)