[Monodevelop-patches-list] r2577 - in trunk/MonoDevelop: . Core/src/MonoDevelop.Base Core/src/MonoDevelop.Base/Services

John Luke <jluke@cfl.rr.com> jluke at mono-cvs.ximian.com
Wed Jun 1 21:58:46 EDT 2005


Author: jluke
Date: 2005-06-01 21:58:45 -0400 (Wed, 01 Jun 2005)
New Revision: 2577

Removed:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelop.Base.dll.config.in
Modified:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/ResourceService.cs
   trunk/MonoDevelop/configure.in
Log:
remove pinvoke workaround and use RenderIcon directly now


Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-06-02 01:14:59 UTC (rev 2576)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-06-02 01:58:45 UTC (rev 2577)
@@ -1,5 +1,13 @@
 2005-06-01  John Luke  <john.luke at gmail.com>
 
+	* Core/src/MonoDevelop.Base/Services/ResourceService.cs: remove
+	DllImport workaround for rendering an icon
+	* Core/src/MonoDevelop.Base/MonoDevelop.Base.dll.config.in: remove
+	as we no longer p/invoke
+	* Core/src/MonoDevelop.Base/Makefile.am: updated for above
+	
+2005-06-01  John Luke  <john.luke at gmail.com>
+
 	* Gui/Workbench/Layouts/SdiWorkspaceLayout.cs:
 	* Gui/Workbench/Layouts/SdiWorkspaceWindow.cs:
 	* Gui/Pads/FileScout/FileListItem.cs: adjust to

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am	2005-06-02 01:14:59 UTC (rev 2576)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Makefile.am	2005-06-02 01:58:45 UTC (rev 2577)
@@ -472,7 +472,6 @@
 build_OPTIONS = $(addprefix $(top_builddir)/build/data/options/, $(notdir $(OPTIONS)))
 
 DLLNAME = MonoDevelop.Base.dll
-CONFIG = $(DLLNAME).config
 ASSEMBLY = $(top_builddir)/build/bin/$(DLLNAME)
 
 ADDIN = MonoDevelopCore.addin.xml
@@ -496,11 +495,10 @@
 $(ASSEMBLY): $(build_sources) $(srcdir)/Base.glade Services/StockIcons.cs
 	$(CSC) $(CSC_FLAGS) $(MONO_POSIX_OEE) -codepage:utf8 -out:$@ -target:library $(DLLS) \
 		-resource:$(srcdir)/Base.glade,Base.glade \
-		$(monodoc_libflags) $(build_sources) Services/StockIcons.cs \
-	&& cp $(CONFIG) $(top_builddir)/build/bin/.
+		$(monodoc_libflags) $(build_sources) Services/StockIcons.cs
 
 assemblydir = $(MD_ASSEMBLY_DIR)
-assembly_DATA = $(ASSEMBLY) $(CONFIG)
+assembly_DATA = $(ASSEMBLY)
 
 addindir = $(MD_ADDIN_DIR)
 addin_DATA = $(ADDIN)
@@ -509,8 +507,8 @@
 options_DATA = $(OPTIONS)
 
 CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb $(build_OPTIONS)
-DISTCLEANFILES = $(CONFIG) Services/StockIcons.cs
+DISTCLEANFILES = Services/StockIcons.cs
 
-EXTRA_DIST = $(FILES) ./Services/process-icons.pl $(CONFIG).in Base.glade $(ADDIN) $(OPTIONS)
+EXTRA_DIST = $(FILES) ./Services/process-icons.pl Base.glade $(ADDIN) $(OPTIONS)
 
 include $(top_srcdir)/Makefile.include

Deleted: trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelop.Base.dll.config.in
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelop.Base.dll.config.in	2005-06-02 01:14:59 UTC (rev 2576)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/MonoDevelop.Base.dll.config.in	2005-06-02 01:58:45 UTC (rev 2577)
@@ -1,3 +0,0 @@
-<configuration>
-	<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0 at LIB_PREFIX@.0 at LIB_SUFFIX@" />
-</configuration>

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/ResourceService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/ResourceService.cs	2005-06-02 01:14:59 UTC (rev 2576)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/ResourceService.cs	2005-06-02 01:58:45 UTC (rev 2577)
@@ -121,13 +121,6 @@
 			//}
 		}
 		
-		// use P/Invoke to be able to pass some NULL parameters
-		[DllImport("libgtk-win32-2.0-0.dll")]
-		static extern IntPtr
-		gtk_icon_set_render_icon (IntPtr raw, IntPtr style, int direction,
-		                          int state, int size, IntPtr widget,
-		                          string detail);
-
 		/// <summary>
 		/// Returns a icon from the resource database, it handles localization
 		/// transparent for the user. In the resource database can be a bitmap
@@ -154,19 +147,10 @@
 			if (stockid != null) {
 				Gtk.IconSet iconset = Gtk.IconFactory.LookupDefault (stockid);
 				if (iconset != null) {
-					// use P/Invoke to be able to pass some NULL parameters
-					IntPtr raw_ret = gtk_icon_set_render_icon
-						(iconset.Handle,
-						 Gtk.Widget.DefaultStyle.Handle,
-						 (int) Gtk.TextDirection.None,
-						 (int) Gtk.StateType.Normal,
-						 (int) size,
-						 IntPtr.Zero, null);
-					return (Gdk.Pixbuf) GLib.Object.GetObject(raw_ret);
+					return iconset.RenderIcon (Gtk.Widget.DefaultStyle, Gtk.TextDirection.None, Gtk.StateType.Normal, size, null, null);
 				}
 			}
 			
-			// throw GLib.GException as the old code?
 			return null;
 		}
 		

Modified: trunk/MonoDevelop/configure.in
===================================================================
--- trunk/MonoDevelop/configure.in	2005-06-02 01:14:59 UTC (rev 2576)
+++ trunk/MonoDevelop/configure.in	2005-06-02 01:58:45 UTC (rev 2577)
@@ -193,7 +193,6 @@
 Core/src/AddIns/DisplayBindings/SourceEditor/MonoDevelop.SourceEditor.dll.config
 Core/src/AddIns/DebuggerAddIn/Makefile
 Core/src/MonoDevelop.Base/Makefile
-Core/src/MonoDevelop.Base/MonoDevelop.Base.dll.config
 Core/src/MonoDevelop.Startup/Makefile
 Core/src/MonoDevelop.Core/Makefile
 Core/src/MonoDevelop.Dock/Makefile




More information about the Monodevelop-patches-list mailing list