[gtksourceview] Remove GD_ macro, use function instead



commit bbd2b8858363face0ad152652943362d4cfd75ed
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Sep 23 15:22:01 2017 +0200

    Remove GD_ macro, use function instead
    
    With the function we directly know that it comes from GtkSourceView.
    
    Rename also the function to have a better name.

 gtksourceview/gtksourcelanguage.c   |    3 ++-
 gtksourceview/gtksourceview-utils.c |    6 +++---
 gtksourceview/gtksourceview-utils.h |    6 ++----
 po/Makevars                         |    2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/gtksourceview/gtksourcelanguage.c b/gtksourceview/gtksourcelanguage.c
index 005db5c..84ec453 100644
--- a/gtksourceview/gtksourcelanguage.c
+++ b/gtksourceview/gtksourcelanguage.c
@@ -474,7 +474,8 @@ _gtk_source_language_translate_string (GtkSourceLanguage *language,
                                       const gchar       *string)
 {
        g_return_val_if_fail (string != NULL, NULL);
-       return GD_(language->priv->translation_domain, string);
+
+       return _gtk_source_dgettext (language->priv->translation_domain, string);
 }
 
 /**
diff --git a/gtksourceview/gtksourceview-utils.c b/gtksourceview/gtksourceview-utils.c
index 32105b3..041b2e4 100644
--- a/gtksourceview/gtksourceview-utils.c
+++ b/gtksourceview/gtksourceview-utils.c
@@ -318,14 +318,14 @@ _gtk_source_pango_font_description_to_css (const PangoFontDescription *font_desc
 }
 
 /*
- * _gtksourceview_dgettext:
+ * _gtk_source_dgettext:
  *
  * Try to translate string from given domain. It returns
  * duplicated string which must be freed with g_free().
  */
 gchar *
-_gtksourceview_dgettext (const gchar *domain,
-                         const gchar *string)
+_gtk_source_dgettext (const gchar *domain,
+                     const gchar *string)
 {
        const gchar *translated;
        gchar *tmp;
diff --git a/gtksourceview/gtksourceview-utils.h b/gtksourceview/gtksourceview-utils.h
index b2209ae..88a8301 100644
--- a/gtksourceview/gtksourceview-utils.h
+++ b/gtksourceview/gtksourceview-utils.h
@@ -41,12 +41,10 @@ gint                _gtk_source_string_to_int                       (const gchar *str);
 G_GNUC_INTERNAL
 gchar *                _gtk_source_pango_font_description_to_css       (const PangoFontDescription 
*font_desc);
 
-#define GD_(Domain,String) _gtksourceview_dgettext (Domain, String)
-
 /* Note: it returns duplicated string. */
 G_GNUC_INTERNAL
-gchar *                _gtksourceview_dgettext         (const gchar *domain,
-                                                const gchar *msgid) G_GNUC_FORMAT(2);
+gchar *                _gtk_source_dgettext                            (const gchar *domain,
+                                                                const gchar *msgid) G_GNUC_FORMAT(2);
 
 G_END_DECLS
 
diff --git a/po/Makevars b/po/Makevars
index e737e74..26b9ebe 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -8,7 +8,7 @@ subdir = po
 top_builddir = ..
 
 # These options get passed to xgettext.
-XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 
--keyword=g_dngettext:2,3 --keyword=GD_:2 --add-comments
+XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 
--keyword=g_dngettext:2,3 --keyword=_gtk_source_dgettext:2 --add-comments
 
 # This is the copyright holder that gets inserted into the header of the
 # $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding


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