From 5be0a82a353b67160142134de1cc51fa31d72759 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 24 Jul 2003 06:02:38 +0000 Subject: use ob_debug for any debug printing and only display the output when its a debug build or when --debug is passed to it --- plugins/keyboard/keyboard.c | 2 +- plugins/keyboard/translate.c | 6 +++--- plugins/menu/client_menu.c | 11 ++++++----- plugins/placement/history.c | 3 ++- 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'plugins') diff --git a/plugins/keyboard/keyboard.c b/plugins/keyboard/keyboard.c index 33f8409e..a583a2e6 100644 --- a/plugins/keyboard/keyboard.c +++ b/plugins/keyboard/keyboard.c @@ -146,7 +146,7 @@ gboolean kbind(GList *keylist, Action *action) while (t->first_child) t = t->first_child; if (conflict) { - g_message("conflict with binding"); + g_warning("conflict with binding"); tree_destroy(tree); return FALSE; } diff --git a/plugins/keyboard/translate.c b/plugins/keyboard/translate.c index 05887e6b..7cda04c3 100644 --- a/plugins/keyboard/translate.c +++ b/plugins/keyboard/translate.c @@ -15,7 +15,7 @@ static guint translate_modifier(char *str) !g_ascii_strcasecmp("C", str)) return ControlMask; else if (!g_ascii_strcasecmp("Shift", str) || !g_ascii_strcasecmp("S", str)) return ShiftMask; - g_message("Invalid modifier '%s' in binding.", str); + g_warning("Invalid modifier '%s' in binding.", str); return 0; } @@ -47,12 +47,12 @@ gboolean translate_key(char *str, guint *state, guint *keycode) /* figure out the keycode */ sym = XStringToKeysym(l); if (sym == NoSymbol) { - g_message("Invalid key name '%s' in key binding.", l); + g_warning("Invalid key name '%s' in key binding.", l); goto translation_fail; } *keycode = XKeysymToKeycode(ob_display, sym); if (!*keycode) { - g_message("Key '%s' does not exist on the display.", l); + g_warning("Key '%s' does not exist on the display.", l); goto translation_fail; } diff --git a/plugins/menu/client_menu.c b/plugins/menu/client_menu.c index 931ee79d..568c8b2d 100644 --- a/plugins/menu/client_menu.c +++ b/plugins/menu/client_menu.c @@ -1,14 +1,14 @@ -#include - +#include "kernel/debug.h" #include "kernel/menu.h" #include "kernel/screen.h" #include "kernel/client.h" #include "kernel/openbox.h" - #include "kernel/frame.h" #include "render/theme.h" +#include + static char *PLUGIN_NAME = "client_menu"; static ObMenu *send_to_menu; @@ -42,7 +42,7 @@ void client_send_to_update(ObMenu *self) if (it != NULL || i != screen_num_desktops) { menu_clear(self); - g_message("update"); + ob_debug("update\n"); for (i = 0; i < screen_num_desktops; ++i) { ObMenuEntry *e; Action *a = action_from_string("sendtodesktop"); @@ -58,7 +58,8 @@ void client_send_to_update(ObMenu *self) void client_menu_show(ObMenu *self, int x, int y, ObClient *client) { - guint i, newy, newx; + guint i; + gint newy, newx; Rect *a = NULL; g_assert(!self->invalid); diff --git a/plugins/placement/history.c b/plugins/placement/history.c index 27efa677..a7460b3d 100644 --- a/plugins/placement/history.c +++ b/plugins/placement/history.c @@ -1,3 +1,4 @@ +#include "kernel/debug.h" #include "kernel/openbox.h" #include "kernel/dispatch.h" #include "kernel/frame.h" @@ -145,7 +146,7 @@ static void save_history() for (it = history_list; it; it = g_slist_next(it)) { struct HistoryItem *hi = it->data; - g_message("adding %s", hi->name); + ob_debug("adding %s\n", hi->name); node = xmlNewChild(root, NULL, (const xmlChar*) "entry", NULL); xmlNewProp(node, (const xmlChar*) "name", (const xmlChar*) hi->name); xmlNewProp(node, (const xmlChar*) "class", (const xmlChar*) hi->class); -- cgit v1.2.3