Mercurial > geeqie
comparison src/rcfile.c @ 267:a9adf9e1a746
Remove dependency on GTK 2.12, reported by John Vodden and Vladimir
Nadvornik.
gtk_set_tooltip_markup() calls were disabled for GTK+ versions < 2.12.
gdk_color_to_string() was replaced by a equivalent function.
author | zas_ |
---|---|
date | Tue, 08 Apr 2008 11:53:35 +0000 |
parents | 22ed43d4c849 |
children | 4f526d436873 |
comparison
equal
deleted
inserted
replaced
266:65187a2309d3 | 267:a9adf9e1a746 |
---|---|
119 text = quoted_value(value, NULL); | 119 text = quoted_value(value, NULL); |
120 } | 120 } |
121 return text; | 121 return text; |
122 } | 122 } |
123 | 123 |
124 /* Since gdk_color_to_string() is only available since gtk 2.12 | |
125 * here is an equivalent stub function. */ | |
126 static gchar *color_to_string(GdkColor *color) | |
127 { | |
128 return g_strdup_printf("#%04X%04X%04X", color->red, color->green, color->blue); | |
129 } | |
130 | |
124 static void write_color_option(FILE *f, gchar *label, GdkColor *color) | 131 static void write_color_option(FILE *f, gchar *label, GdkColor *color) |
125 { | 132 { |
126 if (color) | 133 if (color) |
127 { | 134 { |
128 gchar *colorstring = gdk_color_to_string (color); | 135 gchar *colorstring = color_to_string(color); |
129 | 136 |
130 write_char_option(f, label, colorstring); | 137 write_char_option(f, label, colorstring); |
131 g_free(colorstring); | 138 g_free(colorstring); |
132 } | 139 } |
133 else | 140 else |