예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
 bool IsExaile(IApplicationItem item)
 {
     return(item.Exec.Contains("exaile"));
 }
예제 #4
0
 bool IsExaile(IApplicationItem item)
 {
     return item.Exec.Contains ("exaile");
 }
예제 #5
0
 bool IsRhythmbox(IApplicationItem item)
 {
     return(item.Exec.Contains("rhythmbox"));
 }
예제 #6
0
 bool IsBanshee(IApplicationItem app)
 {
     return(app.Exec.Contains("banshee"));
 }