[Monodevelop-patches-list] r1893 - in trunk/MonoDevelop/Core: . src/Libraries/MonoDevelop.Core src/Libraries/MonoDevelop.Core/Services

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Mon Jul 5 01:30:43 EDT 2004


Author: tberman
Date: 2004-07-05 01:30:43 -0400 (Mon, 05 Jul 2004)
New Revision: 1893

Added:
   trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Services/GettextCatalog.cs.in
Removed:
   trunk/MonoDevelop/Core/libmonodevelop/
   trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Services/GettextCatalog.cs
Modified:
   trunk/MonoDevelop/Core/ChangeLog
   trunk/MonoDevelop/Core/Makefile.am
   trunk/MonoDevelop/Core/configure.in
   trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog
   trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Makefile.am
Log:
remove libmonodevelop, and use Mono.Posix.Catalog


Modified: trunk/MonoDevelop/Core/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/ChangeLog	2004-07-04 19:08:57 UTC (rev 1892)
+++ trunk/MonoDevelop/Core/ChangeLog	2004-07-05 05:30:43 UTC (rev 1893)
@@ -1,3 +1,9 @@
+2004-07-05  Todd Berman  <tberman at off.net>
+
+	* configure.in:
+	* Makefile.am:
+	* libmonodevelop: Removed libmonodevelop.
+
 2004-07-04  Todd Berman  <tberman at off.net>
 
 	* *: Fixup to work on macosx OOB, at least a bit better.

Modified: trunk/MonoDevelop/Core/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/Makefile.am	2004-07-04 19:08:57 UTC (rev 1892)
+++ trunk/MonoDevelop/Core/Makefile.am	2004-07-05 05:30:43 UTC (rev 1893)
@@ -1,6 +1,6 @@
 # leave gdldock first
 # (mkdir ../../build/bin/ hack)
-SUBDIRS = gdldock libmonodevelop src build data po
+SUBDIRS = gdldock src build data po
 
 bin_SCRIPTS = monodevelop
 

Modified: trunk/MonoDevelop/Core/configure.in
===================================================================
--- trunk/MonoDevelop/Core/configure.in	2004-07-04 19:08:57 UTC (rev 1892)
+++ trunk/MonoDevelop/Core/configure.in	2004-07-05 05:30:43 UTC (rev 1893)
@@ -119,7 +119,6 @@
 gdldock/sources/Makefile
 gdldock/sources/gdl/Makefile
 gdldock/gdl/gdl-sharp.dll.config
-libmonodevelop/Makefile
 src/Makefile
 src/AddIns/Makefile
 src/AddIns/BackendBindings/Makefile

Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog	2004-07-04 19:08:57 UTC (rev 1892)
+++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/ChangeLog	2004-07-05 05:30:43 UTC (rev 1893)
@@ -1,3 +1,11 @@
+2004-07-05  Todd Berman  <tberman at off.net>
+
+	* Services/GettextCatalog.cs: removed
+	* Services/GettextCatalog.cs.in: Added, this is a passthru to
+	Mono.Posix.Catalog. We are using the .in so that the locale dir is
+	specified properly.
+	* Makefile.am: Add .cs.in rules to generate, etc.
+
 2004-07-02  Todd Berman  <tberman at off.net>
 
 	* Services/FileUtilityService.cs: remove some unneeded code, and

Modified: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Makefile.am	2004-07-04 19:08:57 UTC (rev 1892)
+++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Makefile.am	2004-07-05 05:30:43 UTC (rev 1893)
@@ -55,8 +55,7 @@
 ./AddIns/TypeNotFoundException.cs \
 ./AddIns/AddInInitializeException.cs \
 ./AddIns/AddInCollection.cs \
-./AddIns/AddInSignatureException.cs \
-./Services/GettextCatalog.cs
+./AddIns/AddInSignatureException.cs
 
 build_sources = $(addprefix $(srcdir)/, $(FILES))
 
@@ -69,18 +68,23 @@
 
 DLL = MonoDevelop.Core.dll
 
-REFS = /r:System.Drawing.dll
+REFS = /r:System.Drawing.dll \
+/r:Mono.Posix.dll
 
 all: $(DLL)
 
-$(DLL): $(build_sources) $(build_resources)
+Services/GettextCatalog.cs: Services/GettextCatalog.cs.in
+	sed -e 's,@''prefix@,$(prefix),g' $(srcdir)/$@.in > $@.tmp
+	mv $@.tmp $@
+
+$(DLL): $(build_sources) $(build_resources) Services/GettextCatalog.cs
 	mcs /debug /out:$(DLL) /target:library $(REFS) /define:LINUX $(COMPILE_RESOURCES) \
-	$(build_sources) && cp $(DLL) ../../../build/bin/.
+	$(build_sources) Services/GettextCatalog.cs && cp $(DLL) ../../../build/bin/.
 
 assemblydir = $(libdir)/monodevelop/bin
 assembly_DATA = $(DLL)
 
-CLEANFILES = $(DLL)
+CLEANFILES = $(DLL) Services/GettextCatalog.cs
 
-EXTRA_DIST = $(FILES)
+EXTRA_DIST = $(FILES) Services/GettextCatalog.cs.in
 

Deleted: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Services/GettextCatalog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Services/GettextCatalog.cs	2004-07-04 19:08:57 UTC (rev 1892)
+++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Services/GettextCatalog.cs	2004-07-05 05:30:43 UTC (rev 1893)
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2004 Jorn Baayen <jorn at nl.linux.org>
- * 
- * Modified by Todd Berman <tberman at sevenl.net> to fit with MonoDevelop.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * !!! Note that this class has to have the same API as the one
- *     from GNU.Gettext.dll, because otherwise the strings won't
- *     be picked up by update-po.
- */
-
-using System;
-using System.Runtime.InteropServices;
-
-using MonoDevelop.Core.Services;
-using MonoDevelop.Core.AddIns;
-
-namespace MonoDevelop.Services
-{
-
-	public class GettextCatalog
-	{
-
-		[DllImport ("libmonodevelop")]
-		private static extern void intl_init (string package);
-	
-		static GettextCatalog ()
-		{
-			intl_init ("monodevelop");
-		}
-	
-		[DllImport ("libmonodevelop")]
-		private static extern IntPtr intl_get_string (IntPtr sptr);
-	
-		public static string GetString (string str)
-		{
-			IntPtr inptr = Marshal.StringToHGlobalAuto (str);
-			IntPtr sptr = intl_get_string (inptr);
-			Marshal.FreeHGlobal (inptr);
-			if (inptr == sptr)
-				return str;
-			else
-				return Marshal.PtrToStringAuto (sptr);
-		}
-	
-		[DllImport ("libmonodevelop")]
-		private static extern IntPtr intl_get_plural_string (IntPtr singular,
-								     IntPtr plural,
-								     int n);
-	
-		public static string GetPluralString (string singular,
-			    	 	              string plural,
-					              int n)
-		{
-			IntPtr singptr = Marshal.StringToHGlobalAuto (singular);
-			IntPtr plurptr = Marshal.StringToHGlobalAuto (plural);
-			IntPtr sptr = intl_get_plural_string (singptr, plurptr, n);
-			Marshal.FreeHGlobal (singptr);
-			Marshal.FreeHGlobal (plurptr);
-			if (sptr == singptr)
-				return singular;
-			else if (sptr == plurptr)
-				return plural;
-			else
-				return Marshal.PtrToStringAuto (sptr);
-		}
-	}
-}

Copied: trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Services/GettextCatalog.cs.in (from rev 1888, trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Services/GettextCatalog.cs)
===================================================================
--- trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Services/GettextCatalog.cs	2004-07-04 04:48:06 UTC (rev 1888)
+++ trunk/MonoDevelop/Core/src/Libraries/MonoDevelop.Core/Services/GettextCatalog.cs.in	2004-07-05 05:30:43 UTC (rev 1893)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2004 Jorn Baayen <jorn at nl.linux.org>
+ * 
+ * Modified by Todd Berman <tberman at sevenl.net> to fit with MonoDevelop.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * !!! Note that this class has to have the same API as the one
+ *     from GNU.Gettext.dll, because otherwise the strings won't
+ *     be picked up by update-po.
+ */
+
+using System;
+using System.Runtime.InteropServices;
+
+using MonoDevelop.Core.Services;
+using MonoDevelop.Core.AddIns;
+
+using Mono.Posix;
+
+namespace MonoDevelop.Services
+{
+
+	public class GettextCatalog
+	{
+
+		static GettextCatalog ()
+		{
+			Catalog.Init ("monodevelop", "@prefix@/share/locale");
+		}
+	
+		public static string GetString (string str)
+		{
+			return Catalog.GetString (str);
+		}
+	
+		public static string GetPluralString (string singular,
+			    	 	              string plural,
+					              int n)
+		{
+			return Catalog.GetPluralString (singular, plural, n);
+		}
+	}
+}




More information about the Monodevelop-patches-list mailing list