summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2013-05-25 16:46:30 +0200
committercos <cos>2013-05-25 16:46:30 +0200
commit7c559f00bacaf65d8c1c58aad20b519f9acded93 (patch)
treebf8a50b58794927af16786ee7b20b509f889f774
parent5ffd64be5b962e8bd8923f31e3bb14a9c8fd228c (diff)
parent77f6e9fa21658bb7954b84c64d460b9d58124bf2 (diff)
downloadratpoison-7c559f00bacaf65d8c1c58aad20b519f9acded93.zip
Merge branch 'cr/deprecate_winliststyle'
-rw-r--r--doc/ratpoison.13
-rw-r--r--doc/ratpoison.texi7
-rw-r--r--src/actions.c14
-rw-r--r--src/bar.c2
-rw-r--r--src/data.h2
-rw-r--r--src/main.c2
6 files changed, 21 insertions, 9 deletions
diff --git a/doc/ratpoison.1 b/doc/ratpoison.1
index 8b53288..d3952e8 100644
--- a/doc/ratpoison.1
+++ b/doc/ratpoison.1
@@ -649,8 +649,7 @@ the duration specified by \fBmsgwait\fP
If \fBmsgwait\fP is zero, toggle between indefinitely showing
and not showing.
-The messages are shown in columns or rows depending on the \fBset\fPting
-of \fBwinliststyle\fP in the format set by \fBset winfmt\fP.
+The messages are shown in columns in the format set by \fBset winfmt\fP.
The following substitutions happen in format:
.br
%a by the application name (resource name),
diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi
index d6552d5..fac0e06 100644
--- a/doc/ratpoison.texi
+++ b/doc/ratpoison.texi
@@ -340,12 +340,6 @@ Set the default gravity for normal windows. See the
When called with no arguments, the current setting is returned.
@end deffn
-@deffn Command {set winliststyle} @var{setting}
-@c @deffnx Command defwinliststyle @var{setting}
-The window list can be displayed in a row or a column. @var{setting}
-can be @samp{row} or @samp{column}.
-@end deffn
-
@deffn Command {set winfmt} @var{fmt}
@c @deffnx Command defwinfmt @var{fmt}
Set the default window format for the @command{windows} command. By
@@ -1640,7 +1634,6 @@ Here is a list of variables that can be set:
@itemize @bullet
@item framesels
-@item winliststyle
@item barpadding
@item bgcolor
@item fgcolor
diff --git a/src/actions.c b/src/actions.c
index e31df72..a79f19b 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -68,7 +68,9 @@ static cmdret * set_bgcolor (struct cmdarg **args);
static cmdret * set_fwcolor (struct cmdarg **args);
static cmdret * set_bwcolor (struct cmdarg **args);
static cmdret * set_barpadding (struct cmdarg **args);
+#ifdef WINLISTSTYLE
static cmdret * set_winliststyle (struct cmdarg **args);
+#endif
static cmdret * set_framesels (struct cmdarg **args);
static cmdret * set_maxundos (struct cmdarg **args);
static cmdret * set_infofmt (struct cmdarg **args);
@@ -138,7 +140,9 @@ init_set_vars(void)
add_set_var ("fwcolor", set_fwcolor, 1, "", arg_STRING);
add_set_var ("bwcolor", set_bwcolor, 1, "", arg_STRING);
add_set_var ("barpadding", set_barpadding, 2, "", arg_NUMBER, "", arg_NUMBER);
+#ifdef WINLISTSTYLE
add_set_var ("winliststyle", set_winliststyle, 1, "", arg_STRING);
+#endif
add_set_var ("framesels", set_framesels, 1, "", arg_STRING);
add_set_var ("infofmt", set_infofmt, 1, "", arg_REST);
add_set_var ("topkmap", set_topkmap, 1, "", arg_STRING);
@@ -2127,6 +2131,13 @@ read_variable (struct argspec *spec, struct sbuf *s, struct cmdarg **arg)
if (var == NULL)
{
cmdret *ret = cmdret_new (RET_FAILURE, "unknown variable '%s'", input);
+#ifndef WINLISTSTYLE
+ if (!strcmp (input, "winliststyle"))
+ {
+ cmdret_free(ret);
+ ret = cmdret_new (RET_FAILURE, "'%s' is deprecated. Please notify ratpoison-devel@nongnu.org if you miss it.", input);
+ }
+#endif
free (input);
return ret;
}
@@ -5021,6 +5032,7 @@ cmd_verbexec (int interactive UNUSED, struct cmdarg **args)
return cmdret_new (RET_SUCCESS, NULL);
}
+#ifdef WINLISTSTYLE
static cmdret *
set_winliststyle (struct cmdarg **args)
{
@@ -5036,6 +5048,7 @@ set_winliststyle (struct cmdarg **args)
return cmdret_new (RET_SUCCESS, NULL);
}
+#endif
cmdret *
cmd_gnext (int interactive UNUSED, struct cmdarg **args UNUSED)
@@ -5938,6 +5951,7 @@ cmd_compat (int interactive UNUSED, struct cmdarg **args UNUSED)
add_alias ("deffgcolor", "set fgcolor");
add_alias ("defbgcolor", "set bgcolor");
add_alias ("defbarpadding", "set barpadding");
+/* FIXME Deprecate the following alias together with everything else WINLISTSTYLE */
add_alias ("defwinliststyle", "set winliststyle");
add_alias ("defframesels", "set framesels");
add_alias ("defmaxundos", "set maxundos");
diff --git a/src/bar.c b/src/bar.c
index 8af3308..4ec3e19 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -192,12 +192,14 @@ update_window_names (rp_screen *s, char *fmt)
bar_buffer = sbuf_new (0);
+#ifdef WINLISTSTYLE
if(defaults.window_list_style == STYLE_ROW)
{
get_window_list (fmt, NULL, bar_buffer, &mark_start, &mark_end);
marked_message_internal (sbuf_get (bar_buffer), mark_start, mark_end);
}
else
+#endif
{
get_window_list (fmt, "\n", bar_buffer, &mark_start, &mark_end);
marked_message_internal (sbuf_get (bar_buffer), mark_start, mark_end);
diff --git a/src/data.h b/src/data.h
index 2be9a98..14a1f9b 100644
--- a/src/data.h
+++ b/src/data.h
@@ -252,9 +252,11 @@ struct rp_defaults
int startup_message;
+#ifdef WINLISTSTYLE
/* Decides whether the window list is displayed in a row or a
column. */
int window_list_style;
+#endif
/* Pointer warping toggle. */
int warp;
diff --git a/src/main.c b/src/main.c
index de2a793..ce2f655 100644
--- a/src/main.c
+++ b/src/main.c
@@ -548,7 +548,9 @@ init_defaults (void)
defaults.win_name = WIN_NAME_TITLE;
defaults.startup_message = 1;
defaults.warp = 0;
+#ifdef WINLISTSTYLE
defaults.window_list_style = STYLE_COLUMN;
+#endif
defaults.history_size = 20;
defaults.history_compaction = True;