summaryrefslogtreecommitdiff
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
parentb0d61b6688c2a7cf4468c4c3073428cf98a85da4 (diff)
downloadratpoison-02c7adf750d153ba0a302b15e1175732d4d41e2b.zip
(cmd_rudeness): Print rudeness to bar when called
interactively.
-rw-r--r--ChangeLog5
-rw-r--r--src/actions.c20
2 files changed, 16 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e15068..abbe992 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-04 Ryan Yeske <rcyeske@gmail.com>
+
+ * src/actions.c (cmd_rudeness): Print rudeness to bar when called
+ interactively.
+
2005-01-03 Ryan Yeske <rcyeske@gmail.com>
* src/main.c (print_help): Update mailing list.
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)