From 4afcd29a1429537dfe3df96b2ab129a3d38d948b Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Mon, 7 Mar 2016 22:00:52 +0000 Subject: [PATCH] Only set the search box cue banner on Windows This particular invocation of SendMessage causes an exception under mono on Linux. Opened issue #209 for getting this working properly under Linux. --- Controls/SearchBox.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Controls/SearchBox.cs b/Controls/SearchBox.cs index d491ce85..f6ae4ef7 100644 --- a/Controls/SearchBox.cs +++ b/Controls/SearchBox.cs @@ -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 @@ -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); + } } }