-CPPFLAGS=`pkg-config --cflags xft` @CPPFLAGS@ \
--Dmultibyte\(\)=True
+CPPFLAGS=`pkg-config --cflags xft` @CPPFLAGS@
INCLUDES= -I../src
+localedir=$(datadir)/locale
DEFAULT_MENU=$(pkgdatadir)/menu
DEFAULT_STYLE=$(pkgdatadir)/styles/mbdtex
CPPFLAGS=`pkg-config --cflags xft` @CPPFLAGS@ \
-DDEFAULTMENU=\"$(DEFAULT_MENU)\" \
--DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\"
+-DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \
+-DLOCALEDIR=\"$(localedir)\"
LDFLAGS=`pkg-config --libs xft`
bin_PROGRAMS= openbox
-openbox_LDADD=../otk/libotk.a
+openbox_LDADD=../otk/libotk.a @LIBINTL@
openbox_SOURCES= basedisplay.cc configuration.cc screen.cc timer.cc util.cc \
window.cc workspace.cc xatom.cc blackbox.cc main.cc
Blackbox::Blackbox(char **m_argv, char *dpy_name, char *rc)
: BaseDisplay(m_argv[0], dpy_name) {
+
if (! XSupportsLocale())
fprintf(stderr, "X server does not support locale\n");
char *rc_file = (char *) 0;
char *menu_file = (char *) 0;
+ // initialize the locale
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
for (int i = 1; i < argc; ++i) {
if (! strcmp(argv[i], "-rc")) {
// look for alternative rc file to use
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
-#include "../config.h"
-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif // HAVE_CONFIG_H