[latexila] Rename Application -> Latexila
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Rename Application -> Latexila
- Date: Tue, 27 Dec 2011 10:17:41 +0000 (UTC)
commit 986a59f4eea146274413a84a76802fb1bbf620ac
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Tue Dec 27 11:16:53 2011 +0100
Rename Application -> Latexila
There is a conflict with Gtk.Application, for the GTK+ 3 migration.
src/app_settings.vala | 18 +++++++++---------
src/build_tools.vala | 2 +-
src/completion.vala | 4 ++--
src/document.vala | 2 +-
src/{application.vala => latexila.vala} | 14 +++++++-------
src/main.vala | 6 +++---
src/main_window.vala | 10 +++++-----
src/projects.vala | 10 +++++-----
8 files changed, 33 insertions(+), 33 deletions(-)
---
diff --git a/src/app_settings.vala b/src/app_settings.vala
index db2035f..05b3c46 100644
--- a/src/app_settings.vala
+++ b/src/app_settings.vala
@@ -84,7 +84,7 @@ public class AppSettings : GLib.Settings
Gtk.SourceStyleSchemeManager.get_default ();
Gtk.SourceStyleScheme scheme = manager.get_scheme (scheme_id);
- foreach (Document doc in Application.get_default ().get_documents ())
+ foreach (Document doc in Latexila.get_default ().get_documents ())
doc.style_scheme = scheme;
// we don't use doc.set_style_scheme_from_string() for performance reason
@@ -95,7 +95,7 @@ public class AppSettings : GLib.Settings
uint val;
setting.get (key, "u", out val);
- foreach (DocumentView view in Application.get_default ().get_views ())
+ foreach (DocumentView view in Latexila.get_default ().get_views ())
view.tab_width = val;
});
@@ -103,7 +103,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
- foreach (DocumentView view in Application.get_default ().get_views ())
+ foreach (DocumentView view in Latexila.get_default ().get_views ())
view.insert_spaces_instead_of_tabs = val;
});
@@ -111,7 +111,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
- foreach (DocumentView view in Application.get_default ().get_views ())
+ foreach (DocumentView view in Latexila.get_default ().get_views ())
view.show_line_numbers = val;
});
@@ -119,7 +119,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
- foreach (DocumentView view in Application.get_default ().get_views ())
+ foreach (DocumentView view in Latexila.get_default ().get_views ())
view.highlight_current_line = val;
});
@@ -127,7 +127,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
- foreach (Document doc in Application.get_default ().get_documents ())
+ foreach (Document doc in Latexila.get_default ().get_documents ())
doc.highlight_matching_brackets = val;
});
@@ -135,7 +135,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
- foreach (Document doc in Application.get_default ().get_documents ())
+ foreach (Document doc in Latexila.get_default ().get_documents ())
doc.tab.auto_save = val;
});
@@ -144,7 +144,7 @@ public class AppSettings : GLib.Settings
uint val;
setting.get (key, "u", out val);
- foreach (Document doc in Application.get_default ().get_documents ())
+ foreach (Document doc in Latexila.get_default ().get_documents ())
doc.tab.auto_save_interval = val;
});
@@ -163,7 +163,7 @@ public class AppSettings : GLib.Settings
private void set_font (string font)
{
- foreach (DocumentView view in Application.get_default ().get_views ())
+ foreach (DocumentView view in Latexila.get_default ().get_views ())
view.set_font_from_string (font);
}
}
diff --git a/src/build_tools.vala b/src/build_tools.vala
index 3785008..75eae5f 100644
--- a/src/build_tools.vala
+++ b/src/build_tools.vala
@@ -231,7 +231,7 @@ public class BuildTools
private void update_all_menus ()
{
_modified = true;
- foreach (MainWindow window in Application.get_default ().windows)
+ foreach (MainWindow window in Latexila.get_default ().windows)
window.update_build_tools_menu ();
}
diff --git a/src/completion.vala b/src/completion.vala
index c4cce58..6d7cdf0 100644
--- a/src/completion.vala
+++ b/src/completion.vala
@@ -405,7 +405,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
private void init_calltip_window ()
{
- Application app = Application.get_default ();
+ Latexila app = Latexila.get_default ();
_calltip_window = new SourceCompletionInfo ();
_calltip_window.set_transient_for (app.active_window);
_calltip_window.set_sizing (800, 200, true, true);
@@ -418,7 +418,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
if (_calltip_window == null)
init_calltip_window ();
- MainWindow win = Application.get_default ().active_window;
+ MainWindow win = Latexila.get_default ().active_window;
// calltip at a fixed place (after the '{' or '[' of the current arg)
TextIter pos;
diff --git a/src/document.vala b/src/document.vala
index 8f30f27..abf9234 100644
--- a/src/document.vala
+++ b/src/document.vala
@@ -328,7 +328,7 @@ public class Document : Gtk.SourceBuffer
// get all unsaved document numbers
uint[] all_nums = {};
- foreach (Document doc in Application.get_default ().get_documents ())
+ foreach (Document doc in Latexila.get_default ().get_documents ())
{
// avoid infinite loop
if (doc == this)
diff --git a/src/application.vala b/src/latexila.vala
similarity index 98%
rename from src/application.vala
rename to src/latexila.vala
index cda1ba5..f558fd1 100644
--- a/src/application.vala
+++ b/src/latexila.vala
@@ -17,7 +17,7 @@
* along with LaTeXila. If not, see <http://www.gnu.org/licenses/>.
*/
-public class Application : GLib.Object
+public class Latexila : GLib.Object
{
struct StockIcon
{
@@ -119,14 +119,14 @@ public class Application : GLib.Object
};
public static int NEW_WINDOW = 1;
- private static Application instance = null;
+ private static Latexila instance = null;
public unowned List<MainWindow> windows { get; private set; }
public MainWindow active_window { get; private set; }
- /* Application is a singleton
- * We must use Application.get_default ()
+ /* Latexila is a singleton
+ * We must use Latexila.get_default ()
*/
- private Application ()
+ private Latexila ()
{
windows = new List<MainWindow> ();
@@ -175,10 +175,10 @@ public class Application : GLib.Object
create_window ();
}
- public static Application get_default ()
+ public static Latexila get_default ()
{
if (instance == null)
- instance = new Application ();
+ instance = new Latexila ();
return instance;
}
diff --git a/src/main.vala b/src/main.vala
index e5460bb..1db53f4 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -111,7 +111,7 @@ int main (string[] args)
}
Unique.App app = new Unique.App ("org.gnome.latexila", null);
- app.add_command ("new_window", Application.NEW_WINDOW);
+ app.add_command ("new_window", Latexila.NEW_WINDOW);
if (app.is_running)
{
@@ -119,7 +119,7 @@ int main (string[] args)
bool ok = true;
if (option_new_window)
{
- Unique.Response resp = app.send_message (Application.NEW_WINDOW, null);
+ Unique.Response resp = app.send_message (Latexila.NEW_WINDOW, null);
ok = resp == Unique.Response.OK;
}
if (ok && command_open)
@@ -146,7 +146,7 @@ int main (string[] args)
/* start a new application */
else
{
- Application latexila = Application.get_default ();
+ Latexila latexila = Latexila.get_default ();
/* reopen files on startup */
GLib.Settings editor_settings =
diff --git a/src/main_window.vala b/src/main_window.vala
index d7d2560..e2bbb0d 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -432,7 +432,7 @@ public class MainWindow : Window
Gtk.drag_dest_add_uri_targets (this);
drag_data_received.connect ((dc, x, y, selection_data, info, time) =>
{
- Application app = Application.get_default ();
+ Latexila app = Latexila.get_default ();
app.open_documents (selection_data.get_uris ());
Gtk.drag_finish (dc, true, true, time);
});
@@ -693,7 +693,7 @@ public class MainWindow : Window
public DocumentTab? open_document (File location, bool jump_to = true)
{
/* check if the document is already opened */
- foreach (MainWindow w in Application.get_default ().windows)
+ foreach (MainWindow w in Latexila.get_default ().windows)
{
foreach (Document doc in w.get_documents ())
{
@@ -1173,7 +1173,7 @@ public class MainWindow : Window
private void move_tab_to_new_window (DocumentTab tab)
{
- MainWindow new_window = Application.get_default ().create_window ();
+ MainWindow new_window = Latexila.get_default ().create_window ();
DocumentView view = tab.view;
documents_panel.remove_tab (tab);
@@ -1256,7 +1256,7 @@ public class MainWindow : Window
// save all the documents belonging to the project
else
{
- List<Document> docs = Application.get_default ().get_documents ();
+ List<Document> docs = Latexila.get_default ().get_documents ();
foreach (Document doc in docs)
{
if (doc.project_id == project_id)
@@ -1485,7 +1485,7 @@ public class MainWindow : Window
public void on_new_window ()
{
- Application.get_default ().create_window ();
+ Latexila.get_default ().create_window ();
}
public void on_file_open ()
diff --git a/src/projects.vala b/src/projects.vala
index dd90515..8ee474e 100644
--- a/src/projects.vala
+++ b/src/projects.vala
@@ -80,7 +80,7 @@ public class Projects
private void update_all_menus ()
{
- foreach (MainWindow window in Application.get_default ().windows)
+ foreach (MainWindow window in Latexila.get_default ().windows)
window.update_config_project_sensitivity ();
}
@@ -102,7 +102,7 @@ public class Projects
modified = true;
// find if some opened documents are belonging to the new project
- GLib.List<Document> docs = Application.get_default ().get_documents ();
+ GLib.List<Document> docs = Latexila.get_default ().get_documents ();
foreach (Document doc in docs)
{
if (doc.project_id != -1)
@@ -133,7 +133,7 @@ public class Projects
modified = true;
// refresh docs
- GLib.List<Document> docs = Application.get_default ().get_documents ();
+ GLib.List<Document> docs = Latexila.get_default ().get_documents ();
foreach (Document doc in docs)
{
if (doc.project_id == num)
@@ -150,7 +150,7 @@ public class Projects
modified = true;
// refresh docs
- GLib.List<Document> docs = Application.get_default ().get_documents ();
+ GLib.List<Document> docs = Latexila.get_default ().get_documents ();
foreach (Document doc in docs)
{
if (doc.project_id == num)
@@ -172,7 +172,7 @@ public class Projects
private void update_all_documents ()
{
- GLib.List<Document> docs = Application.get_default ().get_documents ();
+ GLib.List<Document> docs = Latexila.get_default ().get_documents ();
foreach (Document doc in docs)
{
doc.project_id = -1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]