Mercurial > geeqie.yaz
diff src/image-overlay.c @ 733:57f759d012c7
Modify set_default_image_overlay_template_string() to accept the pointer to
the string to modify and add a generic function to set template_string value.
author | zas_ |
---|---|
date | Thu, 22 May 2008 10:09:07 +0000 |
parents | 8268cbe682f1 |
children | a7289f9e8d29 |
line wrap: on
line diff
--- a/src/image-overlay.c Thu May 22 09:22:29 2008 +0000 +++ b/src/image-overlay.c Thu May 22 10:09:07 2008 +0000 @@ -83,11 +83,18 @@ static void image_osd_timer_schedule(OverlayStateData *osd); - -void set_default_image_overlay_template_string(ConfOptions *options) +void set_image_overlay_template_string(gchar **template_string, const gchar *value) { - if (options->image_overlay.common.template_string) g_free(options->image_overlay.common.template_string); - options->image_overlay.common.template_string = g_strdup(DEFAULT_OVERLAY_INFO); + g_assert(template_string); + + g_free(*template_string); + *template_string = g_strdup(value); +} + + +void set_default_image_overlay_template_string(gchar **template_string) +{ + set_image_overlay_template_string(template_string, DEFAULT_OVERLAY_INFO); } static OverlayStateData *image_get_osd_data(ImageWindow *imd)