static Widget CreateSeparator() { var separator = new HSeparator(); separator.Show(); return(separator); }
public void AddMessage(string msg, string icon) { if (lastImage != null) { HSeparator sep = new HSeparator(); sep.Show(); msgBox.PackStart(sep, false, false, 0); lastImage.IconSize = (int)Gtk.IconSize.Button; } HBox box = new HBox(); box.Spacing = 12; Alignment imgBox = new Alignment(0, 0, 0, 0); Image img = new Image(icon, lastImage != null ? Gtk.IconSize.Button : IconSize.Dialog); imgBox.Add(img); lastImage = img; box.PackStart(imgBox, false, false, 0); Label lab = new Label(msg); lab.Xalign = 0; lab.Yalign = 0; lab.Wrap = true; lab.WidthRequest = 500; box.PackStart(lab, true, true, 0); msgBox.PackStart(box, false, false, 0); box.ShowAll(); }
public void AddMessage(string msg, IconId icon) { if (lastImage != null) { HSeparator sep = new HSeparator(); sep.Show(); msgBox.PackStart(sep, false, false, 0); lastImage.IconSize = Gtk.IconSize.Menu; } HBox box = new HBox(); box.Spacing = 12; Alignment imgBox = new Alignment(0, 0, 0, 0); var img = new ImageView(icon, lastImage != null ? Gtk.IconSize.Menu : IconSize.Dialog); imgBox.Add(img); lastImage = img; box.PackStart(imgBox, false, false, 0); Label lab = new Label(msg); lab.UseUnderline = false; lab.Xalign = 0; lab.Yalign = 0; lab.Wrap = true; lab.WidthRequest = 500; box.PackStart(lab, true, true, 0); msgBox.PackStart(box, false, false, 0); box.ShowAll(); }
public void Separate() { HSeparator separator = (HSeparator)separatorTemplate.Duplicate(); separator.Show(); AddChild(separator); }
public WidgetBuilderOptionPanelWidget(Project project) : base(false, 6) { this.project = project as DotNetProject; Gtk.HBox box = new Gtk.HBox(false, 3); Gtk.Label lbl = new Gtk.Label(GettextCatalog.GetString("Target Gtk# version:")); box.PackStart(lbl, false, false, 0); comboVersions = ComboBox.NewText(); ReferenceManager refmgr = new ReferenceManager(project as DotNetProject); foreach (string v in refmgr.SupportedGtkVersions) { comboVersions.AppendText(v); } comboVersions.Active = refmgr.SupportedGtkVersions.IndexOf(refmgr.GtkPackageVersion); refmgr.Dispose(); box.PackStart(comboVersions, false, false, 0); box.ShowAll(); PackStart(box, false, false, 0); HSeparator sep = new HSeparator(); sep.Show(); PackStart(sep, false, false, 0); if (!GtkDesignInfo.HasDesignedObjects(project)) { return; } GtkDesignInfo designInfo = GtkDesignInfo.FromProject(project); checkGettext = new CheckButton(GettextCatalog.GetString("Enable gettext support")); checkGettext.Active = designInfo.GenerateGettext; checkGettext.Show(); PackStart(checkGettext, false, false, 0); box = new Gtk.HBox(false, 3); box.PackStart(new Label(GettextCatalog.GetString("Gettext class:")), false, false, 0); entryGettext = new Gtk.Entry(); entryGettext.Text = designInfo.GettextClass; entryGettext.Sensitive = checkGettext.Active; box.PackStart(entryGettext, false, false, 0); box.ShowAll(); PackStart(box, false, false, 0); checkGettext.Clicked += delegate { box.Sensitive = checkGettext.Active; if (checkGettext.Active) { entryGettext.Text = "Mono.Unix.Catalog"; } }; }
void ShowQuitOption(object sender, EventArgs args) { if (enabled.Active != originalSetting) { tableRestart.ShowAll(); separatorRestart.Show(); } else { tableRestart.Hide(); separatorRestart.Hide(); } }
public NotebookPage(Page page) { this.page = page; BorderWidth = 5; Spacing = 10; tab_widget = new Label(page.Name); tab_widget.Show(); Widget page_widget = page.DisplayWidget as Widget; if (page_widget != null) { page_widget.Show(); PackStart(page_widget, true, true, 0); } else { foreach (Section section in page) { AddSection(section); } if (page.ChildPages.Count > 0) { Notebook notebook = new Notebook(); notebook.ShowBorder = false; notebook.ShowTabs = false; notebook.Show(); PageComboBox page_combo = new PageComboBox(page.ChildPages, notebook); PackStart(page_combo, false, false, 0); HSeparator sep = new HSeparator(); sep.Show(); PackStart(sep, false, false, 0); foreach (Page child_page in page.ChildPages) { NotebookPage page_ui = new NotebookPage(child_page); page_ui.BorderWidth = 0; page_ui.Show(); notebook.AppendPage(page_ui, null); } PackStart(notebook, true, true, 0); } } }
public static void DrawApp(Gtk.TreeView localTree) { if (firstrun == false) { window.Remove(box1); } else { firstrun = false; } ScrolledWindow sw = new ScrolledWindow(); separator = new HSeparator(); box1 = new VBox(false, 0); sw.Add(localTree); box1.PackStart(sw, true, true, 5); box1.PackStart(separator, false, true, 5); separator.Show(); box2 = new HBox(false, 0); quitbox = new HBox(false, 0); Button downloadButton = new Button("Download"); downloadButton.Clicked += new EventHandler(downloadButton_Clicked); Button button = new Button("Quit"); button.Clicked += QuitButton_Clicked; Button FetchXml = new Button("Fetch Feed"); FetchXml.Clicked += FetchXml_Clicked; quitbox.PackStart(FetchXml, true, false, 0); quitbox.PackStart(downloadButton, true, false, 0); quitbox.PackStart(button, true, false, 0); box1.PackStart(box2, false, false, 0); box1.PackStart(quitbox, false, false, 0); window.Add(box1); }
/// <summary> /// Randomizes the easter egg messages /// and its chance of showing up. /// </summary> public void RandomizeEasterEgg() { lineSeparator.Hide(); tipMessageLabel.Hide(); if (random.Next(0, 6) > 1) { var messages = SimulationParameters.Instance.EasterEggMessages; tipMessageLabel.Text = messages.Messages.Random(random); lineSeparator.Show(); tipMessageLabel.Show(); timer.Start(20); } }
void CreatePageWidget(SectionPage page) { List <PanelInstance> boxPanels = new List <PanelInstance> (); List <PanelInstance> tabPanels = new List <PanelInstance> (); foreach (PanelInstance pi in page.Panels) { if (pi.Widget == null) { pi.Widget = pi.Panel.CreatePanelWidget(); if (pi.Widget == null) { continue; } //HACK: work around bug 469427 - broken themes match on widget names if (pi.Widget.Name.IndexOf("Panel") > 0) { pi.Widget.Name = pi.Widget.Name.Replace("Panel", "_"); } } else if (pi.Widget.Parent != null) { ((Gtk.Container)pi.Widget.Parent).Remove(pi.Widget); } if (pi.Node.Grouping == PanelGrouping.Tab) { tabPanels.Add(pi); } else { boxPanels.Add(pi); } } // Try to fit panels with grouping=box or auto in the main page. // If they don't fit. Move auto panels to its own tab page. int mainPageSize; bool fits; do { PanelInstance lastAuto = null; mainPageSize = 0; foreach (PanelInstance pi in boxPanels) { if (pi.Node.Grouping == PanelGrouping.Auto) { lastAuto = pi; } // HACK: This we are parenting/unparenting the widget here as a workaround // for a layout issue. To properly calculate the size of the widget, the widget // needs to have the style that it will have when added to the window. pi.Widget.Parent = this; mainPageSize += pi.Widget.SizeRequest().Height + 6; pi.Widget.Unparent(); } fits = mainPageSize <= pageFrame.Allocation.Height; if (!fits) { if (lastAuto != null && boxPanels.Count > 1) { boxPanels.Remove(lastAuto); tabPanels.Insert(0, lastAuto); } else { fits = true; } } } while (!fits); Gtk.VBox box = new VBox(false, 12); box.Show(); for (int n = 0; n < boxPanels.Count; n++) { if (n != 0) { HSeparator sep = new HSeparator(); sep.Show(); box.PackStart(sep, false, false, 0); } PanelInstance pi = boxPanels [n]; box.PackStart(pi.Widget, pi.Node.Fill, pi.Node.Fill, 0); pi.Widget.Show(); } box.BorderWidth = 12; if (tabPanels.Count > 0) { /* SquaredNotebook nb = new SquaredNotebook (); * nb.Show (); * nb.AddTab (box, GettextCatalog.GetString ("General")); * foreach (PanelInstance pi in tabPanels) { * Gtk.Alignment a = new Alignment (0, 0, 1, 1); * a.BorderWidth = 9; * a.Show (); * a.Add (pi.Widget); * nb.AddTab (a, GettextCatalog.GetString (pi.Node.Label)); * pi.Widget.Show (); * }*/ Gtk.Notebook nb = new Notebook(); nb.Show(); if (box.Children.Length > 0) { Gtk.Label blab = new Gtk.Label(GettextCatalog.GetString("General")); blab.Show(); box.BorderWidth = 9; nb.InsertPage(box, blab, -1); } foreach (PanelInstance pi in tabPanels) { Gtk.Label lab = new Gtk.Label(GettextCatalog.GetString(pi.Node.Label)); lab.Show(); Gtk.Alignment a = new Alignment(0, 0, 1, 1); a.BorderWidth = 9; a.Show(); a.Add(pi.Widget); nb.InsertPage(a, lab, -1); pi.Widget.Show(); } page.Widget = nb; nb.BorderWidth = 12; } else { page.Widget = box; } }
public CommitDialog(ChangeSet changeSet) { Build(); store = new ListStore(typeof(Xwt.Drawing.Image), typeof(string), typeof(string), typeof(bool), typeof(object)); fileList.Model = store; fileList.SearchColumn = -1; // disable the interactive search this.changeSet = changeSet; oldMessage = changeSet.GlobalComment; CellRendererText crt = new CellRendererText(); var crp = new CellRendererImage(); TreeViewColumn colStatus = new TreeViewColumn(); colStatus.Title = GettextCatalog.GetString("Status"); colStatus.PackStart(crp, false); colStatus.PackStart(crt, true); colStatus.Spacing = 2; colStatus.AddAttribute(crp, "image", 0); colStatus.AddAttribute(crt, "text", 1); CellRendererToggle cellToggle = new CellRendererToggle(); cellToggle.Toggled += new ToggledHandler(OnCommitToggledHandler); TreeViewColumn colCommit = new TreeViewColumn("", cellToggle, "active", 3); TreeViewColumn colFile = new TreeViewColumn(GettextCatalog.GetString("File"), new CellRendererText(), "text", 2); fileList.AppendColumn(colCommit); fileList.AppendColumn(colStatus); fileList.AppendColumn(colFile); colCommit.Visible = false; object[] exts = AddinManager.GetExtensionObjects("/MonoDevelop/VersionControl/CommitDialogExtensions", false); bool separatorRequired = false; foreach (object ob in exts) { CommitDialogExtension ext = ob as CommitDialogExtension; if (ext == null) { LoggingService.LogError("Commit extension type " + ob.GetType() + " must be a subclass of CommitDialogExtension"); continue; } if (ext.Initialize(changeSet)) { var newTitle = ext.FormatDialogTitle(changeSet, Title); if (newTitle != null) { Title = newTitle; } ext.CommitMessageTextViewHook(textview); if (separatorRequired) { HSeparator sep = new HSeparator(); sep.Show(); vboxExtensions.PackEnd(sep, false, false, 0); } vboxExtensions.PackEnd(ext, false, false, 0); extensions.Add(ext); ext.AllowCommitChanged += HandleAllowCommitChanged; separatorRequired = true; } else { ext.Destroy(); } } HandleAllowCommitChanged(null, null); LoadChangeset(changeSet.Items); if (string.IsNullOrEmpty(changeSet.GlobalComment)) { AuthorInformation aInfo; CommitMessageFormat fmt = VersionControlService.GetCommitMessageFormat(changeSet, out aInfo); Message = changeSet.GenerateGlobalComment(fmt, aInfo); } else { Message = changeSet.GlobalComment; } textview.Buffer.Changed += OnTextChanged; responseSensitive = !string.IsNullOrEmpty(Message); // Focus the text view and move the insert point to the beginning. Makes it easier to insert // a comment header. textview.Buffer.MoveMark(textview.Buffer.InsertMark, textview.Buffer.StartIter); textview.Buffer.MoveMark(textview.Buffer.SelectionBound, textview.Buffer.StartIter); textview.GrabFocus(); textview.Buffer.MarkSet += OnMarkSet; SetResponseSensitive(ResponseType.Ok, responseSensitive); VersionControlService.FileStatusChanged += OnFileStatusChanged; }
public CommitDialog(ChangeSet changeSet) { Build(); store = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(bool), typeof(object)); fileList.Model = store; this.changeSet = changeSet; oldMessage = changeSet.GlobalComment; CellRendererText crt = new CellRendererText(); var crp = new CellRendererPixbuf(); TreeViewColumn colStatus = new TreeViewColumn(); colStatus.Title = GettextCatalog.GetString("Status"); colStatus.PackStart(crp, false); colStatus.PackStart(crt, true); colStatus.Spacing = 2; colStatus.AddAttribute(crp, "pixbuf", 0); colStatus.AddAttribute(crt, "text", 1); CellRendererToggle cellToggle = new CellRendererToggle(); cellToggle.Toggled += new ToggledHandler(OnCommitToggledHandler); TreeViewColumn colCommit = new TreeViewColumn("", cellToggle, "active", 3); TreeViewColumn colFile = new TreeViewColumn(GettextCatalog.GetString("File"), new CellRendererText(), "text", 2); fileList.AppendColumn(colCommit); fileList.AppendColumn(colStatus); fileList.AppendColumn(colFile); colCommit.Visible = false; object[] exts = AddinManager.GetExtensionObjects("/MonoDevelop/VersionControl/CommitDialogExtensions", false); bool separatorRequired = false; foreach (object ob in exts) { CommitDialogExtension ext = ob as CommitDialogExtension; if (ext == null) { MessageService.ShowError("Commit extension type " + ob.GetType() + " must be a subclass of CommitDialogExtension"); continue; } if (ext.Initialize(changeSet)) { if (separatorRequired) { HSeparator sep = new HSeparator(); sep.Show(); vboxExtensions.PackEnd(sep, false, false, 0); } vboxExtensions.PackEnd(ext, false, false, 0); extensions.Add(ext); ext.AllowCommitChanged += HandleAllowCommitChanged; separatorRequired = true; } else { ext.Destroy(); } } HandleAllowCommitChanged(null, null); foreach (ChangeSetItem info in changeSet.Items) { Gdk.Pixbuf statusicon = VersionControlService.LoadIconForStatus(info.Status); string lstatus = VersionControlService.GetStatusLabel(info.Status); string localpath = (!info.LocalPath.IsChildPathOf(changeSet.BaseLocalPath)? ".": (string)info.LocalPath.ToRelative(changeSet.BaseLocalPath)); if (localpath.Length > 0 && localpath[0] == System.IO.Path.DirectorySeparatorChar) { localpath = localpath.Substring(1); } if (localpath == "") { localpath = "."; } // not sure if this happens store.AppendValues(statusicon, lstatus, localpath, true, info); selected.Add(info.LocalPath); } if (string.IsNullOrEmpty(changeSet.GlobalComment)) { AuthorInformation aInfo; CommitMessageFormat fmt = VersionControlService.GetCommitMessageFormat(changeSet, out aInfo); Message = changeSet.GenerateGlobalComment(fmt, aInfo); } else { Message = changeSet.GlobalComment; } textview.Buffer.Changed += OnTextChanged; // Focus the text view and move the insert point to the begining. Makes it easier to insert // a comment header. textview.Buffer.MoveMark(textview.Buffer.InsertMark, textview.Buffer.StartIter); textview.Buffer.MoveMark(textview.Buffer.SelectionBound, textview.Buffer.StartIter); textview.GrabFocus(); }
void LoadUpdates(List <Update> updates) { if (updates == null || updates.Count == 0) { SetMessage(GettextCatalog.GetString("No updates available")); return; } foreach (var c in productBox.Children) { productBox.Remove(c); c.Destroy(); } productBox.Spacing = 0; foreach (var update in updates) { var updateBox = new VBox() { Spacing = 2 }; var labelBox = new HBox(); updateBox.PackStart(labelBox, false, false, 0); string warning = null; switch (update.Level) { case UpdateLevel.Alpha: warning = GettextCatalog.GetString("ALPHA"); break; case UpdateLevel.Beta: warning = GettextCatalog.GetString("BETA"); break; case UpdateLevel.Test: warning = GettextCatalog.GetString("TEST"); break; } if (warning != null) { warning = "<b><span color=\"#DD1111\">" + warning + "</span></b>"; } var updateExpander = new Expander(""); updateExpander.LabelWidget = new Label() { Markup = string.Format("<b>{0}</b>\n{1} ({2:yyyy-MM-dd}) {3}", update.Name, update.Version, update.Date, warning ?? ""), }; labelBox.PackStart(updateExpander, true, true, 0); var downloadButton = new Button() { Label = GettextCatalog.GetString("Download") }; //NOTE: grab the variable from the loop var so the closure captures it var url = update.Url; downloadButton.Clicked += delegate { DesktopService.ShowUrl(url); }; labelBox.PackStart(downloadButton, false, false, 0); var sb = new StringBuilder(); for (int i = 0; i < update.Releases.Count; i++) { var release = update.Releases[i]; if (i > 0) { if (i == 1) { sb.AppendLine(); sb.AppendLine("This release also includes previous updates:"); } sb.AppendLine(); sb.AppendFormat("{0} ({1:yyyy-MM-dd})\n", release.Version, release.Date); sb.AppendLine(); } sb.Append(release.Notes.Trim('\t', ' ', '\n', '\r')); sb.AppendLine(); } var buffer = new TextBuffer(null); buffer.Text = sb.ToString(); var textView = new TextView(buffer); textView.WrapMode = WrapMode.Word; textView.Editable = false; textView.LeftMargin = textView.RightMargin = 4; updateBox.PackStart(textView, false, false, 0); bool startsExpanded = false; updateExpander.Expanded = startsExpanded; updateExpander.Activated += delegate { textView.Visible = updateExpander.Expanded; }; updateBox.BorderWidth = 4; productBox.PackStart(updateBox, false, false, 0); updateBox.ShowAll(); //this has to be set false after the ShowAll textView.Visible = startsExpanded; var sep = new HSeparator(); productBox.PackStart(sep, false, false, 0); sep.Show(); } notebook1.CurrentPage = PAGE_UPDATES; }
public NotebookPage(Page page) { this.page = page; BorderWidth = 5; Spacing = 10; tab_widget = new Label(page.Name); tab_widget.Show(); Widget page_widget = page.DisplayWidget as Widget; if (page_widget != null) { page_widget.Show(); PackStart(page_widget, true, true, 0); } else { foreach (Section section in page) { AddSection(section); } if (page.ChildPages.Count > 0) { Notebook notebook = new Notebook(); notebook.ShowBorder = false; notebook.ShowTabs = false; notebook.Show(); var hbox = new HBox() { Spacing = 6 }; // FIXME this shouldn't be hard-coded to 'Source:', but this is the only // user of this code atm... var page_label = new Label(Mono.Unix.Catalog.GetString("Source:")); var page_combo = new PageComboBox(page.ChildPages, notebook); hbox.PackStart(page_label, false, false, 0); hbox.PackStart(page_combo, true, true, 0); hbox.ShowAll(); PackStart(hbox, false, false, 0); HSeparator sep = new HSeparator(); sep.Show(); PackStart(sep, false, false, 0); foreach (Page child_page in page.ChildPages) { NotebookPage page_ui = new NotebookPage(child_page); page_ui.BorderWidth = 0; page_ui.Show(); notebook.AppendPage(page_ui, null); } PackStart(notebook, true, true, 0); } } }
protected override void CreateBody() { CreateBody(Translator.GetString("How do you want to handle the taxes?")); #region VAT or Sales tax WrapLabel lblVATorTax = new WrapLabel { Markup = new PangoStyle { Size = PangoStyle.TextSize.Large, Text = Translator.GetString("Are you using VAT or Sales tax?") } }; lblVATorTax.Show(); vboBody.PackStart(lblVATorTax, true, true, 5); rbnVAT = new RadioButton(Translator.GetString("VAT")); rbnSalesTax = new RadioButton(rbnVAT, Translator.GetString("Sales tax")); rbnVAT.Toggled += rbnVAT_Toggled; HBox hbo = new HBox { Spacing = 10 }; hbo.PackStart(rbnVAT, false, true, 0); hbo.PackStart(rbnSalesTax, false, true, 0); hbo.ShowAll(); vboBody.PackStart(hbo, false, true, 5); #endregion HSeparator hs = new HSeparator(); hs.Show(); vboBody.PackStart(hs, true, true, 2); #region Default tax WrapLabel lblTaxRateTitle = new WrapLabel { Markup = new PangoStyle { Size = PangoStyle.TextSize.Large, Text = Translator.GetString("What is the dafault tax rate you want to use?") } }; lblTaxRateTitle.Show(); vboBody.PackStart(lblTaxRateTitle, true, true, 5); Label lblTaxRate = new Label { Markup = new PangoStyle { Text = Translator.GetString("Rate:") } }; defaultVatGroup = VATGroup.GetById(VATGroup.DefaultVATGroupId); txtTaxRate = new Entry { Text = Percent.ToEditString(defaultVatGroup.VatValue) }; txtTaxRate.WidthChars = 10; txtTaxRate.Alignment = 1; hbo = new HBox { Spacing = 10 }; hbo.PackStart(lblTaxRate, false, true, 0); hbo.PackStart(txtTaxRate, false, true, 0); hbo.ShowAll(); vboBody.PackStart(hbo, false, true, 5); #endregion hs = new HSeparator(); hs.Show(); vboBody.PackStart(hs, true, true, 2); #region With or without VAT WrapLabel lblPrices = new WrapLabel { Markup = new PangoStyle { Size = PangoStyle.TextSize.Large, Text = Translator.GetString("How do you want to use the prices in the application? Choose which value you want to round your prices to.") } }; lblPrices.Show(); vboBody.PackStart(lblPrices, true, true, 5); rbnWithVAT = new RadioButton(Translator.GetString("With VAT")); rbnWithoutVAT = new RadioButton(rbnWithVAT, Translator.GetString("Without VAT")); hbo = new HBox { Spacing = 10 }; hbo.PackStart(rbnWithVAT, false, true, 0); hbo.PackStart(rbnWithoutVAT, false, true, 0); hbo.ShowAll(); vboBody.PackStart(hbo, false, true, 5); lblNote = new WrapLabel { Text = Translator.GetString("Note: You can easely add or subtract VAT after you enter the prices in the operation, using the buttons on the right.") }; lblNote.Show(); vboBody.PackStart(lblNote, true, true, 5); #endregion }
void CreatePageWidget(SectionPage page) { List <PanelInstance> boxPanels = new List <PanelInstance> (); List <PanelInstance> tabPanels = new List <PanelInstance> (); foreach (PanelInstance pi in page.Panels) { if (pi.Widget == null) { pi.Widget = pi.Panel.CreatePanelWidget(); //HACK: work around bug 469427 - broken themes match on widget names if (pi.Widget.Name.IndexOf("Panel") > 0) { pi.Widget.Name = pi.Widget.Name.Replace("Panel", "_"); } } else if (pi.Widget.Parent != null) { ((Gtk.Container)pi.Widget.Parent).Remove(pi.Widget); } if (pi.Node.Grouping == PanelGrouping.Tab) { tabPanels.Add(pi); } else { boxPanels.Add(pi); } } // Try to fit panels with grouping=box or auto in the main page. // If they don't fit. Move auto panels to its own tab page. int mainPageSize; bool fits; do { PanelInstance lastAuto = null; mainPageSize = 0; foreach (PanelInstance pi in boxPanels) { if (pi.Node.Grouping == PanelGrouping.Auto) { lastAuto = pi; } mainPageSize += pi.Widget.SizeRequest().Height + 6; } fits = mainPageSize <= pageFrame.Allocation.Height; if (!fits) { if (lastAuto != null && boxPanels.Count > 1) { boxPanels.Remove(lastAuto); tabPanels.Insert(0, lastAuto); } else { fits = true; } } }while (!fits); Gtk.VBox box = new VBox(false, 12); box.Show(); for (int n = 0; n < boxPanels.Count; n++) { if (n != 0) { HSeparator sep = new HSeparator(); sep.Show(); box.PackStart(sep, false, false, 0); } PanelInstance pi = boxPanels [n]; box.PackStart(pi.Widget, pi.Node.Fill, pi.Node.Fill, 0); pi.Widget.Show(); } if (tabPanels.Count > 0) { Gtk.Notebook nb = new Notebook(); nb.Show(); Gtk.Label blab = new Gtk.Label(GettextCatalog.GetString("General")); blab.Show(); box.BorderWidth = 9; nb.InsertPage(box, blab, -1); foreach (PanelInstance pi in tabPanels) { Gtk.Label lab = new Gtk.Label(GettextCatalog.GetString(pi.Node.Label)); lab.Show(); Gtk.Alignment a = new Alignment(0, 0, 1, 1); a.BorderWidth = 9; a.Show(); a.Add(pi.Widget); nb.InsertPage(a, lab, -1); pi.Widget.Show(); } page.Widget = nb; } else { page.Widget = box; } }