After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 363645 - "Labels" with no labels give a huge search bar
"Labels" with no labels give a huge search bar
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: André Klapper
Evolution QA team
: 374980 436956 473872 506545 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-10-20 12:25 UTC by Bastien Nocera
Modified: 2013-09-13 00:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot-INBOX - Evolution.png (29.42 KB, image/png)
2006-10-20 12:25 UTC, Bastien Nocera
  Details
Screenshot.png (81.41 KB, image/png)
2006-10-20 13:57 UTC, Bastien Nocera
  Details
patch (1.05 KB, patch)
2007-09-05 14:32 UTC, André Klapper
needs-work Details | Review
correct patch (1.03 KB, patch)
2007-09-05 20:31 UTC, André Klapper
committed Details | Review

Description Bastien Nocera 2006-10-20 12:25:11 UTC
evolution-2.8.0-7.fc6

I upgraded from evolution-2.0.2 (on RHEL4) to evolution-2.8.0-7.fc6 (on FC6), and the search bar is absolutely huge, as shown in this screenshot.
Comment 1 Bastien Nocera 2006-10-20 12:25:43 UTC
Created attachment 75077 [details]
Screenshot-INBOX - Evolution.png
Comment 2 Bastien Nocera 2006-10-20 13:11:23 UTC
I also noticed the search text entry isn't taking the whole width available.
Comment 3 André Klapper 2006-10-20 13:47:53 UTC
funky!
reminds me of http://bugzilla.gnome.org/attachment.cgi?id=68223&action=view (bug 346318), though it is probably unrelated.

totally wild guess: hadess, does this also happen if you change your gnome wide "symbols below text/only symbols/only text/blah" settings?
Comment 4 Bastien Nocera 2006-10-20 13:57:05 UTC
(In reply to comment #3)
> funky!
> reminds me of http://bugzilla.gnome.org/attachment.cgi?id=68223&action=view
> (bug 346318), though it is probably unrelated.

That reminded me of something. See attached screenshot below.

> totally wild guess: hadess, does this also happen if you change your gnome wide
> "symbols below text/only symbols/only text/blah" settings?

Yep it does.
Comment 5 Bastien Nocera 2006-10-20 13:57:36 UTC
Created attachment 75083 [details]
Screenshot.png

The en_GB translation is busted.
Comment 6 Bastien Nocera 2006-10-20 14:21:53 UTC
On my system:
$ gconftool-2 --get /apps/evolution/mail/labels
[:#ff0000,:#ff8c00,:#008b00,:#0000ff,:#8b008b]

So evolution is trying to translate an empty string, which means it gets the pot file's header as the translation instead of another empty string.

run this to replicate on your system:
gconftool-2 --set --type list --list-type=string /apps/evolution/mail/labels '[:#ff0000,:#ff8c00,:#008b00,:#0000ff,:#8b008a]'
and run evolution with in a translated language (like en_GB, or somesuch).

Evolution should check that the string isn't empty before trying to translate it.
Comment 7 Bastien Nocera 2006-10-20 14:32:18 UTC
I unset the /apps/evolution/mail/labels GConf key, and I'm back with a normal size toolbar.

I filed bug 363680 to track the search text entry width problem.
Comment 8 André Klapper 2007-01-28 00:18:32 UTC
*** Bug 374980 has been marked as a duplicate of this bug. ***
Comment 9 André Klapper 2007-09-05 12:15:31 UTC
*** Bug 473872 has been marked as a duplicate of this bug. ***
Comment 10 André Klapper 2007-09-05 14:32:28 UTC
Created attachment 94993 [details] [review]
patch
Comment 11 André Klapper 2007-09-05 14:35:22 UTC
there's much likely a better way to fix this, but hey - i'm not a C coder, and it works for me. :)
no idea whether all .po files start with that string - real hackers, go ahead!
Comment 12 Bastien Nocera 2007-09-05 14:43:49 UTC
Comment on attachment 94993 [details] [review]
patch

>Index: evolution/mail/mail-config.c
>===================================================================
>--- evolution/mail/mail-config.c	(Revision 34178)
>+++ evolution/mail/mail-config.c	(Arbeitskopie)
>@@ -176,6 +176,10 @@
> 			*colour++ = '\0';
> 			label->tag = g_strdup(label_defaults[num].tag);
> 			label->name = g_strdup (_(buf));
>+			/* Ugly hack to make sure that a string is displayed 
>+			for empty label names, works around bug 363645: */
>+			if (strncmp (label->name, "Project-Id-Version", 18) == 0)
>+				label->name = g_strdup (_("Unnamed"));
> 			label->colour = g_strdup (colour);

You're fixing the symptom, not the problem :)

The problem is that it's trying to translate an empty string. So:

/* Don't translate an empty string */
if (buf == NULL || buf[0] == '\0')
        label->name = g_strdup (_("Unnamed"));
else
        label->name = label->name = g_strdup (_(buf));
Comment 13 André Klapper 2007-09-05 15:01:20 UTC
ahhh... i knew some real hackers would always be around. :-)
Comment 14 André Klapper 2007-09-05 20:31:46 UTC
Created attachment 95023 [details] [review]
correct patch

correct patch, as described by hadess
Comment 15 André Klapper 2007-09-05 20:32:24 UTC
note that committing this won't break the string freeze.
Comment 16 Srinivasa Ragavan 2007-09-06 06:59:05 UTC
Commit to head please.
Comment 17 André Klapper 2007-09-06 10:37:01 UTC
Committed as revision 34186. This will be available in version 2.12.0.
Thanks, Bastien! :)
Comment 18 André Klapper 2007-12-29 19:49:52 UTC
*** Bug 436956 has been marked as a duplicate of this bug. ***
Comment 19 André Klapper 2008-01-02 09:51:28 UTC
*** Bug 506545 has been marked as a duplicate of this bug. ***