diff --git a/Content/UniversalEditor.Content.PlatformIndependent/Editors/FileSystem/FileSystemEditor.glade b/Content/UniversalEditor.Content.PlatformIndependent/Editors/FileSystem/FileSystemEditor.glade index 10526e60..a9518a3f 100644 --- a/Content/UniversalEditor.Content.PlatformIndependent/Editors/FileSystem/FileSystemEditor.glade +++ b/Content/UniversalEditor.Content.PlatformIndependent/Editors/FileSystem/FileSystemEditor.glade @@ -2,6 +2,20 @@ + + + + + + + + + + + + + + False @@ -45,6 +59,12 @@ Name True True + + + + 4 + + @@ -107,16 +127,4 @@ - - - - - - - - - - - - diff --git a/Libraries/UniversalEditor.UserInterface/Controls/GenericBrowserButton.cs b/Libraries/UniversalEditor.UserInterface/Controls/GenericBrowserButton.cs index 23b13c8c..1b32dc43 100644 --- a/Libraries/UniversalEditor.UserInterface/Controls/GenericBrowserButton.cs +++ b/Libraries/UniversalEditor.UserInterface/Controls/GenericBrowserButton.cs @@ -94,8 +94,8 @@ namespace UniversalEditor.UserInterface.Controls lv = new ListViewControl(); lv.Model = tm; - lv.Columns.Add (new ListViewColumnText (lv.Model.Columns [0], "Name")); - lv.Columns.Add (new ListViewColumnText (lv.Model.Columns [1], "Description")); + lv.Columns.Add(new ListViewColumn("Name", new CellRenderer[] { new CellRendererText(lv.Model.Columns[0]) })); + lv.Columns.Add(new ListViewColumn("Description", new CellRenderer[] { new CellRendererText(lv.Model.Columns[1]) })); lv.HeaderStyle = ColumnHeaderStyle.None; ctObjectModel.Controls.Add (lv, new BoxLayout.Constraints (true, true)); diff --git a/Libraries/UniversalEditor.UserInterface/Editors/Database/Views/ScriptView.cs b/Libraries/UniversalEditor.UserInterface/Editors/Database/Views/ScriptView.cs index 70dc57db..2da24655 100644 --- a/Libraries/UniversalEditor.UserInterface/Editors/Database/Views/ScriptView.cs +++ b/Libraries/UniversalEditor.UserInterface/Editors/Database/Views/ScriptView.cs @@ -353,7 +353,7 @@ namespace UniversalEditor.UserInterface.Editors.Database.Views DefaultTreeModel tmResults = new DefaultTreeModel(list.ToArray()); for (int i = 0; i < db.Tables[0].Fields.Count; i++) { - lvResults.Columns.Add(new ListViewColumnText(tmResults.Columns[i], db.Tables[0].Fields[i].Name)); + lvResults.Columns.Add(new ListViewColumn(db.Tables[0].Fields[i].Name, new CellRenderer[] { new CellRendererText(tmResults.Columns[i]) })); } foreach (DatabaseRecord rec in db.Tables[0].Records) { diff --git a/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs b/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs index 06defd6a..e9aa7fed 100644 --- a/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs +++ b/Libraries/UniversalEditor.UserInterface/Editors/FileSystem/FileSystemEditor.cs @@ -38,6 +38,7 @@ using MBS.Framework; using MBS.Framework.UserInterface.Controls; using System.Text; using System.Diagnostics.Contracts; +using MBS.Framework.UserInterface.Drawing; namespace UniversalEditor.Editors.FileSystem { @@ -48,6 +49,8 @@ namespace UniversalEditor.Editors.FileSystem private DefaultTreeModel tm = null; private TextBox txtPath; + private const int DELIVERED_COLUMNS_COUNT = 5; + [EventHandler(nameof(txtPath), "KeyDown")] private void txtPath_KeyDown(object sender, KeyEventArgs e) { @@ -337,7 +340,8 @@ namespace UniversalEditor.Editors.FileSystem new TreeModelRowColumn(tm.Columns[0], f.Name), new TreeModelRowColumn(tm.Columns[1], String.Format("{0} items", (f.Files.Count + f.Folders.Count))), new TreeModelRowColumn(tm.Columns[2], "Folder"), - new TreeModelRowColumn(tm.Columns[3], now.ToString()) + new TreeModelRowColumn(tm.Columns[3], now.ToString()), + new TreeModelRowColumn(tm.Columns[4], Image.FromStock(StockType.Folder, 16)) }); row.RowColumns[1].RawValue = (f.Folders.Count + f.Files.Count); row.RowColumns[3].RawValue = now.ToBinary(); @@ -606,7 +610,8 @@ namespace UniversalEditor.Editors.FileSystem new TreeModelRowColumn(tm.Columns[0], f.Name), new TreeModelRowColumn(tm.Columns[1], (f.Folders.Count + f.Files.Count).ToString() + " items"), new TreeModelRowColumn(tm.Columns[2], "Folder"), - new TreeModelRowColumn(tm.Columns[3], "") + new TreeModelRowColumn(tm.Columns[3], ""), + new TreeModelRowColumn(tm.Columns[4], Image.FromStock(StockType.Folder, 16)) }); r.RowColumns[1].RawValue = (long)(f.Folders.Count + f.Files.Count); r.RowColumns[3].RawValue = (long)0; @@ -633,14 +638,15 @@ namespace UniversalEditor.Editors.FileSystem new TreeModelRowColumn(tm.Columns[0], f.Name), new TreeModelRowColumn(tm.Columns[1], UserInterface.Common.FileInfo.FormatSize(f.Size)), new TreeModelRowColumn(tm.Columns[2], "File"), - new TreeModelRowColumn(tm.Columns[3], f.ModificationTimestamp.ToString()) + new TreeModelRowColumn(tm.Columns[3], f.ModificationTimestamp.ToString()), + new TreeModelRowColumn(tm.Columns[4], Image.FromStock(StockType.File, 16)) }); r.RowColumns[1].RawValue = f.Size; r.RowColumns[3].RawValue = f.ModificationTimestamp.ToBinary(); for (int i = 0; i < fsom.AdditionalDetails.Count; i++) { - r.RowColumns.Add(new TreeModelRowColumn(tm.Columns[4 + i], f.GetAdditionalDetail(fsom.AdditionalDetails[i].Name))); + r.RowColumns.Add(new TreeModelRowColumn(tm.Columns[DELIVERED_COLUMNS_COUNT + i], f.GetAdditionalDetail(fsom.AdditionalDetails[i].Name))); } } r.SetExtraData("item", fso); @@ -769,14 +775,14 @@ namespace UniversalEditor.Editors.FileSystem FileSystemObjectModel fsom = (ObjectModel as FileSystemObjectModel); if (fsom == null) return; - for (int i = 4; i < tv.Columns.Count; i++) + for (int i = DELIVERED_COLUMNS_COUNT; i < tv.Columns.Count; i++) { tv.Columns.Remove(tv.Columns[i]); } for (int i = 0; i < fsom.AdditionalDetails.Count; i++) { tm.Columns.Add(new TreeModelColumn(typeof(string))); - tv.Columns.Add(new ListViewColumnText(tm.Columns[tm.Columns.Count - 1], fsom.AdditionalDetails[i].Title)); + tv.Columns.Add(new ListViewColumn(fsom.AdditionalDetails[i].Title, new CellRenderer[] { new CellRendererText(tm.Columns[tm.Columns.Count - 1]) })); } tv.Model = tm; @@ -917,7 +923,7 @@ namespace UniversalEditor.Editors.FileSystem if (!IsCreated) return; - for (int i = 4; i < tm.Columns.Count; i++) + for (int i = DELIVERED_COLUMNS_COUNT; i < tm.Columns.Count; i++) { tm.Columns.RemoveAt(i); } diff --git a/Libraries/UniversalEditor.UserInterface/MainWindow.cs b/Libraries/UniversalEditor.UserInterface/MainWindow.cs index c2f043b9..cc2cdcdc 100644 --- a/Libraries/UniversalEditor.UserInterface/MainWindow.cs +++ b/Libraries/UniversalEditor.UserInterface/MainWindow.cs @@ -215,7 +215,7 @@ namespace UniversalEditor.UserInterface ListViewControl lvToolbox = new ListViewControl(); lvToolbox.RowActivated += LvToolbox_RowActivated; lvToolbox.Model = tmToolbox; - lvToolbox.Columns.Add(new ListViewColumnText(tmToolbox.Columns[0], "Item")); + lvToolbox.Columns.Add(new ListViewColumn("Item", new CellRenderer[] { new CellRendererText(tmToolbox.Columns[0]) })); lvToolbox.HeaderStyle = ColumnHeaderStyle.None; AddPanel("Toolbox", DockingItemPlacement.Left, lvToolbox); diff --git a/Libraries/UniversalEditor.UserInterface/Panels/DocumentExplorerPanel.cs b/Libraries/UniversalEditor.UserInterface/Panels/DocumentExplorerPanel.cs index 9709b922..ef594bc6 100644 --- a/Libraries/UniversalEditor.UserInterface/Panels/DocumentExplorerPanel.cs +++ b/Libraries/UniversalEditor.UserInterface/Panels/DocumentExplorerPanel.cs @@ -23,7 +23,7 @@ namespace UniversalEditor.UserInterface.Panels tm = new DefaultTreeModel(new Type[] { typeof(string) }); lv.Model = tm; lv.HeaderStyle = ColumnHeaderStyle.None; - lv.Columns.Add(new ListViewColumnText(tm.Columns[0], "Item")); + lv.Columns.Add(new ListViewColumn("Item", new CellRenderer[] { new CellRendererText(tm.Columns[0]) })); Controls.Add(lv, new BoxLayout.Constraints(true, true)); } diff --git a/Libraries/UniversalEditor.UserInterface/Panels/ErrorListPanel.cs b/Libraries/UniversalEditor.UserInterface/Panels/ErrorListPanel.cs index d81f3780..8b969c14 100644 --- a/Libraries/UniversalEditor.UserInterface/Panels/ErrorListPanel.cs +++ b/Libraries/UniversalEditor.UserInterface/Panels/ErrorListPanel.cs @@ -53,12 +53,12 @@ namespace UniversalEditor.UserInterface.Panels tvErrorList.Model = tm; - tvErrorList.Columns.Add(new ListViewColumnText(tm.Columns[0], "Line")); - tvErrorList.Columns.Add(new ListViewColumnText(tm.Columns[1], "Description")); - tvErrorList.Columns.Add(new ListViewColumnText(tm.Columns[2], "File")); - tvErrorList.Columns.Add(new ListViewColumnText(tm.Columns[3], "Project")); - tvErrorList.Columns.Add(new ListViewColumnText(tm.Columns[4], "Path")); - tvErrorList.Columns.Add(new ListViewColumnText(tm.Columns[5], "Category")); + tvErrorList.Columns.Add(new ListViewColumn("Line", new CellRenderer[] { new CellRendererText(tm.Columns[0]) })); + tvErrorList.Columns.Add(new ListViewColumn("Description", new CellRenderer[] { new CellRendererText(tm.Columns[1]) } )); + tvErrorList.Columns.Add(new ListViewColumn("File", new CellRenderer[] { new CellRendererText(tm.Columns[2]) } )); + tvErrorList.Columns.Add(new ListViewColumn("Project", new CellRenderer[] { new CellRendererText(tm.Columns[3]) } )); + tvErrorList.Columns.Add(new ListViewColumn("Path", new CellRenderer[] { new CellRendererText(tm.Columns[4]) } )); + tvErrorList.Columns.Add(new ListViewColumn("Category", new CellRenderer[] { new CellRendererText(tm.Columns[5]) })); (Application.Instance as IHostApplication).Messages.MessageAdded += (sender, e) => { diff --git a/Libraries/UniversalEditor.UserInterface/Panels/SolutionExplorerPanel.cs b/Libraries/UniversalEditor.UserInterface/Panels/SolutionExplorerPanel.cs index 69749477..8e4f8c9f 100644 --- a/Libraries/UniversalEditor.UserInterface/Panels/SolutionExplorerPanel.cs +++ b/Libraries/UniversalEditor.UserInterface/Panels/SolutionExplorerPanel.cs @@ -184,7 +184,7 @@ namespace UniversalEditor.UserInterface.Panels tvSolutionExplorer.RowActivated += tvSolutionExplorer_RowActivated; // (UniversalEditor.exe:24867): Gtk-CRITICAL **: 21:28:56.913: gtk_tree_store_set_value: assertion 'G_IS_VALUE (value)' failed - tvSolutionExplorer.Columns.Add(new ListViewColumnText(tmSolutionExplorer.Columns[0], "File Name")); + tvSolutionExplorer.Columns.Add(new ListViewColumn("File name", new CellRenderer[] { new CellRendererText(tmSolutionExplorer.Columns[0]) })); this.Controls.Add(tvSolutionExplorer, new BoxLayout.Constraints(true, true)); diff --git a/Plugins.UserInterface/UniversalEditor.Plugins.AddressBook.UserInterface/Editors/Contact/ContactEditor.cs b/Plugins.UserInterface/UniversalEditor.Plugins.AddressBook.UserInterface/Editors/Contact/ContactEditor.cs index 7d2fc6ee..786ec907 100644 --- a/Plugins.UserInterface/UniversalEditor.Plugins.AddressBook.UserInterface/Editors/Contact/ContactEditor.cs +++ b/Plugins.UserInterface/UniversalEditor.Plugins.AddressBook.UserInterface/Editors/Contact/ContactEditor.cs @@ -148,7 +148,7 @@ namespace UniversalEditor.Editors.Contact tmAddresses = new DefaultTreeModel(new Type[] { typeof(string) }); lvPhysicalAddresses = new ListViewControl(); - lvPhysicalAddresses.Columns.Add(new ListViewColumnText(tmAddresses.Columns[0], "Address")); + lvPhysicalAddresses.Columns.Add(new ListViewColumn("Address", new CellRenderer[] { new CellRendererText(tmAddresses.Columns[0]) })); lvPhysicalAddresses.Model = tmAddresses; ct.Controls.Add(lvPhysicalAddresses, new BoxLayout.Constraints(true, true)); @@ -167,7 +167,7 @@ namespace UniversalEditor.Editors.Contact tmAddresses = new DefaultTreeModel(new Type[] { typeof(string) }); ListViewControl lvAddresses = new ListViewControl(); - lvAddresses.Columns.Add(new ListViewColumnText(tmAddresses.Columns[0], "Address")); + lvAddresses.Columns.Add(new ListViewColumn("Address", new CellRenderer[] { new CellRendererText(tmAddresses.Columns[0]) })); ct.Controls.Add(lvAddresses, new BoxLayout.Constraints(true, true)); StackSidebarPanel panel = new StackSidebarPanel(); @@ -185,7 +185,7 @@ namespace UniversalEditor.Editors.Contact tmAddresses = new DefaultTreeModel(new Type[] { typeof(string) }); ListViewControl lvAddresses = new ListViewControl(); - lvAddresses.Columns.Add(new ListViewColumnText(tmAddresses.Columns[0], "Address")); + lvAddresses.Columns.Add(new ListViewColumn("Address", new CellRenderer[] { new CellRendererText(tmAddresses.Columns[0]) })); ct.Controls.Add(lvAddresses, new BoxLayout.Constraints(true, true)); StackSidebarPanel panel = new StackSidebarPanel(); diff --git a/Plugins.UserInterface/UniversalEditor.Plugins.Executable.UserInterface/Editors/Executable/NonLayout/ExecutableEditor.cs b/Plugins.UserInterface/UniversalEditor.Plugins.Executable.UserInterface/Editors/Executable/NonLayout/ExecutableEditor.cs index 058b1d69..b5bad4f0 100644 --- a/Plugins.UserInterface/UniversalEditor.Plugins.Executable.UserInterface/Editors/Executable/NonLayout/ExecutableEditor.cs +++ b/Plugins.UserInterface/UniversalEditor.Plugins.Executable.UserInterface/Editors/Executable/NonLayout/ExecutableEditor.cs @@ -76,10 +76,10 @@ namespace UniversalEditor.Plugins.Executable.UserInterface.Editors.Executable tvSections = new ListViewControl(); tvSections.Model = tmSections; - tvSections.Columns.Add(new ListViewColumnText(tmSections.Columns[0], "Name")); - tvSections.Columns.Add(new ListViewColumnText(tmSections.Columns[1], "Physical address")); - tvSections.Columns.Add(new ListViewColumnText(tmSections.Columns[2], "Virtual address")); - tvSections.Columns.Add(new ListViewColumnText(tmSections.Columns[3], "Size")); + tvSections.Columns.Add(new ListViewColumn("Name", new CellRenderer[] { new CellRendererText(tmSections.Columns[0]) })); + tvSections.Columns.Add(new ListViewColumn("Physical address", new CellRenderer[] { new CellRendererText(tmSections.Columns[1]) })); + tvSections.Columns.Add(new ListViewColumn("Virtual address", new CellRenderer[] { new CellRendererText(tmSections.Columns[2]) })); + tvSections.Columns.Add(new ListViewColumn("Size", new CellRenderer[] { new CellRendererText(tmSections.Columns[3]) })); tvSections.BeforeContextMenu += tvSections_BeforeContextMenu; tbs = new TabContainer(); @@ -125,8 +125,8 @@ namespace UniversalEditor.Plugins.Executable.UserInterface.Editors.Executable ListViewControl lvOtherInformation = new ListViewControl(); lvOtherInformation.Model = tmOtherInformation; - lvOtherInformation.Columns.Add(new ListViewColumnText(tmOtherInformation.Columns[0], "Name")); - lvOtherInformation.Columns.Add(new ListViewColumnText(tmOtherInformation.Columns[1], "Value")); + lvOtherInformation.Columns.Add(new ListViewColumn("Name", new CellRenderer[] { new CellRendererText(tmOtherInformation.Columns[0]) })); + lvOtherInformation.Columns.Add(new ListViewColumn("Value", new CellRenderer[] { new CellRendererText(tmOtherInformation.Columns[1]) })); tabVersion.Controls.Add(lvOtherInformation, new GridLayout.Constraints(4, 0, 1, 2, ExpandMode.Both)); tbs.TabPages.Add(tabVersion); diff --git a/Plugins.UserInterface/UniversalEditor.Plugins.Executable.UserInterface/Editors/Executable/NonLayout/ManagedAssemblyPanel.cs b/Plugins.UserInterface/UniversalEditor.Plugins.Executable.UserInterface/Editors/Executable/NonLayout/ManagedAssemblyPanel.cs index 0ad528a2..f110ac15 100644 --- a/Plugins.UserInterface/UniversalEditor.Plugins.Executable.UserInterface/Editors/Executable/NonLayout/ManagedAssemblyPanel.cs +++ b/Plugins.UserInterface/UniversalEditor.Plugins.Executable.UserInterface/Editors/Executable/NonLayout/ManagedAssemblyPanel.cs @@ -260,8 +260,8 @@ namespace UniversalEditor.Plugins.Executable.UserInterface.Editors.Executable tmTypes = new DefaultTreeModel(new Type[] { typeof(string), typeof(string) }); tvTypes.Model = tmTypes; - tvTypes.Columns.Add(new ListViewColumnText(tmTypes.Columns[0], "Name")); - tvTypes.Columns.Add(new ListViewColumnText(tmTypes.Columns[1], "Type")); + tvTypes.Columns.Add(new ListViewColumn("Name", new CellRenderer[] { new CellRendererText(tmTypes.Columns[0]) })); + tvTypes.Columns.Add(new ListViewColumn("Type", new CellRenderer[] { new CellRendererText(tmTypes.Columns[1]) })); scLeftRight.Panel1.Controls.Add(tvTypes, new BoxLayout.Constraints(true, true)); scLeftRight.Panel2.Layout = new BoxLayout(Orientation.Vertical); diff --git a/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/Editors/Multimedia/Audio/Voicebank/VoicebankEditor.cs b/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/Editors/Multimedia/Audio/Voicebank/VoicebankEditor.cs index b6154705..e3e06e1a 100644 --- a/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/Editors/Multimedia/Audio/Voicebank/VoicebankEditor.cs +++ b/Plugins.UserInterface/UniversalEditor.Plugins.Multimedia.UserInterface/Editors/Multimedia/Audio/Voicebank/VoicebankEditor.cs @@ -47,10 +47,10 @@ namespace UniversalEditor.Plugins.Multimedia.UserInterface.Editors.Multimedia.Au lvSamples = new ListViewControl(); lvSamples.SelectionMode = SelectionMode.Multiple; lvSamples.BeforeContextMenu += lvSamples_BeforeContextMenu; - lvSamples.Columns.Add(new ListViewColumnText(tmSamples.Columns[0], "Name")); - lvSamples.Columns.Add(new ListViewColumnText(tmSamples.Columns[1], "Frequency")); - lvSamples.Columns.Add(new ListViewColumnText(tmSamples.Columns[2], "Channels")); - lvSamples.Columns.Add(new ListViewColumnText(tmSamples.Columns[3], "Size")); + lvSamples.Columns.Add(new ListViewColumn("Name", new CellRenderer[] { new CellRendererText(tmSamples.Columns[0]) })); + lvSamples.Columns.Add(new ListViewColumn("Frequency", new CellRenderer[] { new CellRendererText(tmSamples.Columns[1]) })); + lvSamples.Columns.Add(new ListViewColumn("Channels", new CellRenderer[] { new CellRendererText(tmSamples.Columns[2]) })); + lvSamples.Columns.Add(new ListViewColumn("Size", new CellRenderer[] { new CellRendererText(tmSamples.Columns[3]) })); lvSamples.Model = tmSamples; Controls.Add(lvSamples, new BoxLayout.Constraints(true, true)); diff --git a/Plugins.UserInterface/UniversalEditor.Plugins.Scientific.UserInterface/Editors/DataSetCollection/DataSetCollectionEditor.cs b/Plugins.UserInterface/UniversalEditor.Plugins.Scientific.UserInterface/Editors/DataSetCollection/DataSetCollectionEditor.cs index 6b9b162e..22301ce8 100644 --- a/Plugins.UserInterface/UniversalEditor.Plugins.Scientific.UserInterface/Editors/DataSetCollection/DataSetCollectionEditor.cs +++ b/Plugins.UserInterface/UniversalEditor.Plugins.Scientific.UserInterface/Editors/DataSetCollection/DataSetCollectionEditor.cs @@ -99,7 +99,7 @@ namespace UniversalEditor.Plugins.Scientific.UserInterface.Editors.DataSetCollec for (int i = 0; i < ds.Dimensions; i++) { - tv.Columns.Add(new ListViewColumnText(tm.Columns[i], i.ToString())); + tv.Columns.Add(new ListViewColumn(i.ToString(), new CellRenderer[] { new CellRendererText(tm.Columns[i]) })); for (int j = 0; j < ds.Sizes[i]; j++) {