summaryrefslogtreecommitdiffstats
path: root/headers.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2017-01-28 18:47:26 -0800
committerKevin McCarthy <kevin@8t8.us>2017-01-28 18:47:26 -0800
commitf318cb48d18ef1cc52c9c9e9e17c03e88c3c4f07 (patch)
tree8459cd80a5488b0c2b92465548b9847e292a64d9 /headers.c
parent8583edba96dc050315dba9bfa9dcad17996f2d9a (diff)
Minor fixes to the x-label patch from David.
Add L10N comment to sort menu. Mark a couple strings for localization. Use ascii_strncasecmp() for the X-Label header comparison. Simplify label_message() using mutt library routines. Bind label editing to "Y" instead of "y". "y" is already used in the default sample muttrc to display mailboxes.
Diffstat (limited to 'headers.c')
-rw-r--r--headers.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/headers.c b/headers.c
index 48195bd4..ada4aad4 100644
--- a/headers.c
+++ b/headers.c
@@ -219,17 +219,9 @@ static int label_message(HEADER *hdr, char *new)
{
if (hdr == NULL)
return 0;
- if (hdr->env->x_label == NULL && new == NULL)
+ if (mutt_strcmp (hdr->env->x_label, new) == 0)
return 0;
- if (hdr->env->x_label != NULL && new != NULL &&
- strcmp(hdr->env->x_label, new) == 0)
- return 0;
- if (hdr->env->x_label != NULL)
- FREE(&hdr->env->x_label);
- if (new == NULL)
- hdr->env->x_label = NULL;
- else
- hdr->env->x_label = safe_strdup(new);
+ mutt_str_replace (&hdr->env->x_label, new);
return hdr->changed = hdr->xlabel_changed = 1;
}