diff options
author | Havoc Pennington <hp@pobox.com> | 2002-12-08 19:17:17 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-12-08 19:17:17 +0000 |
commit | 8d314aead872d09198f887295c2e91e02ac525c6 (patch) | |
tree | 2e0d380f168553693937bb28efdb197933b354ea /src/tools | |
parent | 15d28dfd97ddc799b70407c05b9c5212d92c24f4 (diff) | |
download | mutter-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/tools')
-rw-r--r-- | src/tools/metacity-message.c | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/src/tools/metacity-message.c b/src/tools/metacity-message.c index 518861517..0c202584e 100644 --- a/src/tools/metacity-message.c +++ b/src/tools/metacity-message.c @@ -19,11 +19,17 @@ * 02111-1307, USA. */ +#include <config.h> #include <gtk/gtk.h> #include <gdk/gdkx.h> #include <stdlib.h> #include <string.h> +#include <libintl.h> +#define _(x) dgettext (GETTEXT_PACKAGE, x) +#define N_(x) x + + static void send_restart (void) { @@ -108,10 +114,41 @@ send_set_keybindings (gboolean enabled) XSync (gdk_display, False); } +#ifdef WITH_VERBOSE_MODE +static void +send_toggle_verbose (void) +{ + XEvent xev; + + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; + xev.xclient.display = gdk_display; + xev.xclient.window = gdk_x11_get_default_root_xwindow (); + xev.xclient.message_type = XInternAtom (gdk_display, + "_METACITY_TOGGLE_VERBOSE", + False); + xev.xclient.format = 32; + xev.xclient.data.l[0] = 0; + xev.xclient.data.l[1] = 0; + xev.xclient.data.l[2] = 0; + + XSendEvent (gdk_display, + gdk_x11_get_default_root_xwindow (), + False, + SubstructureRedirectMask | SubstructureNotifyMask, + &xev); + + XFlush (gdk_display); + XSync (gdk_display, False); +} +#endif + static void usage (void) { - g_printerr ("Usage: metacity-message (restart|reload-theme|enable-keybindings|disable-keybindings)\n"); + g_printerr (_("Usage: %s\n"), + "metacity-message (restart|reload-theme|enable-keybindings|disable-keybindings|toggle-verbose)"); exit (1); } @@ -131,6 +168,15 @@ main (int argc, char **argv) send_set_keybindings (TRUE); else if (strcmp (argv[1], "disable-keybindings") == 0) send_set_keybindings (FALSE); + else if (strcmp (argv[1], "toggle-verbose") == 0) + { +#ifndef WITH_VERBOSE_MODE + g_printerr (_("Metacity was compiled without support for verbose mode\n")); + return 1; +#else + send_toggle_verbose (); +#endif + } else usage (); |