~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
                }
163
163
        }
164
164
 
 
165
        // MonoDevelop.Ide.Commands.FileCommands.CloseFile
 
166
        public class CloseFileHandler: CommandHandler
 
167
        {
 
168
                protected override void Run ()
 
169
                {
 
170
                        IdeApp.Workbench.ActiveDocument.Close ();
 
171
                }
 
172
 
 
173
                protected override void Update (CommandInfo info)
 
174
                {
 
175
                        info.Enabled = IdeApp.Workbench.ActiveDocument != null;
 
176
                }
 
177
        }
 
178
 
165
179
        // MonoDevelop.Ide.Commands.FileCommands.CloseWorkspace
166
180
        // MonoDevelop.Ide.Commands.FileCommands.CloseWorkspaceItem
167
181
        public class CloseWorkspaceHandler : CommandHandler
258
272
                                        Description = GettextCatalog.GetString ("Open {0}", ri.FileName)
259
273
                                };
260
274
                                Gdk.Pixbuf icon = DesktopService.GetPixbufForFile (ri.FileName, IconSize.Menu);
 
275
                                #pragma warning disable 618
261
276
                                if (icon != null)
262
277
                                        cmd.Icon = ImageService.GetStockId (icon, IconSize.Menu);
 
278
                                #pragma warning restore 618
263
279
                                info.Add (cmd, ri.FileName);
264
280
                                i++;
265
281
                        }