Exemple #1
0
        private void HandleAdvUse(object sender, EventArgs args)
        {
            TreePath [] paths = adv_tree_view.Selection.GetSelectedRows();

            if (paths != null && paths.Length != 1)
            {
                return;
            }

            TreeIter iter;

            if (adv_tree_view.Model.GetIter(out iter, paths[0]))
            {
                SmartPlaylistDefinition def = ((SmartPlaylistDefinition)adv_tree_view.Model.GetValue(iter, 1));
                UpdateForPlaylist(def.ToSmartPlaylistSource(primary_source));
            }
        }
Exemple #2
0
        private void HandleAdvAdd(object sender, EventArgs args)
        {
            TreePath [] paths = adv_tree_view.Selection.GetSelectedRows();

            foreach (TreePath path in paths)
            {
                TreeIter iter;
                if (adv_tree_view.Model.GetIter(out iter, path))
                {
                    SmartPlaylistDefinition def = ((SmartPlaylistDefinition)adv_tree_view.Model.GetValue(iter, 1));
                    SmartPlaylistSource     pl  = def.ToSmartPlaylistSource(primary_source);
                    pl.Save();
                    pl.PrimarySource.AddChildSource(pl);
                    //SmartPlaylistCore.Instance.StartTimer (pl);
                }
            }

            currently_editing = null;
            Destroy();
        }