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; }
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); }