Convert variable name to utf8 before displaying in tooltips
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 4 Mar 2009 01:15:18 +0000 (10:15 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 4 Mar 2009 01:15:18 +0000 (10:15 +0900)
src/ui/gui/dict-display.c

index 356758beeea4100c4f4f1fd3feeaae71ebeb2fb4..63d9f3c914b0280366a09378ccd6ec2e63d49579 100644 (file)
@@ -197,7 +197,13 @@ set_tooltip_for_variable (GtkTreeView  *treeview,
   if ( ! var_has_label (var))
     return FALSE;
 
-  gtk_tooltip_set_text (tooltip, var_get_name (var));
+  {
+    char *name = pspp_locale_to_utf8 (var_get_name (var), -1, NULL);
+
+    gtk_tooltip_set_text (tooltip, name);
+
+    g_free (name);
+  }
 
   return TRUE;
 }