public static RequestWindow Create() { Gtk.Builder builder = new Gtk.Builder(null, "OECGUI.PullRequestWindow.glade", null); RequestWindow m = new RequestWindow(builder, builder.GetObject("RequestWindow").Handle); return(m); }
public static void ShowError (Exception ex, string message, Window parent, bool modal) { Gtk.Builder builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.ErrorDialog.ui", null); ErrorDialog dlg = new ErrorDialog (builder, builder.GetObject ("ErrorDialog").Handle); if (message == null) { if (ex != null) dlg.Message = string.Format (Catalog.GetString ("Exception occurred: {0}"), ex.Message); else { dlg.Message = "An unknown error occurred"; dlg.AddDetails (Environment.StackTrace, false); } } else dlg.Message = message; if (ex != null) { dlg.AddDetails (string.Format (Catalog.GetString ("Exception occurred: {0}"), ex.Message) + "\n\n", true); dlg.AddDetails (ex.ToString (), false); } if (modal) { dlg.Run (); dlg.Destroy (); } else dlg.Show (); }
public AddinInfoView () { Builder builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.AddinInfoView.ui", null); builder.Autoconnect (this); Add ((Box) builder.GetObject ("AddinInfoView")); AllowInstall = true; titleWidth = labelName.SizeRequest ().Width; HeaderBox hb = new HeaderBox (1,1,1,1); hb.Show (); hb.Replace (this); hb = new HeaderBox (1,0,0,0); hb.SetPadding (6,6,6,6); hb.Show (); hb.GradientBackround = true; hb.Replace (eboxButs); hb = new HeaderBox (0,1,0,0); hb.SetPadding (6,6,6,6); hb.Show (); hb.GradientBackround = true; hb.Replace (boxHeader); topHeaderBox = hb; //Enable our buttons for clicking btnDisable.Clicked += OnBtnDisableClicked; btnInstall.Clicked += OnBtnInstallClicked; btnUninstall.Clicked += OnBtnUninstallClicked; btnUpdate.Clicked += OnBtnUpdateClicked; urlButton.Clicked += OnUrlButtonClicked; ShowAll (); }
protected virtual void OnButtonRefreshClicked(object sender, System.EventArgs e) { Gtk.Builder builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.ProgressDialog.ui", null); ProgressDialog pdlg = new ProgressDialog(builder, builder.GetObject("ProgressDialog").Handle); pdlg.Show(); pdlg.SetMessage(AddinManager.CurrentLocalizer.GetString("Updating repository")); bool updateDone = false; Thread t = new Thread(delegate() { try { service.Repositories.UpdateAllRepositories(pdlg); } finally { updateDone = true; } }); t.Start(); while (!updateDone) { while (Gtk.Application.EventsPending()) { Gtk.Application.RunIteration(); } Thread.Sleep(50); } pdlg.Destroy(); LoadGallery(); LoadUpdates(); }
public static PluginWindow Create() { Gtk.Builder builder = new Gtk.Builder(null, "OECGUI.PluginWindow.glade", null); PluginWindow m = new PluginWindow(builder, builder.GetObject("PluginWindow").Handle); return(m); }
public static SettingsWindow Create() { Gtk.Builder builder = new Gtk.Builder(null, "OECGUI.SettingsForm.glade", null); SettingsWindow m = new SettingsWindow(builder, builder.GetObject("SettingsForm").Handle); return(m); }
public static LoginWindow Create() { Gtk.Builder builder = new Gtk.Builder(null, "OECGUI.Test.glade", null); LoginWindow m = new LoginWindow(builder, builder.GetObject("LoginWindow").Handle); return(m); }
public static ExceptionDialog Create(String format, String stackTrace, params object[] args) { Gtk.Builder builder = new Gtk.Builder(null, "OECGUI.ExceptionDialog.glade", null); ExceptionDialog m = new ExceptionDialog(builder, builder.GetObject("dialog1").Handle, format, stackTrace, args); return(m); }
public static DashboardForm Create() { Gtk.Builder builder = new Gtk.Builder(null, "OECGUI.DashboardForm.glade", null); DashboardForm m = new DashboardForm(builder, builder.GetObject("dashboardForm").Handle); return(m); }
#pragma warning restore 169 static void Main(string[] args) { Application.Init(); MyWidget.Register(); Builder builder = new Builder(new System.IO.FileStream("CustomWidgetBuilder.ui", System.IO.FileMode.Open)); MainWindow wnd = new MainWindow(builder, builder.GetObject("m_window").Handle); wnd.Show(); Application.Run(); }
public static BotForm Create() { Gtk.Builder builder = new Gtk.Builder(null, "OECGUI.BotForm.glade", null); BotForm m = new BotForm(builder, builder.GetObject("BotForm").Handle); return(m); }
public DemoThemingStyleClasses () : base ("Style Classes") { BorderWidth = 12; var builder = new Builder ("theming.ui"); var grid = (Widget)builder.GetObject ("grid"); grid.ShowAll (); Add (grid); Show (); }
public static MainWindow Create(RepositoryManager manager) { Gtk.Builder builder = new Gtk.Builder(null, "OECGUI.MainWindow.glade", null); MainWindow.manager = manager; MainWindow.session = manager.session; MainWindow m = new MainWindow(builder, builder.GetObject("MainWindow").Handle, manager); return(m); }
internal void OnManageRepos(object sender, EventArgs e) { Gtk.Builder builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.ManageSitesDialog.ui", null); ManageSitesDialog dlg = new ManageSitesDialog(service, builder, builder.GetObject("window1").Handle); try { dlg.Run(); } finally { dlg.Destroy(); } }
void ManageSites() { Gtk.Builder builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.ManageSitesDialog.ui", null); ManageSitesDialog dlg = new ManageSitesDialog(service, builder, builder.GetObject("ManageSitesDialog").Handle); try { dlg.Run(); repoCombo.Active = lastRepoActive; FillRepos(); } finally { dlg.Destroy(); } }
protected virtual void OnButtonInstallFromFileClicked(object sender, System.EventArgs e) { string[] files; Gtk.FileChooserDialog dlg = new Gtk.FileChooserDialog(Catalog.GetString("Install Add-in Package"), this, FileChooserAction.Open); try { if (lastFolder != null) { dlg.SetCurrentFolder(lastFolder); } else { dlg.SetCurrentFolder(Environment.GetFolderPath(Environment.SpecialFolder.Personal)); } dlg.SelectMultiple = true; Gtk.FileFilter f = new Gtk.FileFilter(); f.AddPattern("*.mpack"); f.Name = Catalog.GetString("Add-in packages"); dlg.AddFilter(f); f = new Gtk.FileFilter(); f.AddPattern("*"); f.Name = Catalog.GetString("All files"); dlg.AddFilter(f); dlg.AddButton(Gtk.Stock.Cancel, ResponseType.Cancel); dlg.AddButton(Gtk.Stock.Open, ResponseType.Ok); if (dlg.Run() != (int)Gtk.ResponseType.Ok) { return; } files = dlg.Filenames; lastFolder = dlg.CurrentFolder; } finally { dlg.Destroy(); } Gtk.Builder builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.InstallDialog.ui", null); InstallDialog idlg = new InstallDialog(service, builder, builder.GetObject("InstallDialog").Handle); try { idlg.InitForInstall(files); if (idlg.Run() == (int)Gtk.ResponseType.Ok) { LoadAll(); } } finally { idlg.Destroy(); } }
protected virtual void OnInstallClicked(object sender, System.EventArgs e) { Gtk.Builder builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.InstallDialog.ui", null); InstallDialog dlg = new InstallDialog(service, builder, builder.GetObject("InstallDialog").Handle); try { List <AddinRepositoryEntry> selectedEntry = ((AddinInfoView)sender).SelectedEntries; dlg.InitForInstall(selectedEntry.ToArray()); if (dlg.Run() == (int)Gtk.ResponseType.Ok) { LoadAll(); } } finally { dlg.Destroy(); } }
protected virtual void OnUpdateAll(object sender, System.EventArgs e) { object[] data = updatesTree.AddinsData; AddinRepositoryEntry[] entries = new AddinRepositoryEntry [data.Length]; Array.Copy(data, entries, data.Length); Gtk.Builder builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.InstallDialog.ui", null); InstallDialog dlg = new InstallDialog(service, builder, builder.GetObject("InstallDialog").Handle); try { dlg.InitForInstall(entries); if (dlg.Run() == (int)Gtk.ResponseType.Ok) { LoadAll(); } } finally { dlg.Destroy(); } }
public HeaderBarWindow(string[] program_args) : base(program_args) { Process proc = new Process (); proc.StartInfo.FileName = "/bin/bash"; proc.StartInfo.Arguments = "-c \"echo $XDG_CURRENT_DESKTOP\""; proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true; proc.Start (); while (!proc.StandardOutput.EndOfStream) { string line = proc.StandardOutput.ReadLine (); UseHeaderBar &= (line == "GNOME"); } if (!UseHeaderBar) return; this.MainMenu = new Xwt.Menu(); Xwt.GtkBackend.GtkEngine ge = new Xwt.GtkBackend.GtkEngine(); var gtk_window = (Window)ge.GetNativeParentWindow(this.Content); Builder builder = new Builder(null, "HeaderBar.glade", null); headerbar1 = new HeaderBar(builder.GetObject("headerbar").Handle); builder.Autoconnect(this); gtk_window.Titlebar = headerbar1; headerbar1.ShowCloseButton = true; headerbar1.ShowAll(); var saveas_menuitem = new MenuItem("Save As"); saveas_menuitem.ButtonPressEvent += (o, args) => SaveAs(); menu2.Add(saveas_menuitem); menu2.ShowAll(); new_button.Clicked += NewClicked; open_button.Clicked += OpenClicked; save_button.Clicked += SaveClicked; ReloadTitle(); }
public static void ShowError(Exception ex, string message, Window parent, bool modal) { Gtk.Builder builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.ErrorDialog.ui", null); ErrorDialog dlg = new ErrorDialog(builder, builder.GetObject("ErrorDialog").Handle); if (message == null) { if (ex != null) { dlg.Message = string.Format(Catalog.GetString("Exception occurred: {0}"), ex.Message); } else { dlg.Message = "An unknown error occurred"; dlg.AddDetails(Environment.StackTrace, false); } } else { dlg.Message = message; } if (ex != null) { dlg.AddDetails(string.Format(Catalog.GetString("Exception occurred: {0}"), ex.Message) + "\n\n", true); dlg.AddDetails(ex.ToString(), false); } if (modal) { dlg.Run(); dlg.Destroy(); } else { dlg.Show(); } }
public GladyWindow(WindowType windowType, string filename) { if (useGlade) { using (var file = App.GetEmbeddedResourceStream("glade." + filename + ".glade")) { Glade.XML gxml = new Glade.XML(file, gladeElementId, ""); gxml.Autoconnect(this); } } else { using (var file = App.GetEmbeddedResourceStream("glade." + filename + ".gtk.xml")) { var builder = new Gtk.Builder(); using (var reader = new StreamReader(file)) { builder.AddFromString(reader.ReadToEnd()); _window = builder.GetObject(gladeElementId) as Gtk.Window; } } } Window.Icon = Gdk.Pixbuf.LoadFromResource(App.GetEmbeddedResourceName("resources.app.png")); }
public AddinInfoView() { Builder builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.AddinInfoView.ui", null); builder.Autoconnect(this); Add((Box)builder.GetObject("AddinInfoView")); AllowInstall = true; titleWidth = labelName.SizeRequest().Width; HeaderBox hb = new HeaderBox(1, 1, 1, 1); hb.Show(); hb.Replace(this); hb = new HeaderBox(1, 0, 0, 0); hb.SetPadding(6, 6, 6, 6); hb.Show(); hb.GradientBackround = true; hb.Replace(eboxButs); hb = new HeaderBox(0, 1, 0, 0); hb.SetPadding(6, 6, 6, 6); hb.Show(); hb.GradientBackround = true; hb.Replace(boxHeader); topHeaderBox = hb; //Enable our buttons for clicking btnDisable.Clicked += OnBtnDisableClicked; btnInstall.Clicked += OnBtnInstallClicked; btnUninstall.Clicked += OnBtnUninstallClicked; btnUpdate.Clicked += OnBtnUpdateClicked; urlButton.Clicked += OnUrlButtonClicked; ShowAll(); }
public MainWindow(Builder builder) : base(builder.GetObject ("mainWindow").Handle) { builder.Autoconnect (this); taskEditor = new TaskEditor (builder); taskTree = new TaskTree (builder); taskTree.SelectedTaskChanged += (sender, e) => { taskEditor.SetCurrentTask (e); taskEditor.LoadTask (); }; Destroyed += (sender, e) => Application.Quit (); DeleteEvent += (o, args) => { if (TaskManager.Instance.ModelModified) { switch (UiUtils.ShowYesNoCancelDialog (this, "Save changes?")) { case ResponseType.Yes: TaskManager.Instance.SaveModel (); break; case ResponseType.Cancel: args.RetVal = true; break; } } }; removeDoneButton.Clicked += (sender, e) => TaskManager.Instance.RemoveTasks (task => task.IsDone); addNewTaskButton.Clicked += AddNewTaskButton_Clicked; saveToFileButton.Clicked += (sender, e) => TaskManager.Instance.SaveModel (); TaskManager.Instance.ModelStateModified += TaskManager_Instance_ModelStateModified; taskEditor.SetCurrentTask (null); RadioToolButton[] filterButtons = { allTasksToolButton, todaysTasksToolButton, thisWeekToolButton, expiredToolButton, noDeadlineToolButton }; ProcessTaskFunc[] filterFuncs = { task => true, task => task.Deadline.HasValue && task.Deadline.Value.Date == DateTime.Now.Date, task => task.Deadline.HasValue && task.Deadline.Value.Date >= DateTime.Now.Date && task.Deadline.Value.Date < DateTime.Now.Date.AddDays (7), task => task.Deadline.HasValue && task.Deadline.Value.Date < DateTime.Now.Date, task => !task.Deadline.HasValue }; foreach (var btn in filterButtons) { btn.Toggled += (sender, e) => { if ((sender as RadioToolButton).Active) { int index = Array.IndexOf (filterButtons, sender); taskTree.SetFilterFunc (filterFuncs [index]); } }; } TaskManager.Instance.LoadModel (); }
protected virtual void OnUpdateClicked(object sender, System.EventArgs e) { List<AddinRepositoryEntry> selectedEntry = ((AddinInfoView)sender).SelectedEntries; Gtk.Builder builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.InstallDialog.ui", null); InstallDialog dlg = new InstallDialog (service, builder, builder.GetObject ("InstallDialog").Handle); try { dlg.InitForInstall (selectedEntry.ToArray ()); if (dlg.Run () == (int) Gtk.ResponseType.Ok) LoadAll (); } finally { dlg.Destroy (); } }
protected virtual void OnUpdateAll(object sender, System.EventArgs e) { object[] data = updatesTree.AddinsData; AddinRepositoryEntry[] entries = new AddinRepositoryEntry [data.Length]; Array.Copy (data, entries, data.Length); Gtk.Builder builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.InstallDialog.ui", null); InstallDialog dlg = new InstallDialog (service, builder, builder.GetObject ("InstallDialog").Handle); try { dlg.InitForInstall (entries); if (dlg.Run () == (int) Gtk.ResponseType.Ok) LoadAll (); } finally { dlg.Destroy (); } }
public static AboutDialog InitializeGui(Window parent = null) { Builder bl = new Builder ("${Namespace}.Dialogs.AboutDialog.glade"); return new AboutDialog (parent, bl, bl.GetObject ("aboutdialog1").Handle); }
void ManageSites() { Gtk.Builder builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.ManageSitesDialog.ui", null); ManageSitesDialog dlg = new ManageSitesDialog (service, builder, builder.GetObject ("ManageSitesDialog").Handle); try { dlg.Run (); repoCombo.Active = lastRepoActive; FillRepos (); } finally { dlg.Destroy (); } }
internal void OnManageRepos(object sender, EventArgs e) { Gtk.Builder builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.ManageSitesDialog.ui", null); ManageSitesDialog dlg = new ManageSitesDialog (service, builder, builder.GetObject ("window1").Handle); try { dlg.Run (); } finally { dlg.Destroy (); } }
protected void OnAdd (object sender, EventArgs e) { Gtk.Builder builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.NewSiteDialog.ui", null); NewSiteDialog dlg = new NewSiteDialog (builder, builder.GetObject ("NewSiteDialog").Handle); try { if (dlg.Run ()) { string url = dlg.Url; if (!url.StartsWith ("http://") && !url.StartsWith ("https://") && !url.StartsWith ("file://")) { url = "http://" + url; } try { new Uri (url); } catch { Services.ShowError (null, "Invalid url: " + url, null, true); } if (!service.Repositories.ContainsRepository (url)) { builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.ProgressDialog.ui", null); ProgressDialog pdlg = new ProgressDialog (builder, builder.GetObject ("ProgressDialog").Handle); pdlg.Show (); pdlg.SetMessage (AddinManager.CurrentLocalizer.GetString ("Registering repository")); bool done = false; AddinRepository rr = null; Exception error = null; ThreadPool.QueueUserWorkItem (delegate { try { rr = service.Repositories.RegisterRepository (pdlg, url, true); } catch (System.Exception ex) { error = ex; } finally { done = true; } }); while (!done) { if (Gtk.Application.EventsPending ()) Gtk.Application.RunIteration (); else Thread.Sleep (100); } pdlg.Destroy (); if (pdlg.HadError) { if (rr != null) service.Repositories.RemoveRepository (rr.Url); return; } if (error != null) { Services.ShowError (error, "The repository could not be registered", null, true); return; } AppendRepository (rr); } } } finally { dlg.Destroy (); } }
private View(GtkLib.Builder builder) : base(builder.GetObject("View").Handle) { builder.Autoconnect(this); }
protected void OnAdd(object sender, EventArgs e) { Gtk.Builder builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.NewSiteDialog.ui", null); NewSiteDialog dlg = new NewSiteDialog(builder, builder.GetObject("NewSiteDialog").Handle); try { if (dlg.Run()) { string url = dlg.Url; if (!url.StartsWith("http://") && !url.StartsWith("https://") && !url.StartsWith("file://")) { url = "http://" + url; } try { new Uri(url); } catch { Services.ShowError(null, "Invalid url: " + url, null, true); } if (!service.Repositories.ContainsRepository(url)) { builder = new Gtk.Builder(null, "Mono.Addins.GuiGtk3.interfaces.ProgressDialog.ui", null); ProgressDialog pdlg = new ProgressDialog(builder, builder.GetObject("ProgressDialog").Handle); pdlg.Show(); pdlg.SetMessage(AddinManager.CurrentLocalizer.GetString("Registering repository")); bool done = false; AddinRepository rr = null; Exception error = null; ThreadPool.QueueUserWorkItem(delegate { try { rr = service.Repositories.RegisterRepository(pdlg, url, true); } catch (System.Exception ex) { error = ex; } finally { done = true; } }); while (!done) { if (Gtk.Application.EventsPending()) { Gtk.Application.RunIteration(); } else { Thread.Sleep(100); } } pdlg.Destroy(); if (pdlg.HadError) { if (rr != null) { service.Repositories.RemoveRepository(rr.Url); } return; } if (error != null) { Services.ShowError(error, "The repository could not be registered", null, true); return; } AppendRepository(rr); } } } finally { dlg.Destroy(); } }
private MainWindow(Gtk.Builder builder) : base(builder.GetObject("MainWindow").Handle) { builder.Autoconnect(this); DeleteEvent += Window_DeleteEvent; // Create a status bar context _fpsStatusbarContextID = _appStatusbar.GetContextId("FPS"); // Create the scene editor _sceneGLWidget = new SceneEditorWidget(); _sceneGLWidget.FpsChange += SceneGLWidgetOnFpsChange; // Add the GL widget to the UI _sceneGLAlignement.Add(_sceneGLWidget); // AlienEngine logo _alienEngineLogoSquare.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.AlienEngineLogo"); _alienEngineLogoSquare.Pixbuf = _alienEngineLogoSquare.Pixbuf.ScaleSimple(36, 36, Gdk.InterpType.Bilinear); // Command buttons _commandButtonMoveImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonMove"); _commandButtonRotateImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonRotate"); _commandButtonScaleImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonScale"); _commandButtonGlobalViewImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonGlobal"); _commandButtonLocalViewImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonLocal"); // Toolbar buttons _commandButtonUndoImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonUndo"); _commandButtonRedoImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonRedo"); // Options buttons _optionButtonHelpImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonHelp"); _optionButtonSettingsImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonSettings"); _optionButtonProjectsImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.commandButtonProjects"); _sceneEditorGameElementsTreeView.RowActivated += _sceneEditorGameElementsTreeView_RowActivated; _sceneEditorTransformComponentTranstateSpinX.SetRange(double.MinValue, double.MaxValue); _sceneEditorTransformComponentTranstateSpinY.SetRange(double.MinValue, double.MaxValue); _sceneEditorTransformComponentTranstateSpinZ.SetRange(double.MinValue, double.MaxValue); _sceneEditorTransformComponentRotateSpinX.SetRange(double.MinValue, double.MaxValue); _sceneEditorTransformComponentRotateSpinY.SetRange(double.MinValue, double.MaxValue); _sceneEditorTransformComponentRotateSpinZ.SetRange(double.MinValue, double.MaxValue); _sceneEditorTransformComponentScaleSpinX.SetRange(double.MinValue, double.MaxValue); _sceneEditorTransformComponentScaleSpinY.SetRange(double.MinValue, double.MaxValue); _sceneEditorTransformComponentScaleSpinZ.SetRange(double.MinValue, double.MaxValue); _sceneEditorTransformComponentRevealerSwitchImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.Components.Transform"); _sceneEditorTransformComponentRevealerSwitch.Clicked += (sender, args) => _sceneEditorTransformComponentRevealer.RevealChild = !_sceneEditorTransformComponentRevealer.RevealChild; _sceneEditorTransformComponentTranslateImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.Icons.move"); _sceneEditorTransformComponentRotateImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.Icons.rotate"); _sceneEditorTransformComponentScaleImage.Pixbuf = new Gdk.Pixbuf(typeof(Program).Assembly, "Windows.Resources.Images.Icons.scale"); _sceneEditorTransformComponentTranstateSpinX.ValueChanged += _sceneEditorTransformComponentChanged; _sceneEditorTransformComponentTranstateSpinY.ValueChanged += _sceneEditorTransformComponentChanged; _sceneEditorTransformComponentTranstateSpinZ.ValueChanged += _sceneEditorTransformComponentChanged; _sceneEditorTransformComponentRotateSpinX.ValueChanged += _sceneEditorTransformComponentChanged; _sceneEditorTransformComponentRotateSpinY.ValueChanged += _sceneEditorTransformComponentChanged; _sceneEditorTransformComponentRotateSpinZ.ValueChanged += _sceneEditorTransformComponentChanged; _sceneEditorTransformComponentScaleSpinX.ValueChanged += _sceneEditorTransformComponentChanged; _sceneEditorTransformComponentScaleSpinY.ValueChanged += _sceneEditorTransformComponentChanged; _sceneEditorTransformComponentScaleSpinZ.ValueChanged += _sceneEditorTransformComponentChanged; SceneEditorGameElementsTree.SetTree(ref _sceneEditorGameElementsTreeStore, ref _sceneEditorGameElementsTreeView); }
protected virtual void OnButtonRefreshClicked(object sender, System.EventArgs e) { Gtk.Builder builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.ProgressDialog.ui", null); ProgressDialog pdlg = new ProgressDialog (builder, builder.GetObject ("ProgressDialog").Handle); pdlg.Show (); pdlg.SetMessage (AddinManager.CurrentLocalizer.GetString ("Updating repository")); bool updateDone = false; Thread t = new Thread (delegate () { try { service.Repositories.UpdateAllRepositories (pdlg); } finally { updateDone = true; } }); t.Start (); while (!updateDone) { while (Gtk.Application.EventsPending ()) Gtk.Application.RunIteration (); Thread.Sleep (50); } pdlg.Destroy (); LoadGallery (); LoadUpdates (); }
#pragma warning restore 649 #endregion #region Constructors / Destructors /// <summary> Default Shared Constructor. </summary> /// <returns> A TestForm1. </returns> public static TestForm1 Create() { Builder builder = new Builder(null, "GtkSharp_BasicForm1_CS.App.TestForm1.glade", null); return new TestForm1(builder, builder.GetObject("window1").Handle); }
protected virtual void Build () { global::Stetic.Gui.Initialize (this); // Widget MonoGame.Tools.Pipeline.MainWindow this.UIManager = new global::Gtk.UIManager (); global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default"); this.FileAction = new global::Gtk.Action ("FileAction", global::Mono.Unix.Catalog.GetString ("File"), null, null); this.FileAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("File"); w1.Add (this.FileAction, null); this.NewAction = new global::Gtk.Action ("NewAction", global::Mono.Unix.Catalog.GetString ("New..."), null, "gtk-new"); this.NewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("New..."); w1.Add (this.NewAction, "<Control>n"); this.OpenAction = new global::Gtk.Action ("OpenAction", global::Mono.Unix.Catalog.GetString ("Open..."), null, "gtk-open"); this.OpenAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Open..."); w1.Add (this.OpenAction, "<Control>o"); this.OpenRecentAction = new global::Gtk.Action ("OpenRecentAction", global::Mono.Unix.Catalog.GetString ("Open Recent"), null, null); this.OpenRecentAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Open Recent"); w1.Add (this.OpenRecentAction, null); this.CloseAction = new global::Gtk.Action ("CloseAction", global::Mono.Unix.Catalog.GetString ("Close"), null, "gtk-close"); this.CloseAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Close"); w1.Add (this.CloseAction, null); this.ImportAction = new global::Gtk.Action ("ImportAction", global::Mono.Unix.Catalog.GetString ("Import..."), null, null); this.ImportAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Import..."); w1.Add (this.ImportAction, null); this.SaveAction = new global::Gtk.Action ("SaveAction", global::Mono.Unix.Catalog.GetString ("Save"), null, "gtk-save"); this.SaveAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Save"); w1.Add (this.SaveAction, "<Control>s"); this.SaveAsAction = new global::Gtk.Action ("SaveAsAction", global::Mono.Unix.Catalog.GetString ("Save As..."), null, "gtk-save-as"); this.SaveAsAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Save As..."); w1.Add (this.SaveAsAction, null); this.ExitAction = new global::Gtk.Action ("ExitAction", global::Mono.Unix.Catalog.GetString ("Exit"), null, "gtk-quit"); this.ExitAction.HideIfEmpty = false; this.ExitAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Exit"); w1.Add (this.ExitAction, null); this.EditAction = new global::Gtk.Action ("EditAction", global::Mono.Unix.Catalog.GetString ("Edit"), null, null); this.EditAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Edit"); w1.Add (this.EditAction, null); this.UndoAction = new global::Gtk.Action ("UndoAction", global::Mono.Unix.Catalog.GetString ("Undo"), null, "gtk-undo"); this.UndoAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Undo"); w1.Add (this.UndoAction, "<Control>z"); this.RedoAction = new global::Gtk.Action ("RedoAction", global::Mono.Unix.Catalog.GetString ("Redo"), null, "gtk-redo"); this.RedoAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Redo"); w1.Add (this.RedoAction, "<Control>y"); RenameAction = new Action ("RenameAction", global::Mono.Unix.Catalog.GetString ("Rename"), null, null); RenameAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Rename"); w1.Add (RenameAction, null); this.DeleteAction = new global::Gtk.Action ("DeleteAction", global::Mono.Unix.Catalog.GetString ("Delete"), null, "gtk-delete"); this.DeleteAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Delete"); w1.Add (this.DeleteAction, null); this.BuildAction = new global::Gtk.Action ("BuildAction", global::Mono.Unix.Catalog.GetString ("Build"), null, null); this.BuildAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Build"); w1.Add (this.BuildAction, null); this.BuildAction1 = new global::Gtk.Action ("BuildAction1", global::Mono.Unix.Catalog.GetString ("Build"), null, "gtk-execute"); this.BuildAction1.ShortLabel = global::Mono.Unix.Catalog.GetString ("Build"); w1.Add (this.BuildAction1, "<Mod2>F6"); this.RebuildAction = new global::Gtk.Action ("RebuildAction", global::Mono.Unix.Catalog.GetString ("Rebuild"), null, "gtk-execute"); this.RebuildAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Rebuild"); w1.Add (this.RebuildAction, null); this.CleanAction = new global::Gtk.Action ("CleanAction", global::Mono.Unix.Catalog.GetString ("Clean"), null, null); this.CleanAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Clean"); w1.Add (this.CleanAction, null); this.DebugModeAction = new global::Gtk.ToggleAction ("DebugModeAction", global::Mono.Unix.Catalog.GetString ("Debug Mode"), null, null); this.DebugModeAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Debug Mode"); w1.Add (this.DebugModeAction, null); this.FilterOutputAction = new global::Gtk.ToggleAction ("FilterOutputAction", global::Mono.Unix.Catalog.GetString ("Filter Output"), null, null); this.FilterOutputAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Filter Output"); this.FilterOutputAction.Active = true; w1.Add (this.FilterOutputAction, null); this.HelpAction = new global::Gtk.Action ("HelpAction", global::Mono.Unix.Catalog.GetString ("Help"), null, null); this.HelpAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Help"); w1.Add (this.HelpAction, null); this.ViewHelpAction = new global::Gtk.Action ("ViewHelpAction", global::Mono.Unix.Catalog.GetString ("View Help"), null, "gtk-help"); this.ViewHelpAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("View Help"); w1.Add (this.ViewHelpAction, "<Mod2>F1"); this.AboutAction = new global::Gtk.Action ("AboutAction", global::Mono.Unix.Catalog.GetString ("About"), null, "gtk-about"); this.AboutAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("About"); w1.Add (this.AboutAction, null); this.CancelBuildAction = new global::Gtk.Action ("CancelBuildAction", global::Mono.Unix.Catalog.GetString ("Cancel Build"), null, "gtk-stop"); this.CancelBuildAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Cancel Build"); w1.Add (this.CancelBuildAction, null); this.AddAction = new global::Gtk.Action ("AddAction", global::Mono.Unix.Catalog.GetString ("Add"), null, null); this.AddAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Add"); w1.Add (this.AddAction, null); this.NewItemAction = new global::Gtk.Action ("NewItemAction", global::Mono.Unix.Catalog.GetString ("New Item..."), null, "gtk-file"); this.NewItemAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("New Item..."); w1.Add (this.NewItemAction, null); this.NewFolderAction = new global::Gtk.Action ("NewFolderAction", global::Mono.Unix.Catalog.GetString ("New Folder..."), null, "gtk-directory"); this.NewFolderAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("New Folder..."); w1.Add (this.NewFolderAction, null); this.ExistingItemAction = new global::Gtk.Action ("ExistingItemAction", global::Mono.Unix.Catalog.GetString ("Existing Item..."), null, null); this.ExistingItemAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Add Existing Item..."); w1.Add (this.ExistingItemAction, null); this.ExistingFolderAction = new global::Gtk.Action ("ExistingFolderAction", global::Mono.Unix.Catalog.GetString ("Existing Folder..."), null, null); this.ExistingFolderAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Add Existing Folder..."); w1.Add (this.ExistingFolderAction, null); this.UIManager.InsertActionGroup (w1, 0); this.AddAccelGroup (this.UIManager.AccelGroup); this.Name = "MonoGame.Tools.Pipeline.MainWindow"; this.Icon = global::Gdk.Pixbuf.LoadFromResource ("MonoGame.Tools.Pipeline.App.ico"); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); // Container child MonoGame.Tools.Pipeline.MainWindow.Gtk.Container+ContainerChild this.vbox2 = new global::Gtk.VBox (); this.vbox2.Name = "vbox2"; // Container child vbox2.Gtk.Box+BoxChild this.UIManager.AddUiFromString ("<ui><menubar name='menubar1'><menu name='FileAction' action='FileAction'><menuitem name='NewAction' action='NewAction'/><menuitem name='OpenAction' action='OpenAction'/><menuitem name='OpenRecentAction' action='OpenRecentAction'/><menuitem name='CloseAction' action='CloseAction'/><separator/><menuitem name='ImportAction' action='ImportAction'/><separator/><menuitem name='SaveAction' action='SaveAction'/><menuitem name='SaveAsAction' action='SaveAsAction'/><separator/><menuitem name='ExitAction' action='ExitAction'/></menu><menu name='EditAction' action='EditAction'><menuitem name='UndoAction' action='UndoAction'/><menuitem name='RedoAction' action='RedoAction'/><separator/><menu name='AddAction' action='AddAction'><menuitem name='NewItemAction' action='NewItemAction'/><menuitem name='NewFolderAction' action='NewFolderAction'/><separator/><menuitem name='ExistingItemAction' action='ExistingItemAction'/><menuitem name='ExistingFolderAction' action='ExistingFolderAction'/></menu><separator/><menuitem name='RenameAction' action='RenameAction'/><menuitem name='DeleteAction' action='DeleteAction'/></menu><menu name='BuildAction' action='BuildAction'><menuitem name='BuildAction1' action='BuildAction1'/><menuitem name='RebuildAction' action='RebuildAction'/><menuitem name='CleanAction' action='CleanAction'/><menuitem name='CancelBuildAction' action='CancelBuildAction'/><separator name='sep1'/><menuitem name='DebugModeAction' action='DebugModeAction'/><menuitem name='FilterOutputAction' action='FilterOutputAction'/></menu><menu name='HelpAction' action='HelpAction'><menuitem name='ViewHelpAction' action='ViewHelpAction'/><separator/><menuitem name='AboutAction' action='AboutAction'/></menu></menubar></ui>"); this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar1"))); this.menubar1.Name = "menubar1"; this.vbox2.Add (this.menubar1); toolBar1 = new Toolbar(); toolNew = new ToolButton(new Image(null, "Toolbar.New.png"), "New"); toolNew.TooltipText = toolNew.Label; toolBar1.Add(toolNew); toolOpen = new ToolButton(new Image(null, "Toolbar.Open.png"), "Open"); toolOpen.TooltipText = toolOpen.Label; toolBar1.Add(toolOpen); toolSave = new ToolButton(new Image(null, "Toolbar.Save.png"), "Save"); toolSave.TooltipText = toolSave.Label; toolBar1.Add(toolSave); toolBar1.Add(new SeparatorToolItem()); toolNewItem = new ToolButton(new Image(null, "Toolbar.NewItem.png"), "Add New Item"); toolNewItem.TooltipText = toolNewItem.Label; toolBar1.Add(toolNewItem); toolAddItem = new ToolButton(new Image(null, "Toolbar.ExistingItem.png"), "Add Existing Item"); toolAddItem.TooltipText = toolAddItem.Label; toolBar1.Add(toolAddItem); toolNewFolder = new ToolButton(new Image(null, "Toolbar.NewFolder.png"), "Add New Folder"); toolNewFolder.TooltipText = toolNewFolder.Label; toolBar1.Add(toolNewFolder); toolAddFolder = new ToolButton(new Image(null, "Toolbar.ExistingFolder.png"), "Add Existing Folder"); toolAddFolder.TooltipText = toolAddFolder.Label; toolBar1.Add(toolAddFolder); toolBar1.Add(new SeparatorToolItem()); toolBuild = new ToolButton(new Image(null, "Toolbar.Build.png"), "Build"); toolBuild.TooltipText = toolBuild.Label; toolBar1.Add(toolBuild); toolRebuild = new ToolButton(new Image(null, "Toolbar.Rebuild.png"), "Rebuild"); toolRebuild.TooltipText = toolRebuild.Label; toolBar1.Add(toolRebuild); toolClean = new ToolButton(new Image(null, "Toolbar.Clean.png"), "Clean"); toolClean.TooltipText = toolClean.Label; toolBar1.Add(toolClean); toolBar1.Add(new SeparatorToolItem()); toolFilterOutput = new ToggleToolButton(); toolFilterOutput.Label = toolFilterOutput.TooltipText = "Filter Output"; toolFilterOutput.IconWidget = new Image(null, "Toolbar.FilterOutput.png"); toolBar1.Add(toolFilterOutput); if (!Global.UseHeaderBar) this.vbox2.PackStart(toolBar1, false, true, 0); global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.menubar1])); w2.Position = 0; w2.Expand = false; w2.Fill = false; // Container child vbox2.Gtk.Box+BoxChild this.hpaned1 = new global::Gtk.HPaned (); this.hpaned1.CanFocus = true; this.hpaned1.Name = "hpaned1"; this.hpaned1.Position = 179; // Container child hpaned1.Gtk.Paned+PanedChild this.vpaned2 = new global::Gtk.VPaned (); this.vpaned2.CanFocus = true; this.vpaned2.Name = "vpaned2"; this.vpaned2.Position = 247; // Container child vpaned2.Gtk.Paned+PanedChild this.projectview1 = new global::MonoGame.Tools.Pipeline.ProjectView (); this.projectview1.Events = ((global::Gdk.EventMask)(256)); this.projectview1.Name = "projectview1"; this.vpaned2.Add (this.projectview1); global::Gtk.Paned.PanedChild w3 = ((global::Gtk.Paned.PanedChild)(this.vpaned2 [this.projectview1])); w3.Resize = false; // Container child vpaned2.Gtk.Paned+PanedChild this.propertiesview1 = new global::MonoGame.Tools.Pipeline.PropertiesView (); this.propertiesview1.Events = ((global::Gdk.EventMask)(256)); this.propertiesview1.Name = "propertiesview1"; this.vpaned2.Add (this.propertiesview1); global::Gtk.Paned.PanedChild w4 = ((global::Gtk.Paned.PanedChild)(this.vpaned2 [this.propertiesview1])); w4.Resize = false; this.hpaned1.Add (this.vpaned2); global::Gtk.Paned.PanedChild w5 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.vpaned2])); w5.Resize = false; // Container child hpaned1.Gtk.Paned+PanedChild buildOutput1 = new BuildOutput(); this.hpaned1.Add (this.buildOutput1); this.vbox2.Add (this.hpaned1); global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hpaned1])); w8.Position = 2; this.Add (this.vbox2); treeview1 = new TreeView(); #if GTK3 if(Global.UseHeaderBar) { Builder builder = new Builder(null, "MonoGame.Tools.Pipeline.Gtk.MainWindow.HeaderBar.glade", null); hbar = new HeaderBar(builder.GetObject("headerbar").Handle); builder.Autoconnect(this); hbar.AttachToWindow(this); hbar.ShowCloseButton = true; hbar.Show(); foreach(var o in menubar1.Children) { menubar1.Remove(o); menu2.Insert(o, 4); } new_button.Clicked += OnNewActionActivated; save_button.Clicked += OnSaveActionActivated; build_button.Clicked += OnBuildAction1Activated; rebuild_button.Clicked += OnRebuildActionActivated; cancel_button.Clicked += OnCancelBuildActionActivated; filteroutput_button.ButtonReleaseEvent += ToggleFilterOutput; filteroutput_button.Sensitive = true; vbox2.Remove (menubar1); open_menubutton = new MenuButton(open_button.Handle); var popover = new Popover(open_menubutton); var vbox = new VBox(); vbox.WidthRequest = 350; vbox.HeightRequest = 300; Gtk3Wrapper.gtk_tree_view_set_activate_on_single_click(treeview1.Handle, true); treeview1.HeadersVisible = false; treeview1.EnableGridLines = TreeViewGridLines.Horizontal; treeview1.HoverSelection = true; treeview1.RowActivated += delegate(object o, RowActivatedArgs args) { popover.Hide(); TreeIter iter; if(!recentListStore.GetIter(out iter, args.Path)) return; OpenProject(recentListStore.GetValue(iter, 1).ToString()); }; ScrolledWindow scroll1 = new ScrolledWindow(); scroll1.WidthRequest = 350; scroll1.HeightRequest = 300; scroll1.Add(treeview1); vbox.PackStart(scroll1, true, true, 0); var openButton = new Button("Open Other..."); openButton.Clicked += delegate(object sender, System.EventArgs e) { popover.Hide(); OnOpenActionActivated(sender, e); }; vbox.PackStart(openButton, false, true, 0); vbox.ShowAll(); popover.Add(vbox); open_menubutton.Popup = popover; } #endif this.Title = basetitle; if ((this.Child != null)) { this.Child.ShowAll (); } this.DefaultWidth = 751; this.DefaultHeight = 557; #if GTK3 Gdk.Geometry geom = new Gdk.Geometry(); geom.MinWidth = 400; geom.MinHeight = 300; this.SetGeometryHints(this, geom, Gdk.WindowHints.MinSize); #endif this.Show (); this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent); this.NewAction.Activated += new global::System.EventHandler (this.OnNewActionActivated); this.toolNew.Clicked += OnNewActionActivated; this.OpenAction.Activated += new global::System.EventHandler (this.OnOpenActionActivated); this.toolOpen.Clicked += OnOpenActionActivated; this.CloseAction.Activated += new global::System.EventHandler (this.OnCloseActionActivated); this.ImportAction.Activated += new global::System.EventHandler (this.OnImportActionActivated); this.SaveAction.Activated += new global::System.EventHandler (this.OnSaveActionActivated); this.toolSave.Clicked += OnSaveActionActivated; this.SaveAsAction.Activated += new global::System.EventHandler (this.OnSaveAsActionActivated); this.ExitAction.Activated += new global::System.EventHandler (this.OnExitActionActivated); this.UndoAction.Activated += new global::System.EventHandler (this.OnUndoActionActivated); this.RedoAction.Activated += new global::System.EventHandler (this.OnRedoActionActivated); RenameAction.Activated += this.OnRenameActionActivated; this.DeleteAction.Activated += new global::System.EventHandler (this.OnDeleteActionActivated); this.BuildAction1.Activated += new global::System.EventHandler (this.OnBuildAction1Activated); toolBuild.Clicked += OnBuildAction1Activated; this.RebuildAction.Activated += new global::System.EventHandler (this.OnRebuildActionActivated); toolRebuild.Clicked += OnRebuildActionActivated; this.CleanAction.Activated += new global::System.EventHandler (this.OnCleanActionActivated); toolClean.Clicked += OnCleanActionActivated; this.ViewHelpAction.Activated += new global::System.EventHandler (this.OnViewHelpActionActivated); this.AboutAction.Activated += new global::System.EventHandler (this.OnAboutActionActivated); this.NewItemAction.Activated += new global::System.EventHandler (this.OnNewItemActionActivated); this.toolNewItem.Clicked += OnNewItemActionActivated; this.NewFolderAction.Activated += new global::System.EventHandler (this.OnNewFolderActionActivated); this.toolNewFolder.Clicked += OnNewFolderActionActivated; this.ExistingItemAction.Activated += new global::System.EventHandler (this.OnAddItemActionActivated); this.toolAddItem.Clicked += OnAddItemActionActivated; this.ExistingFolderAction.Activated += new global::System.EventHandler (this.OnAddFolderActionActivated); this.toolAddFolder.Clicked += OnAddFolderActionActivated; this.DebugModeAction.Activated += new global::System.EventHandler (this.OnDebugModeActionActivated); this.FilterOutputAction.Activated += OnFilterOutputActionActivated; this.toolFilterOutput.ButtonReleaseEvent += ToggleFilterOutput; this.CancelBuildAction.Activated += new global::System.EventHandler (this.OnCancelBuildActionActivated); this.SizeAllocated += MainWindow_SizeAllocated; }
protected virtual void OnButtonInstallFromFileClicked(object sender, System.EventArgs e) { string[] files; Gtk.FileChooserDialog dlg = new Gtk.FileChooserDialog (Catalog.GetString ("Install Add-in Package"), this, FileChooserAction.Open); try { if (lastFolder != null) dlg.SetCurrentFolder (lastFolder); else dlg.SetCurrentFolder (Environment.GetFolderPath (Environment.SpecialFolder.Personal)); dlg.SelectMultiple = true; Gtk.FileFilter f = new Gtk.FileFilter (); f.AddPattern ("*.mpack"); f.Name = Catalog.GetString ("Add-in packages"); dlg.AddFilter (f); f = new Gtk.FileFilter (); f.AddPattern ("*"); f.Name = Catalog.GetString ("All files"); dlg.AddFilter (f); dlg.AddButton (Gtk.Stock.Cancel, ResponseType.Cancel); dlg.AddButton (Gtk.Stock.Open, ResponseType.Ok); if (dlg.Run () != (int) Gtk.ResponseType.Ok) return; files = dlg.Filenames; lastFolder = dlg.CurrentFolder; } finally { dlg.Destroy (); } Gtk.Builder builder = new Gtk.Builder (null, "Mono.Addins.GuiGtk3.interfaces.InstallDialog.ui", null); InstallDialog idlg = new InstallDialog (service, builder, builder.GetObject ("InstallDialog").Handle); try { idlg.InitForInstall (files); if (idlg.Run () == (int) Gtk.ResponseType.Ok) LoadAll (); } finally { idlg.Destroy (); } }