~ubuntu-branches/ubuntu/edgy/monodevelop/edgy

« back to all changes in this revision

Viewing changes to Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SystemFileNodeBuilder.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-08-18 00:51:23 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060818005123-5iit07y0j7wjg55f
Tags: 0.11+svn20060818-0ubuntu1
* New SVN snapshot
  + Works with Gtk# 2.9.0
* debian/control:
  + Updated Build-Depends
* debian/patches/use_nunit2.2.dpatch,
  debian/patches/use_real_libs.dpatch:
  + Updated
* debian/patches/versioncontrol_buildfix.dpatch:
  + Fix build failure in the version control addin

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
                        SystemFile file = (SystemFile) dataObject;
69
69
                        label = file.Name;
70
70
                        icon = Context.GetIcon (Services.Icons.GetImageForFile (file.Path));
71
 
                        Gdk.Pixbuf gicon = Context.GetComposedIcon (icon, "fade");
72
 
                        if (gicon == null) {
73
 
                                gicon = Services.Icons.MakeTransparent (icon, 0.5);
74
 
                                Context.CacheComposedIcon (icon, "fade", gicon);
 
71
                        if (file.ShowTransparent) {
 
72
                                Gdk.Pixbuf gicon = Context.GetComposedIcon (icon, "fade");
 
73
                                if (gicon == null) {
 
74
                                        gicon = Services.Icons.MakeTransparent (icon, 0.5);
 
75
                                        Context.CacheComposedIcon (icon, "fade", gicon);
 
76
                                }
 
77
                                icon = gicon;
 
78
                                label = "<span foreground='dimgrey'>" + label + "</span>";
75
79
                        }
76
 
                        icon = gicon;
77
80
                }
78
81
                
79
82
                public override int CompareObjects (ITreeNavigator thisNode, ITreeNavigator otherNode)
122
125
 
123
126
                        try {
124
127
                                Services.FileService.RemoveFile (file.Path);
125
 
                        } catch (Exception ex) {
 
128
                        } catch {
126
129
                                Services.MessageService.ShowError (string.Format (GettextCatalog.GetString ("The file {0} could not be deleted"), file.Path));
127
130
                        }
128
131
                }
147
150
                                project.Save (m);
148
151
                        }
149
152
                }
 
153
                
 
154
                [CommandUpdateHandler (ProjectCommands.IncludeToProject)]
 
155
                public void UpdateIncludeFileToProject (CommandInfo info)
 
156
                {
 
157
                        Project project = CurrentNode.GetParentDataItem (typeof(Project), true) as Project;
 
158
                        info.Visible = project != null;
 
159
                }
 
160
                
 
161
                [CommandHandler (ViewCommands.OpenWithList)]
 
162
                public void OnOpenWith (object ob)
 
163
                {
 
164
                        SystemFile file = CurrentNode.DataItem as SystemFile;
 
165
                        ((FileViewer)ob).OpenFile (file.Path);
 
166
                }
 
167
                
 
168
                [CommandUpdateHandler (ViewCommands.OpenWithList)]
 
169
                public void OnOpenWithUpdate (CommandArrayInfo info)
 
170
                {
 
171
                        SystemFile file = CurrentNode.DataItem as SystemFile;
 
172
                        FileViewer prev = null; 
 
173
                        foreach (FileViewer fv in IdeApp.Workbench.GetFileViewers (file.Path)) {
 
174
                                if (prev != null && fv.IsExternal != prev.IsExternal)
 
175
                                        info.AddSeparator ();
 
176
                                info.Add (fv.Title, fv);
 
177
                                prev = fv;
 
178
                        }
 
179
                }
150
180
        }
151
181
}