[f-spot] bind g_shell_quote, need to push that upstream too
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [f-spot] bind g_shell_quote, need to push that upstream too
- Date: Wed, 29 Jul 2009 14:05:29 +0000 (UTC)
commit 7090276892b01c09c4952e1b44e98d711a1ec6f1
Author: Stephane Delcroix <stephane delcroix org>
Date: Wed Jul 29 16:05:03 2009 +0200
bind g_shell_quote, need to push that upstream too
lib/gtk-sharp-beans/Makefile.am | 1 +
lib/gtk-sharp-beans/Shell.cs | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/lib/gtk-sharp-beans/Makefile.am b/lib/gtk-sharp-beans/Makefile.am
index cd7906b..81cb889 100644
--- a/lib/gtk-sharp-beans/Makefile.am
+++ b/lib/gtk-sharp-beans/Makefile.am
@@ -8,6 +8,7 @@ SRCS = \
$(srcdir)/Widget.cs \
$(srcdir)/Format.cs \
$(srcdir)/Priority.cs \
+ $(srcdir)/Shell.cs \
$(srcdir)/Sources.cs \
$(srcdir)/Timeout.cs \
$(srcdir)/PixbufFormat.cs \
diff --git a/lib/gtk-sharp-beans/Shell.cs b/lib/gtk-sharp-beans/Shell.cs
new file mode 100644
index 0000000..af0dab2
--- /dev/null
+++ b/lib/gtk-sharp-beans/Shell.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace GLib
+{
+ public class Shell
+ {
+ [DllImport ("libglib-2.0-0.dll")]
+ static extern IntPtr g_shell_quote (IntPtr unquoted_string);
+
+ public static string Quote (string unquoted)
+ {
+ IntPtr native_string = GLib.Marshaller.StringToPtrGStrdup (unquoted);
+ string quoted = GLib.Marshaller.PtrToStringGFree (g_shell_quote (native_string));
+ GLib.Marshaller.Free (native_string);
+ return quoted;
+ }
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]