public void ShowGlobalPreferencesDialog(Window parentWindow, string panelId, Action <OptionsDialog> configurationAction = null) { if (parentWindow == null && IdeApp.Workbench.RootWindow.Visible) { parentWindow = IdeApp.Workbench.RootWindow; } OptionsDialog ops = new OptionsDialog( parentWindow, properties, "/MonoDevelop/Ide/GlobalOptionsDialog"); ops.Title = Platform.IsWindows ? GettextCatalog.GetString("Options") : GettextCatalog.GetString("Preferences"); try { if (panelId != null) { ops.SelectPanel(panelId); } if (configurationAction != null) { configurationAction(ops); } if (MessageService.RunCustomDialog(ops, parentWindow) == (int)Gtk.ResponseType.Ok) { PropertyService.SaveProperties(); MonoDevelop.Projects.Policies.PolicyService.SavePolicies(); } } finally { ops.Destroy(); ops.Dispose(); } }
public void ShowGlobalPreferencesDialog(Gtk.Window parentWindow, string panelId) { if (parentWindow == null) { parentWindow = IdeApp.Workbench.RootWindow; } OptionsDialog ops = new OptionsDialog( parentWindow, TextEditorProperties.Properties, "/MonoDevelop/Ide/GlobalOptionsDialog"); try { if (panelId != null) { ops.SelectPanel(panelId); } if (MessageService.RunCustomDialog(ops, parentWindow) == (int)Gtk.ResponseType.Ok) { PropertyService.SaveProperties(); MonoDevelop.Projects.Policies.PolicyService.SavePolicies(); } } finally { ops.Destroy(); } }