From 6cabf9fcf0530fdd75903d500abbefdd996fdef0 Mon Sep 17 00:00:00 2001 From: pabs Date: Thu, 27 Dec 2007 04:53:44 +0000 Subject: [PATCH] Only build in gettext support when gettext is available. git-svn-id: http://svn.voria.com/code@1234 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/general.h | 7 +++++++ synfig-studio/trunk/src/gtkmm/main.cpp | 2 ++ synfig-studio/trunk/src/synfigapp/general.h | 7 +++++++ synfig-studio/trunk/src/synfigapp/main.cpp | 2 ++ 4 files changed, 18 insertions(+) diff --git a/synfig-studio/trunk/src/gtkmm/general.h b/synfig-studio/trunk/src/gtkmm/general.h index 6397097..77366d8 100644 --- a/synfig-studio/trunk/src/gtkmm/general.h +++ b/synfig-studio/trunk/src/gtkmm/general.h @@ -27,16 +27,23 @@ /* === H E A D E R S ======================================================= */ +#ifdef ENABLE_NLS #include +#endif /* === M A C R O S ========================================================= */ #undef _ #undef gettext_noop #undef N_ +#ifdef ENABLE_NLS #define _(x) gettext(x) #define gettext_noop(x) x #define N_(x) gettext_noop(x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif /* === T Y P E D E F S ===================================================== */ diff --git a/synfig-studio/trunk/src/gtkmm/main.cpp b/synfig-studio/trunk/src/gtkmm/main.cpp index e53a483..15dc9d6 100644 --- a/synfig-studio/trunk/src/gtkmm/main.cpp +++ b/synfig-studio/trunk/src/gtkmm/main.cpp @@ -59,9 +59,11 @@ using namespace studio; int main(int argc, char **argv) { +#ifdef ENABLE_NLS setlocale(LC_ALL, ""); bindtextdomain("synfigstudio", LOCALEDIR); textdomain("synfigstudio"); +#endif { SmartFILE file(IPC::make_connection()); diff --git a/synfig-studio/trunk/src/synfigapp/general.h b/synfig-studio/trunk/src/synfigapp/general.h index 817624b..51bfdfe 100644 --- a/synfig-studio/trunk/src/synfigapp/general.h +++ b/synfig-studio/trunk/src/synfigapp/general.h @@ -27,16 +27,23 @@ /* === H E A D E R S ======================================================= */ +#ifdef ENABLE_NLS #include +#endif /* === M A C R O S ========================================================= */ #undef _ #undef gettext_noop #undef N_ +#ifdef ENABLE_NLS #define _(x) dgettext("synfigstudio",x) #define gettext_noop(x) x #define N_(x) gettext_noop(x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif /* === T Y P E D E F S ===================================================== */ diff --git a/synfig-studio/trunk/src/synfigapp/main.cpp b/synfig-studio/trunk/src/synfigapp/main.cpp index b7fb9b9..081d5f7 100644 --- a/synfig-studio/trunk/src/synfigapp/main.cpp +++ b/synfig-studio/trunk/src/synfigapp/main.cpp @@ -98,7 +98,9 @@ synfigapp::Main::Main(const synfig::String &basepath, synfig::ProgressCallback * // Add initialization after this point +#ifdef ENABLE_NLS bindtextdomain("synfigstudio", LOCALEDIR); +#endif action_main=new synfigapp::Action::Main(); -- 2.7.4