summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/mate-session-check-accelerated-common.h6
-rw-r--r--tools/mate-session-check-accelerated-gl-helper.c4
-rw-r--r--tools/mate-session-check-accelerated-gles-helper.c5
-rw-r--r--tools/mate-session-check-accelerated.c2
-rw-r--r--tools/mate-session-inhibit.c5
-rw-r--r--tools/mate-session-save.c5
6 files changed, 23 insertions, 4 deletions
diff --git a/tools/mate-session-check-accelerated-common.h b/tools/mate-session-check-accelerated-common.h
index 59631d9..c2f8852 100644
--- a/tools/mate-session-check-accelerated-common.h
+++ b/tools/mate-session-check-accelerated-common.h
@@ -2,7 +2,7 @@
/* Tool to set the property _GNOME_SESSION_ACCELERATED on the root window */
/*
* Copyright (C) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
- *
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,8 +22,12 @@
* Frederic Crozat <[email protected]>
*/
+#ifndef __MATE_SESSION_CHECK_ACCELERATED_COMMON_H__
+#define __MATE_SESSION_CHECK_ACCELERATED_COMMON_H__
+
/* Exit value for helper */
#define HELPER_ACCEL 0
#define HELPER_NO_ACCEL 1
#define HELPER_SOFTWARE_RENDERING 2
+#endif /* __MATE_SESSION_CHECK_ACCELERATED_COMMON_H__ */
diff --git a/tools/mate-session-check-accelerated-gl-helper.c b/tools/mate-session-check-accelerated-gl-helper.c
index 0526336..e11206e 100644
--- a/tools/mate-session-check-accelerated-gl-helper.c
+++ b/tools/mate-session-check-accelerated-gl-helper.c
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2010 Novell, Inc.
* Copyright (C) 2006-2009 Red Hat, Inc.
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -438,7 +439,7 @@ static gboolean print_renderer = FALSE;
static const GOptionEntry entries[] = {
{ "print-renderer", 'p', 0, G_OPTION_ARG_NONE, &print_renderer, "Print GL renderer name", NULL },
- { NULL },
+ { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL },
};
int
@@ -509,6 +510,7 @@ main (int argc, char **argv)
out:
if (display)
XCloseDisplay (display);
+ g_option_context_free (context);
g_free (renderer);
return ret;
diff --git a/tools/mate-session-check-accelerated-gles-helper.c b/tools/mate-session-check-accelerated-gles-helper.c
index 4dac1d5..b206832 100644
--- a/tools/mate-session-check-accelerated-gles-helper.c
+++ b/tools/mate-session-check-accelerated-gles-helper.c
@@ -2,6 +2,7 @@
/*
*
* Copyright (C) 2016 Endless Mobile, Inc
+ * Copyright (C) 2016-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -192,7 +193,7 @@ static gboolean print_renderer = FALSE;
static const GOptionEntry entries[] = {
{ "print-renderer", 'p', 0, G_OPTION_ARG_NONE, &print_renderer, "Print EGL renderer name", NULL },
- { NULL },
+ { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL },
};
int
@@ -225,8 +226,10 @@ main (int argc,
else
ret = HELPER_ACCEL;
}
+ g_free (renderer);
#endif
out:
+ g_option_context_free (context);
return ret;
}
diff --git a/tools/mate-session-check-accelerated.c b/tools/mate-session-check-accelerated.c
index d264953..70095f5 100644
--- a/tools/mate-session-check-accelerated.c
+++ b/tools/mate-session-check-accelerated.c
@@ -2,6 +2,7 @@
/* Tool to set the property _GNOME_SESSION_ACCELERATED on the root window */
/*
* Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -157,6 +158,7 @@ main (int argc, char **argv)
renderer_string = get_gtk_gles_renderer ();
if (renderer_string) {
g_print ("%s", renderer_string);
+ g_free (renderer_string);
return 0;
}
return 1;
diff --git a/tools/mate-session-inhibit.c b/tools/mate-session-inhibit.c
index 6473735..48b035d 100644
--- a/tools/mate-session-inhibit.c
+++ b/tools/mate-session-inhibit.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2012-2021 MATE Developers
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,7 +25,9 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
+#ifdef ENABLE_NLS
#include <locale.h>
+#endif /* ENABLE_NLS */
#include <glib.h>
#include <glib/gi18n.h>
@@ -149,10 +152,12 @@ int main (int argc, char *argv[])
g_set_prgname (prgname);
g_free (prgname);
+#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
for (i = 1; i < argc; i++)
{
diff --git a/tools/mate-session-save.c b/tools/mate-session-save.c
index 31e302c..27a7ad9 100644
--- a/tools/mate-session-save.c
+++ b/tools/mate-session-save.c
@@ -3,6 +3,7 @@
Copyright (C) 1998 Tom Tromey
Copyright (C) 2008 Red Hat, Inc.
+ * Copyright (C) 2012-2021 MATE Developers
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -72,7 +73,7 @@ static GOptionEntry options[] = {
{"session-name", 's', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &session_name, N_("Set the current session name"), N_("NAME")},
{"kill", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &kill_session, N_("Kill session"), NULL},
{"silent", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &no_interaction, N_("Do not require confirmation"), NULL},
- {NULL}
+ {NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL}
};
static void display_error(const char* message)
@@ -206,9 +207,11 @@ int main(int argc, char* argv[])
int conflicting_options;
/* Initialize the i18n stuff */
+#ifdef ENABLE_NLS
bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
error = NULL;