summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrcyeske <rcyeske>2005-01-04 20:06:24 +0000
committerrcyeske <rcyeske>2005-01-04 20:06:24 +0000
commit02c7adf750d153ba0a302b15e1175732d4d41e2b (patch)
tree409268cda6aad54c0fa7b6552c50cd4ec3d4289f /src
parentb0d61b6688c2a7cf4468c4c3073428cf98a85da4 (diff)
downloadratpoison-02c7adf750d153ba0a302b15e1175732d4d41e2b.zip
(cmd_rudeness): Print rudeness to bar when called
interactively.
Diffstat (limited to 'src')
-rw-r--r--src/actions.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/actions.c b/src/actions.c
index 3d1b4b1..abd0e2b 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -2321,17 +2321,19 @@ cmd_rudeness (int interactive, char *data)
{
int num;
- if (data == NULL && !interactive)
- return xsprintf ("%d",
- rp_honour_transient_raise
- | (rp_honour_normal_raise << 1)
- | (rp_honour_transient_map << 2)
- | (rp_honour_normal_map << 3));
-
if (data == NULL)
{
- message ("rudeness: one argument required");
- return NULL;
+ num = rp_honour_transient_raise
+ | (rp_honour_normal_raise << 1)
+ | (rp_honour_transient_map << 2)
+ | (rp_honour_normal_map << 3);
+ if (interactive)
+ {
+ marked_message_printf (0, 0, "%d", num);
+ return NULL;
+ }
+ else
+ return xsprintf ("%d", num);
}
if (sscanf (data, "%d", &num) < 1 || num < 0 || num > 15)