Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2014-12-14 05:53:06 +0300
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2014-12-14 05:53:06 +0300
commit62a36795a9078c25be32d9efd2549a3b5e357541 (patch)
treedbc59868b79eb13dfc050c167a8e8009648f12ab /Xwt.Gtk.Windows
parent02a654b17032a87504c92e5a71dc6a3a0dcd065b (diff)
[Gtk.Windows] Add Auto detection of charset.
Diffstat (limited to 'Xwt.Gtk.Windows')
-rw-r--r--Xwt.Gtk.Windows/GtkWindowsDesktopBackend.cs2
-rw-r--r--Xwt.Gtk.Windows/Win32.cs6
2 files changed, 4 insertions, 4 deletions
diff --git a/Xwt.Gtk.Windows/GtkWindowsDesktopBackend.cs b/Xwt.Gtk.Windows/GtkWindowsDesktopBackend.cs
index 0465d986..f1bdd6f4 100644
--- a/Xwt.Gtk.Windows/GtkWindowsDesktopBackend.cs
+++ b/Xwt.Gtk.Windows/GtkWindowsDesktopBackend.cs
@@ -41,7 +41,7 @@ namespace Xwt.Gtk.Windows
Gdk.Pixbuf GetIcon (string filename, uint size)
{
var shinfo = new Win32.SHFILEINFO ();
- Win32.SHGetFileInfoW (filename, Win32.FILE_ATTRIBUTES_NORMAL, ref shinfo, (uint)Marshal.SizeOf (shinfo), Win32.SHGFI_USEFILEATTRIBUTES | Win32.SHGFI_ICON | Win32.SHGFI_ICONLOCATION | Win32.SHGFI_TYPENAME | size);
+ Win32.SHGetFileInfo (filename, Win32.FILE_ATTRIBUTES_NORMAL, ref shinfo, (uint)Marshal.SizeOf (shinfo), Win32.SHGFI_USEFILEATTRIBUTES | Win32.SHGFI_ICON | Win32.SHGFI_ICONLOCATION | Win32.SHGFI_TYPENAME | size);
if (shinfo.iIcon == 0) {
Win32.DestroyIcon (shinfo.hIcon);
return null;
diff --git a/Xwt.Gtk.Windows/Win32.cs b/Xwt.Gtk.Windows/Win32.cs
index 91444a00..8261cde1 100644
--- a/Xwt.Gtk.Windows/Win32.cs
+++ b/Xwt.Gtk.Windows/Win32.cs
@@ -24,7 +24,7 @@ namespace Xwt.Gtk.Windows
{
public static class Win32
{
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+ [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct SHFILEINFO
{
public IntPtr hIcon;
@@ -50,8 +50,8 @@ namespace Xwt.Gtk.Windows
#region USER32
[DllImport (Win32.USER32)]
public static extern bool DestroyIcon ([In] IntPtr hIcon);
- [DllImport (Win32.SHELL32, CharSet = CharSet.Unicode)]
- public static extern IntPtr SHGetFileInfoW ([In] string pszPath, uint dwFileAttributes, [In, Out] ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags);
+ [DllImport (Win32.SHELL32, CharSet = CharSet.Auto)]
+ public static extern IntPtr SHGetFileInfo ([In] string pszPath, uint dwFileAttributes, [In, Out] ref SHFILEINFO psfi, uint cbSizeFileInfo, uint uFlags);
#endregion
}
}