[2755] in BarnOwl Developers
Re: [PATCH] Punted __unspecified__ default value for default_style.
daemon@ATHENA.MIT.EDU (Nelson Elhage)
Sun Nov 7 08:34:45 2010
From: Nelson Elhage <nelhage@MIT.EDU>
To: Jaon Gross <jgross@mit.edu>, barnowl-dev@mit.edu
In-Reply-To: <1289090256-10104-1-git-send-email-jgross@mit.edu>
Date: Sun, 07 Nov 2010 08:34:42 -0500
Applied.
It looks like the story here is that there used to be logic there to
decide between the "default", "perl", and "basic" styles, but we've
since killed "basic" and pushed the "perl" logic elsewhere, so we can
use a constant default.
Thanks.
- Nelson
On Sat, 6 Nov 2010 20:37:36 -0400, Jaon Gross <jgross@MIT.EDU> wrote:
> From: Jason Gross <jasongross9+git@gmail.com>
>
> variable.c set default_style to __unspecified__, and owl.c checked
> this and then changed it to default. This seemed to have no purpose,
> and additionally would cause problems if the user decided to make a
> custom style and named it __unspecified__, so I had variable.c set
> default_style to default and removed the code from owl.c.
> ---
> owl.c | 8 --------
> variable.c | 2 +-
> 2 files changed, 1 insertions(+), 9 deletions(-)
>
> diff --git a/owl.c b/owl.c
> index c3f436b..a038e4a 100644
> --- a/owl.c
> +++ b/owl.c
> @@ -564,14 +564,6 @@ int main(int argc, char **argv, char **env)
> owl_function_debugmsg("startup: processing startup file");
> owl_function_source(NULL);
>
> - /* Set the default style */
> - owl_function_debugmsg("startup: setting startup and default style");
> - if (0 != strcmp(owl_global_get_default_style(&g), "__unspecified__")) {
> - /* the style was set by the user: leave it alone */
> - } else {
> - owl_global_set_default_style(&g, "default");
> - }
> -
> owl_function_debugmsg("startup: set style for the view: %s", owl_global_get_default_style(&g));
> s = owl_global_get_style_by_name(&g, owl_global_get_default_style(&g));
> if(s)
> diff --git a/variable.c b/variable.c
> index c1c219f..10a3c9e 100644
> --- a/variable.c
> +++ b/variable.c
> @@ -268,7 +268,7 @@ static owl_variable variables_to_init[] = {
> OWLVAR_STRING_FULL( "tty" /* %OwlVarStub */, "", "tty name for zephyr location", "",
> NULL, owl_variable_tty_set, NULL),
>
> - OWLVAR_STRING( "default_style" /* %OwlVarStub */, "__unspecified__",
> + OWLVAR_STRING( "default_style" /* %OwlVarStub */, "default",
> "name of the default formatting style",
> "This sets the default message formatting style.\n"
> "Styles may be created with the 'style' command.\n"
> --
> 1.7.0.4
>
>