From 8cb3a02a26c03e57d064bd03319e34b6930ac3f5 Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 17 Feb 2021 11:05:40 +0100 Subject: i18n: Use glib's gettext support macros --- po/POTFILES.in | 1 - src/core/bell.c | 2 ++ src/core/core.c | 2 ++ src/core/delete.c | 2 ++ src/core/display.c | 2 ++ src/core/errors.c | 1 - src/core/keybindings.c | 2 ++ src/core/main.c | 2 ++ src/core/prefs.c | 2 ++ src/core/screen.c | 2 ++ src/core/session.c | 1 + src/core/util.c | 2 ++ src/core/window-props.c | 2 ++ src/core/window.c | 2 ++ src/core/xprops.c | 2 ++ src/include/util.h | 4 ---- src/tools/marco-message.c | 5 +---- src/ui/frames.c | 2 ++ src/ui/menu.c | 4 +++- src/ui/metaaccellabel.c | 2 ++ src/ui/resizepopup.c | 2 ++ src/ui/theme-parser.c | 2 ++ src/ui/theme-viewer.c | 6 ++---- src/ui/theme.c | 2 ++ 24 files changed, 41 insertions(+), 15 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 84c49730..a0a7bc46 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -8,7 +8,6 @@ src/core/bell.c src/core/core.c src/core/delete.c src/core/display.c -src/core/errors.c src/core/keybindings.c src/core/main.c src/core/prefs.c diff --git a/src/core/bell.c b/src/core/bell.c index 9a847bc3..107933ef 100644 --- a/src/core/bell.c +++ b/src/core/bell.c @@ -49,6 +49,8 @@ */ #include +#include + #include "bell.h" #include "screen-private.h" #include "prefs.h" diff --git a/src/core/core.c b/src/core/core.c index b089e754..37459d8f 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -24,6 +24,8 @@ */ #include +#include + #include "core.h" #include "frame-private.h" #include "workspace.h" diff --git a/src/core/delete.c b/src/core/delete.c index 63f0d2f8..593f2607 100644 --- a/src/core/delete.c +++ b/src/core/delete.c @@ -26,6 +26,8 @@ #define _XOPEN_SOURCE /* for gethostname() and kill() */ #include +#include + #include "util.h" #include "window-private.h" #include "errors.h" diff --git a/src/core/display.c b/src/core/display.c index d9400d39..f79e60ea 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -29,6 +29,8 @@ */ #include +#include + #include "display-private.h" #include "util.h" #include "main.h" diff --git a/src/core/errors.c b/src/core/errors.c index 048477f3..54bd9565 100644 --- a/src/core/errors.c +++ b/src/core/errors.c @@ -50,4 +50,3 @@ meta_error_trap_pop_with_return (MetaDisplay *display, { return gdk_x11_display_error_trap_pop (gdk_x11_lookup_xdisplay (meta_display_get_xdisplay (display))); } - diff --git a/src/core/keybindings.c b/src/core/keybindings.c index 5b0000ea..64db48b8 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -27,6 +27,8 @@ #define _XOPEN_SOURCE /* for putenv() */ #include +#include + #include "keybindings.h" #include "workspace.h" #include "errors.h" diff --git a/src/core/main.c b/src/core/main.c index 3ca95e6f..825859e6 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -45,6 +45,8 @@ #define _XOPEN_SOURCE /* for putenv() and some signal-related functions */ #include +#include + #include "main.h" #include "util.h" #include "display-private.h" diff --git a/src/core/prefs.c b/src/core/prefs.c index e73324f0..0c11fff6 100644 --- a/src/core/prefs.c +++ b/src/core/prefs.c @@ -24,6 +24,8 @@ */ #include +#include + #include "prefs.h" #include "ui.h" #include "util.h" diff --git a/src/core/screen.c b/src/core/screen.c index efb65945..5e65fd2a 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -27,6 +27,8 @@ */ #include +#include + #include "screen-private.h" #include "util.h" #include "errors.h" diff --git a/src/core/session.c b/src/core/session.c index 5cd13b31..9b4407ba 100644 --- a/src/core/session.c +++ b/src/core/session.c @@ -24,6 +24,7 @@ */ #include +#include #include "session.h" #include diff --git a/src/core/util.c b/src/core/util.c index c29901de..baf485ae 100644 --- a/src/core/util.c +++ b/src/core/util.c @@ -26,6 +26,8 @@ #define _POSIX_C_SOURCE 200112L /* for fdopen() */ #include +#include + #include "util.h" #include "main.h" diff --git a/src/core/window-props.c b/src/core/window-props.c index f0eb1c64..ed1d5c0c 100644 --- a/src/core/window-props.c +++ b/src/core/window-props.c @@ -39,6 +39,8 @@ #define _XOPEN_SOURCE /* for gethostname() */ #include +#include + #include "window-props.h" #include "errors.h" #include "xprops.h" diff --git a/src/core/window.c b/src/core/window.c index e377d7df..9338d736 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -25,6 +25,8 @@ */ #include +#include + #include "window-private.h" #include "edge-resistance.h" #include "util.h" diff --git a/src/core/xprops.c b/src/core/xprops.c index 5cc9b451..9776b09c 100644 --- a/src/core/xprops.c +++ b/src/core/xprops.c @@ -80,6 +80,8 @@ from The Open Group. */ #include +#include + #include "xprops.h" #include "errors.h" #include "util.h" diff --git a/src/include/util.h b/src/include/util.h index 331a0b96..afbba6a1 100644 --- a/src/include/util.h +++ b/src/include/util.h @@ -90,10 +90,6 @@ void meta_print_backtrace (void); const char* meta_gravity_to_string (int gravity); -#include -#define _(x) dgettext (GETTEXT_PACKAGE, x) -#define N_(x) x - char* meta_g_utf8_strndup (const gchar *src, gsize n); GPid meta_show_dialog (const char *type, diff --git a/src/tools/marco-message.c b/src/tools/marco-message.c index 0badb82f..fb3c088e 100644 --- a/src/tools/marco-message.c +++ b/src/tools/marco-message.c @@ -20,15 +20,12 @@ */ #include +#include #include #include #include #include -#include -#define _(x) dgettext (GETTEXT_PACKAGE, x) -#define N_(x) x - static void send_restart (void) { diff --git a/src/ui/frames.c b/src/ui/frames.c index 5f938dff..4b2d597d 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -24,6 +24,8 @@ */ #include +#include + #include #include #include "boxes.h" diff --git a/src/ui/menu.c b/src/ui/menu.c index ac5fb2c1..df40f1b6 100644 --- a/src/ui/menu.c +++ b/src/ui/menu.c @@ -21,8 +21,10 @@ * 02110-1301, USA. */ -#include #include +#include + +#include #include #include #include "menu.h" diff --git a/src/ui/metaaccellabel.c b/src/ui/metaaccellabel.c index f6903d44..28867702 100644 --- a/src/ui/metaaccellabel.c +++ b/src/ui/metaaccellabel.c @@ -32,6 +32,8 @@ */ #include +#include + #include "metaaccellabel.h" #include #include diff --git a/src/ui/resizepopup.c b/src/ui/resizepopup.c index 0464636d..1e57756d 100644 --- a/src/ui/resizepopup.c +++ b/src/ui/resizepopup.c @@ -22,6 +22,8 @@ */ #include +#include + #include "resizepopup.h" #include "util.h" #include diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c index a200876c..a8557a69 100644 --- a/src/ui/theme-parser.c +++ b/src/ui/theme-parser.c @@ -22,6 +22,8 @@ */ #include +#include + #include "theme-parser.h" #include "util.h" #include diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c index 35fcdda3..e301e9b6 100644 --- a/src/ui/theme-viewer.c +++ b/src/ui/theme-viewer.c @@ -22,6 +22,8 @@ */ #include +#include + #include "util.h" #include "theme.h" #include "theme-parser.h" @@ -31,10 +33,6 @@ #include #include -#include -#define _(x) dgettext (GETTEXT_PACKAGE, x) -#define N_(x) x - /* We need to compute all different button arrangements * in terms of button location. We don't care about * different arrangements in terms of button function. diff --git a/src/ui/theme.c b/src/ui/theme.c index 3a623f9e..bd51673e 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -53,6 +53,8 @@ */ #include +#include + #include "prefs.h" #include "theme.h" #include "theme-parser.h" -- cgit v1.2.1