[latexila] Escape tooltip text



commit 23bdc86e6b040d79c23a447f749263fda71ce480
Author: SÃbastien Wilmet <swilmet src gnome org>
Date:   Fri Jul 29 22:40:06 2011 +0200

    Escape tooltip text
    
    When we use TreeView.set_tooltip_column (), we must escape the text
    because GTK+ use "markup" internally.

 src/build_view.vala         |    3 +++
 src/preferences_dialog.vala |    8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/build_view.vala b/src/build_view.vala
index 2a7e2cb..1ff2f6b 100644
--- a/src/build_view.vala
+++ b/src/build_view.vala
@@ -281,6 +281,9 @@ public class BuildView : HBox
             {
                 file = File.new_for_path (issue.filename);
                 path = Utils.replace_home_dir_with_tilde (issue.filename);
+
+                // the path is displayed in a tooltip
+                path = Markup.escape_text (path);
             }
 
             TreeIter iter;
diff --git a/src/preferences_dialog.vala b/src/preferences_dialog.vala
index 8c4411a..dc1f290 100644
--- a/src/preferences_dialog.vala
+++ b/src/preferences_dialog.vala
@@ -273,14 +273,14 @@ public class PreferencesDialog : Dialog
             SettingsBindFlags.DEFAULT);
 
         var interactive_comp_spinbutton =
-            (Widget) builder.get_object ("interactive_comp_spinbutton");
+            builder.get_object ("interactive_comp_spinbutton") as Widget;
         settings.bind ("interactive-completion-num", interactive_comp_spinbutton, "value",
             SettingsBindFlags.DEFAULT);
         set_sensitivity (settings, "interactive-completion",
             interactive_comp_spinbutton);
 
         Label interactive_comp_label =
-            (Label) builder.get_object ("interactive_comp_label");
+            builder.get_object ("interactive_comp_label") as Label;
         set_plural (interactive_comp_label, settings, "interactive-completion-num",
             (n) => ngettext ("character", "characters", n));
 
@@ -292,7 +292,7 @@ public class PreferencesDialog : Dialog
         settings.bind ("latexmk-always-show-all", latexmk_checkbutton, "active",
             SettingsBindFlags.DEFAULT);
 
-        var build_tools_view = (TreeView) builder.get_object ("build_tools_treeview");
+        var build_tools_view = builder.get_object ("build_tools_treeview") as TreeView;
         init_build_tools_treeview (build_tools_view);
 
         Button bt_properties = builder.get_object ("build_tool_properties") as Button;
@@ -624,7 +624,7 @@ public class PreferencesDialog : Dialog
                 BuildToolColumn.SHOW, tool.show,
                 BuildToolColumn.PIXBUF, tool.icon,
                 BuildToolColumn.LABEL, tool.label,
-                BuildToolColumn.DESCRIPTION, tool.description,
+                BuildToolColumn.DESCRIPTION, Markup.escape_text (tool.description),
                 -1);
         }
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]