~do-win/do/test-paths

« back to all changes in this revision

Viewing changes to Do.Platform.Windows/src/Do.Universe/ApplicationItemSource.cs

  • Committer: Chris S.
  • Date: 2009-06-24 05:28:12 UTC
  • Revision ID: chris@szikszoy.com-20090624052812-xbyscuw5zgew266f
fix ApplicationItemSource to search common start menu on all versions of windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
using System.Runtime.InteropServices;
25
25
 
26
26
using Do.Platform;
 
27
using Do.Platform.Windows;
27
28
using Do.Universe;
28
29
 
29
30
using Mono.Unix;
164
165
        /// A <see cref="IEnumerable"/>
165
166
        /// </returns>
166
167
        static IEnumerable<string> GetDesktopFileDirectories ()
167
 
        {
168
 
                        // get the path to the "all users" start menu ** THIS IS FOR VISTA + WIN7
169
 
                        string commonStartMenu = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.CommonApplicationData), "Microsoft");
170
 
                        commonStartMenu = Path.Combine (commonStartMenu, "Windows");
171
 
                        commonStartMenu = Path.Combine (commonStartMenu, "Start Menu");
172
 
                        
173
 
                        /*
174
 
                        if (!File.Exists (commonStartMenu))
175
 
                        Console.WriteLine ("Common start menu: {0}", commonStartMenu);
176
 
                        Console.WriteLine (Environment.GetFolderPath (Environment.SpecialFolder.StartMenu));
177
 
                        */
178
 
 
179
 
                        //Console.WriteLine (Environment.GetWin
 
168
                {
180
169
 
181
170
            return new [] {
182
171
                Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
183
172
                Environment.GetFolderPath(Environment.SpecialFolder.StartMenu),
184
173
                                Environment.GetFolderPath(Environment.SpecialFolder.Programs),
185
 
                                commonStartMenu,
 
174
                                WindowsPathsService.WinAPIPath (WinAPIFolder.CommonStartMenu),
186
175
            };
187
176
        }
188
177
    }