summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2012-10-20 02:31:07 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-19 21:14:15 -0700
commit55f08bfeab68fd0cb6dbdd87964051b6273f0c35 (patch)
tree4a495f310bf952f774c6f6e0bee6a73d97309dbb /divelist.c
parent5b3e480be3c61ea790ee2a39727ffad1c3487178 (diff)
downloadsubsurface-55f08bfeab68fd0cb6dbdd87964051b6273f0c35.tar.gz
Use subsurface_os_feature_available() to check for unicode stars support
Mainly affecting older Windows (such as XP), which do not have a more fully featured unicode fonts installed, such as Arial Unicode MS. With this patch we do a runtime check of the OS version in a couple of places and if the OS is old, we use the asterix character and spaces instead of the unicode star characters. Linux and OSX should be unaffected by this change unless subsurface_os_feature_available() returns FALSE for UTF8_FONT_WITH_STARS at some point. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/divelist.c b/divelist.c
index 274773da4..3e1e94dbf 100644
--- a/divelist.c
+++ b/divelist.c
@@ -2280,6 +2280,10 @@ GtkWidget *dive_list_create(void)
gtk_tree_selection_set_mode(GTK_TREE_SELECTION(selection), GTK_SELECTION_MULTIPLE);
gtk_widget_set_size_request(dive_list.tree_view, 200, 200);
+ /* check if utf8 stars are available as a default OS feature */
+ if (!subsurface_os_feature_available(UTF8_FONT_WITH_STARS))
+ dl_column[3].header = "*";
+
dive_list.nr = divelist_column(&dive_list, dl_column + DIVE_NR);
dive_list.date = divelist_column(&dive_list, dl_column + DIVE_DATE);
dive_list.stars = divelist_column(&dive_list, dl_column + DIVE_RATING);