[gimp] libgimpwidgets: (meson) fix gimpwidgetsenums.c generation.



commit 5d79fba8238a27b8691556489898d33b3fa0dda0
Author: Jehan <jehan girinstud io>
Date:   Sat Oct 19 17:51:21 2019 +0200

    libgimpwidgets: (meson) fix gimpwidgetsenums.c generation.
    
    Noticed by Massimo.
    gimp_type_set_translation_domain() calls were missing.
    Also make so that the output is exactly similar (even whitespaces) as
    the autotools one, making it easier to diff, hence maintain.

 libgimpwidgets/meson.build | 2 +-
 meson.build                | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/libgimpwidgets/meson.build b/libgimpwidgets/meson.build
index ca8ca647a4..b54ab4c005 100644
--- a/libgimpwidgets/meson.build
+++ b/libgimpwidgets/meson.build
@@ -7,7 +7,7 @@ gimpwidgetsenums = custom_target('gimpwidgetsenums.c',
     '--fhead','#include "config.h"\n'
             + '#include <gio/gio.h>\n'
             + '#include "libgimpbase/gimpbase.h"\n'
-            + '#include "@INPUT@"\n'
+            + '#include "gimpwidgetsenums.h"\n'
             + '#include "libgimp/libgimp-intl.h"\n',
     gimp_mkenums_custom_target_commonargs,
   ],
diff --git a/meson.build b/meson.build
index 1d3bea49b8..e775f96522 100644
--- a/meson.build
+++ b/meson.build
@@ -1080,7 +1080,7 @@ meson_install_subdir= find_program('tools'/'meson_install_subdir.py')
 
 gimp_mkenums        = find_program('tools'/'gimp-mkenums')
 gimp_mkenums_custom_target_commonargs = [
-  '--fprod','/* enumerations from "@basename@" */\n',
+  '--fprod','/* enumerations from "@basename@" */',
   '--vhead','GType\n'+
             '@enum_name@_get_type (void)\n'+
             '{\n'+
@@ -1091,10 +1091,8 @@ gimp_mkenums_custom_target_commonargs = [
             '  };\n',
   '--dhead','  static const Gimp@Type@Desc descs[] =\n'+
             '  {',
-  '--dprod','    {\n'+
-            '      @VALUENAME@, @valuedesc@, @valuehelp@\n'+
-            '    },\n'+
-            '    @if (\'@valueabbrev@\' ne \'NULL\')@\n'+
+  '--dprod','    { @VALUENAME@, @valuedesc@, @valuehelp@ },'+
+            '@if (\'@valueabbrev@\' ne \'NULL\')@    \n'+
             '    /* Translators:\n'+
             '       this is an abbreviated version of @valueudesc@.\n'+
             '       Keep it short. */\n'+
@@ -1108,6 +1106,7 @@ gimp_mkenums_custom_target_commonargs = [
             '  if (G_UNLIKELY (! type))\n'+
             '    {\n'+
             '      type = g_@type@_register_static ("@EnumName@", values);\n'+
+            '      gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");\n'+
             '      gimp_type_set_translation_context (type, "@enumnick@");\n'+
             '      gimp_@type@_set_value_descriptions (type, descs);\n'+
             '    }\n'+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]