Skip to content

Commit

Permalink
First start of changes to support Mono.
Browse files Browse the repository at this point in the history
* Growl/_source/Utility.cs:
* Growl/_source/DisplayStyleManager.cs:

 Uses platform independent
  directory separator.
  • Loading branch information
michael.letterle committed Nov 30, 2009
1 parent 025b37a commit 8da3917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Growl/Growl/_source/DisplayStyleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ internal sealed class DisplayStyleManager
internal delegate void DisplayLoadedEventHandler(string displayName);
internal static event DisplayLoadedEventHandler DisplayLoaded;

private static string appDisplayStyleDirectory = Growl.CoreLibrary.PathUtility.Combine(Application.StartupPath, @"Displays\");
private static string userDisplayStyleDirectory = Growl.CoreLibrary.PathUtility.Combine(Utility.UserSettingFolder, @"Displays\");
private static string appDisplayStyleDirectory = Growl.CoreLibrary.PathUtility.Combine(Application.StartupPath, @"Displays" + Path.DirectorySeparatorChar);
private static string userDisplayStyleDirectory = Growl.CoreLibrary.PathUtility.Combine(Utility.UserSettingFolder, @"Displays" + Path.DirectorySeparatorChar);
private static Dictionary<string, LoadedDisplayStyle> currentlyLoadedDisplayStyles = new Dictionary<string, LoadedDisplayStyle>();
private static Dictionary<string, SettingsPanelBase> settingsPanels = new Dictionary<string, SettingsPanelBase>();
private static Dictionary<string, Display> availableDisplays;
Expand Down
8 changes: 4 additions & 4 deletions Growl/Growl/_source/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ static Utility()
fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(a.Location);

string root = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
string folder = String.Format(@"Growl\{0}", a.GetName().Version.ToString());
string folderBeta = @"Growl\2.0b2";
string folder = String.Format(@"Growl" + System.IO.Path.DirectorySeparatorChar + "{0}", a.GetName().Version.ToString());
string folderBeta = @"Growl" + System.IO.Path.DirectorySeparatorChar + "2.0b2";
userSettingsFolder = System.IO.Path.Combine(root, folder);
if (!userSettingsFolder.EndsWith(@"\")) userSettingsFolder += @"\";
if (!userSettingsFolder.EndsWith(System.IO.Path.DirectorySeparatorChar.ToString())) userSettingsFolder += System.IO.Path.DirectorySeparatorChar;
userSettingsFolderBeta = System.IO.Path.Combine(root, folderBeta);
if (!userSettingsFolderBeta.EndsWith(@"\")) userSettingsFolderBeta += @"\";
if (!userSettingsFolderBeta.EndsWith(System.IO.Path.DirectorySeparatorChar.ToString())) userSettingsFolderBeta += System.IO.Path.DirectorySeparatorChar;

Growl.CoreLibrary.PathUtility.EnsureDirectoryExists(userSettingsFolder);
}
Expand Down

0 comments on commit 8da3917

Please sign in to comment.