[latexila] DocumentTab: rename view property to document_view



commit 6d30023e2c057aaa3c8ad002bf7f6a568db6515a
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jun 23 17:42:51 2017 +0200

    DocumentTab: rename view property to document_view
    
    A preparatory step to use TeplTab, which already contains a :view
    property (but with the type TeplView).

 src/completion.vala            |    2 +-
 src/document.vala              |    2 +-
 src/document_tab.vala          |   14 +++++++-------
 src/main_window.vala           |    8 ++++----
 src/main_window_documents.vala |    2 +-
 src/main_window_edit.vala      |    4 ++--
 src/search.vala                |    4 ++--
 7 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/src/completion.vala b/src/completion.vala
index bf555ab..bac0239 100644
--- a/src/completion.vala
+++ b/src/completion.vala
@@ -496,7 +496,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
         Document doc = iter.get_buffer () as Document;
 
         string cur_indent = Tepl.iter_get_line_indentation (iter);
-        string indent = doc.tab.view.get_indentation_style ();
+        string indent = doc.tab.document_view.get_indentation_style ();
 
         CompletionChoice? env = _environments[env_name];
 
diff --git a/src/document.vala b/src/document.vala
index 5f5e0d1..3ebfb7f 100644
--- a/src/document.vala
+++ b/src/document.vala
@@ -62,7 +62,7 @@ public class Document : Tepl.Buffer
 
         if (tab != null)
         {
-            completion = tab.view.completion;
+            completion = tab.document_view.completion;
             completion.block_interactive ();
         }
 
diff --git a/src/document_tab.vala b/src/document_tab.vala
index 9dff748..1bb30d0 100644
--- a/src/document_tab.vala
+++ b/src/document_tab.vala
@@ -21,7 +21,7 @@ using Gtk;
 
 public class DocumentTab : Grid
 {
-    public DocumentView view { get; private set; }
+    public DocumentView document_view { get; private set; }
     public Document document { get; private set; }
 
     private bool ask_if_externally_modified = false;
@@ -111,7 +111,7 @@ public class DocumentTab : Grid
     public DocumentTab ()
     {
         document = new Document ();
-        view = new DocumentView (document);
+        document_view = new DocumentView (document);
         initialize ();
     }
 
@@ -123,7 +123,7 @@ public class DocumentTab : Grid
 
     public DocumentTab.with_view (DocumentView view)
     {
-        this.view = view;
+        document_view = view;
         document = (Document) view.buffer;
         initialize ();
     }
@@ -150,16 +150,16 @@ public class DocumentTab : Grid
             _label_mark.label = document.get_modified () ? "*" : "";
         });
 
-        view.focus_in_event.connect (view_focused_in);
+        document_view.focus_in_event.connect (view_focused_in);
 
         // with a scrollbar
         ScrolledWindow sw = new ScrolledWindow (null, null);
         sw.overlay_scrolling = false;
 
         if (reparent)
-            view.reparent (sw);
+            document_view.reparent (sw);
         else
-            sw.add (view);
+            sw.add (document_view);
 
         sw.show_all ();
 
@@ -302,7 +302,7 @@ public class DocumentTab : Grid
                 }
 
                 infobar.destroy ();
-                view.grab_focus ();
+                document_view.grab_focus ();
             });
         }
 
diff --git a/src/main_window.vala b/src/main_window.vala
index c68d180..cf73810 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -133,7 +133,7 @@ public class MainWindow : ApplicationWindow
         {
             if (active_tab == null)
                 return null;
-            return active_tab.view;
+            return active_tab.document_view;
         }
     }
 
@@ -615,7 +615,7 @@ public class MainWindow : ApplicationWindow
         for (int i = 0 ; i < nb_documents ; i++)
         {
             DocumentTab tab = _documents_panel.get_nth_page (i) as DocumentTab;
-            all_views.add (tab.view);
+            all_views.add (tab.document_view);
         }
 
         return all_views;
@@ -660,7 +660,7 @@ public class MainWindow : ApplicationWindow
                     if (response_id == ResponseType.YES)
                         tab.document.readonly = false;
                     infobar.destroy ();
-                    tab.view.grab_focus ();
+                    tab.document_view.grab_focus ();
                 });
                 return tab;
             }
@@ -1002,7 +1002,7 @@ public class MainWindow : ApplicationWindow
         // Ensure that the file is fully loaded before selecting the lines.
         Utils.flush_queue ();
 
-        tab.view.select_lines (start_line, end_line);
+        tab.document_view.select_lines (start_line, end_line);
     }
 
     /*************************************************************************/
diff --git a/src/main_window_documents.vala b/src/main_window_documents.vala
index 9c062a7..bbedd5e 100644
--- a/src/main_window_documents.vala
+++ b/src/main_window_documents.vala
@@ -283,7 +283,7 @@ public class MainWindowDocuments
         return_if_fail (_documents_panel != null);
 
         MainWindow new_window = LatexilaApp.get_instance ().create_window ();
-        DocumentView view = tab.view;
+        DocumentView view = tab.document_view;
         _documents_panel.remove_tab (tab);
 
         new_window.create_tab_with_view (view);
diff --git a/src/main_window_edit.vala b/src/main_window_edit.vala
index 97bb89f..d6e5b47 100644
--- a/src/main_window_edit.vala
+++ b/src/main_window_edit.vala
@@ -239,7 +239,7 @@ public class MainWindowEdit
         TextIter end;
         tab.document.get_selection_bounds (out start, out end);
 
-        tab.view.indent_lines (start, end);
+        tab.document_view.indent_lines (start, end);
     }
 
     public void on_unindent ()
@@ -251,7 +251,7 @@ public class MainWindowEdit
         TextIter end;
         tab.document.get_selection_bounds (out start, out end);
 
-        tab.view.unindent_lines (start, end);
+        tab.document_view.unindent_lines (start, end);
     }
 
     public void on_comment ()
diff --git a/src/search.vala b/src/search.vala
index bd50801..5798b25 100644
--- a/src/search.vala
+++ b/src/search.vala
@@ -236,7 +236,7 @@ public class SearchAndReplace : GLib.Object
             if (_search_context.backward2 (iter, out match_start, out match_end, null))
             {
                 doc.select_range (match_start, match_end);
-                doc.tab.view.scroll_to_cursor ();
+                doc.tab.document_view.scroll_to_cursor ();
             }
         });
 
@@ -506,7 +506,7 @@ public class SearchAndReplace : GLib.Object
         if (_search_context.forward2 (iter, out match_start, out match_end, null))
         {
             doc.select_range (match_start, match_end);
-            doc.tab.view.scroll_to_cursor ();
+            doc.tab.document_view.scroll_to_cursor ();
         }
     }
 


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