Mercurial > geeqie.yaz
comparison src/image-overlay.c @ 481:67a612985686
Merge view_overlay_toggle() and layout_image_overlay_toggle() into new image_osd_toggle().
author | zas_ |
---|---|
date | Tue, 22 Apr 2008 08:53:07 +0000 |
parents | 805c3258d228 |
children | 75b7154e6435 |
comparison
equal
deleted
inserted
replaced
480:805c3258d228 | 481:67a612985686 |
---|---|
75 | 75 |
76 #define IMAGE_OSD_DEFAULT_DURATION 30 | 76 #define IMAGE_OSD_DEFAULT_DURATION 30 |
77 | 77 |
78 #define HISTOGRAM_HEIGHT 140 | 78 #define HISTOGRAM_HEIGHT 140 |
79 | 79 |
80 static void image_osd_timer_schedule(OverlayStateData *osd); | |
81 | |
82 | |
80 void set_default_image_overlay_template_string(ConfOptions *options) | 83 void set_default_image_overlay_template_string(ConfOptions *options) |
81 { | 84 { |
82 if (options->image_overlay.common.template_string) g_free(options->image_overlay.common.template_string); | 85 if (options->image_overlay.common.template_string) g_free(options->image_overlay.common.template_string); |
83 options->image_overlay.common.template_string = g_strdup(DEFAULT_OVERLAY_INFO); | 86 options->image_overlay.common.template_string = g_strdup(DEFAULT_OVERLAY_INFO); |
84 } | 87 } |
112 { | 115 { |
113 if (imd->histogram) | 116 if (imd->histogram) |
114 histogram_set_mode(imd->histogram, !histogram_get_mode(imd->histogram)); | 117 histogram_set_mode(imd->histogram, !histogram_get_mode(imd->histogram)); |
115 } | 118 } |
116 | 119 |
117 | 120 void image_osd_toggle(ImageWindow *imd) |
118 | 121 { |
119 static void image_osd_timer_schedule(OverlayStateData *osd); | 122 if (image_osd_get(imd, NULL, NULL)) |
123 { | |
124 if (image_osd_histogram_onoff_status(imd)) | |
125 { | |
126 image_osd_histogram_onoff_toggle(imd, 0); | |
127 image_osd_update(imd); | |
128 } | |
129 else | |
130 { | |
131 image_osd_set(imd, FALSE, FALSE); | |
132 } | |
133 } | |
134 else | |
135 { | |
136 image_osd_set(imd, TRUE, TRUE); | |
137 image_osd_icon(imd, IMAGE_OSD_ICON, -1); | |
138 image_osd_histogram_onoff_toggle(imd, 1); | |
139 image_osd_update(imd); | |
140 } | |
141 } | |
120 | 142 |
121 static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *vars) | 143 static gchar *image_osd_mkinfo(const gchar *str, ImageWindow *imd, GHashTable *vars) |
122 { | 144 { |
123 gchar delim = '%', imp = '|', sep[] = " - "; | 145 gchar delim = '%', imp = '|', sep[] = " - "; |
124 gchar *start, *end; | 146 gchar *start, *end; |