From 0a8bdcdcb3823442ddde34e49967860cefabdcc3 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sat, 7 Apr 2007 22:16:35 +0000 Subject: [PATCH] Add an (unbound by default) keybinding for setting spew marks in verbose 2007-04-07 Elijah Newren * src/prefs.[ch] (screen_bindings array, META_KEYBINDING_SET_SPEW_MARK definition): * src/keybindings.c (handle_spew_mark, screen_handlers array): Add an (unbound by default) keybinding for setting spew marks in verbose debugging logs. I'm not sure why this was ever removed; I've wanted it so many times. * HACKING: valgrind wants --log-file not --logfile. svn path=/trunk/; revision=3174 --- ChangeLog | 12 ++++++++++++ HACKING | 2 +- src/keybindings.c | 8 ++++++-- src/prefs.c | 1 + src/prefs.h | 1 + 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc2c7ed87..ed5eb6e94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-04-07 Elijah Newren + + * src/prefs.[ch] (screen_bindings array, + META_KEYBINDING_SET_SPEW_MARK definition): + * src/keybindings.c (handle_spew_mark, screen_handlers array): + Add an (unbound by default) keybinding for setting spew marks in + verbose debugging logs. I'm not sure why this was ever removed; + I've wanted it so many times. + + * HACKING: + valgrind wants --log-file not --logfile. + 2007-04-07 Elijah Newren * src/window.c (meta_window_free): Fix memory bug (invalid free) diff --git a/HACKING b/HACKING index 0b6c864e6..d8b67211d 100644 --- a/HACKING +++ b/HACKING @@ -183,7 +183,7 @@ Debugging information To run metacity under valgrind, use options typical for any Gnome program, such as - valgrind --logfile=metacity.log --tool=memcheck --num-callers=48 \ + valgrind --log-file=metacity.log --tool=memcheck --num-callers=48 \ --leak-check=yes --leak-resolution=high --show-reachable=yes \ ./src/metacity --replace where, again, the backslashes mean to join all the stuff on the following diff --git a/src/keybindings.c b/src/keybindings.c index 63ec83588..1e0b26c31 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -231,6 +231,11 @@ static void handle_move_to_corner_se (MetaDisplay *display, MetaWindow *window, XEvent *event, MetaKeyBinding *binding); +static void handle_spew_mark (MetaDisplay *display, + MetaScreen *screen, + MetaWindow *window, + XEvent *event, + MetaKeyBinding *binding); static void handle_run_terminal (MetaDisplay *display, MetaScreen *screen, MetaWindow *window, @@ -419,6 +424,7 @@ static const MetaKeyHandler screen_handlers[] = { GINT_TO_POINTER (33) }, { META_KEYBINDING_RUN_COMMAND_TERMINAL, handle_run_terminal, NULL }, + { META_KEYBINDING_SET_SPEW_MARK, handle_spew_mark, NULL }, { NULL, NULL, NULL } }; @@ -3804,7 +3810,6 @@ handle_workspace_switch (MetaDisplay *display, } } -#if 0 static void handle_spew_mark (MetaDisplay *display, MetaScreen *screen, @@ -3814,7 +3819,6 @@ handle_spew_mark (MetaDisplay *display, { meta_verbose ("-- MARK MARK MARK MARK --\n"); } -#endif void meta_set_keybindings_disabled (gboolean setting) diff --git a/src/prefs.c b/src/prefs.c index 7c0358c88..a44169e75 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -1910,6 +1910,7 @@ static MetaKeyPref screen_bindings[] = { { META_KEYBINDING_COMMAND_SCREENSHOT, NULL, FALSE }, { META_KEYBINDING_COMMAND_WIN_SCREENSHOT, NULL, FALSE }, { META_KEYBINDING_RUN_COMMAND_TERMINAL, NULL, FALSE }, + { META_KEYBINDING_SET_SPEW_MARK, NULL, FALSE }, { NULL, NULL, FALSE} }; diff --git a/src/prefs.h b/src/prefs.h index 95296f904..f07a5c9da 100644 --- a/src/prefs.h +++ b/src/prefs.h @@ -176,6 +176,7 @@ gboolean meta_prefs_get_compositing_manager (void); #define META_KEYBINDING_COMMAND_SCREENSHOT "run_command_screenshot" #define META_KEYBINDING_COMMAND_WIN_SCREENSHOT "run_command_window_screenshot" #define META_KEYBINDING_RUN_COMMAND_TERMINAL "run_command_terminal" +#define META_KEYBINDING_SET_SPEW_MARK "set_spew_mark" /* Window bindings */ #define META_KEYBINDING_WINDOW_MENU "activate_window_menu"