~ubuntu-branches/ubuntu/vivid/monodevelop/vivid-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageRecentProjectsList.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2014-10-09 14:09:23 UTC
  • mfrom: (10.3.5)
  • Revision ID: package-import@ubuntu.com-20141009140923-s0d22u5f9kg8jvds
Tags: 5.5.0.227-1
* [b2c8331] Imported Upstream version 5.5.0.227 (Closes: #754316)
* [d210995] Delete obsolete patches
* [1b59ae1] Clear patch fizz, via quilt refresh
* [3dd147d] Fix error in configure.in which applies for tarball builds but 
  not git builds when running autoreconf
* [21c2a57] Remove Metacity references for good
* [3331661] Ensure NUnit 2.6.3 is installed
* [fd85c88] Build-depend on NuGet
* [a1ae116] Add WebKit to build dependencies, for Xwt moduleref resolution
* [9b4cf12] Since the GDB addin is integrated now, declare it in 
  debian/control
* [6231562] Correct NUnit links
* [3d2b693] Fix NuGet addin, by copying libs locally
* [74bf9a8] Don't symlink unused Mocks NUnit assembly
* [ade52b2] Ensure IKVM.Reflection is built with default (4.5) profile

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        public class WelcomePageRecentProjectsList : WelcomePageSection
38
38
        {
39
39
                bool destroyed;
40
 
                EventHandler recentChangesHandler;
41
 
                VBox box;
 
40
                readonly EventHandler recentChangesHandler;
 
41
                readonly VBox box;
42
42
                int itemCount = 10;
43
 
                Gdk.Pixbuf openProjectIcon;
44
 
                Gdk.Pixbuf newProjectIcon;
 
43
                readonly Xwt.Drawing.Image openProjectIcon;
 
44
                readonly Xwt.Drawing.Image newProjectIcon;
45
45
                
46
46
                public WelcomePageRecentProjectsList (string title = null, int count = 10): base (title)
47
47
                {
48
 
                        openProjectIcon = Gdk.Pixbuf.LoadFromResource ("open_solution.png");
49
 
                        newProjectIcon = Gdk.Pixbuf.LoadFromResource ("new_solution.png");
 
48
                        openProjectIcon = Xwt.Drawing.Image.FromResource ("open_solution.png");
 
49
                        newProjectIcon = Xwt.Drawing.Image.FromResource ("new_solution.png");
50
50
 
51
51
                        box = new VBox ();
52
52
 
98
98
                        //TODO: pinned files
99
99
                        foreach (var recent in DesktopService.RecentFiles.GetProjects ().Take (itemCount)) {
100
100
                                var filename = recent.FileName;
 
101
                                if (!System.IO.File.Exists (filename))
 
102
                                        continue;
 
103
 
101
104
                                var accessed = recent.TimeStamp;
102
 
                                var pixbuf = ImageService.GetPixbuf (GetIcon (filename), IconSize.Dnd);
 
105
                                var pixbuf = ImageService.GetIcon (GetIcon (filename), IconSize.Dnd);
103
106
                                var button = new WelcomePageListButton (recent.DisplayName, System.IO.Path.GetDirectoryName (filename), pixbuf, "project://" + filename);
104
107
                                button.BorderPadding = 2;
105
108
                                button.AllowPinning = true;
141
144
                        //string icon;
142
145
                        //getting the icon requires probing the file, so handle IO errors
143
146
                        try {
144
 
                                if (!System.IO.File.Exists (fileName))
145
 
                                        return null;
146
147
/* delay project service creation. 
147
148
                                icon = IdeApp.Services.ProjectService.FileFormats.GetFileFormats
148
149
                                                (fileName, typeof(Solution)).Length > 0