X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fdict-display.c;h=a8e9237a7edbb38c065e5d2c0f52dc6064fef862;hb=f463d854c12bda4f9f12f798ba12d3ea88c3a9ed;hp=d665edd62be1872f5cede3a2515f791344145e1f;hpb=89ca2311946d399ae677478b78861cfbf63893bc;p=pspp-builds.git diff --git a/src/ui/gui/dict-display.c b/src/ui/gui/dict-display.c index d665edd6..a8e9237a 100644 --- a/src/ui/gui/dict-display.c +++ b/src/ui/gui/dict-display.c @@ -24,6 +24,7 @@ #include "psppire-dict.h" #include "helper.h" #include +#include #define _(msgid) gettext (msgid) #define N_(msgid) msgid @@ -135,7 +136,7 @@ var_description_cell_data_func (GtkTreeViewColumn *col, if ( var_has_label (var)) { - gchar *text = g_strdup_printf ( + gchar *text = g_markup_printf_escaped ( "%s", var_get_label (var)); @@ -153,6 +154,7 @@ var_description_cell_data_func (GtkTreeViewColumn *col, } +#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, @@ -170,6 +172,7 @@ 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); @@ -198,6 +201,7 @@ set_tooltip_for_variable (GtkTreeView *treeview, return TRUE; } +#endif /* Sets up TREEVIEW to display the variables of DICT. MODE is the selection mode for TREEVIEW. @@ -268,7 +272,9 @@ attach_dictionary_to_treeview (GtkTreeView *treeview, PsppireDict *dict, 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 }