diff --git a/ChangeLog b/ChangeLog index 7329c2128..e25287f0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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: diff --git a/glib/Global.cs b/glib/Global.cs index 0f3e85371..fb7f3eb0e 100644 --- a/glib/Global.cs +++ b/glib/Global.cs @@ -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 (); } }