]> Dogcows Code - chaz/openbox/commitdiff
gettext is ready to rock and roll
authorDana Jansens <danakj@orodu.net>
Sun, 3 Nov 2002 05:56:15 +0000 (05:56 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 3 Nov 2002 05:56:15 +0000 (05:56 +0000)
otk/Makefile.am
src/Makefile.am
src/blackbox.cc
src/main.cc
src/xatom.cc

index b3e1076740ba6f594d2fa151b6e512f27cd598f2..075f4a412df40bace75225bc4a83765ebe12ee52 100644 (file)
@@ -1,5 +1,4 @@
-CPPFLAGS=`pkg-config --cflags xft` @CPPFLAGS@ \
--Dmultibyte\(\)=True
+CPPFLAGS=`pkg-config --cflags xft` @CPPFLAGS@
 
 INCLUDES= -I../src
 
index 0936920b66f2c847d7d35abcbeeedd61c01ffd4c..9adefeeba4653c058d8009908a6946ee21f18c9b 100644 (file)
@@ -1,9 +1,11 @@
+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`
 
@@ -11,7 +13,7 @@ INCLUDES= -I../otk
 
 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
index 8e9214675383304a9d0461c573acb12365f6eb3d..8040ca36690987a84d479b2b1078b24bf3789b6a 100644 (file)
@@ -89,6 +89,7 @@ Blackbox *blackbox;
 
 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");
 
index 4ea8aaf10c21715d409ae76479ff3cc0b44e1534..2bc4b3ce245348fcac5712d77cac5677db54e686 100644 (file)
@@ -94,6 +94,11 @@ int main(int argc, char **argv) {
   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
index 5561503adf8d97cc0992a1daad7cbcc112872b8c..0e92e471676a9f7fc26972e1f61ecfab1293cff8 100644 (file)
@@ -1,7 +1,5 @@
 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
 
-#include "../config.h"
-
 #ifdef    HAVE_CONFIG_H
 #  include "../config.h"
 #endif // HAVE_CONFIG_H
This page took 0.028064 seconds and 4 git commands to generate.