public ImportDialog(bool doNotShowAgainVisible) : base("ImportDialog") { accel_group = new AccelGroup(); if (ServiceManager.Contains("GtkElementsService")) { Dialog.TransientFor = ServiceManager.Get <GtkElementsService> ().PrimaryWindow; } Dialog.WindowPosition = WindowPosition.CenterOnParent; Dialog.AddAccelGroup(accel_group); Dialog.DefaultResponse = ResponseType.Ok; import_button = (Glade["ImportButton"] as Button); DoNotShowAgainVisible = doNotShowAgainVisible; PopulateSourceList(); ServiceManager.SourceManager.SourceAdded += OnSourceAdded; ServiceManager.SourceManager.SourceRemoved += OnSourceRemoved; ServiceManager.SourceManager.SourceUpdated += OnSourceUpdated; Glade["MessageLabel"].Visible = ServiceManager.SourceManager.DefaultSource.Count == 0; import_button.AddAccelerator("activate", accel_group, (uint)Gdk.Key.Return, 0, AccelFlags.Visible); Dialog.StyleSet += delegate { UpdateIcons(); }; }
public ErrorListDialog() : base("ErrorListDialog") { accel_group = new AccelGroup(); Dialog.AddAccelGroup(accel_group); list_view.SetSizeRequest(-1, 120); details_expander.Activated += delegate { ConfigureGeometry(); }; Dialog.Realized += delegate { ConfigureGeometry(); }; }