diff options
author | rbuj <[email protected]> | 2021-02-13 12:32:06 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-02-16 14:07:47 +0100 |
commit | e50a1907e04a320bf9e054182b8dbeb4c52eb076 (patch) | |
tree | f0c11e26e732a7693149229c6d5fd7449149b35b /typing-break | |
parent | 68306612ea6c7dc8635290950ce435a459dd4568 (diff) | |
download | mate-control-center-e50a1907e04a320bf9e054182b8dbeb4c52eb076.tar.bz2 mate-control-center-e50a1907e04a320bf9e054182b8dbeb4c52eb076.tar.xz |
build: allow users to disable gettext support (--disable-nls)
Diffstat (limited to 'typing-break')
-rw-r--r-- | typing-break/drwright.c | 2 | ||||
-rw-r--r-- | typing-break/main.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/typing-break/drwright.c b/typing-break/drwright.c index b4f1b368..b43cc631 100644 --- a/typing-break/drwright.c +++ b/typing-break/drwright.c @@ -869,7 +869,9 @@ drwright_new (void) dr->ui_manager = gtk_ui_manager_new (); action_group = gtk_action_group_new ("MenuActions"); +#ifdef ENABLE_NLS gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ gtk_action_group_add_actions (action_group, actions, G_N_ELEMENTS (actions), dr); gtk_ui_manager_insert_action_group (dr->ui_manager, action_group, 0); gtk_ui_manager_add_ui_from_string (dr->ui_manager, ui_description, -1, NULL); diff --git a/typing-break/main.c b/typing-break/main.c index 145d1c5d..c018f820 100644 --- a/typing-break/main.c +++ b/typing-break/main.c @@ -68,12 +68,16 @@ main (int argc, char *argv[]) GError *error = NULL; gboolean retval; +#ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ option_context = g_option_context_new (NULL); +#ifdef ENABLE_NLS g_option_context_set_translation_domain (option_context, GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ g_option_context_add_main_entries (option_context, options, GETTEXT_PACKAGE); g_option_context_add_group (option_context, gtk_get_option_group (TRUE)); |