void OnSourceProjectLibsChanged(object s, EventArgs a) { // If component types have changed in the source project, they must also change // in this project. gproject.WidgetLibraries = (ArrayList)sourceProject.WidgetLibraries.Clone(); gproject.InternalWidgetLibraries = (ArrayList)sourceProject.InternalWidgetLibraries.Clone(); gproject.NotifyComponentTypesChanged(); }
void OnProjectReloaded(object s, EventArgs a) { Gtk.Widget topWidget = project.GetWidget(sourceWidget); if (topWidget != null) { rootWidget = Stetic.Wrapper.Container.Lookup(topWidget); undoManager.RootObject = rootWidget; if (rootWidget != null) { Gtk.Widget oldWidget = designer; if (widget != null) { widget.SelectionChanged -= OnSelectionChanged; widget = null; } OnRootWidgetChanged(); if (oldWidget != null) { // Delay the destruction of the old widget, so the designer has time to // show the new widget. This avoids flickering. GLib.Timeout.Add(500, delegate { oldWidget.Destroy(); return(false); }); } project.NotifyComponentTypesChanged(); return; } } SetErrorMode(); }