예제 #1
0
        public SourceView()
        {
            FixedHeightMode = false;
            BuildColumns();

            store = new SourceModel();
            store.SourceRowInserted += OnSourceRowInserted;
            store.SourceRowRemoved  += OnSourceRowRemoved;
            store.RowChanged        += OnRowChanged;
            Model        = store;
            EnableSearch = false;

            ShowExpanders    = false;
            LevelIndentation = 6;

            ConfigureDragAndDrop();
            store.Refresh();
            ConnectEvents();

            Selection.SelectFunction = (selection, model, path, selected) => {
                Source source = store.GetSource(path);
                if (source == null || source is SourceManager.GroupSource)
                {
                    return(false);
                }
                return(true);
            };

            ResetSelection();
        }
예제 #2
0
        public SourceView ()
        {
            FixedHeightMode = false;
            BuildColumns ();

            store = new SourceModel ();
            store.SourceRowInserted += OnSourceRowInserted;
            store.SourceRowRemoved += OnSourceRowRemoved;
            store.RowChanged += OnRowChanged;
            Model = store;
            EnableSearch = false;

            ShowExpanders = false;
            LevelIndentation = 6;

            ConfigureDragAndDrop ();
            store.Refresh ();
            ConnectEvents ();

            Selection.SelectFunction = (selection, model, path, selected) => {
                Source source = store.GetSource (path);
                if (source == null || source is SourceManager.GroupSource) {
                    return false;
                }
                return true;
            };

            ResetSelection ();
        }
예제 #3
0
        public QueueableSourceComboBox(string source_name)
        {
            // FIXME: Would probably be nice to use this, but variable
            // width reporting in SourceRowRenderer does not work as
            // I would expect, so currently it's forced to 200px wide
            // which causes quite a problem with a UI like Muinshee
            // and the Media Panel
            //
            // SourceRowRenderer renderer = new SourceRowRenderer ();
            // renderer.ParentWidget = this;

            var renderer = new CellRendererText ();
            PackStart (renderer, true);
            SetCellDataFunc (renderer, new CellLayoutDataFunc (
                (layout, cell, model, iter) => renderer.Text = ((Source)model.GetValue (iter, 0)).Name
            ));

            var store = new SourceModel ();
            filter = new TreeModelFilter (store, null);
            filter.VisibleFunc = (model, iter) => IsQueueable (((SourceModel)model).GetSource (iter));
            Model = filter;

            store.Refresh ();

            SetActiveSource (source_name);

            HasTooltip = true;
            QueryTooltip += HandleQueryTooltip;
        }
예제 #4
0
        public SourceView()
        {
            BuildColumns();

            store = new SourceModel();
            store.SourceRowInserted += OnSourceRowInserted;
            store.SourceRowRemoved  += OnSourceRowRemoved;
            store.RowChanged        += OnRowChanged;
            Model = store;

            ConfigureDragAndDrop();
            store.Refresh();
            ConnectEvents();

            RowSeparatorFunc = RowSeparatorHandler;
        }
        public SourceView ()
        {
            BuildColumns ();

            store = new SourceModel ();
            store.SourceRowInserted += OnSourceRowInserted;
            store.SourceRowRemoved += OnSourceRowRemoved;
            store.RowChanged += OnRowChanged;
            Model = store;
            EnableSearch = false;

            ConfigureDragAndDrop ();
            store.Refresh ();
            ConnectEvents ();

            RowSeparatorFunc = RowSeparatorHandler;

            ResetSelection ();
        }
예제 #6
0
        public SourceComboBox()
        {
            renderer = new SourceRowRenderer();
            renderer.ParentWidget = this;
            PackStart(renderer, true);
            SetCellDataFunc(renderer, new CellLayoutDataFunc(SourceRowRenderer.CellDataHandler));

            store = new SourceModel();
            Model = store;

            ServiceManager.SourceManager.ActiveSourceChanged += delegate {
                ThreadAssist.ProxyToMain(UpdateActiveSource);
            };

            ServiceManager.SourceManager.SourceUpdated += delegate {
                ThreadAssist.ProxyToMain(QueueDraw);
            };

            store.Refresh();
        }
예제 #7
0
        public SourceComboBox()
        {
            renderer = new SourceRowRenderer ();
            renderer.ParentWidget = this;
            PackStart (renderer, true);
            SetCellDataFunc (renderer, new CellLayoutDataFunc (SourceRowRenderer.CellDataHandler));

            store = new SourceModel ();
            Model = store;

            ServiceManager.SourceManager.ActiveSourceChanged += delegate {
                ThreadAssist.ProxyToMain (UpdateActiveSource);
            };

            ServiceManager.SourceManager.SourceUpdated += delegate {
                ThreadAssist.ProxyToMain (QueueDraw);
            };

            store.Refresh ();
        }
예제 #8
0
        public SourceView ()
        {
            FixedHeightMode = false;
            BuildColumns ();

            store = new SourceModel ();
            store.SourceRowInserted += OnSourceRowInserted;
            store.SourceRowRemoved += OnSourceRowRemoved;
            store.RowChanged += OnRowChanged;
            Model = store;
            EnableSearch = false;

            ShowExpanders = false;
            LevelIndentation = 6;

            ConfigureDragAndDrop ();
            store.Refresh ();
            ConnectEvents ();

            ResetSelection ();
        }