Skip to content

Commit

Permalink
Only set the search box cue banner on Windows
Browse files Browse the repository at this point in the history
This particular invocation of SendMessage causes an exception under mono
on Linux.

Opened issue #209 for getting this working properly under Linux.
  • Loading branch information
ribbons committed Jul 30, 2016
1 parent 7e67ab1 commit 4afcd29
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Controls/SearchBox.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of Radio Downloader.
* Copyright © 2007-2012 by the authors - see the AUTHORS file for details.
* Copyright © 2007-2016 by the authors - see the AUTHORS file for details.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -94,7 +94,11 @@ public string CueBanner
set
{
this.cueBanner = value;
NativeMethods.SendMessage(this.textBox.Handle, NativeMethods.EM_SETCUEBANNER, IntPtr.Zero, this.cueBanner);

if (OsUtils.Windows())
{
NativeMethods.SendMessage(this.textBox.Handle, NativeMethods.EM_SETCUEBANNER, IntPtr.Zero, this.cueBanner);
}
}
}

Expand Down

0 comments on commit 4afcd29

Please sign in to comment.