Author: lluis
Date: 2007-04-24 10:00:56 -0400 (Tue, 24 Apr 2007)
New Revision: 76190

Added:
   trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballBuilderEditorWidget.cs
   
trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/MonoDevelop.Autotools.TarballBuilderEditorWidget.cs
Removed:
   trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballTargetEditorWidget.cs
Modified:
   trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog
   trunk/monodevelop/Extras/MonoDevelop.Autotools/Handler.cs
   trunk/monodevelop/Extras/MonoDevelop.Autotools/Makefile.am
   trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileData.cs
   
trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileProjectServiceExtension.cs
   trunk/monodevelop/Extras/MonoDevelop.Autotools/MonoDevelop.Autotools.mdp
   trunk/monodevelop/Extras/MonoDevelop.Autotools/SolutionDeployer.cs
   trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/gui.stetic
   trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/objects.xml
Log:
* MonoDevelop.Autotools.mdp, Makefile.am: Synchronized project with
  makefile.
* Handler.cs, SolutionDeployer.cs: Allow creating a tarball from
  autotools files already generated, instead of always generating new
  files.
* MakefileProjectServiceExtension.cs: Include referenced makefiles when
  exporting a project.
* TarballBuilderEditorWidget.cs, TarballTargetEditorWidget.cs,
  gtk-gui/MonoDevelop.Autotools.TarballBuilderEditorWidget.cs,
  gtk-gui/gui.stetic: Implemented the tarball configuration editor
  using stetic.
* gtk-gui/objects.xml: Updated.
* MakefileData.cs: Fixed warning.

Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog    2007-04-24 
14:00:44 UTC (rev 76189)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/ChangeLog    2007-04-24 
14:00:56 UTC (rev 76190)
@@ -1,3 +1,19 @@
+2007-04-24  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
+
+       * MonoDevelop.Autotools.mdp, Makefile.am: Synchronized project with
+         makefile.
+       * Handler.cs, SolutionDeployer.cs: Allow creating a tarball from
+         autotools files already generated, instead of always generating new
+         files.
+       * MakefileProjectServiceExtension.cs: Include referenced makefiles when
+         exporting a project.
+       * TarballBuilderEditorWidget.cs, TarballTargetEditorWidget.cs,
+         gtk-gui/MonoDevelop.Autotools.TarballBuilderEditorWidget.cs,
+         gtk-gui/gui.stetic: Implemented the tarball configuration editor
+         using stetic.
+       * gtk-gui/objects.xml: Updated.
+       * MakefileData.cs: Fixed warning.
+
 2007-04-21  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * SimpleProjectMakefileHandler.cs, TarballTargetEditorWidget.cs: Track

Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/Handler.cs
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/Handler.cs   2007-04-24 
14:00:44 UTC (rev 76189)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/Handler.cs   2007-04-24 
14:00:56 UTC (rev 76190)
@@ -21,6 +21,9 @@
                [ItemProperty ("DefaultConfiguration")]
                string defaultConfig;
                
+               [ItemProperty ("GenerateFiles", DefaultValue=true)]
+               bool generateFiles = true;
+               
                public override string Description {
                        get { return GettextCatalog.GetString ("Tarball"); }
                }
@@ -31,8 +34,14 @@
                        TarballDeployTarget target = other as 
TarballDeployTarget;
                        targetDir = target.targetDir;
                        defaultConfig = target.defaultConfig;
+                       generateFiles = target.generateFiles;
                }
                
+               public bool GenerateFiles {
+                       get { return generateFiles; }
+                       set { generateFiles = value; }
+               }
+               
                public string TargetDir {
                        get { return targetDir; }
                        set { targetDir = value; }
@@ -63,6 +72,12 @@
                                if (entry.ActiveConfiguration != null)
                                        defaultConfig = 
entry.ActiveConfiguration.Name;
                        }
+                       if (File.Exists (Path.Combine (entry.BaseDirectory, 
"autogen.sh")) ||
+                           File.Exists (Path.Combine (entry.BaseDirectory, 
"configure"))) {
+                               generateFiles = false;
+                       }
+                       else
+                               generateFiles = true;
                }
 
                
@@ -73,21 +88,30 @@
                        CombineEntry entry = RootCombineEntry;
                        
                        try {
-                               string[] childEntries;
-                               if (entry is Combine) {
-                                       CombineEntry[] ents = GetChildEntries 
();
-                                       childEntries = new string [ents.Length];
-                                       for (int n=0; n<ents.Length; n++)
-                                               childEntries [n] = ents 
[n].FileName;
+                               if (generateFiles) {
+                                       string[] childEntries;
+                                       if (entry is Combine) {
+                                               CombineEntry[] ents = 
GetChildEntries ();
+                                               childEntries = new string 
[ents.Length];
+                                               for (int n=0; n<ents.Length; 
n++)
+                                                       childEntries [n] = ents 
[n].FileName;
+                                       }
+                                       else {
+                                               // If the entry is not a 
combine, use the parent combine as base combine
+                                               childEntries = new string [] { 
entry.FileName };
+                                               entry = entry.ParentCombine;
+                                       }
+                                       
+                                       string efile = 
Services.ProjectService.Export (new NullProgressMonitor (), entry.FileName, 
childEntries, tmpFolder, null);
+                                       combine = 
Services.ProjectService.ReadCombineEntry (efile, new NullProgressMonitor ()) as 
Combine;
                                }
                                else {
-                                       // If the entry is not a combine, use 
the parent combine as base combine
-                                       childEntries = new string [] { 
entry.FileName };
-                                       entry = entry.ParentCombine;
+                                       if (entry is Combine)
+                                               combine = (Combine) entry;
+                                       else 
+                                               combine = entry.ParentCombine;
                                }
                                
-                               string efile = Services.ProjectService.Export 
(new NullProgressMonitor (), entry.FileName, childEntries, tmpFolder, null);
-                               combine = 
Services.ProjectService.ReadCombineEntry (efile, new NullProgressMonitor ()) as 
Combine;
                                combine.Build (monitor);
                        
                                if (monitor.IsCancelRequested || 
!monitor.AsyncOperation.Success)
@@ -96,9 +120,9 @@
                                SolutionDeployer deployer = new 
SolutionDeployer ();
                                
                                if (DefaultConfiguration == null || 
DefaultConfiguration == "")
-                                       deployer.Deploy ( ctx, combine, 
TargetDir, monitor );
+                                       deployer.Deploy ( ctx, combine, 
TargetDir, generateFiles, monitor );
                                else
-                                       deployer.Deploy ( ctx, combine, 
DefaultConfiguration, TargetDir, monitor );
+                                       deployer.Deploy ( ctx, combine, 
DefaultConfiguration, TargetDir, generateFiles, monitor );
                                
                        } finally {
                                if (combine != null)
@@ -134,7 +158,7 @@
                
                public Gtk.Widget CreateEditor (PackageBuilder target)
                {
-                       return new TarballTargetEditorWidget 
((TarballDeployTarget) target);
+                       return new TarballBuilderEditorWidget 
((TarballDeployTarget) target);
                }
        }
 }

Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/Makefile.am
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/Makefile.am  2007-04-24 
14:00:44 UTC (rev 76189)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/Makefile.am  2007-04-24 
14:00:56 UTC (rev 76190)
@@ -2,54 +2,59 @@
 ADDIN_BUILD = $(top_builddir)/build/AddIns/MonoDevelop.Autotools
 ASSEMBLY = $(ADDIN_BUILD)/MonoDevelop.Autotools.dll
 
-REFS = -r:Mono.Posix \
-       -r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
-       -r:$(top_builddir)/build/bin/log4net.dll  \
+REFS =  \
+       $(GNOME_SHARP_LIBS) \
+       $(GTK_SHARP_LIBS) \
+       -r:$(top_builddir)/build/AddIns/MonoDevelop.Components.dll \
        -r:$(top_builddir)/build/AddIns/MonoDevelop.Core.Gui.dll \
+       -r:$(top_builddir)/build/AddIns/MonoDevelop.Deployment.dll \
+       -r:$(top_builddir)/build/AddIns/MonoDevelop.Ide.dll \
        -r:$(top_builddir)/build/AddIns/MonoDevelop.Projects.dll \
        -r:$(top_builddir)/build/AddIns/MonoDevelop.Projects.Gui.dll \
-       -r:$(top_builddir)/build/AddIns/MonoDevelop.Components.dll \
-       -r:$(top_builddir)/build/AddIns/MonoDevelop.Ide.dll  \
-       -r:$(top_builddir)/build/AddIns/MonoDevelop.Deployment.dll  \
-       $(GNOME_SHARP_LIBS) \
-       $(GTK_SHARP_LIBS) 
+       -r:$(top_builddir)/build/bin/log4net.dll \
+       -r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
+       -r:Mono.Posix \
+       -r:System 
 
-FILES = \
-       AssemblyInfo.cs         \
-       AutotoolsContext.cs     \
-       Commands.cs     \
+FILES =  \
+       AssemblyInfo.cs \
+       AutotoolsContext.cs \
+       Commands.cs \
+       CustomMakefile.cs \
+       FileNodeBuilderExtension.cs \
+       gtk-gui/generated.cs \
+       gtk-gui/MonoDevelop.Autotools.MakefileOptionPanelWidget.cs \
+       gtk-gui/MonoDevelop.Autotools.TarballBuilderEditorWidget.cs \
        Handler.cs \
-       IMakefileHandler.cs     \
+       IMakefileHandler.cs \
        ImportMakefileDialog.cs \
        ISimpleAutotoolsSetup.cs \
-       Makefile.cs     \
-       MakefileProject.cs \
-       MakefileReaderExtension.cs \
-       Set.cs                          \
-       SimpleProjectMakefileHandler.cs \
-       SolutionDeployer.cs     \
-       SolutionOptionsPanel.cs \
-       SolutionMakefileHandler.cs      \
-       TarballTargetEditorWidget.cs \
-       TemplateEngine.cs \
-       CustomMakefile.cs \
+       Makefile.cs \
+       MakefileData.cs \
        MakefileOptionPanel.cs \
        MakefileOptionPanelWidget.cs \
-       gtk-gui/MonoDevelop.Autotools.MakefileOptionPanelWidget.cs \
-       gtk-gui/generated.cs \
+       MakefileProject.cs \
        MakefileProjectServiceExtension.cs \
-       MakefileData.cs \
-       FileNodeBuilderExtension.cs \
-       MakefileVar.cs
+       MakefileReaderExtension.cs \
+       MakefileVar.cs \
+       Set.cs \
+       SimpleProjectMakefileHandler.cs \
+       SolutionDeployer.cs \
+       SolutionMakefileHandler.cs \
+       SolutionOptionsPanel.cs \
+       TarballBuilderEditorWidget.cs \
+       TemplateEngine.cs
 
-RES =
+RES =  \
+       gtk-gui/gui.stetic \
+       gtk-gui/objects.xml
 
-DATA_FILES = \
-       templates/Makefile.am.project.template  \
-       templates/Makefile.include      \
-       templates/autogen.sh.template   \
-       templates/configure.ac.template \
+DATA_FILES =  \
+       templates/autogen.sh.template \
+       templates/configure.ac.template \
        templates/exe.wrapper.in.template \
+       templates/Makefile.am.project.template \
+       templates/Makefile.include \
        templates/package.pc.template
 
 DATA_FILE_BUILD = $(addprefix $(ADDIN_BUILD)/, $(DATA_FILES))

Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileData.cs
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileData.cs      
2007-04-24 14:00:44 UTC (rev 76189)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileData.cs      
2007-04-24 14:00:56 UTC (rev 76190)
@@ -134,7 +134,6 @@
 
                                relativeMakefileName = value;
                                makefile = null;
-                               baseDirectory = null;
                                InitBuildVars ();
                        }
                }
@@ -147,7 +146,6 @@
                        }
                }
 
-               string baseDirectory = null;
                public string BaseDirectory {
                        get {
                                //FIXME: Check for AbsoluteMakefileName == null 
or empty

Modified: 
trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileProjectServiceExtension.cs
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileProjectServiceExtension.cs
   2007-04-24 14:00:44 UTC (rev 76189)
+++ 
trunk/monodevelop/Extras/MonoDevelop.Autotools/MakefileProjectServiceExtension.cs
   2007-04-24 14:00:56 UTC (rev 76190)
@@ -34,6 +34,7 @@
 
 using System;
 using System.CodeDom.Compiler;
+using System.Collections.Specialized;
 using System.Collections.Generic;
 using System.IO;
 using System.Text;
@@ -117,7 +118,20 @@
                                        "Error saving to Makefile ({0}) for 
project {1}", data.AbsoluteMakefileName, project.Name), e);
                        }
                }
+               
+               public override StringCollection GetExportFiles (CombineEntry 
entry)
+               {
+                       StringCollection col = base.GetExportFiles (entry);
+                       
+                       MakefileData data = entry.ExtendedProperties 
["MonoDevelop.Autotools.MakefileInfo"] as MakefileData;
+                       if (data == null || !data.IntegrationEnabled || 
string.IsNullOrEmpty (data.AbsoluteMakefileName))
+                               return col;
+                       
+                       col.Add (data.AbsoluteMakefileName);
+                       return col;
+               }
 
+
                //TODO
                public override bool GetNeedsBuilding (CombineEntry entry)
                {

Modified: 
trunk/monodevelop/Extras/MonoDevelop.Autotools/MonoDevelop.Autotools.mdp
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/MonoDevelop.Autotools.mdp    
2007-04-24 14:00:44 UTC (rev 76189)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/MonoDevelop.Autotools.mdp    
2007-04-24 14:00:56 UTC (rev 76190)
@@ -26,11 +26,8 @@
     <File name="./SolutionDeployer.cs" subtype="Code" buildaction="Compile" />
     <File name="./SolutionMakefileHandler.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./SolutionOptionsPanel.cs" subtype="Code" 
buildaction="Compile" />
-    <File name="./TarballTargetEditorWidget.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./TemplateEngine.cs" subtype="Code" buildaction="Compile" />
-    <File name="./gtk-gui/gui.stetic" subtype="Code" 
buildaction="EmbedAsResource" />
     <File name="./gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
-    <File name="./gtk-gui/objects.xml" subtype="Code" 
buildaction="EmbedAsResource" />
     <File name="./CustomMakefile.cs" subtype="Code" buildaction="Compile" />
     <File name="./MakefileOptionPanelWidget.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./MakefileOptionPanel.cs" subtype="Code" buildaction="Compile" 
/>
@@ -41,12 +38,19 @@
     <File name="./MakefileProject.cs" subtype="Code" buildaction="Compile" />
     <File name="./MakefileReaderExtension.cs" subtype="Code" 
buildaction="Compile" />
     <File name="./Makefile.am" subtype="Code" buildaction="Nothing" />
-    <File name="./MonoDevelop.Autotools.addin.xml" subtype="Code" 
buildaction="FileCopy" />
     <File name="./ChangeLog" subtype="Code" buildaction="Nothing" />
-    <File name="./templates" subtype="Directory" buildaction="Compile" />
     <File name="./FileNodeBuilderExtension.cs" subtype="Code" 
buildaction="Compile" />
-    <File name="./PropertyProvider.cs" subtype="Code" buildaction="Compile" />
     <File name="./gtk-gui/MonoDevelop.Autotools.MakefileOptionPanelWidget.cs" 
subtype="Code" buildaction="Compile" />
+    <File name="./templates/Makefile.am.project.template" subtype="Code" 
buildaction="FileCopy" />
+    <File name="./templates/Makefile.include" subtype="Code" 
buildaction="FileCopy" />
+    <File name="./templates/autogen.sh.template" subtype="Code" 
buildaction="FileCopy" />
+    <File name="./templates/configure.ac.template" subtype="Code" 
buildaction="FileCopy" />
+    <File name="./templates/exe.wrapper.in.template" subtype="Code" 
buildaction="FileCopy" />
+    <File name="./templates/package.pc.template" subtype="Code" 
buildaction="FileCopy" />
+    <File name="./TarballBuilderEditorWidget.cs" subtype="Code" 
buildaction="Compile" />
+    <File name="./gtk-gui/gui.stetic" subtype="Code" 
buildaction="EmbedAsResource" />
+    <File name="./gtk-gui/MonoDevelop.Autotools.TarballBuilderEditorWidget.cs" 
subtype="Code" buildaction="Compile" />
+    <File name="./gtk-gui/objects.xml" subtype="Code" 
buildaction="EmbedAsResource" />
   </Contents>
   <References>
     <ProjectReference type="Project" localcopy="False" 
refto="MonoDevelop.Core.Gui" />
@@ -54,20 +58,25 @@
     <ProjectReference type="Project" localcopy="False" refto="MonoDevelop.Ide" 
/>
     <ProjectReference type="Project" localcopy="False" 
refto="MonoDevelop.Core" />
     <ProjectReference type="Project" localcopy="False" 
refto="MonoDevelop.Components" />
-    <ProjectReference type="Gac" localcopy="False" refto="System, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
     <ProjectReference type="Project" localcopy="False" 
refto="MonoDevelop.Projects.Gui" />
     <ProjectReference type="Gac" localcopy="False" refto="Mono.Posix, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
-    <ProjectReference type="Gac" localcopy="False" refto="System.Xml, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-    <ProjectReference type="Assembly" localcopy="False" 
refto="../../contrib/log4net.dll" />
-    <ProjectReference type="Project" localcopy="False" 
refto="MonoDevelop.DesignerSupport" />
     <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gnome-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Project" localcopy="False" 
refto="MonoDevelop.Deployment" />
+    <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <ProjectReference type="Gac" localcopy="True" refto="atk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <ProjectReference type="Assembly" localcopy="True" 
refto="../../build/bin/log4net.dll" />
+    <ProjectReference type="Gac" localcopy="True" refto="System, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   </References>
-  <GtkDesignInfo partialTypes="True">
-    <ExportedWidgets>
-      <Widget>MonoDevelop.Autotools.MakefileOptionPanelWidget</Widget>
-    </ExportedWidgets>
-  </GtkDesignInfo>
+  <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" 
RelativeMakefileName="./Makefile.am" BuildTargetName="" CleanTargetName="" 
SyncReferences="True" IsAutotoolsProject="True" 
RelativeConfigureInPath="../../">
+    <BuildFilesVar Sync="True" Name="FILES" />
+    <DeployFilesVar Sync="True" Name="DATA_FILES" />
+    <ResourcesVar Sync="True" Name="RES" />
+    <OthersVar />
+    <GacRefVar Sync="True" Name="REFS" Prefix="-r:" />
+    <AsmRefVar Sync="True" Name="REFS" Prefix="-r:" />
+    <ProjectRefVar Sync="True" Name="REFS" Prefix="-r:" />
+  </MonoDevelop.Autotools.MakefileInfo>
+  <GtkDesignInfo partialTypes="True" isWidgetLibrary="True" />
 </Project>
\ No newline at end of file

Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/SolutionDeployer.cs
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/SolutionDeployer.cs  
2007-04-24 14:00:44 UTC (rev 76189)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/SolutionDeployer.cs  
2007-04-24 14:00:56 UTC (rev 76190)
@@ -126,14 +126,17 @@
                        return true;
                }
 
-               public void Deploy ( DeployContext ctx, Combine combine, string 
targetDir, IProgressMonitor monitor  )
+               public void Deploy ( DeployContext ctx, Combine combine, string 
targetDir, bool generateFiles, IProgressMonitor monitor  )
                {
-                       Deploy ( ctx, combine, 
combine.ActiveConfiguration.Name, targetDir, monitor  );
+                       Deploy ( ctx, combine, 
combine.ActiveConfiguration.Name, targetDir, generateFiles, monitor  );
                }
                
-               public void Deploy ( DeployContext ctx, Combine combine, string 
defaultConf, string targetDir, IProgressMonitor monitor  )
+               public void Deploy ( DeployContext ctx, Combine combine, string 
defaultConf, string targetDir, bool generateFiles, IProgressMonitor monitor  )
                {
-                       if ( !GenerateFiles ( ctx, combine, defaultConf, 
monitor ) )  return;
+                       if (generateFiles) {
+                               if ( !GenerateFiles ( ctx, combine, 
defaultConf, monitor ) ) 
+                                       return;
+                       }
                        
                        monitor.BeginTask ( GettextCatalog.GetString( 
"Deploying Solution to Tarball" ) , 3 );
                        try

Added: 
trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballBuilderEditorWidget.cs
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballBuilderEditorWidget.cs    
    2007-04-24 14:00:44 UTC (rev 76189)
+++ 
trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballBuilderEditorWidget.cs    
    2007-04-24 14:00:56 UTC (rev 76190)
@@ -0,0 +1,65 @@
+
+using System;
+using MonoDevelop.Projects;
+
+namespace MonoDevelop.Autotools
+{
+       
+       
+       public partial class TarballBuilderEditorWidget : Gtk.Bin
+       {
+               TarballDeployTarget target;
+               
+               public TarballBuilderEditorWidget (TarballDeployTarget target)
+               {
+                       this.Build();
+                       
+                       this.target = target;
+                       Combine targetCombine = target.RootCombineEntry as 
Combine;
+                       folderEntry.Path = target.TargetDir;
+                       
+                       if ((target.DefaultConfiguration == null || 
target.DefaultConfiguration == "") && targetCombine.ActiveConfiguration != null)
+                               target.DefaultConfiguration = 
targetCombine.ActiveConfiguration.Name;
+                       
+                       for (int ii=0; ii < targetCombine.Configurations.Count; 
ii++)
+                       {
+                               string cc = targetCombine.Configurations 
[ii].Name;
+                               comboConfigs.AppendText ( cc );
+                               if ( cc == target.DefaultConfiguration ) 
comboConfigs.Active = ii;
+                       }
+                       if (target.GenerateFiles)
+                               radioGenerate.Active = true;
+                       else
+                               radioUseExisting.Active = true;
+                       
+                       UpdateControls ();
+               }
+               
+               void UpdateControls ()
+               {
+                       boxConfig.Sensitive = target.GenerateFiles;
+               }
+
+               protected virtual void OnRadioGenerateClicked(object sender, 
System.EventArgs e)
+               {
+                       target.GenerateFiles = true;
+                       UpdateControls ();
+               }
+
+               protected virtual void OnRadioUseExistingClicked(object sender, 
System.EventArgs e)
+               {
+                       target.GenerateFiles = false;
+                       UpdateControls ();
+               }
+
+               protected virtual void OnComboConfigsChanged(object sender, 
System.EventArgs e)
+               {
+                       target.DefaultConfiguration = comboConfigs.ActiveText;
+               }
+
+               protected virtual void OnFolderEntryPathChanged(object sender, 
System.EventArgs e)
+               {
+                       target.TargetDir = folderEntry.Path;
+               }
+       }
+}

Deleted: 
trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballTargetEditorWidget.cs
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballTargetEditorWidget.cs 
2007-04-24 14:00:44 UTC (rev 76189)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/TarballTargetEditorWidget.cs 
2007-04-24 14:00:56 UTC (rev 76190)
@@ -1,59 +0,0 @@
-using System;
-
-using MonoDevelop.Projects;
-using MonoDevelop.Core;
-
-using Gtk;
-
-namespace MonoDevelop.Autotools
-{
-       public class TarballTargetEditorWidget : VBox
-       {
-               public TarballTargetEditorWidget (TarballDeployTarget target)
-               {
-                       Combine targetCombine = target.RootCombineEntry as 
Combine;
-                       
-                       HBox dir_entry = new HBox ();
-                       
-                       Label lab = new Label ( GettextCatalog.GetString 
("Deploy directory:") );
-                       dir_entry.PackStart (lab, false, false, 0);
-                       
-                       Gnome.FileEntry fe = new Gnome.FileEntry 
("tarball-folders","Target Directory");
-                       fe.GtkEntry.Text = target.TargetDir;
-                       fe.Directory = true;
-                       fe.Modal = true;
-                       fe.UseFilechooser = true;
-                       fe.FilechooserAction = FileChooserAction.SelectFolder;
-                       fe.GtkEntry.Changed += delegate (object s, EventArgs 
args) {
-                               target.TargetDir = fe.GtkEntry.Text;
-                       };
-                       dir_entry.PackStart (fe, true, true, 6);
-
-                       PackStart ( dir_entry , false, false, 0 );
-                       
-                       HBox config_box = new HBox ();
-
-                       Label conlab = new Label ( GettextCatalog.GetString 
("Default configuration:") );
-                       config_box.PackStart (conlab, false, false, 0);
-                       
-                       if ((target.DefaultConfiguration == null || 
target.DefaultConfiguration == "") && targetCombine.ActiveConfiguration != null)
-                               target.DefaultConfiguration = 
targetCombine.ActiveConfiguration.Name;
-                       
-                       ComboBox configs = ComboBox.NewText ();
-                       for ( int ii=0; ii < 
targetCombine.Configurations.Count; ii++ )
-                       {
-                               string cc = targetCombine.Configurations 
[ii].Name;
-                               configs.AppendText ( cc );
-                               if ( cc == target.DefaultConfiguration ) 
configs.Active = ii;
-                       }
-                       configs.Changed += delegate (object s, EventArgs args) {
-                               target.DefaultConfiguration = 
targetCombine.Configurations [configs.Active].Name;
-                       };
-                       config_box.PackStart ( configs, true, true, 6 );
-
-                       PackStart ( config_box, false, false, 6 );
-
-                       ShowAll ();
-               }
-       }
-}

Added: 
trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/MonoDevelop.Autotools.TarballBuilderEditorWidget.cs
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/MonoDevelop.Autotools.TarballBuilderEditorWidget.cs
  2007-04-24 14:00:44 UTC (rev 76189)
+++ 
trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/MonoDevelop.Autotools.TarballBuilderEditorWidget.cs
  2007-04-24 14:00:56 UTC (rev 76190)
@@ -0,0 +1,139 @@
+// 
------------------------------------------------------------------------------
+//  <autogenerated>
+//      This code was generated by a tool.
+//      Mono Runtime Version: 2.0.50727.42
+// 
+//      Changes to this file may cause incorrect behavior and will be lost if 
+//      the code is regenerated.
+//  </autogenerated>
+// 
------------------------------------------------------------------------------
+
+namespace MonoDevelop.Autotools {
+    
+    
+    public partial class TarballBuilderEditorWidget {
+        
+        private Gtk.VBox vbox2;
+        
+        private Gtk.HBox hbox1;
+        
+        private Gtk.Label label2;
+        
+        private MonoDevelop.Components.FolderEntry folderEntry;
+        
+        private Gtk.RadioButton radioUseExisting;
+        
+        private Gtk.RadioButton radioGenerate;
+        
+        private Gtk.HBox boxConfig;
+        
+        private Gtk.Label label4;
+        
+        private Gtk.Label label3;
+        
+        private Gtk.ComboBox comboConfigs;
+        
+        protected virtual void Build() {
+            Stetic.Gui.Initialize();
+            // Widget MonoDevelop.Autotools.TarballBuilderEditorWidget
+            Stetic.BinContainer.Attach(this);
+            this.Name = "MonoDevelop.Autotools.TarballBuilderEditorWidget";
+            // Container child 
MonoDevelop.Autotools.TarballBuilderEditorWidget.Gtk.Container+ContainerChild
+            this.vbox2 = new Gtk.VBox();
+            this.vbox2.Name = "vbox2";
+            this.vbox2.Spacing = 6;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.hbox1 = new Gtk.HBox();
+            this.hbox1.Name = "hbox1";
+            this.hbox1.Spacing = 6;
+            // Container child hbox1.Gtk.Box+BoxChild
+            this.label2 = new Gtk.Label();
+            this.label2.Name = "label2";
+            this.label2.LabelProp = Mono.Unix.Catalog.GetString("Deploy 
directory:");
+            this.hbox1.Add(this.label2);
+            Gtk.Box.BoxChild w1 = 
((Gtk.Box.BoxChild)(this.hbox1[this.label2]));
+            w1.Position = 0;
+            w1.Expand = false;
+            w1.Fill = false;
+            // Container child hbox1.Gtk.Box+BoxChild
+            this.folderEntry = new MonoDevelop.Components.FolderEntry();
+            this.folderEntry.Name = "folderEntry";
+            this.folderEntry.BrowserTitle = "Target Directory";
+            this.hbox1.Add(this.folderEntry);
+            Gtk.Box.BoxChild w2 = 
((Gtk.Box.BoxChild)(this.hbox1[this.folderEntry]));
+            w2.Position = 1;
+            this.vbox2.Add(this.hbox1);
+            Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
+            w3.Position = 0;
+            w3.Expand = false;
+            w3.Fill = false;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.radioUseExisting = new 
Gtk.RadioButton(Mono.Unix.Catalog.GetString("Use existing Autotools files"));
+            this.radioUseExisting.CanFocus = true;
+            this.radioUseExisting.Name = "radioUseExisting";
+            this.radioUseExisting.DrawIndicator = true;
+            this.radioUseExisting.UseUnderline = true;
+            this.radioUseExisting.Group = new GLib.SList(System.IntPtr.Zero);
+            this.vbox2.Add(this.radioUseExisting);
+            Gtk.Box.BoxChild w4 = 
((Gtk.Box.BoxChild)(this.vbox2[this.radioUseExisting]));
+            w4.Position = 1;
+            w4.Expand = false;
+            w4.Fill = false;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.radioGenerate = new 
Gtk.RadioButton(Mono.Unix.Catalog.GetString("Generate new Autotools files"));
+            this.radioGenerate.CanFocus = true;
+            this.radioGenerate.Name = "radioGenerate";
+            this.radioGenerate.DrawIndicator = true;
+            this.radioGenerate.UseUnderline = true;
+            this.radioGenerate.Group = this.radioUseExisting.Group;
+            this.vbox2.Add(this.radioGenerate);
+            Gtk.Box.BoxChild w5 = 
((Gtk.Box.BoxChild)(this.vbox2[this.radioGenerate]));
+            w5.Position = 2;
+            w5.Expand = false;
+            w5.Fill = false;
+            // Container child vbox2.Gtk.Box+BoxChild
+            this.boxConfig = new Gtk.HBox();
+            this.boxConfig.Name = "boxConfig";
+            this.boxConfig.Spacing = 6;
+            // Container child boxConfig.Gtk.Box+BoxChild
+            this.label4 = new Gtk.Label();
+            this.label4.WidthRequest = 24;
+            this.label4.Name = "label4";
+            this.label4.LabelProp = "";
+            this.boxConfig.Add(this.label4);
+            Gtk.Box.BoxChild w6 = 
((Gtk.Box.BoxChild)(this.boxConfig[this.label4]));
+            w6.Position = 0;
+            w6.Expand = false;
+            w6.Fill = false;
+            // Container child boxConfig.Gtk.Box+BoxChild
+            this.label3 = new Gtk.Label();
+            this.label3.Name = "label3";
+            this.label3.LabelProp = Mono.Unix.Catalog.GetString("Default 
configuration:");
+            this.boxConfig.Add(this.label3);
+            Gtk.Box.BoxChild w7 = 
((Gtk.Box.BoxChild)(this.boxConfig[this.label3]));
+            w7.Position = 1;
+            w7.Expand = false;
+            w7.Fill = false;
+            // Container child boxConfig.Gtk.Box+BoxChild
+            this.comboConfigs = Gtk.ComboBox.NewText();
+            this.comboConfigs.Name = "comboConfigs";
+            this.boxConfig.Add(this.comboConfigs);
+            Gtk.Box.BoxChild w8 = 
((Gtk.Box.BoxChild)(this.boxConfig[this.comboConfigs]));
+            w8.Position = 2;
+            this.vbox2.Add(this.boxConfig);
+            Gtk.Box.BoxChild w9 = 
((Gtk.Box.BoxChild)(this.vbox2[this.boxConfig]));
+            w9.Position = 3;
+            w9.Expand = false;
+            w9.Fill = false;
+            this.Add(this.vbox2);
+            if ((this.Child != null)) {
+                this.Child.ShowAll();
+            }
+            this.Show();
+            this.folderEntry.PathChanged += new 
System.EventHandler(this.OnFolderEntryPathChanged);
+            this.radioUseExisting.Clicked += new 
System.EventHandler(this.OnRadioUseExistingClicked);
+            this.radioGenerate.Clicked += new 
System.EventHandler(this.OnRadioGenerateClicked);
+            this.comboConfigs.Changed += new 
System.EventHandler(this.OnComboConfigsChanged);
+        }
+    }
+}

Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/gui.stetic
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/gui.stetic   
2007-04-24 14:00:44 UTC (rev 76189)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/gui.stetic   
2007-04-24 14:00:56 UTC (rev 76190)
@@ -1470,4 +1470,136 @@
       </widget>
     </child>
   </widget>
+  <widget class="Gtk.Bin" 
id="MonoDevelop.Autotools.TarballBuilderEditorWidget" design-size="463 367">
+    <property name="MemberName" />
+    <child>
+      <widget class="Gtk.VBox" id="vbox2">
+        <property name="MemberName" />
+        <property name="Spacing">6</property>
+        <child>
+          <widget class="Gtk.HBox" id="hbox1">
+            <property name="MemberName" />
+            <property name="Spacing">6</property>
+            <child>
+              <widget class="Gtk.Label" id="label2">
+                <property name="MemberName" />
+                <property name="LabelProp" translatable="yes">Deploy 
directory:</property>
+              </widget>
+              <packing>
+                <property name="Position">0</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="MonoDevelop.Components.FolderEntry" 
id="folderEntry">
+                <property name="MemberName" />
+                <property name="BrowserTitle">Target Directory</property>
+                <signal name="PathChanged" handler="OnFolderEntryPathChanged" 
/>
+              </widget>
+              <packing>
+                <property name="Position">1</property>
+                <property name="AutoSize">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">0</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.RadioButton" id="radioUseExisting">
+            <property name="MemberName" />
+            <property name="CanFocus">True</property>
+            <property name="Label" translatable="yes">Use existing Autotools 
files</property>
+            <property name="DrawIndicator">True</property>
+            <property name="HasLabel">True</property>
+            <property name="UseUnderline">True</property>
+            <property name="Group">group1</property>
+            <signal name="Clicked" handler="OnRadioUseExistingClicked" />
+          </widget>
+          <packing>
+            <property name="Position">1</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.RadioButton" id="radioGenerate">
+            <property name="MemberName" />
+            <property name="CanFocus">True</property>
+            <property name="Label" translatable="yes">Generate new Autotools 
files</property>
+            <property name="DrawIndicator">True</property>
+            <property name="HasLabel">True</property>
+            <property name="UseUnderline">True</property>
+            <property name="Group">group1</property>
+            <signal name="Clicked" handler="OnRadioGenerateClicked" />
+          </widget>
+          <packing>
+            <property name="Position">2</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.HBox" id="boxConfig">
+            <property name="MemberName" />
+            <property name="Spacing">6</property>
+            <child>
+              <widget class="Gtk.Label" id="label4">
+                <property name="MemberName" />
+                <property name="WidthRequest">24</property>
+                <property name="LabelProp" translatable="yes" />
+              </widget>
+              <packing>
+                <property name="Position">0</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.Label" id="label3">
+                <property name="MemberName" />
+                <property name="LabelProp" translatable="yes">Default 
configuration:</property>
+              </widget>
+              <packing>
+                <property name="Position">1</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.ComboBox" id="comboConfigs">
+                <property name="MemberName" />
+                <property name="IsTextCombo">True</property>
+                <property name="Items" translatable="yes" />
+                <signal name="Changed" handler="OnComboConfigsChanged" />
+              </widget>
+              <packing>
+                <property name="Position">2</property>
+                <property name="AutoSize">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">3</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder />
+        </child>
+      </widget>
+    </child>
+  </widget>
 </stetic-interface>
\ No newline at end of file

Modified: trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/objects.xml
===================================================================
--- trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/objects.xml  
2007-04-24 14:00:44 UTC (rev 76189)
+++ trunk/monodevelop/Extras/MonoDevelop.Autotools/gtk-gui/objects.xml  
2007-04-24 14:00:56 UTC (rev 76190)
@@ -1,21 +1,2 @@
 <objects>
-  <object type="MonoDevelop.Autotools.MakefileOptionPanelWidget" 
palette-category="widget" allow-children="false">
-    <itemgroups>
-      <itemgroup ref="Gtk.Widget" />
-      <itemgroup label="Container Properties">
-        <property name="BorderWidth" />
-        <property name="FocusHadjustment" />
-        <property name="FocusVadjustment" />
-      </itemgroup>
-    </itemgroups>
-    <signals>
-      <itemgroup ref="Gtk.Widget" />
-      <itemgroup label="Container Signals">
-        <signal name="ResizeChecked" />
-        <signal name="Removed" />
-        <signal name="FocusChildSet" />
-        <signal name="Added" />
-      </itemgroup>
-    </signals>
-  </object>
 </objects>
\ No newline at end of file

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to