[notification-daemon] add missing bindtextdomain
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [notification-daemon] add missing bindtextdomain
- Date: Thu, 9 Jul 2015 11:55:46 +0000 (UTC)
commit d4f32d0dae5954a87eb4ce959f477e107b9777cd
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Jul 9 14:40:44 2015 +0300
add missing bindtextdomain
Bind text domain for gettext() to work. Based on patch by Sergey
Alyoshin <alyoshin s gmail com>.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680751
src/Makefile.am | 9 +++++++--
src/daemon.c | 4 ++++
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 29997cb..bb02077 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,5 @@
+NULL =
+
libexec_PROGRAMS = notification-daemon
notification_daemon_SOURCES = \
@@ -14,14 +16,17 @@ notification_daemon_SOURCES = \
daemon.c \
daemon.h \
sound.c \
- sound.h
+ sound.h \
+ $(NULL)
notification_daemon_LDADD = $(NOTIFICATION_DAEMON_LIBS)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(NOTIFICATION_DAEMON_CFLAGS) \
- -DENGINES_DIR=\"$(libdir)/notification-daemon-1.0/engines\"
+ -DENGINES_DIR=\"$(libdir)/notification-daemon-1.0/engines\" \
+ -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ $(NULL)
EXTRA_DIST = notificationdaemon.xml
diff --git a/src/daemon.c b/src/daemon.c
index 2492e9b..840b586 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -371,6 +371,10 @@ main (int argc, char **argv)
NotifyDaemon *daemon;
guint owner_id;
+ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
gtk_init (&argc, &argv);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]