Hi,
Am Donnerstag, den 15.12.2005, 13:05 -0800 schrieb Calitar:
> Hello again. When I try to select a different appplication from "Other
> Application..." Thunar crashes and I get this on the terminal:
>
> libxfce4util-CRITICAL **: simple_add_entry: assertion `locale == NULL'
> failed
> aborting...
Looks like the xfce rc entry bug I fixed some months ago...
(
-/* $Id: xfce-rc-simple.c 17330 2005-09-04 09:47:25Z kelnos $ */
+/* $Id: xfce-rc-simple.c 17334 2005-09-04 17:29:02Z dannym $ */
)
It happens when you have a "desktop file" which has a key with a
language suffix but no generic key.
For example:
Name[de]=xyz
It "should" be:
Name=xyz
Name[de]=xyz1
> Aborted
>
> I was having this problem before, but now that I am up to date I can
> finally report it. I have a feeling that this may just be a problem
> with my computer because I don't see anyone else complaining about it.
> Perhaps another problem of outdated software? I am running Mepis 3.3.2
> with xfce 4.2.3.2.
cheers,
Danny
--- xfce-rc-simple.c~ 2005-09-04 19:14:03.829746250 +0200
+++ xfce-rc-simple.c 2005-09-04 19:29:09.390340250 +0200
@@ -1,4 +1,4 @@
-/* $Id: xfce-rc-simple.c 17330 2005-09-04 09:47:25Z kelnos $ */
+/* $Id: xfce-rc-simple.c 17334 2005-09-04 17:29:02Z dannym $ */
/*-
* Copyright (c) 2003-2005 Benedikt Meurer <[EMAIL PROTECTED]>
* All rights reserved.
@@ -173,7 +173,28 @@ simple_add_entry (XfceRcSimple *simple,
if (G_UNLIKELY (entry == NULL))
{
- g_return_val_if_fail (locale == NULL, NULL);
+ if (locale != NULL) {
+ /* this point is reached when there is a .desktop file that lists a language specific key for something that had no language-neutral key yet.
+ Example:
+ b.desktop
+
+ [Desktop Entry]
+ Version=1.0
+ Encoding=UTF-8
+ Name=xyz
+ GenericName[de_AT]=Test
+
+ here GenericName[de_AT] will end up here.
+ The previous way with g_return_val_if_fail would call an assertion failure and terminate the _whole application_(!!).
+
+ Saner ways to react are either just ignoring GenericName[de_AT] altogether, or, alternatively, just set the normal GenericName
+ to Test too (i.e. imply GenericName=Test).
+
+ For now, we are just ignoring the line altogether. But we aren't assert-failing anymore and the apps dont crash anymore.
+ */
+ return NULL;
+ }
+ /* why you annoying macro, will you stop borking libxfceutil? thanks. DO NOT DO THAT: g_return_val_if_fail (locale == NULL, NULL); */
entry = g_chunk_new (Entry, simple->entry_chunk);
entry->key = g_string_chunk_insert (simple->string_chunk, key);
_______________________________________________
Thunar-dev mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/thunar-dev