THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#322 - Allow removal of categories using the libpnd category config file User who did this - Jürgen Rühle (jr)
---------- <p>The following patch implements this.</p>
<blockquote> <p>From 59eb27c78bd7bd4db1fde6e99cb64efd90c4f6ba Mon Sep 17 00:00:00 2001<br /> From: =?UTF-8?q?J=C3=BCrgen=20R=C3=BChle?= <j-r@online.de><br /> Date: Sat, 15 Jun 2013 19:33:05 +0200<br /> Subject: [PATCH] Allow mapping categories to nothing</p>
<p>Now a category mapped to the magic string "NoCategory" in the categories config<br /> file will not be added to the Categories field of the desktop file.</p>
<p>Note that the configured default categories are used, if all PND categories get<br /> suppressed using this mechanism.<br /> ---<br /> lib/pnd_desktop.c | 6 ++++--<br /> 1 files changed, 4 insertions(+), 2 deletions(-)</p>
<p>diff --git a/lib/pnd_desktop.c b/lib/pnd_desktop.c<br /> index e6aca21..08ec6b0 100644<br /> --- a/lib/pnd_desktop.c<br /> +++ b/lib/pnd_desktop.c<br /> @@ -537,8 +537,10 @@ int pnd_map_dotdesktop_categories ( pnd_conf_handle c, char *target_buffer, unsi<br /> #define MAPCAT(field) <br /> if ( ( t = d -> field ) ) { <br /> match = pnd_map_dotdesktop_category ( c, t ); <br /> - strncat ( target_buffer, match ? match : t, len ); <br /> - strncat ( target_buffer, ";", len ); <br /> + if ( !match || strcasecmp ( match, "NoCategory" ) ) { <br /> + strncat ( target_buffer, match ? match : t, len ); <br /> + strncat ( target_buffer, ";", len ); <br /> + } <br /> }<br /> <br /> MAPCAT(main_category);<br /> --<br /> 1.7.0.2</p>
<p> </p> </blockquote>
----------
More information can be found at the following URL: http://bugs.openpandora.org/index.php?do=details&task_id=322#comment531
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.