[latexila/wip/build-tools-revamp] Rename Latexila -> LatexilaApp (in Vala)



commit 40d23c558d13f411f7f720e6fa0aa9661957fabf
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed May 7 14:03:04 2014 +0200

    Rename Latexila -> LatexilaApp (in Vala)
    
    Because there is a conflict with the Latexila namespace used by the
    liblatexila.

 src/Makefile.am                          |    2 +-
 src/app_settings.vala                    |   18 +++++++++---------
 src/completion.vala                      |    2 +-
 src/document.vala                        |    2 +-
 src/{latexila.vala => latexila_app.vala} |    8 ++++----
 src/main.vala                            |    4 ++--
 src/main_window.vala                     |    4 ++--
 src/main_window_build_tools.vala         |    2 +-
 src/main_window_documents.vala           |    2 +-
 src/main_window_file.vala                |    2 +-
 src/projects.vala                        |   10 +++++-----
 src/synctex.vala                         |    4 ++--
 12 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index e6738f1..508fd87 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,7 +31,7 @@ vala_files =                          \
        encodings.vala                  \
        error_entry.vala                \
        file_browser.vala               \
-       latexila.vala                   \
+       latexila_app.vala               \
        latex_menu.vala                 \
        main.vala                       \
        main_window_build_tools.vala    \
diff --git a/src/app_settings.vala b/src/app_settings.vala
index b3e00ff..b519238 100644
--- a/src/app_settings.vala
+++ b/src/app_settings.vala
@@ -76,7 +76,7 @@ public class AppSettings : GLib.Settings
                 Gtk.SourceStyleSchemeManager.get_default ();
             Gtk.SourceStyleScheme scheme = manager.get_scheme (scheme_id);
 
-            foreach (Document doc in Latexila.get_instance ().get_documents ())
+            foreach (Document doc in LatexilaApp.get_instance ().get_documents ())
                 doc.style_scheme = scheme;
 
             // we don't use doc.set_style_scheme_from_string() for performance reason
@@ -87,7 +87,7 @@ public class AppSettings : GLib.Settings
             uint val;
             setting.get (key, "u", out val);
 
-            foreach (DocumentView view in Latexila.get_instance ().get_views ())
+            foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
                 view.tab_width = val;
         });
 
@@ -95,7 +95,7 @@ public class AppSettings : GLib.Settings
         {
             bool val = setting.get_boolean (key);
 
-            foreach (DocumentView view in Latexila.get_instance ().get_views ())
+            foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
                 view.insert_spaces_instead_of_tabs = val;
         });
 
@@ -103,7 +103,7 @@ public class AppSettings : GLib.Settings
         {
             bool val = setting.get_boolean (key);
 
-            foreach (DocumentView view in Latexila.get_instance ().get_views ())
+            foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
                 view.show_line_numbers = val;
         });
 
@@ -111,7 +111,7 @@ public class AppSettings : GLib.Settings
         {
             bool val = setting.get_boolean (key);
 
-            foreach (DocumentView view in Latexila.get_instance ().get_views ())
+            foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
                 view.highlight_current_line = val;
         });
 
@@ -119,7 +119,7 @@ public class AppSettings : GLib.Settings
         {
             bool val = setting.get_boolean (key);
 
-            foreach (Document doc in Latexila.get_instance ().get_documents ())
+            foreach (Document doc in LatexilaApp.get_instance ().get_documents ())
                 doc.highlight_matching_brackets = val;
         });
 
@@ -127,7 +127,7 @@ public class AppSettings : GLib.Settings
         {
             bool val = setting.get_boolean (key);
 
-            foreach (Document doc in Latexila.get_instance ().get_documents ())
+            foreach (Document doc in LatexilaApp.get_instance ().get_documents ())
                 doc.tab.auto_save = val;
         });
 
@@ -136,14 +136,14 @@ public class AppSettings : GLib.Settings
             uint val;
             setting.get (key, "u", out val);
 
-            foreach (Document doc in Latexila.get_instance ().get_documents ())
+            foreach (Document doc in LatexilaApp.get_instance ().get_documents ())
                 doc.tab.auto_save_interval = val;
         });
     }
 
     private void set_font (string font)
     {
-        foreach (DocumentView view in Latexila.get_instance ().get_views ())
+        foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
             view.set_font_from_string (font);
     }
 }
diff --git a/src/completion.vala b/src/completion.vala
index dbb5b27..0021c4f 100644
--- a/src/completion.vala
+++ b/src/completion.vala
@@ -352,7 +352,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
 
         _calltip_window_label.set_markup (markup);
 
-        MainWindow window = Latexila.get_instance ().active_window as MainWindow;
+        MainWindow window = LatexilaApp.get_instance ().active_window as MainWindow;
         _calltip_window.set_transient_for (window);
         _calltip_window.set_attached_to (window.active_view);
 
diff --git a/src/document.vala b/src/document.vala
index 51418cb..e91cdb1 100644
--- a/src/document.vala
+++ b/src/document.vala
@@ -305,7 +305,7 @@ public class Document : Gtk.SourceBuffer
 
         // get all unsaved document numbers
         uint[] all_nums = {};
-        foreach (Document doc in Latexila.get_instance ().get_documents ())
+        foreach (Document doc in LatexilaApp.get_instance ().get_documents ())
         {
             // avoid infinite loop
             if (doc == this)
diff --git a/src/latexila.vala b/src/latexila_app.vala
similarity index 97%
rename from src/latexila.vala
rename to src/latexila_app.vala
index 9704adc..fa6ba35 100644
--- a/src/latexila.vala
+++ b/src/latexila_app.vala
@@ -19,9 +19,9 @@
  * Author: Sébastien Wilmet
  */
 
-public class Latexila : Gtk.Application
+public class LatexilaApp : Gtk.Application
 {
-    public Latexila ()
+    public LatexilaApp ()
     {
         Object (application_id: "org.gnome.latexila");
         Environment.set_application_name (Config.PACKAGE_NAME);
@@ -97,9 +97,9 @@ public class Latexila : Gtk.Application
         });
     }
 
-    public static Latexila get_instance ()
+    public static LatexilaApp get_instance ()
     {
-        return GLib.Application.get_default () as Latexila;
+        return GLib.Application.get_default () as LatexilaApp;
     }
 
     private void init_primary_instance ()
diff --git a/src/main.vala b/src/main.vala
index 5ef897f..821a106 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -94,7 +94,7 @@ private CmdLineData parse_cmd_line_options (string[] args)
         string[] uris = {};
         foreach (string filename in files_list)
         {
-            // Call File.new_for_commandline_arg() here (and not in the Latexila class)
+            // Call File.new_for_commandline_arg() here (and not in the LatexilaApp class)
             // because relative path resolution needs the right current working directory,
             // which can be different for the primary instance.
             File file = File.new_for_commandline_arg (filename);
@@ -113,7 +113,7 @@ int main (string[] args)
 
     CmdLineData data = parse_cmd_line_options (args);
 
-    Latexila app = new Latexila ();
+    LatexilaApp app = new LatexilaApp ();
 
     try
     {
diff --git a/src/main_window.vala b/src/main_window.vala
index d088542..41df680 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -526,7 +526,7 @@ public class MainWindow : Window
         Gtk.drag_dest_add_uri_targets (this);
         drag_data_received.connect ((dc, x, y, selection_data, info, time) =>
         {
-            Latexila app = Latexila.get_instance ();
+            LatexilaApp app = LatexilaApp.get_instance ();
 
             File[] files = {};
             foreach (string uri in selection_data.get_uris ())
@@ -631,7 +631,7 @@ public class MainWindow : Window
     public DocumentTab? open_document (File location, bool jump_to = true)
     {
         /* check if the document is already opened */
-        foreach (Window window in Latexila.get_instance ().get_windows ())
+        foreach (Window window in LatexilaApp.get_instance ().get_windows ())
         {
             MainWindow w = window as MainWindow;
 
diff --git a/src/main_window_build_tools.vala b/src/main_window_build_tools.vala
index 301c83e..2952caf 100644
--- a/src/main_window_build_tools.vala
+++ b/src/main_window_build_tools.vala
@@ -326,7 +326,7 @@ public class MainWindowBuildTools
             // Save all the documents belonging to the project
             else
             {
-                Gee.List<Document> docs = Latexila.get_instance ().get_documents ();
+                Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
                 foreach (Document doc in docs)
                 {
                     if (doc.project_id == project_id)
diff --git a/src/main_window_documents.vala b/src/main_window_documents.vala
index 9642f10..db51603 100644
--- a/src/main_window_documents.vala
+++ b/src/main_window_documents.vala
@@ -282,7 +282,7 @@ public class MainWindowDocuments
         return_if_fail (tab != null);
         return_if_fail (_documents_panel != null);
 
-        MainWindow new_window = Latexila.get_instance ().create_window ();
+        MainWindow new_window = LatexilaApp.get_instance ().create_window ();
         DocumentView view = tab.view;
         _documents_panel.remove_tab (tab);
 
diff --git a/src/main_window_file.vala b/src/main_window_file.vala
index 6d6d210..922d7b6 100644
--- a/src/main_window_file.vala
+++ b/src/main_window_file.vala
@@ -135,7 +135,7 @@ public class MainWindowFile
 
     public void on_new_window ()
     {
-        Latexila.get_instance ().create_window ();
+        LatexilaApp.get_instance ().create_window ();
     }
 
     public void on_file_open ()
diff --git a/src/projects.vala b/src/projects.vala
index 2d61759..a2d3690 100644
--- a/src/projects.vala
+++ b/src/projects.vala
@@ -80,7 +80,7 @@ public class Projects
 
     private void update_all_menus ()
     {
-        foreach (Gtk.Window window in Latexila.get_instance ().get_windows ())
+        foreach (Gtk.Window window in LatexilaApp.get_instance ().get_windows ())
         {
             MainWindow main_window = window as MainWindow;
             main_window.update_config_project_sensitivity ();
@@ -105,7 +105,7 @@ public class Projects
         modified = true;
 
         // find if some opened documents are belonging to the new project
-        Gee.List<Document> docs = Latexila.get_instance ().get_documents ();
+        Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
         foreach (Document doc in docs)
         {
             if (doc.project_id != -1 || doc.location == null)
@@ -136,7 +136,7 @@ public class Projects
         modified = true;
 
         // refresh docs
-        Gee.List<Document> docs = Latexila.get_instance ().get_documents ();
+        Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
         foreach (Document doc in docs)
         {
             if (doc.project_id == num)
@@ -153,7 +153,7 @@ public class Projects
         modified = true;
 
         // refresh docs
-        Gee.List<Document> docs = Latexila.get_instance ().get_documents ();
+        Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
         foreach (Document doc in docs)
         {
             if (doc.project_id == num)
@@ -175,7 +175,7 @@ public class Projects
 
     private void update_all_documents ()
     {
-        Gee.List<Document> docs = Latexila.get_instance ().get_documents ();
+        Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
         foreach (Document doc in docs)
         {
             doc.project_id = -1;
diff --git a/src/synctex.vala b/src/synctex.vala
index eeceea5..7ed4665 100644
--- a/src/synctex.vala
+++ b/src/synctex.vala
@@ -116,7 +116,7 @@ public class Synctex : Object
 
     private void show_warning (string message)
     {
-        MainWindow main_window = Latexila.get_instance ().active_window as MainWindow;
+        MainWindow main_window = LatexilaApp.get_instance ().active_window as MainWindow;
 
         MessageDialog dialog = new MessageDialog (main_window,
             DialogFlags.DESTROY_WITH_PARENT,
@@ -256,7 +256,7 @@ public class Synctex : Object
                 return;
             }
 
-            MainWindow main_window = Latexila.get_instance ().active_window as MainWindow;
+            MainWindow main_window = LatexilaApp.get_instance ().active_window as MainWindow;
             main_window.jump_to_file_position (tex_file, pos.line - 1, pos.line);
             main_window.present_with_time (timestamp);
         });


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