summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-01-25 19:46:32 +0100
committerraveit65 <[email protected]>2021-02-05 21:36:53 +0100
commit8a653210e2ecf00c11bd8cdf44af2d8c4814fadf (patch)
tree78693278cad2311662a583f6a0b6565ec395a292 /src
parentafd8f48f9b71f68953bc8e6bf4859031475aee0f (diff)
downloadeom-8a653210e2ecf00c11bd8cdf44af2d8c4814fadf.tar.bz2
eom-8a653210e2ecf00c11bd8cdf44af2d8c4814fadf.tar.xz
build: allow users to disable gettext support (--disable-nls)
Diffstat (limited to 'src')
-rw-r--r--src/eom-save-as-dialog-helper.c2
-rw-r--r--src/eom-window.c8
-rw-r--r--src/main.c2
3 files changed, 12 insertions, 0 deletions
diff --git a/src/eom-save-as-dialog-helper.c b/src/eom-save-as-dialog-helper.c
index 537243f..24f472f 100644
--- a/src/eom-save-as-dialog-helper.c
+++ b/src/eom-save-as-dialog-helper.c
@@ -207,7 +207,9 @@ eom_save_as_dialog_new (GtkWindow *main, GList *images, GFile *base_file)
GtkWidget *label;
xml = gtk_builder_new_from_resource ("/org/mate/eom/ui/eom-multiple-save-as-dialog.ui");
+#ifdef ENABLE_NLS
gtk_builder_set_translation_domain (xml, GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
dlg = GTK_WIDGET (g_object_ref (gtk_builder_get_object (xml, "eom_multiple_save_as_dialog")));
gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (main));
diff --git a/src/eom-window.c b/src/eom-window.c
index 337f16f..a431674 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -4412,8 +4412,10 @@ eom_window_construct_ui (EomWindow *window)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
priv->actions_window = gtk_action_group_new ("MenuActionsWindow");
+#ifdef ENABLE_NLS
gtk_action_group_set_translation_domain (priv->actions_window,
GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
gtk_action_group_add_actions (priv->actions_window,
action_entries_window,
@@ -4430,8 +4432,10 @@ eom_window_construct_ui (EomWindow *window)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
priv->actions_image = gtk_action_group_new ("MenuActionsImage");
+#ifdef ENABLE_NLS
gtk_action_group_set_translation_domain (priv->actions_image,
GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
gtk_action_group_add_actions (priv->actions_image,
action_entries_image,
@@ -4450,8 +4454,10 @@ eom_window_construct_ui (EomWindow *window)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
priv->actions_collection = gtk_action_group_new ("MenuActionsCollection");
+#ifdef ENABLE_NLS
gtk_action_group_set_translation_domain (priv->actions_collection,
GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
gtk_action_group_add_actions (priv->actions_collection,
action_entries_collection,
@@ -4536,8 +4542,10 @@ eom_window_construct_ui (EomWindow *window)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
priv->actions_recent = gtk_action_group_new ("RecentFilesActions");
+#ifdef ENABLE_NLS
gtk_action_group_set_translation_domain (priv->actions_recent,
GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
G_GNUC_END_IGNORE_DEPRECATIONS;
g_signal_connect (gtk_recent_manager_get_default (), "changed",
diff --git a/src/main.c b/src/main.c
index cf8abec..5f0806c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -97,9 +97,11 @@ main (int argc, char **argv)
GFile *css_file;
GtkCssProvider *provider;
+#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, EOM_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
gdk_set_allowed_backends ("wayland,x11");