Global.ApplicationName property

2008-11-21  Stephane Delcroix  <sdelcroix@novell.com>

	* glib/Global.cs: implement Global.ApplicationName for localized
	application name.

svn path=/trunk/gtk-sharp/; revision=119633
This commit is contained in:
Stephane Delcroix 2008-11-21 16:54:10 +00:00
parent 68ec7f1ebd
commit 1d63a0e3e7
2 changed files with 22 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-11-21 Stephane Delcroix <sdelcroix@novell.com>
* glib/Global.cs: implement Global.ApplicationName for localized
application name.
2008-11-21 Stephane Delcroix <sdelcroix@novell.com>
* Makefile.am:

View file

@ -47,5 +47,22 @@ namespace GLib {
[DllImport("libglib-2.0-0.dll")]
static extern IntPtr g_get_prgname ();
public static string ApplicationName {
get {
return GLib.Marshaller.PtrToStringGFree(g_get_application_name());
}
set {
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (value);
g_set_application_name (native_name);
GLib.Marshaller.Free (native_name);
}
}
[DllImport("libglib-2.0-0.dll")]
static extern void g_set_application_name (IntPtr name);
[DllImport("libglib-2.0-0.dll")]
static extern IntPtr g_get_application_name ();
}
}