Skip to content

Commit 44871aa

Browse files
committed
Added a check if we are running on wine & new project dialog adjustment for CrossOver...
1 parent f3afd45 commit 44871aa

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

External/Plugins/ProjectManager/Controls/NewProjectDialog.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,14 @@ public NewProjectDialog()
282282

283283
projectListView.Items.Clear();
284284
projectListView.TileSize = PluginCore.Helpers.ScaleHelper.Scale(new Size(170, 22));
285+
projectListView.ShowGroups = PluginBase.Settings.UseListViewGrouping;
286+
287+
if (Win32.isRunningOnWine())
288+
{
289+
projectListView.View = View.SmallIcon;
290+
projectListView.GridLines = !projectListView.ShowGroups;
291+
columnHeader1.Width = -2;
292+
}
285293

286294
if (!Directory.Exists(ProjectPaths.ProjectTemplatesDirectory))
287295
{

PluginCore/PluginCore/Win32.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Drawing;
44
using System.Windows.Forms;
55
using System.Runtime.InteropServices;
6+
using Microsoft.Win32;
67

78
namespace PluginCore
89
{
@@ -27,6 +28,14 @@ public static Boolean IsRunningOnWindows()
2728
return shouldUseWin32;
2829
}
2930

31+
/// <summary>
32+
/// Checks if we are running on Wine
33+
/// </summary>
34+
public static Boolean isRunningOnWine()
35+
{
36+
return Registry.LocalMachine.OpenSubKey(@"Software\Wine\") != null;
37+
}
38+
3039
/// <summary>
3140
/// Checks if we are running on Mono
3241
/// </summary>

0 commit comments

Comments
 (0)