[gtk-mac-integration] Use glib instead of the custom gettext code
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-mac-integration] Use glib instead of the custom gettext code
- Date: Tue, 25 Sep 2018 16:51:38 +0000 (UTC)
commit c7b1588844ef2f678940f566de21c42da9aabd35
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Tue Sep 25 09:51:50 2018 +0200
Use glib instead of the custom gettext code
Note that the gettext.h file was gplv3 which made the project
to be gplv3 instead of lgplv2.1 as it is stated so better to
just use glib directly.
Fixes https://gitlab.gnome.org/GNOME/gtk-mac-integration/issues/3
configure.ac | 7 +
src/Makefile.am | 1 -
src/gettext.h | 292 -----------------------------------------
src/gtkosxapplication_quartz.c | 4 +-
4 files changed, 9 insertions(+), 295 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7eca9fd..fe7e355 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,9 +36,16 @@ AC_PROG_OBJC
AM_PROG_CC_C_O
AM_PROG_AR
AM_PROG_LIBTOOL
+
+dnl ================================================================
+dnl Gettext stuff.
+dnl ================================================================
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.8])
+AC_SUBST([GETTEXT_PACKAGE], [gtk-mac-integration])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Define to the gettext package name.])
+
AM_PATH_GLIB_2_0([2.14.0])
AC_MSG_CHECKING([GLib Version])
PKG_INSTALLDIR()
diff --git a/src/Makefile.am b/src/Makefile.am
index 29ed707..3180e5e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,6 @@ HEADER = \
cocoa_menu.h \
cocoa_menu_item.h \
getlabel.h \
- gettext.h \
GNSMenuBar.h \
GNSMenuDelegate.h \
GNSMenuItem.h \
diff --git a/src/gtkosxapplication_quartz.c b/src/gtkosxapplication_quartz.c
index 4812873..ed04ea6 100644
--- a/src/gtkosxapplication_quartz.c
+++ b/src/gtkosxapplication_quartz.c
@@ -38,7 +38,8 @@
#include "cocoa_menu.h"
#include "getlabel.h"
#include "gtkosx-image.h"
-#include "gettext.h"
+
+#include <glib/gi18n-lib.h>
#if GTK_CHECK_VERSION (2, 90, 7)
#include <gdk/gdkkeysyms-compat.h>
@@ -50,7 +51,6 @@
#undef G_LOG_DOMAIN
#endif
#define G_LOG_DOMAIN "gtkosxapplication"
-#define _(s) dgettext (PACKAGE_NAME, s)
/* This is a private function in libgdk; we need to have is so that we
can force new windows onto the Window menu */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]