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 150222 - Comment format in web export is ugly
Comment format in web export is ugly
Status: RESOLVED DUPLICATE of bug 319933
Product: gthumb
Classification: Other
Component: general
unspecified
Other Linux
: High enhancement
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2004-08-16 01:00 UTC by Rennie deGraaf
Modified: 2006-11-05 22:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for issue described in bug 150222 (8.45 KB, patch)
2004-08-16 01:10 UTC, Rennie deGraaf
none Details | Review
Patch to modify HTML output, against CVS tree 20041216 (8.24 KB, patch)
2004-12-30 21:17 UTC, Rennie deGraaf
none Details | Review

Description Rennie deGraaf 2004-08-16 01:00:16 UTC
When one creates a web album, the format gthumb uses for image comments is kind
of ugly and run together.  There is, in my opinion, insufficient whitespace
between the comment, place, and date for clarity.

Proposed fix: instead of encoding image comments as a string with <BR>s
separating the comment, place, and date, use an HTML table with comment, place
and date on separate rows.

Patch to follow.
Comment 1 Rennie deGraaf 2004-08-16 01:10:57 UTC
Created attachment 30573 [details] [review]
Patch for issue described in bug 150222

Here's my fix:

- I added two additional params to comment_get_comment_as_string(), to provide
a head and tail to the returned string, as well as the two separators.	These
two new params can be null.
- In all functions that call comment_get_comment_as_string() except in
catalog_web_exporter.c, I added the two new NULL parameters.  Thus, the results
of this call are unaffected in these locations. In catalog_web_exporter.c
(which is responsible for generating web albums), I replaced the "&nbsp;<BR>"
separators with the necessary head, separator, and tail HTML code for a simple
table with three rows.

I discovered one side effect of this change:  Since the comments are now in a
separate sub-table in all the web album templates (image.ghtml), the <font>
tags preceeding the comment insertion have no effect.  As a work-around, I
added the appropriate color code to the style sheet for <td> tags in
image.ghtml for all web album templates in the distribution.  This did not
affect the color of any other text generated by the templates that I could
find; the template author was very careful to put <font> tags whereever they
might be needed.

The net result is that the comment format in web albums is a little prettier.

I didn't touch the changelog, because I don't know how you guys handle those
things.
Comment 2 Rennie deGraaf 2004-12-30 21:17:58 UTC
Created attachment 35310 [details] [review]
Patch to modify HTML output, against CVS tree 20041216

With this patch, in
exported HTML, comments are nested in a <div> block, with each section
(label, location, date) nested in a <p> element.  Each block has a class
name assigned to it, so that their appearance can be manipulated from
within web export template files via CSS.  The new HTML code is valid
under XHTML 1.1, so it should not cause any portability issues in the
future.  The main differences from the old version are that the old
version embedded the comment information inside a table, which is
considered poor HTML design, and didn't have the class tags to make CSS
modification easy.
Comment 3 Michael Chudobiak 2006-11-05 20:30:56 UTC
Rennie,

Could you update your patch against CVS HEAD?

- Mike
Comment 4 Rennie deGraaf 2006-11-05 21:34:16 UTC
I generalized this bug into a much larger set of modifications to the web export language last fall, detailed in bug 319933, which was ignored by the gthumb maintainers at the time.  Those changes allowed me to generate much more elaborate web albums like this (http://pages.cpsc.ucalgary.ca/~degraaf/Photos/aurora_borealis/), using a new DHTML template that I wrote (http://pages.cpsc.ucalgary.ca/~degraaf/software/gthumb/BestFit.tgz).  

If you're interested in this larger patch, then I'll mark this bug as a dupe and try to update that one; otherwise, I should be able to update this patch fairly quickly.

By the way, thanks for going back through these old bugs.  I was pretty annoyed at being ignored when I first submitted them.

Rennie
Comment 5 Michael Chudobiak 2006-11-05 22:11:34 UTC
Rennie,

OK, please update bug 319933 for review. I was starting with the simpler patches (because I have to understand everything that I commit) but there's no point committing this if you have a better patch.

Do you think you can slip in iso-coding of non-ascii characters into your patch, to address bug 155042?

I also have my eye on Bug 166579 – Improvements to file and comment labels on Web Album creation. Please keep that bug in mind when updating yours - perhaps you've already added the same functionality; I haven't checked yet. Keep the patches compatible anyway, and add a note there if you do anything that affects it.

A sample theme that used your modifications should probably be attached to bug 319933, to simplify testing.

It's a tragedy to ignore the effort put into patches... it defeats the spirit of gnome. So this is my way of helping, even if I'm not an ace programmer!

- Mike


*** This bug has been marked as a duplicate of 319933 ***