Permalink
Browse files

Lots of minor cleaning up

svn path=/trunk/aspeditor/; revision=55616
  • Loading branch information...
1 parent 9ddc22b commit 51d41719b165f420b5df5eb20a98611f9faea63d @mhutch mhutch committed Jan 16, 2006
View
@@ -1,3 +1,8 @@
+2006-01-16 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * config.in, INSTALL: update dependencies for new Toolbox
+ *config.in: check for missing build directories, check for installed_chrome.txt
+
2005-09-17 Michael Hutchinson <m.j.hutchinson@gmail.com>
* INSTALL: updated instructions regarding Mozilla extensions
View
@@ -5,7 +5,7 @@ You will need:
Gtk# 2.5.5.99
Gecko# 0.10
GCC 3.3
- Gtk+ 2.6.4 + developer headers
+ Gtk+ 2.6 + developer headers
Mozilla 1.7.10 + developer headers
Newer versions should work; if they don't, it's a bug.
@@ -34,7 +34,7 @@ You can run AspNetEdit out of the build directory with the command
make run
-However, the Mozilla extension must be installed first, so this command is only useful for running updated builds of the Mono-based components without reinstalling the whole application.
+However, the Mozilla extension *must* be installed first, so this command is only useful for running updated builds of the Mono-based components without reinstalling the whole application.
View
@@ -6,17 +6,32 @@ AM_MAINTAINER_MODE
AC_PROG_INSTALL
AC_PROG_CXX
-dnl pkg-config
+### Dependency version numbers
+
+MONO_REQUIRED_VERSION=1.1.9
+GTKSHARP_REQUIRED_VERSION=2.5.5.99
+GECKOSHARP_REQUIRED_VERSION=0.10
+
+GTK_VERSION=2.6.0
+MOZILLA_VERSION=1.6
+
+
+### Check for pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
-dnl C# compiler
+### Check mono version
+PKG_CHECK_MODULES(MONO, mono >= $MONO_REQUIRED_VERSION)
+
+#Check for C# compiler
AC_PATH_PROG(CSC, csc, no)
AC_PATH_PROG(MCS, mcs, no)
AC_PATH_PROG(MONO, mono, no)
+### Find a c# compiler
+
CS="C#"
if test "x$CSC" = "xno" -a "x$MCS" = "xno" ; then
dnl AC_MSG_ERROR([You need to install a C# compiler])
@@ -33,25 +48,44 @@ fi
AC_SUBST(MCS)
-
MCS_OPTIONS="-d:TRACE"
AC_SUBST(MCS_OPTIONS)
-dnl c# dependencies
-GTKSHARP_REQUIRED_VERSION=2.3.5.99
-GECKOSHARP_REQUIRED_VERSION=0.10
+
+### Check c# dependencies
+
PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0 >= $GTKSHARP_REQUIRED_VERSION)
PKG_CHECK_MODULES(GECKOSHARP, gecko-sharp-2.0 >= $GECKOSHARP_REQUIRED_VERSION)
-dnl c++ dependencies
-GTK_VERSION=2.4.0
-MOZILLA_VERSION=1.6
+### Check c++ dependencies
PKG_CHECK_MODULES(JSGLUEDEPS, mozilla-xpcom >= $MOZILLA_VERSION gtk+-2.0 >= $GTK_VERSION mozilla-gtkmozembed >= $MOZILLA_VERSION)
-dnl Mozilla directory to install chrome
+### Find the Mozilla directory to install chrome
MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
AC_SUBST(MOZILLA_HOME)
+AC_MSG_CHECKING(for installed-chrome.txt)
+INSTALLED_CHROME="$MOZILLA_HOME/chrome/installed-chrome.txt"
+if test -f "$INSTALLED_CHROME"; then
+ AC_MSG_RESULT(yes)
+ AC_SUBST(INSTALLED_CHROME)
+else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([Your Mozilla installation has an unexpected structure])
+fi
+
+### Create build directories, as tarballs seem to ignore them despite being in svn
+AC_MSG_CHECKING(for build directory)
+if test -d build ; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+ echo "Creating build directories..."
+ mkdir build
+ mkdir build/lib
+fi
+
+
AC_OUTPUT([
Makefile
View
@@ -0,0 +1,3 @@
+2006-01-16 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * SampleHost.cs: Refresh toolbox - no-one noticed breakage!
@@ -202,7 +202,7 @@ System.Diagnostics.TextWriterTraceListener listener
toolboxService.AddToolboxItem (new TextToolboxItem ("<input type=\"submit\" value=\"submit\" />", "Input [Submit]"), "Html");
toolboxService.AddToolboxItem (new TextToolboxItem ("<input type=\"reset\" value=\"reset\" />", "Input [Reset]"), "Html");
toolboxService.AddToolboxItem (new TextToolboxItem ("<input type=\"button\" value=\"button\" />", "Input [Button]"), "Html");
- toolbox.UpdateCategories ();
+ toolbox.Refresh ();
#endregion
@@ -16,12 +16,14 @@
<DeploymentInformation strategy="File">
<excludeFiles>
<ExcludeFile file="./AssemblyInfo.cs.in" />
+ <ExcludeFile file="./ChangeLog" />
</excludeFiles>
</DeploymentInformation>
<Contents>
<File name="./SampleHost.cs" subtype="Code" buildaction="Compile" />
<File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
<File name="./AssemblyInfo.cs.in" subtype="Code" buildaction="Exclude" />
+ <File name="./ChangeLog" subtype="Code" buildaction="Exclude" />
</Contents>
<References>
<ProjectReference type="Project" localcopy="True" refto="editor" />
View
@@ -1,3 +1,8 @@
+2006-01-16 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * Makefile.am: find installed-chrome.txt in correct location
+
+
2005-10-5 Michael Hutchinson <m.j.hutchinson@gmail.com>
* Makefile.am: Added .js files from Blago's reorganisation to the chrome deployment
View
@@ -1,6 +1,6 @@
packagename = aspdesigner
chromedir = $(MOZILLA_HOME)/chrome/$(packagename)
-chrome_install_file = /var/lib/mozilla/chrome/installed-chrome.txt
+chrome_install_file = $(MOZILLA_HOME)/chrome/installed-chrome.txt
chrome_install_text = "content,install,url,resource:/chrome/aspdesigner/content/" \
"locale,install,url,resource:/chrome/aspdesigner/locale/en-US/"
@@ -23,12 +23,11 @@ locale_files = \
$(srcdir)/locale/contents.rdf
install-data-hook:
- if test -f $(chrome_install_file); then f=$(chrome_install_file); else f=/opt/mozilla/lib/chrome/installed-chrome.txt; fi; \
- cp $$f /tmp/chrome.old; \
- sudo bash -c "sed -e'/aspdesigner/d' /tmp/chrome.old > $$f"; \
+ cp $(INSTALLED_CHROME) /tmp/chrome.old; \
+ sudo bash -c "sed -e'/aspdesigner/d' /tmp/chrome.old > $(INSTALLED_CHROME)"; \
for CHRM in $(chrome_install_text); do \
- cp $$f /tmp/chrome.old; \
- sudo bash -c "sed -e'\$$a$$CHRM' /tmp/chrome.old > $$f"; \
+ cp $(INSTALLED_CHROME) /tmp/chrome.old; \
+ sudo bash -c "sed -e'\$$a$$CHRM' /tmp/chrome.old > $(INSTALLED_CHROME)"; \
rm /tmp/chrome.old; \
done;
@@ -1,3 +1,7 @@
+2006-01-16 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * MenuCommandService.cs, WebFormPage.cs, Document.cs: Reduce trivial warnings
+
2005-11-28 Michael Hutchinson <m.j.hutchinson@gmail.com>
* Document.cs, DesignerHost.cs: avoid duplicating controls in container when loading and unloading
@@ -77,10 +77,10 @@ public Document (Control parent, DesignerHost host, Stream fileStream, string fi
this.document = DeserializeAndAdd (reader.ReadToEnd ());
}
catch (ParseException ex) {
- this.document = string.Format ("<html><head></head><body><h1>{0}</h1><p>{1}</p></body></html>", ex.Title, ex.Message);
+ this.document = ConstructErrorDocument (ex.Title, ex.Message);
}
catch (Exception ex) {
- this.document = string.Format ("<html><head></head><body><h1>{0}</h1><p>{1}</p><p>{2}</p></body></html>", "Error loading document", ex.Message, ex.StackTrace);
+ this.document = ConstructErrorDocument ("Error loading document", ex.Message + ex.StackTrace);
}
GetView ();
@@ -367,7 +367,7 @@ public void InsertFragment (string fragment)
#endregion
- private string ErrorDocument(string errorTitle, string errorDetails)
+ private string ConstructErrorDocument (string errorTitle, string errorDetails)
{
return "<html><body fgcolor='red'><h1>"
+ errorTitle
@@ -105,7 +105,7 @@ public void ShowContextMenu (CommandID menuID, int x, int y)
// Delegate doesn't accept the data pointer...?!
this.x = x;
this.y = y;
- contextMenu.Popup(null, null, new MenuPositionFunc (positionFunc), new System.IntPtr (), 2, Gtk.Global.CurrentEventTime);
+ contextMenu.Popup(null, null, new MenuPositionFunc (positionFunc), 2, Gtk.Global.CurrentEventTime);
}
private void positionFunc (Gtk.Menu menu, out int x, out int y, out bool pushIn)
@@ -44,7 +44,7 @@ namespace AspNetEdit.Editor.ComponentModel
{
internal class WebFormPage : System.Web.UI.Page
{
- private HttpRequest httpRequest;
+ //private HttpRequest httpRequest;
public WebFormPage ()
{
@@ -1,3 +1,7 @@
+2006-01-16 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * DesignTimeParser.cs: Reduce trivial warnings
+
2005-11-28 Michael Hutchinson <m.j.hutchinson@gmail.com>
* ServerControlParsingObject.cs: Add child collection objects to parent control
@@ -116,22 +116,22 @@ void TagParsed (ILocation location, TagType tagtype, string tagid, TagAttributes
break;
case TagType.CodeRender:
throw new NotImplementedException ("Code render expressions have not yet been implemented: " + location.PlainText);
- break;
+ //break;
case TagType.CodeRenderExpression:
throw new NotImplementedException ("Code render expressions have not yet been implemented: " + location.PlainText);
- break;
+ //break;
case TagType.DataBinding:
throw new NotImplementedException("Data binding expressions have not yet been implemented: " + location.PlainText);
- break;
+ //break;
case TagType.Directive:
ProcessDirective (tagid, attributes);
break;
case TagType.Include:
throw new NotImplementedException ("Server-side includes have not yet been implemented: " + location.PlainText);
- break;
+ //break;
case TagType.ServerComment:
throw new NotImplementedException ("Server comments have not yet been implemented: " + location.PlainText);
- break;
+ //break;
case TagType.Tag:
//TODO: don't do this for XHTML
if ((string.Compare (tagid, "br", true) == 0)
@@ -149,7 +149,7 @@ void TagParsed (ILocation location, TagType tagtype, string tagid, TagAttributes
break;
case TagType.Text:
throw new NotImplementedException("Text tagtypes have not yet been implemented: " + location.PlainText);
- break;
+ //break;
}
}
@@ -1,3 +1,8 @@
+2006-01-16 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * ToolboxItem.cs: cleanup redundant file
+ * RootDesignerView.cs: make exception more informative
+
2005-11-28 Michael Hutchinson <m.j.hutchinson@gmail.com>
* Toolbox.cs: initial migration to GTK# TreeView
@@ -8,4 +13,4 @@
2005-09-18 Michael Hutchinson <m.j.hutchinson@gmail.com>
- * Toolbox.cs: Use System.Web.UI.ToolboxDataAttribute when inserting Web Controls, if present
+ * Toolbox.cs: Use System.Web.UI.ToolboxDataAttribute when inserting Web Controls, if present
@@ -183,7 +183,7 @@ internal void RemoveControl (Control control)
internal void RenameControl (string oldName, string newName)
{
- throw new NotImplementedException ();
+ throw new NotImplementedException ("Renaming controls not supported yet");
}
internal string GetDocument ()
View
@@ -16,6 +16,10 @@
<DeploymentInformation strategy="File">
<excludeFiles>
<ExcludeFile file="./AssemblyInfo.cs.in" />
+ <ExcludeFile file="./AspNetEdit.Editor.Persistence/ChangeLog" />
+ <ExcludeFile file="./AspNetEdit.Editor.UI/ChangeLog" />
+ <ExcludeFile file="./ChangeLog" />
+ <ExcludeFile file="./AspNetEdit.Editor.ComponentModel/ChangeLog" />
</excludeFiles>
</DeploymentInformation>
<Contents>
@@ -38,7 +42,6 @@
<File name="./AspNetEdit.Editor.ComponentModel/WebFormReferenceManager.cs" subtype="Code" buildaction="Compile" />
<File name="./AspNetEdit.Editor.UI/RootDesignerView.cs" subtype="Code" buildaction="Compile" />
<File name="./AspNetEdit.Editor.UI/Toolbox.cs" subtype="Code" buildaction="Compile" />
- <File name="./AspNetEdit.Editor.UI/ToolboxItemBox.cs" subtype="Code" buildaction="Compile" />
<File name="./AspNetEdit.Editor.ComponentModel/Document.cs" subtype="Code" buildaction="Compile" />
<File name="./AspNetEdit.Editor.ComponentModel/DocumentDirective.cs" subtype="Code" buildaction="Compile" />
<File name="./AspNetEdit.Editor.Persistence/AspParser.cs" subtype="Code" buildaction="Compile" />
@@ -57,6 +60,11 @@
<File name="./AspNetEdit.Editor.Persistence/TagAttributes.cs" subtype="Code" buildaction="Compile" />
<File name="./AspNetEdit.Editor.Persistence/TagType.cs" subtype="Code" buildaction="Compile" />
<File name="./AspNetEdit.Editor.ComponentModel/TextToolboxItem.cs" subtype="Code" buildaction="Compile" />
+ <File name="./ChangeLog" subtype="Code" buildaction="Exclude" />
+ <File name="./AspNetEdit.Editor.ComponentModel/ChangeLog" subtype="Code" buildaction="Exclude" />
+ <File name="./AspNetEdit.Editor.Persistence/ChangeLog" subtype="Code" buildaction="Exclude" />
+ <File name="./AspNetEdit.Editor.UI/ChangeLog" subtype="Code" buildaction="Exclude" />
+ <File name="./AspNetEdit.Editor.UI/ToolboxItemStore.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
<ProjectReference type="Project" localcopy="True" refto="jscall" />
@@ -72,5 +80,6 @@
<ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.6.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<ProjectReference type="Gac" localcopy="True" refto="gecko-sharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=ccf7d78a55e9f021" />
<ProjectReference type="Gac" localcopy="True" refto="atk-sharp, Version=2.6.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.6.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
</References>
</Project>
View
@@ -16,6 +16,10 @@
<DeploymentInformation strategy="File">
<excludeFiles>
<ExcludeFile file="./AssemblyInfo.cs.in" />
+ <ExcludeFile file="./ChangeLog" />
+ <ExcludeFile file="./Resources/ChangeLog" />
+ <ExcludeFile file="./jscallglue/ChangeLog" />
+ <ExcludeFile file="./AspNetEdit.JSCall/ChangeLog" />
</excludeFiles>
</DeploymentInformation>
<Contents>
@@ -27,6 +31,10 @@
<File name="./Resources/JSCall.js" subtype="Code" buildaction="Exclude" />
<File name="./jscallglue/README" subtype="Code" buildaction="Exclude" />
<File name="./jscallglue/jscallglue.cpp" subtype="Code" buildaction="Exclude" />
+ <File name="./ChangeLog" subtype="Code" buildaction="Exclude" />
+ <File name="./AspNetEdit.JSCall/ChangeLog" subtype="Code" buildaction="Exclude" />
+ <File name="./Resources/ChangeLog" subtype="Code" buildaction="Exclude" />
+ <File name="./jscallglue/ChangeLog" subtype="Code" buildaction="Exclude" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -75,13 +75,23 @@ void entry_Changed (object sender, EventArgs e)
{
//Catching all exceptions is bad, but converter can throw all sorts of exception
//with invalid entries. We just want to ignore bad entries.
+ string text = ((Entry) sender).Text;
try {
- string text = ((Entry) sender).Text;
//if value was null and new value is empty, leave as null
if (!(text == "" && parentRow.PropertyValue== null))
parentRow.PropertyValue = parentRow.PropertyDescriptor.Converter.ConvertFromString (((Entry) sender).Text);
}
- catch (Exception ex) { }
+ catch (Exception ex)
+ {
+ //we want to give a helpful error message: even if we ignore these exceptions
+ //most of the time, the error may still be useful when debugging controls
+ System.Diagnostics.Trace.WriteLine (
+ "PropertyGrid String Editor: TypeConverter could not convert string \"" + text +
+ "\" to " + parentRow.PropertyDescriptor.PropertyType.ToString () +
+ " for property \"" + parentRow.PropertyDescriptor.DisplayName + "\".\n" +
+ "Error details: "+ ex.Message
+ );
+ }
}
public override bool DialogueEdit {
Oops, something went wrong.

0 comments on commit 51d4171

Please sign in to comment.