void Update()
        {
            IOutlinedDocument outlineDoc = null;

            if (CurrentDoc != null)
            {
                outlineDoc = CurrentDoc.GetContent <IOutlinedDocument> ();
            }
            if (currentOutlineDoc == outlineDoc)
            {
                return;
            }

            ReleaseDoc();

            Gtk.Widget newWidget = null;
            if (outlineDoc != null)
            {
                newWidget = outlineDoc.GetOutlineWidget();
            }
            if (newWidget == null)
            {
                SetEmptyWidget();
            }
            else
            {
                SetWidget(newWidget);
            }
            currentOutlineDoc = outlineDoc;
        }
Ejemplo n.º 2
0
        void Update()
        {
            IOutlinedDocument outlineDoc = null;

            if (CurrentDoc != null)
            {
                outlineDoc = CurrentDoc.GetContent <IOutlinedDocument> ();
            }

            if (currentOutlineDoc == outlineDoc)
            {
                return;
            }
            ReleaseDoc();
            currentOutlineDoc = outlineDoc;

            Widget newWidget = null;
            IEnumerable <Widget> toolbarWidgets = null;

            if (outlineDoc != null)
            {
                newWidget = outlineDoc.GetOutlineWidget();
                if (newWidget != null)
                {
                    toolbarWidgets = outlineDoc.GetToolbarWidgets();
                }
            }
            SetWidget(newWidget);
            SetToolbarWidgets(toolbarWidgets);
        }