comparison 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
comparison
equal deleted inserted replaced
732:8256c74730e2 733:57f759d012c7
81 #define HISTOGRAM_HEIGHT 140 81 #define HISTOGRAM_HEIGHT 140
82 #define HISTOGRAM_WIDTH 256 82 #define HISTOGRAM_WIDTH 256
83 83
84 static void image_osd_timer_schedule(OverlayStateData *osd); 84 static void image_osd_timer_schedule(OverlayStateData *osd);
85 85
86 86 void set_image_overlay_template_string(gchar **template_string, const gchar *value)
87 void set_default_image_overlay_template_string(ConfOptions *options) 87 {
88 { 88 g_assert(template_string);
89 if (options->image_overlay.common.template_string) g_free(options->image_overlay.common.template_string); 89
90 options->image_overlay.common.template_string = g_strdup(DEFAULT_OVERLAY_INFO); 90 g_free(*template_string);
91 *template_string = g_strdup(value);
92 }
93
94
95 void set_default_image_overlay_template_string(gchar **template_string)
96 {
97 set_image_overlay_template_string(template_string, DEFAULT_OVERLAY_INFO);
91 } 98 }
92 99
93 static OverlayStateData *image_get_osd_data(ImageWindow *imd) 100 static OverlayStateData *image_get_osd_data(ImageWindow *imd)
94 { 101 {
95 OverlayStateData *osd; 102 OverlayStateData *osd;