[latexila/wip/build-tools-revamp: 6/9] BuildView: replace home dir with tilde in the path



commit 18ab68a84558a61ce5f8bf33c73a386e12a1b38d
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed May 7 23:14:50 2014 +0200

    BuildView: replace home dir with tilde in the path

 src/liblatexila/latexila-build-view.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/liblatexila/latexila-build-view.c b/src/liblatexila/latexila-build-view.c
index 78e496c..4b32332 100644
--- a/src/liblatexila/latexila-build-view.c
+++ b/src/liblatexila/latexila-build-view.c
@@ -27,6 +27,7 @@
  */
 
 #include "latexila-build-view.h"
+#include "latexila-utils.h"
 #include "latexila-enum-types.h"
 
 struct _LatexilaBuildViewPrivate
@@ -624,12 +625,13 @@ latexila_build_view_append_single_message (LatexilaBuildView *build_view,
 
   if (message->filename != NULL)
     {
+      gchar *filename_with_tilde;
+
       file = g_file_new_for_path (message->filename);
 
-      /* TODO implement and call latexila_utils_replace_home_dir_with_tilde() on
-       * the path. See if gedit has already this function in C.
-       */
-      path = g_markup_escape_text (message->filename, -1);
+      filename_with_tilde = latexila_utils_replace_home_dir_with_tilde (message->filename);
+      path = g_markup_escape_text (filename_with_tilde, -1);
+      g_free (filename_with_tilde);
 
       basename = g_file_get_basename (file);
     }


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