#include "psppire-dict.h"
#include "helper.h"
#include <data/variable.h>
+#include <data/format.h>
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
if ( var_has_label (var))
{
- gchar *text = g_strdup_printf (
+ gchar *text = g_markup_printf_escaped (
"<span stretch=\"condensed\">%s</span>",
var_get_label (var));
}
+#if GTK_CHECK_VERSION (2, 12, 0)
/* Sets the tooltip to be the name of the variable under the cursor */
static gboolean
set_tooltip_for_variable (GtkTreeView *treeview,
struct variable *var = NULL;
gboolean ok;
+
gtk_tree_view_convert_widget_to_bin_window_coords (treeview,
x, y, &bx, &by);
return TRUE;
}
+#endif
/* Sets up TREEVIEW to display the variables of DICT.
MODE is the selection mode for TREEVIEW.
g_object_set (treeview, "has-tooltip", TRUE, NULL);
+#if GTK_CHECK_VERSION (2, 12, 0)
g_signal_connect (treeview, "query-tooltip", G_CALLBACK (set_tooltip_for_variable), NULL);
+#endif
}