summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-12-08 19:17:17 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-12-08 19:17:17 +0000
commit8d314aead872d09198f887295c2e91e02ac525c6 (patch)
tree2e0d380f168553693937bb28efdb197933b354ea /src/util.h
parent15d28dfd97ddc799b70407c05b9c5212d92c24f4 (diff)
downloadmetacity-8d314aead872d09198f887295c2e91e02ac525c6.tar.gz
make this always return FALSE for now, to avoid bug reports.
2002-12-08 Havoc Pennington <hp@pobox.com> * src/prefs.c (meta_prefs_get_application_based): make this always return FALSE for now, to avoid bug reports. * src/util.c (ensure_logfile): put "opened log file" message on stderr so it will normally land in ~/.xsession-errors * configure.in: remove extra AC_ARG_PROGRAM * src/display.c (event_callback): handle the toggle-verbose message * src/tools/metacity-message.c: add a toggle-verbose message, been meaning to do this for a while. * src/util.c (meta_set_verbose): if verbose mode is enabled and we don't support it, then exit. * src/prefs.c: allow building without gconf (currently means some prefs are no-ops) * src/util.c, src/util.h: support defining macros to kill all verbose output entirely. (Removes the code and strings associated with it) * configure.in: don't get METACITY_PROPS_LIBS if not building the config dialog. (HAVE_GCONF): allow building sans gconf, if you are size-sensitive and not using gnome. (WITH_VERBOSE_MODE): add ability to disable all the verbose debug spew strings, to shrink the binary. (--disable-sm): allow SM support to be forced on or off (--disable-startup-notification): allow forcing this on or off
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h41
1 files changed, 33 insertions, 8 deletions
diff --git a/src/util.h b/src/util.h
index a339352a..280e7eed 100644
--- a/src/util.h
+++ b/src/util.h
@@ -33,10 +33,11 @@ void meta_set_syncing (gboolean setting);
gboolean meta_get_replace_current_wm (void);
void meta_set_replace_current_wm (gboolean setting);
-void meta_debug_spew (const char *format,
- ...) G_GNUC_PRINTF (1, 2);
-void meta_verbose (const char *format,
- ...) G_GNUC_PRINTF (1, 2);
+void meta_debug_spew_real (const char *format,
+ ...) G_GNUC_PRINTF (1, 2);
+void meta_verbose_real (const char *format,
+ ...) G_GNUC_PRINTF (1, 2);
+
void meta_bug (const char *format,
...) G_GNUC_PRINTF (1, 2);
void meta_warning (const char *format,
@@ -67,9 +68,9 @@ typedef enum
} MetaDebugTopic;
-void meta_topic (MetaDebugTopic topic,
- const char *format,
- ...) G_GNUC_PRINTF (2, 3);
+void meta_topic_real (MetaDebugTopic topic,
+ const char *format,
+ ...) G_GNUC_PRINTF (2, 3);
void meta_push_no_msg_prefix (void);
void meta_pop_no_msg_prefix (void);
@@ -84,6 +85,30 @@ void meta_print_backtrace (void);
#define _(x) dgettext (GETTEXT_PACKAGE, x)
#define N_(x) x
-#endif
+
+/* To disable verbose mode, we make these functions into no-ops */
+#ifdef WITH_VERBOSE_MODE
+
+#define meta_debug_spew meta_debug_spew_real
+#define meta_verbose meta_verbose_real
+#define meta_topic meta_topic_real
+
+#else
+
+# ifdef G_HAVE_ISO_VARARGS
+# define meta_debug_spew(...)
+# define meta_verbose(...)
+# define meta_topic(...)
+# elif defined(G_HAVE_GNUC_VARARGS)
+# define meta_debug_spew(format...)
+# define meta_verbose(format...)
+# define meta_topic(format...)
+# else
+# error "This compiler does not support varargs macros and thus verbose mode can't be disabled meaningfully"
+# endif
+
+#endif /* !WITH_VERBOSE_MODE */
+
+#endif /* META_UTIL_H */