[Monodevelop-patches-list] r640 - trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Jan 24 22:03:56 EST 2004
Author: jluke
Date: 2004-01-24 22:03:56 -0500 (Sat, 24 Jan 2004)
New Revision: 640
Modified:
trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS/Vfs.cs
Log:
update, should be able to get an icon now
Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS/Vfs.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS/Vfs.cs 2004-01-25 02:36:02 UTC (rev 639)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/VFS/Vfs.cs 2004-01-25 03:03:56 UTC (rev 640)
@@ -6,19 +6,44 @@
public class Vfs
{
[DllImport ("gnomevfs-2")]
- static extern string gnome_vfs_mime_type_from_name (string filename);
+ static extern bool gnome_vfs_init ();
[DllImport ("gnomevfs-2")]
- static extern string gnome_vfs_mime_type_from_name_or_default (string filename, string defaultval);
-
+ static extern bool gnome_vfs_initialized ();
+
+ [DllImport ("gnomevfs-2")]
+ static extern bool gnome_vfs_shutdown ();
+
+ [DllImport ("gnomevfs-2")]
+ static extern string gnome_vfs_get_mime_type (string uri);
+
+ [DllImport ("gnomevfs-2")]
+ static extern string gnome_vfs_mime_get_icon (string mime_type);
+
+ // gnome_program_init calls this for you
+ public static bool Init ()
+ {
+ return gnome_vfs_init ();
+ }
+
+ public static string GetIcon (string mimetype)
+ {
+ return gnome_vfs_mime_get_icon (mimetype);
+ }
+
public static string GetMimeType (string filename)
{
- return gnome_vfs_mime_type_from_name (filename);
+ return gnome_vfs_get_mime_type (filename);
}
- public static string GetMimeTypeDefault (string filename, string defaultval)
+ public static bool Shutdown ()
{
- return gnome_vfs_mime_type_from_name_or_default (filename, defaultval);
+ return gnome_vfs_shutdown ();
}
+
+ public static bool Initialized
+ {
+ get { return gnome_vfs_init (); }
+ }
}
}
More information about the Monodevelop-patches-list
mailing list