diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2014-09-14 18:21:11 +0400 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2014-11-08 01:20:18 +0300 |
commit | 75151b5fcb2a61c3c84d8c28431c246ba3617633 (patch) | |
tree | f0ce1f6ab1cfd353ab25c38b34d1e703f5515c2f /main/src/addins/WindowsPlatform | |
parent | 7485addb297f65710e7d53f9b41ea8a966354311 (diff) |
[Windows] TaskBar implementation works now.
Diffstat (limited to 'main/src/addins/WindowsPlatform')
-rw-r--r-- | main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs index 33e4eed6a7..45fea36671 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/WindowsPlatform.cs @@ -66,21 +66,22 @@ namespace MonoDevelop.Platform public override void Initialize () { // Only initialize elements for Win7+. - if (TaskbarManager.IsPlatformSupported) + if (TaskbarManager.IsPlatformSupported) { TaskbarManager.Instance.ApplicationId = BrandingService.ProfileDirectoryName + "." + IdeApp.Version; + } } - + public override void SetGlobalProgressBar (double progress) { if (!TaskbarManager.IsPlatformSupported) return; + IntPtr handle = GdkWin32.HgdiobjGet (MessageService.RootWindow.GdkWindow); if (progress == 1) { - TaskbarManager.Instance.SetProgressState (TaskbarProgressBarState.NoProgress); + TaskbarManager.Instance.SetProgressState (TaskbarProgressBarState.NoProgress, handle); } else { - if (progress == 0) - TaskbarManager.Instance.SetProgressState (TaskbarProgressBarState.Normal); - TaskbarManager.Instance.SetProgressValue ((int)(progress * 100f), 100); + TaskbarManager.Instance.SetProgressState (TaskbarProgressBarState.Normal, handle); + TaskbarManager.Instance.SetProgressValue ((int)(progress * 100f), 100, handle); } } @@ -89,7 +90,8 @@ namespace MonoDevelop.Platform if (!TaskbarManager.IsPlatformSupported) return; - TaskbarManager.Instance.SetProgressState (TaskbarProgressBarState.Error); + IntPtr handle = GdkWin32.HgdiobjGet (MessageService.RootWindow.GdkWindow); + TaskbarManager.Instance.SetProgressState (TaskbarProgressBarState.Error, handle); } public override object GetFileAttributes (string fileName) |