public IApplicationItem NewApplicationItem(string path) { // We attempt to create the Application item, but return a NullApplicationItem // instead of null if MaybeCreateFromDesktopItem fails. IApplicationItem maybe = ApplicationItem.MaybeCreateFromDesktopItem(path); return(maybe ?? new NullApplicationItem(path)); }
public override IEnumerable <Item> ChildrenOfItem(Item item) { List <Item> results = new List <Item> (); IApplicationItem app = item as IApplicationItem; if (app == null) { return(results); } List <Wnck.Window> windows = WindowUtils.WindowListForCmd(app.Exec); if (!windows.Any()) { return(results); } foreach (Wnck.Window window in windows) { results.Add(new WindowItem(window, app.Icon)); } return(results); }
bool IsExaile(IApplicationItem item) { return(item.Exec.Contains("exaile")); }
bool IsExaile(IApplicationItem item) { return item.Exec.Contains ("exaile"); }
bool IsRhythmbox(IApplicationItem item) { return(item.Exec.Contains("rhythmbox")); }
bool IsBanshee(IApplicationItem app) { return(app.Exec.Contains("banshee")); }