[latexila] Use tepl_file_is_local()



commit 58bf747b4df3843448390c57264b2c6e53e83993
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Aug 6 15:47:37 2017 +0200

    Use tepl_file_is_local()

 src/document.vala     |    7 -------
 src/document_tab.vala |    2 +-
 2 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/src/document.vala b/src/document.vala
index 89ddae2..9da254f 100644
--- a/src/document.vala
+++ b/src/document.vala
@@ -345,13 +345,6 @@ public class Document : Tepl.Buffer
         return num;
     }
 
-    public bool is_local ()
-    {
-        if (location == null)
-            return false;
-        return location.has_uri_scheme ("file");
-    }
-
     public bool is_externally_modified ()
     {
         if (location == null)
diff --git a/src/document_tab.vala b/src/document_tab.vala
index 9e77f6e..41978e5 100644
--- a/src/document_tab.vala
+++ b/src/document_tab.vala
@@ -249,7 +249,7 @@ public class DocumentTab : Tepl.Tab
             return false;
 
         // if file was never saved or is remote we do not check
-        if (! document.is_local ())
+        if (! get_buffer ().get_file ().is_local ())
             return false;
 
         if (document.is_externally_modified ())


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