[nautilus-actions] Only enable syslog'ed debug messages when in maintainer mode



commit 20a997b00a8c7baee6ccdfa73a74561573afbd97
Author: Pierre Wieser <pwieser trychlos org>
Date:   Thu May 28 23:42:18 2009 +0200

    Only enable syslog'ed debug messages when in maintainer mode
---
 ChangeLog                  |    4 ++++
 m4/nact-maintainer-mode.m4 |    5 +----
 plugin/nautilus-actions.c  |    4 ++++
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3046179..10f71f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,10 @@
 	* nact/nact-profile-editor.c:
 	Enable the OK button as soon as required fields are filled.
 
+	* m4/nact-maintainer-mode.m4:
+	* plugin/nautilus-actions.c:
+	Only enable syslog'ed debug messages when in maintainer mode.
+
 2009-05-25 Pierre Wieser <pwieser trychlos org>
 
 	* configure.ac:
diff --git a/m4/nact-maintainer-mode.m4 b/m4/nact-maintainer-mode.m4
index 8add47b..2667f22 100644
--- a/m4/nact-maintainer-mode.m4
+++ b/m4/nact-maintainer-mode.m4
@@ -30,10 +30,7 @@
 dnl define NACT_MAINTAINER_MODE
 
 AC_DEFUN([NACT_IS_MAINTAINER_MODE],[
-	NACT_MAINTAINER_MODE=
 	if test "${USE_MAINTAINER_MODE}" = "yes"; then
-		NACT_MAINTAINER_MODE=1
+		AC_DEFINE([NACT_MAINTAINER_MODE],[1],[Define to 1 if we are in maintainer mode])
 	fi
-	AC_SUBST([NACT_MAINTAINER_MODE])
-	AC_DEFINE_UNQUOTED([NACT_MAINTAINER_MODE],[${NACT_MAINTAINER_MODE}],[Define to 1 if we are in maintainer mode])
 ])
diff --git a/plugin/nautilus-actions.c b/plugin/nautilus-actions.c
index 0493708..a6ac2af 100644
--- a/plugin/nautilus-actions.c
+++ b/plugin/nautilus-actions.c
@@ -47,7 +47,9 @@ static GObjectClass *parent_class = NULL;
 static GType actions_type = 0;
 static guint log_handler = 0;
 
+#ifdef NACT_MAINTAINER_MODE
 static void nact_log_handler( const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data );
+#endif
 
 GType nautilus_actions_get_type (void)
 {
@@ -385,6 +387,7 @@ void nautilus_actions_register_type (GTypeModule *module)
  * a given key and obtain a full log to send to Bugzilla..
  * For now, is always install when compiled in maintainer mode, never else
  */
+#ifdef NACT_MAINTAINER_MODE
 static void
 nact_log_handler( const gchar *log_domain,
 					GLogLevelFlags log_level,
@@ -393,3 +396,4 @@ nact_log_handler( const gchar *log_domain,
 {
 	syslog( LOG_USER | LOG_DEBUG, "%s", message );
 }
+#endif



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