Mercurial > geeqie
view src/image-overlay.h @ 622:54e20abb5c6d
Fix display of collection in overlay info.
Due to markup escaped <i>collection</i> was displayed instead of collection's in italic.
Overlay info syntax was extended to allow the wrapping of displayed data with markup.
General syntax is: %name[:length limit][:extra]%
Extra string uses special character '*' to mark the place of the data to display.
If no '*' is present, then extra string is just appended to data.
Any "\n" is replaced by a newline on display.
Pango mark up is accepted in left and right parts.
If data is empty, nothing will be displayed.
Examples:
"%name:<i>*</i>\n%" -> name is displayed in italics ended with a newline
"%size:\n%" -> size is displayed with a newline at end
"%formatted.ISOSpeedRating:ISO *%" -> prefix iso number with "ISO " (ie. "ISO 100")
"Collection <b>*</b>\n" -> display collection name in bold prefixed by "Collection " and a newline is appended
Collection name formatting was slighly improved by not displaying the .gqv extension.
The default overlay info string was modified to use the new syntax, but older info strings should be
displayed as usual.
author | zas_ |
---|---|
date | Sat, 10 May 2008 21:29:53 +0000 |
parents | 734b6b0a3356 |
children | 57f759d012c7 |
line wrap: on
line source
/* * Geeqie * (C) 2006 John Ellis * Copyright (C) 2008 The Geeqie Team * * Author: John Ellis * * This software is released under the GNU General Public License (GNU GPL). * Please read the included file COPYING for more information. * This software comes with no warranty of any kind, use at your own risk! */ #ifndef IMAGE_OVERLAY_H #define IMAGE_OVERLAY_H typedef enum { IMAGE_OSD_NONE = 0, IMAGE_OSD_ROTATE_USER, IMAGE_OSD_ROTATE_AUTO, IMAGE_OSD_COLOR, IMAGE_OSD_FIRST, IMAGE_OSD_LAST, IMAGE_OSD_ICON, IMAGE_OSD_COUNT } ImageOSDFlag; typedef enum { OSD_SHOW_NOTHING = 0, OSD_SHOW_INFO = 1 << 0, OSD_SHOW_STATUS = 1 << 1, OSD_SHOW_HISTOGRAM = 1 << 2 } OsdShowFlags; void set_default_image_overlay_template_string(ConfOptions *options); void image_osd_set(ImageWindow *imd, OsdShowFlags show); OsdShowFlags image_osd_get(ImageWindow *imd); void image_osd_update(ImageWindow *imd); void image_osd_icon(ImageWindow *imd, ImageOSDFlag flag, gint duration); void image_osd_histogram_chan_toggle(ImageWindow *); void image_osd_histogram_log_toggle(ImageWindow *); void image_osd_toggle(ImageWindow *imd); #endif