summaryrefslogtreecommitdiff
path: root/src/capplet
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-02-18 12:25:55 +0100
committerraveit65 <[email protected]>2021-02-24 16:29:19 +0100
commit59ce19333e004c55645951beb850dc5a3abd5444 (patch)
tree9678914f86d8463a1d50e66ebe284dcce7986053 /src/capplet
parentd8d3f21b1a6e1cc9a4e82ff9c9a6e2aded0394bd (diff)
downloadmate-notification-daemon-59ce19333e004c55645951beb850dc5a3abd5444.tar.bz2
mate-notification-daemon-59ce19333e004c55645951beb850dc5a3abd5444.tar.xz
build: allow users to disable gettext support (--disable-nls)
Diffstat (limited to 'src/capplet')
-rw-r--r--src/capplet/mate-notification-applet.c4
-rw-r--r--src/capplet/mate-notification-properties.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/capplet/mate-notification-applet.c b/src/capplet/mate-notification-applet.c
index 04a799d..ec10acc 100644
--- a/src/capplet/mate-notification-applet.c
+++ b/src/capplet/mate-notification-applet.c
@@ -166,9 +166,11 @@ applet_main (MatePanelApplet *applet_widget)
MateNotificationApplet *applet;
GtkWidget *box;
+#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
g_set_application_name (_("Do Not Disturb"));
gtk_window_set_default_icon_name ("mate-notification-properties");
@@ -202,7 +204,9 @@ applet_main (MatePanelApplet *applet_widget)
/* set up context menu */
applet->action_group = gtk_action_group_new ("Do Not Disturb Actions");
+#ifdef ENABLE_NLS
gtk_action_group_set_translation_domain (applet->action_group, GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
gtk_action_group_add_actions (applet->action_group, applet_menu_actions,
G_N_ELEMENTS (applet_menu_actions), applet);
diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c
index 154029d..7d43455 100644
--- a/src/capplet/mate-notification-properties.c
+++ b/src/capplet/mate-notification-properties.c
@@ -511,9 +511,11 @@ int main(int argc, char** argv)
{
NotificationAppletDialog dialog = {NULL, }; /* <- ? */
+#ifdef ENABLE_NLS
bindtextdomain(GETTEXT_PACKAGE, NOTIFICATION_LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
gtk_init(&argc, &argv);