Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
changeset 126:d4e6bfeb1c61
Re #361: Add XML export UI to GTK#
* Separate out the "transform" section so we can add it as an ExtraWidget on the file chooser
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 01 Oct 2011 16:19:48 +0100 |
parents | 42d2aa87dfa7 |
children | 786a3afb9240 |
files | FrmExportXml.cs IBBoard.WarFoundry.GUI.GTK.csproj gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmExportXml.cs gtk-gui/IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget.cs gtk-gui/gui.stetic gtk-gui/objects.xml |
diffstat | 6 files changed, 208 insertions(+), 302 deletions(-) [+] |
line wrap: on
line diff
--- a/FrmExportXml.cs Sat Oct 01 14:52:39 2011 +0100 +++ b/FrmExportXml.cs Sat Oct 01 16:19:48 2011 +0100 @@ -16,38 +16,26 @@ public partial class FrmExportXml : Gtk.Dialog { private Army army; + private TransformXmlWidget transformWidget; public FrmExportXml(Army army) { this.army = army; this.Build(); - FillXsltList(); + transformWidget = new TransformXmlWidget(); + transformWidget.TransformChanged += HandleTransformWidgetTransformChanged; + saveAsPath.ExtraWidget = transformWidget; saveAsPath.SetCurrentFolder(Environment.GetFolderPath(Environment.SpecialFolder.Personal)); } - private void FillXsltList() + private void HandleTransformWidgetTransformChanged (object sender, EventArgs e) { - DirectoryInfo dir = new DirectoryInfo(System.IO.Path.Combine(Constants.ExecutablePath, "xsl")); - List<FileInfo> files = new List<FileInfo>(dir.GetFiles("*.xsl")); - ComboBoxUtils.FillCombo(transformList, files, delegate(FileInfo file) { return file.Name; }); - } - - protected void OnDoTransformWidgetToggled(object sender, System.EventArgs e) - { - bool enabled = doTransformWidget.Active; - lblTransform.Sensitive = enabled; - transformList.Sensitive = enabled; SetOkayButtonSensitive(); } private void SetOkayButtonSensitive() { - buttonOk.Sensitive = saveAsName.Text != "" && saveAsPath.Filename != null && saveAsPath.Filename != "" && (!doTransformWidget.Active || ComboBoxUtils.GetSelectedItem<FileInfo>(transformList) != null); - } - - protected void OnTransformListChanged(object sender, System.EventArgs e) - { - SetOkayButtonSensitive(); + buttonOk.Sensitive = saveAsPath.Filename != null && saveAsPath.Filename != "" && transformWidget.IsValid; } protected void OnSaveAsPathSelectionChanged(object sender, System.EventArgs e) @@ -61,11 +49,11 @@ // Catch potential errors with the file export or XSL compiliation try { - string fileName = System.IO.Path.Combine(saveAsPath.Filename, saveAsName.Text); + string fileName = saveAsPath.Filename; - if (doTransformWidget.Active) + if (transformWidget.TransformEnabled) { - WarFoundryXmlWithXslExporter.GetDefault().ExportArmyWithTransform(army, fileName, ComboBoxUtils.GetSelectedItem<FileInfo>(transformList).FullName); + WarFoundryXmlWithXslExporter.GetDefault().ExportArmyWithTransform(army, fileName, transformWidget.GetXsltPath()); } else { @@ -113,9 +101,10 @@ Respond(ResponseType.Cancel); } - protected void OnSaveAsNameChanged (object sender, System.EventArgs e) + protected void OnSizeAllocated (object o, Gtk.SizeAllocatedArgs args) { - SetOkayButtonSensitive(); + Console.WriteLine(args.Allocation.Height + "," + args.Allocation.Width); + //this. } } }
--- a/IBBoard.WarFoundry.GUI.GTK.csproj Sat Oct 01 14:52:39 2011 +0100 +++ b/IBBoard.WarFoundry.GUI.GTK.csproj Sat Oct 01 16:19:48 2011 +0100 @@ -74,6 +74,8 @@ <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmPreferences.cs" /> <Compile Include="FrmExportXml.cs" /> <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmExportXml.cs" /> + <Compile Include="Widgets\TransformXmlWidget.cs" /> + <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget.cs" /> </ItemGroup> <ItemGroup> <Content Include="App.png" /> @@ -109,6 +111,7 @@ <Reference Include="log4net"> <HintPath>libs\log4net.dll</HintPath> </Reference> + <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\IBBoard.WarFoundry.API\IBBoard.WarFoundry.API.csproj">
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmExportXml.cs Sat Oct 01 14:52:39 2011 +0100 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmExportXml.cs Sat Oct 01 16:19:48 2011 +0100 @@ -4,14 +4,7 @@ { public partial class FrmExportXml { - private global::Gtk.Table table; - private global::Gtk.CheckButton doTransformWidget; - private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblOutputFile; - private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblSaveIn; - private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblTransform; - private global::Gtk.Entry saveAsName; - private global::Gtk.FileChooserButton saveAsPath; - private global::Gtk.ComboBox transformList; + private global::Gtk.FileChooserWidget saveAsPath; private global::Gtk.Button buttonCancel; private global::Gtk.Button buttonOk; @@ -22,108 +15,26 @@ this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmExportXml"; this.TypeHint = ((global::Gdk.WindowTypeHint)(1)); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + this.SkipPagerHint = true; + this.SkipTaskbarHint = true; // Internal child IBBoard.WarFoundry.GUI.GTK.FrmExportXml.VBox global::Gtk.VBox w1 = this.VBox; w1.Name = "dialog1_VBox"; w1.BorderWidth = ((uint)(2)); // Container child dialog1_VBox.Gtk.Box+BoxChild - this.table = new global::Gtk.Table (((uint)(4)), ((uint)(2)), false); - this.table.Name = "table"; - this.table.RowSpacing = ((uint)(6)); - this.table.ColumnSpacing = ((uint)(6)); - // Container child table.Gtk.Table+TableChild - this.doTransformWidget = new global::Gtk.CheckButton (); - this.doTransformWidget.CanFocus = true; - this.doTransformWidget.Name = "doTransformWidget"; - this.doTransformWidget.Label = global::Mono.Unix.Catalog.GetString ("Transform output?"); - this.doTransformWidget.DrawIndicator = true; - this.doTransformWidget.UseUnderline = true; - this.table.Add (this.doTransformWidget); - global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table [this.doTransformWidget])); - w2.TopAttach = ((uint)(2)); - w2.BottomAttach = ((uint)(3)); - w2.LeftAttach = ((uint)(1)); - w2.RightAttach = ((uint)(2)); - w2.XOptions = ((global::Gtk.AttachOptions)(4)); - w2.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table.Gtk.Table+TableChild - this.lblOutputFile = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel (); - this.lblOutputFile.Name = "lblOutputFile"; - this.lblOutputFile.Xalign = 1F; - this.lblOutputFile.LabelProp = global::Mono.Unix.Catalog.GetString ("save as:"); - this.table.Add (this.lblOutputFile); - global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table [this.lblOutputFile])); - w3.XOptions = ((global::Gtk.AttachOptions)(4)); - w3.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table.Gtk.Table+TableChild - this.lblSaveIn = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel (); - this.lblSaveIn.Name = "lblSaveIn"; - this.lblSaveIn.Xalign = 1F; - this.lblSaveIn.LabelProp = global::Mono.Unix.Catalog.GetString ("in folder"); - this.table.Add (this.lblSaveIn); - global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table [this.lblSaveIn])); - w4.TopAttach = ((uint)(1)); - w4.BottomAttach = ((uint)(2)); - w4.XOptions = ((global::Gtk.AttachOptions)(4)); - w4.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table.Gtk.Table+TableChild - this.lblTransform = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel (); - this.lblTransform.Sensitive = false; - this.lblTransform.Name = "lblTransform"; - this.lblTransform.LabelProp = global::Mono.Unix.Catalog.GetString ("transform:"); - this.table.Add (this.lblTransform); - global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table [this.lblTransform])); - w5.TopAttach = ((uint)(3)); - w5.BottomAttach = ((uint)(4)); - w5.XOptions = ((global::Gtk.AttachOptions)(4)); - w5.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table.Gtk.Table+TableChild - this.saveAsName = new global::Gtk.Entry (); - this.saveAsName.CanFocus = true; - this.saveAsName.Name = "saveAsName"; - this.saveAsName.IsEditable = true; - this.saveAsName.InvisibleChar = '●'; - this.table.Add (this.saveAsName); - global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table [this.saveAsName])); - w6.LeftAttach = ((uint)(1)); - w6.RightAttach = ((uint)(2)); - w6.XOptions = ((global::Gtk.AttachOptions)(4)); - w6.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table.Gtk.Table+TableChild - this.saveAsPath = new global::Gtk.FileChooserButton (global::Mono.Unix.Catalog.GetString ("Select A File"), ((global::Gtk.FileChooserAction)(2))); + this.saveAsPath = new global::Gtk.FileChooserWidget (((global::Gtk.FileChooserAction)(1))); this.saveAsPath.Name = "saveAsPath"; - this.saveAsPath.WidthChars = 20; + this.saveAsPath.LocalOnly = false; this.saveAsPath.DoOverwriteConfirmation = true; - this.table.Add (this.saveAsPath); - global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table [this.saveAsPath])); - w7.TopAttach = ((uint)(1)); - w7.BottomAttach = ((uint)(2)); - w7.LeftAttach = ((uint)(1)); - w7.RightAttach = ((uint)(2)); - w7.XOptions = ((global::Gtk.AttachOptions)(4)); - w7.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table.Gtk.Table+TableChild - this.transformList = global::Gtk.ComboBox.NewText (); - this.transformList.Sensitive = false; - this.transformList.Name = "transformList"; - this.table.Add (this.transformList); - global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table [this.transformList])); - w8.TopAttach = ((uint)(3)); - w8.BottomAttach = ((uint)(4)); - w8.LeftAttach = ((uint)(1)); - w8.RightAttach = ((uint)(2)); - w8.YOptions = ((global::Gtk.AttachOptions)(4)); - w1.Add (this.table); - global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(w1 [this.table])); - w9.Position = 0; - w9.Expand = false; - w9.Fill = false; + w1.Add (this.saveAsPath); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1 [this.saveAsPath])); + w2.Position = 0; // Internal child IBBoard.WarFoundry.GUI.GTK.FrmExportXml.ActionArea - global::Gtk.HButtonBox w10 = this.ActionArea; - w10.Name = "dialog1_ActionArea"; - w10.Spacing = 10; - w10.BorderWidth = ((uint)(5)); - w10.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + global::Gtk.HButtonBox w3 = this.ActionArea; + w3.Name = "dialog1_ActionArea"; + w3.Spacing = 10; + w3.BorderWidth = ((uint)(5)); + w3.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild this.buttonCancel = new global::Gtk.Button (); this.buttonCancel.CanDefault = true; @@ -133,9 +44,9 @@ this.buttonCancel.UseUnderline = true; this.buttonCancel.Label = "gtk-cancel"; this.AddActionWidget (this.buttonCancel, -6); - global::Gtk.ButtonBox.ButtonBoxChild w11 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10 [this.buttonCancel])); - w11.Expand = false; - w11.Fill = false; + global::Gtk.ButtonBox.ButtonBoxChild w4 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w3 [this.buttonCancel])); + w4.Expand = false; + w4.Fill = false; // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild this.buttonOk = new global::Gtk.Button (); this.buttonOk.CanDefault = true; @@ -145,20 +56,18 @@ this.buttonOk.UseUnderline = true; this.buttonOk.Label = "gtk-ok"; this.AddActionWidget (this.buttonOk, -5); - global::Gtk.ButtonBox.ButtonBoxChild w12 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10 [this.buttonOk])); - w12.Position = 1; - w12.Expand = false; - w12.Fill = false; + global::Gtk.ButtonBox.ButtonBoxChild w5 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w3 [this.buttonOk])); + w5.Position = 1; + w5.Expand = false; + w5.Fill = false; if ((this.Child != null)) { this.Child.ShowAll (); } - this.DefaultWidth = 397; - this.DefaultHeight = 300; + this.DefaultWidth = 634; + this.DefaultHeight = 468; this.Show (); - this.transformList.Changed += new global::System.EventHandler (this.OnTransformListChanged); + this.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnSizeAllocated); this.saveAsPath.SelectionChanged += new global::System.EventHandler (this.OnSaveAsPathSelectionChanged); - this.saveAsName.Changed += new global::System.EventHandler (this.OnSaveAsNameChanged); - this.doTransformWidget.Toggled += new global::System.EventHandler (this.OnDoTransformWidgetToggled); this.buttonCancel.Clicked += new global::System.EventHandler (this.OnButtonCancelClicked); this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget.cs Sat Oct 01 16:19:48 2011 +0100 @@ -0,0 +1,68 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace IBBoard.WarFoundry.GUI.GTK +{ + public partial class TransformXmlWidget + { + private global::Gtk.Table table1; + private global::Gtk.CheckButton doTransformWidget; + private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblTransform; + private global::Gtk.ComboBox transformList; + + protected virtual void Build () + { + global::Stetic.Gui.Initialize (this); + // Widget IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget + global::Stetic.BinContainer.Attach (this); + this.Name = "IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget"; + // Container child IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget.Gtk.Container+ContainerChild + this.table1 = new global::Gtk.Table (((uint)(2)), ((uint)(2)), false); + this.table1.Name = "table1"; + this.table1.RowSpacing = ((uint)(6)); + this.table1.ColumnSpacing = ((uint)(6)); + // Container child table1.Gtk.Table+TableChild + this.doTransformWidget = new global::Gtk.CheckButton (); + this.doTransformWidget.CanFocus = true; + this.doTransformWidget.Name = "doTransformWidget"; + this.doTransformWidget.Label = global::Mono.Unix.Catalog.GetString ("transform output"); + this.doTransformWidget.DrawIndicator = true; + this.doTransformWidget.UseUnderline = true; + this.table1.Add (this.doTransformWidget); + global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(this.table1 [this.doTransformWidget])); + w1.LeftAttach = ((uint)(1)); + w1.RightAttach = ((uint)(2)); + w1.XOptions = ((global::Gtk.AttachOptions)(4)); + w1.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.lblTransform = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel (); + this.lblTransform.Sensitive = false; + this.lblTransform.Name = "lblTransform"; + this.lblTransform.Xalign = 1F; + this.lblTransform.LabelProp = global::Mono.Unix.Catalog.GetString ("transformation:"); + this.table1.Add (this.lblTransform); + global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1 [this.lblTransform])); + w2.TopAttach = ((uint)(1)); + w2.BottomAttach = ((uint)(2)); + w2.XOptions = ((global::Gtk.AttachOptions)(4)); + w2.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.transformList = global::Gtk.ComboBox.NewText (); + this.transformList.Sensitive = false; + this.transformList.Name = "transformList"; + this.table1.Add (this.transformList); + global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1 [this.transformList])); + w3.TopAttach = ((uint)(1)); + w3.BottomAttach = ((uint)(2)); + w3.LeftAttach = ((uint)(1)); + w3.RightAttach = ((uint)(2)); + w3.YOptions = ((global::Gtk.AttachOptions)(4)); + this.Add (this.table1); + if ((this.Child != null)) { + this.Child.ShowAll (); + } + this.Hide (); + this.transformList.Changed += new global::System.EventHandler (this.OnTransformListChanged); + this.doTransformWidget.Toggled += new global::System.EventHandler (this.OnDoTransformWidgetToggled); + } + } +}
--- a/gtk-gui/gui.stetic Sat Oct 01 14:52:39 2011 +0100 +++ b/gtk-gui/gui.stetic Sat Oct 01 16:19:48 2011 +0100 @@ -2532,185 +2532,30 @@ </widget> </child> </widget> - <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmExportXml" design-size="397 300"> + <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmExportXml" design-size="634 468"> <property name="MemberName" /> <property name="TypeHint">Dialog</property> <property name="WindowPosition">CenterOnParent</property> + <property name="SkipPagerHint">True</property> + <property name="SkipTaskbarHint">True</property> <property name="Buttons">2</property> <property name="HelpButton">False</property> + <signal name="SizeAllocated" handler="OnSizeAllocated" after="yes" /> <child internal-child="VBox"> <widget class="Gtk.VBox" id="dialog1_VBox"> <property name="MemberName" /> <property name="BorderWidth">2</property> <child> - <widget class="Gtk.Table" id="table"> + <widget class="Gtk.FileChooserWidget" id="saveAsPath"> <property name="MemberName" /> - <property name="NRows">4</property> - <property name="NColumns">2</property> - <property name="RowSpacing">6</property> - <property name="ColumnSpacing">6</property> - <child> - <placeholder /> - </child> - <child> - <widget class="Gtk.CheckButton" id="doTransformWidget"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="Label" translatable="yes">Transform output?</property> - <property name="DrawIndicator">True</property> - <property name="HasLabel">True</property> - <property name="UseUnderline">True</property> - <signal name="Toggled" handler="OnDoTransformWidgetToggled" /> - </widget> - <packing> - <property name="TopAttach">2</property> - <property name="BottomAttach">3</property> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">True</property> - <property name="XOptions">Fill</property> - <property name="YOptions">Fill</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="IBBoard.GtkSharp.Translatable.TranslatableLabel" id="lblOutputFile"> - <property name="MemberName" /> - <property name="Xalign">1</property> - <property name="LabelProp" translatable="yes">save as:</property> - </widget> - <packing> - <property name="AutoSize">True</property> - <property name="XOptions">Fill</property> - <property name="YOptions">Fill</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="IBBoard.GtkSharp.Translatable.TranslatableLabel" id="lblSaveIn"> - <property name="MemberName" /> - <property name="Xalign">1</property> - <property name="LabelProp" translatable="yes">in folder</property> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">2</property> - <property name="AutoSize">True</property> - <property name="XOptions">Fill</property> - <property name="YOptions">Fill</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="IBBoard.GtkSharp.Translatable.TranslatableLabel" id="lblTransform"> - <property name="MemberName" /> - <property name="Sensitive">False</property> - <property name="LabelProp" translatable="yes">transform:</property> - </widget> - <packing> - <property name="TopAttach">3</property> - <property name="BottomAttach">4</property> - <property name="AutoSize">True</property> - <property name="XOptions">Fill</property> - <property name="YOptions">Fill</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.Entry" id="saveAsName"> - <property name="MemberName" /> - <property name="CanFocus">True</property> - <property name="IsEditable">True</property> - <property name="InvisibleChar">●</property> - <signal name="Changed" handler="OnSaveAsNameChanged" /> - </widget> - <packing> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">True</property> - <property name="XOptions">Fill</property> - <property name="YOptions">Fill</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.FileChooserButton" id="saveAsPath"> - <property name="MemberName" /> - <property name="Action">SelectFolder</property> - <property name="WidthChars">20</property> - <property name="DoOverwriteConfirmation">True</property> - <signal name="SelectionChanged" handler="OnSaveAsPathSelectionChanged" /> - </widget> - <packing> - <property name="TopAttach">1</property> - <property name="BottomAttach">2</property> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">True</property> - <property name="XOptions">Fill</property> - <property name="YOptions">Fill</property> - <property name="XExpand">False</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> - <child> - <widget class="Gtk.ComboBox" id="transformList"> - <property name="MemberName" /> - <property name="Sensitive">False</property> - <property name="IsTextCombo">True</property> - <property name="Items" translatable="yes" /> - <signal name="Changed" handler="OnTransformListChanged" /> - </widget> - <packing> - <property name="TopAttach">3</property> - <property name="BottomAttach">4</property> - <property name="LeftAttach">1</property> - <property name="RightAttach">2</property> - <property name="AutoSize">False</property> - <property name="YOptions">Fill</property> - <property name="XExpand">True</property> - <property name="XFill">True</property> - <property name="XShrink">False</property> - <property name="YExpand">False</property> - <property name="YFill">True</property> - <property name="YShrink">False</property> - </packing> - </child> + <property name="Action">Save</property> + <property name="LocalOnly">False</property> + <property name="DoOverwriteConfirmation">True</property> + <signal name="SelectionChanged" handler="OnSaveAsPathSelectionChanged" /> </widget> <packing> <property name="Position">0</property> - <property name="AutoSize">True</property> - <property name="Expand">False</property> - <property name="Fill">False</property> + <property name="AutoSize">False</property> </packing> </child> </widget> @@ -2760,4 +2605,88 @@ </widget> </child> </widget> + <widget class="Gtk.Bin" id="IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget" design-size="300 55"> + <property name="MemberName" /> + <property name="Visible">False</property> + <child> + <widget class="Gtk.Table" id="table1"> + <property name="MemberName" /> + <property name="NRows">2</property> + <property name="NColumns">2</property> + <property name="RowSpacing">6</property> + <property name="ColumnSpacing">6</property> + <child> + <placeholder /> + </child> + <child> + <widget class="Gtk.CheckButton" id="doTransformWidget"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Label" translatable="yes">transform output</property> + <property name="DrawIndicator">True</property> + <property name="HasLabel">True</property> + <property name="UseUnderline">True</property> + <signal name="Toggled" handler="OnDoTransformWidgetToggled" /> + </widget> + <packing> + <property name="LeftAttach">1</property> + <property name="RightAttach">2</property> + <property name="AutoSize">True</property> + <property name="XOptions">Fill</property> + <property name="YOptions">Fill</property> + <property name="XExpand">False</property> + <property name="XFill">True</property> + <property name="XShrink">False</property> + <property name="YExpand">False</property> + <property name="YFill">True</property> + <property name="YShrink">False</property> + </packing> + </child> + <child> + <widget class="IBBoard.GtkSharp.Translatable.TranslatableLabel" id="lblTransform"> + <property name="MemberName" /> + <property name="Sensitive">False</property> + <property name="Xalign">1</property> + <property name="LabelProp" translatable="yes">transformation:</property> + </widget> + <packing> + <property name="TopAttach">1</property> + <property name="BottomAttach">2</property> + <property name="AutoSize">True</property> + <property name="XOptions">Fill</property> + <property name="YOptions">Fill</property> + <property name="XExpand">False</property> + <property name="XFill">True</property> + <property name="XShrink">False</property> + <property name="YExpand">False</property> + <property name="YFill">True</property> + <property name="YShrink">False</property> + </packing> + </child> + <child> + <widget class="Gtk.ComboBox" id="transformList"> + <property name="MemberName" /> + <property name="Sensitive">False</property> + <property name="IsTextCombo">True</property> + <property name="Items" translatable="yes" /> + <signal name="Changed" handler="OnTransformListChanged" /> + </widget> + <packing> + <property name="TopAttach">1</property> + <property name="BottomAttach">2</property> + <property name="LeftAttach">1</property> + <property name="RightAttach">2</property> + <property name="AutoSize">False</property> + <property name="YOptions">Fill</property> + <property name="XExpand">True</property> + <property name="XFill">True</property> + <property name="XShrink">False</property> + <property name="YExpand">False</property> + <property name="YFill">True</property> + <property name="YShrink">False</property> + </packing> + </child> + </widget> + </child> + </widget> </stetic-interface> \ No newline at end of file
--- a/gtk-gui/objects.xml Sat Oct 01 14:52:39 2011 +0100 +++ b/gtk-gui/objects.xml Sat Oct 01 16:19:48 2011 +0100 @@ -1,2 +1,10 @@ <objects attr-sync="on"> + <object type="IBBoard.WarFoundry.GUI.GTK.TransformXmlWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin"> + <itemgroups /> + <signals> + <itemgroup label="TransformXmlWidget Signals"> + <signal name="TransformChanged" /> + </itemgroup> + </signals> + </object> </objects> \ No newline at end of file