[gnome-contacts] Different C_ binding workaround
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Different C_ binding workaround
- Date: Tue, 6 Sep 2011 12:46:11 +0000 (UTC)
commit d6cd8cce3e1dfe23ba24339c7298a044375ad504
Author: Alexander Larsson <alexl redhat com>
Date: Tue Sep 6 14:45:38 2011 +0200
Different C_ binding workaround
This doesn't break when the binding is in vala i hope
src/contacts-contact-pane.vala | 5 ++++-
src/contacts-link-dialog.vala | 6 +++++-
vapi/custom.vapi | 6 ------
3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index a640fc7..c04895d 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -19,7 +19,6 @@
using Gtk;
using Folks;
using Gee;
-using LocalGLib; // For C_
public class Contacts.ContactFrame : Frame {
private int size;
@@ -286,6 +285,10 @@ public class Contacts.PersonaButton : RadioButton {
public class Contacts.ContactPane : Grid {
+ // TODO: Remove later when bound in vala
+ private static unowned string C_(string context, string msgid) {
+ return GLib.dpgettext2 (Config.GETTEXT_PACKAGE, context, msgid);
+ }
private enum DisplayMode {
INITIAL,
EMPTY,
diff --git a/src/contacts-link-dialog.vala b/src/contacts-link-dialog.vala
index 8251d09..e8f61cb 100644
--- a/src/contacts-link-dialog.vala
+++ b/src/contacts-link-dialog.vala
@@ -18,9 +18,13 @@
using Gtk;
using Folks;
-using LocalGLib; // For C_
public class Contacts.LinkDialog : Dialog {
+ // TODO: Remove later when bound in vala
+ private static unowned string C_(string context, string msgid) {
+ return GLib.dpgettext2 (Config.GETTEXT_PACKAGE, context, msgid);
+ }
+
private Contact contact;
private Contact? selected_contact;
private Entry filter_entry;
diff --git a/vapi/custom.vapi b/vapi/custom.vapi
index f03a12a..73f0a5f 100644
--- a/vapi/custom.vapi
+++ b/vapi/custom.vapi
@@ -16,9 +16,3 @@ namespace Gnome {
LARGE
}
}
-
-[CCode (cprefix = "G", lower_case_cprefix = "g_", cheader_filename = "glib.h", gir_namespace = "GLib", gir_version = "2.0")]
-namespace LocalGLib {
- [CCode (cname = "C_", cheader_filename = "glib.h,glib/gi18n-lib.h")]
- public static unowned string C_ (string contect, string str);
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]