[Monodevelop-patches-list] r1870 - in trunk/MonoDevelop/Core: data/resources src/Main/Base src/Main/Base/Services src/Main/StartUp
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Thu Jul 1 12:47:17 EDT 2004
Author: tberman
Date: 2004-07-01 12:47:17 -0400 (Thu, 01 Jul 2004)
New Revision: 1870
Removed:
trunk/MonoDevelop/Core/data/resources/BitmapResources.resources
trunk/MonoDevelop/Core/data/resources/StringResources.bg.resources
trunk/MonoDevelop/Core/data/resources/StringResources.br.resources
trunk/MonoDevelop/Core/data/resources/StringResources.cn-big.resources
trunk/MonoDevelop/Core/data/resources/StringResources.cn-gb.resources
trunk/MonoDevelop/Core/data/resources/StringResources.cz.resources
trunk/MonoDevelop/Core/data/resources/StringResources.de.resources
trunk/MonoDevelop/Core/data/resources/StringResources.dk.resources
trunk/MonoDevelop/Core/data/resources/StringResources.es.resources
trunk/MonoDevelop/Core/data/resources/StringResources.fr.resources
trunk/MonoDevelop/Core/data/resources/StringResources.goisern.resources
trunk/MonoDevelop/Core/data/resources/StringResources.it.resources
trunk/MonoDevelop/Core/data/resources/StringResources.jp.resources
trunk/MonoDevelop/Core/data/resources/StringResources.kr.resources
trunk/MonoDevelop/Core/data/resources/StringResources.nl.resources
trunk/MonoDevelop/Core/data/resources/StringResources.pl.resources
trunk/MonoDevelop/Core/data/resources/StringResources.pt.resources
trunk/MonoDevelop/Core/data/resources/StringResources.resources
trunk/MonoDevelop/Core/data/resources/StringResources.ro.resources
trunk/MonoDevelop/Core/data/resources/StringResources.ru.resources
trunk/MonoDevelop/Core/data/resources/StringResources.se.resources
Modified:
trunk/MonoDevelop/Core/data/resources/Makefile.am
trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
trunk/MonoDevelop/Core/src/Main/Base/Services/ResourceService.cs
trunk/MonoDevelop/Core/src/Main/StartUp/Makefile.am
Log:
remove lots of now unneeded code and data.
Deleted: trunk/MonoDevelop/Core/data/resources/BitmapResources.resources
===================================================================
(Binary files differ)
Modified: trunk/MonoDevelop/Core/data/resources/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/data/resources/Makefile.am 2004-07-01 06:28:55 UTC (rev 1869)
+++ trunk/MonoDevelop/Core/data/resources/Makefile.am 2004-07-01 16:47:17 UTC (rev 1870)
@@ -1,5 +1,4 @@
SUBDIRS = glade
EXTRA_DIST = AddIn.xsd \
-SplashScreen.png \
-StringResources.resources
+SplashScreen.png
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.bg.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.br.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.cn-big.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.cn-gb.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.cz.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.de.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.dk.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.es.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.fr.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.goisern.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.it.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.jp.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.kr.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.nl.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.pl.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.pt.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.ro.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.ru.resources
===================================================================
(Binary files differ)
Deleted: trunk/MonoDevelop/Core/data/resources/StringResources.se.resources
===================================================================
(Binary files differ)
Modified: trunk/MonoDevelop/Core/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-07-01 06:28:55 UTC (rev 1869)
+++ trunk/MonoDevelop/Core/src/Main/Base/ChangeLog 2004-07-01 16:47:17 UTC (rev 1870)
@@ -1,3 +1,8 @@
+2004-07-01 Todd Berman <tberman at off.net>
+
+ * Services/ResourceService.cs: Remove a lot of code associated with
+ loading resources at runtime, etc.
+
2004-06-29 Todd Berman <tberman at off.net>
* Internal/Codons/Templates/ProjectTemplateCodon.cs: new codon for
Modified: trunk/MonoDevelop/Core/src/Main/Base/Services/ResourceService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/Main/Base/Services/ResourceService.cs 2004-07-01 06:28:55 UTC (rev 1869)
+++ trunk/MonoDevelop/Core/src/Main/Base/Services/ResourceService.cs 2004-07-01 16:47:17 UTC (rev 1870)
@@ -37,18 +37,8 @@
public class ResourceService : AbstractService
{
- readonly static string uiLanguageProperty = "CoreProperties.UILanguage";
-
- readonly static string stringResources = "StringResources";
- readonly static string imageResources = "BitmapResources";
-
- static string resourceDirctory;
-
static ResourceService()
{
- PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
- resourceDirctory = propertyService.DataDirectory + Path.DirectorySeparatorChar + "resources";
-
iconFactory = new Gtk.IconFactory ();
// FIXME: remove this when all MonoDevelop is using Gtk+
@@ -61,58 +51,6 @@
Hashtable userStrings = null;
Hashtable userIcons = null;
- ResourceManager strings = null;
- ResourceManager icon = null;
-
- Hashtable localStrings = null;
- Hashtable localIcons = null;
-
- void ChangeProperty(object sender, PropertyEventArgs e)
- {
- if (e.Key == uiLanguageProperty && e.OldValue != e.NewValue) {
- LoadLanguageResources();
- }
- }
-
- void LoadLanguageResources()
- {
- PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
- string language = propertyService.GetProperty(uiLanguageProperty, Thread.CurrentThread.CurrentUICulture.Name);
-
- localStrings = Load(stringResources, language);
- if (localStrings == null && language.IndexOf('-') > 0) {
- localStrings = Load(stringResources, language.Split(new char[] {'-'})[0]);
- }
-
- localIcons = Load(imageResources, language);
- if (localIcons == null && language.IndexOf('-') > 0) {
- localIcons = Load(imageResources, language.Split(new char[] {'-'})[0]);
- }
- }
-
- public override void InitializeService()
- {
- base.InitializeService();
- PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
- propertyService.PropertyChanged += new PropertyEventHandler(ChangeProperty);
-
- LoadLanguageResources();
- }
-
- // core service : Can't use Initialize, because all other stuff needs this service before initialize is called.
- public ResourceService()
- {
- strings = new ResourceManager(stringResources, Assembly.GetCallingAssembly());
- icon = new ResourceManager(imageResources, Assembly.GetCallingAssembly());
-
- if (System.Configuration.ConfigurationSettings.AppSettings["UserStrings"] != null) {
- userStrings = Load(resourceDirctory + Path.DirectorySeparatorChar + System.Configuration.ConfigurationSettings.AppSettings["UserStrings"]);
- }
- if (System.Configuration.ConfigurationSettings.AppSettings["UserIcons"] != null) {
- userIcons = Load(resourceDirctory + Path.DirectorySeparatorChar + System.Configuration.ConfigurationSettings.AppSettings["UserIcons"]);
- }
- }
-
/// <summary>
/// The LoadFont routines provide a safe way to load fonts.
/// </summary>
@@ -180,25 +118,6 @@
//}
}
- Hashtable Load(string fileName)
- {
- if (File.Exists(fileName)) {
- Hashtable resources = new Hashtable();
- ResourceReader rr = new ResourceReader(fileName);
- foreach (DictionaryEntry entry in rr) {
- resources.Add(entry.Key, entry.Value);
- }
- rr.Close();
- return resources;
- }
- return null;
- }
- Hashtable Load(string name, string language)
- {
- return Load(resourceDirctory + Path.DirectorySeparatorChar + name + "." + language + ".resources");
-
- }
-
// use P/Invoke to be able to pass some NULL parameters
[DllImport("libgtk-x11-2.0.so.0")]
static extern IntPtr
Modified: trunk/MonoDevelop/Core/src/Main/StartUp/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/Main/StartUp/Makefile.am 2004-07-01 06:28:55 UTC (rev 1869)
+++ trunk/MonoDevelop/Core/src/Main/StartUp/Makefile.am 2004-07-01 16:47:17 UTC (rev 1870)
@@ -22,7 +22,6 @@
mcs /debug /out:$(DLL) \
/define:GTK $(REFS) \
$(build_sources) \
- /resource:$(BASEDIR)/data/resources/StringResources.resources,StringResources.resources \
/resource:$(BASEDIR)/data/resources/SplashScreen.png,SplashScreen.png \
&& cp $(DLL) ../../../build/bin/.
More information about the Monodevelop-patches-list
mailing list