Commit c380d2ee authored by Sébastien Wilmet's avatar Sébastien Wilmet

Rename to GNOME LaTeX: rename class LatexilaApp -> GlatexApp

parent 7cfcb92e
......@@ -23,7 +23,7 @@ src/encodings.vala
src/error_entry.vala
src/file_browser.vala
src/finance.vala
src/latexila_app.vala
src/glatex_app.vala
src/latex_menu.vala
src/liblatexila/dh-dconf-migration.c
src/liblatexila/latexila-build-job.c
......
......@@ -18,7 +18,7 @@ src/encodings.c
src/error_entry.c
src/file_browser.c
src/finance.c
src/latexila_app.c
src/glatex_app.c
src/latex_menu.c
src/main.c
src/main_window_build_tools.c
......
......@@ -40,7 +40,7 @@ vala_files = \
factory.vala \
file_browser.vala \
finance.vala \
latexila_app.vala \
glatex_app.vala \
latex_menu.vala \
main.vala \
main_window_build_tools.vala \
......
......@@ -73,7 +73,7 @@ public class AppSettings : GLib.Settings
uint val;
setting.get (key, "u", out val);
foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
foreach (DocumentView view in GlatexApp.get_instance ().get_views ())
view.tab_width = val;
});
......@@ -81,7 +81,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
foreach (DocumentView view in GlatexApp.get_instance ().get_views ())
view.insert_spaces_instead_of_tabs = val;
});
......@@ -89,7 +89,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
foreach (DocumentView view in GlatexApp.get_instance ().get_views ())
view.show_line_numbers = val;
});
......@@ -97,7 +97,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
foreach (DocumentView view in GlatexApp.get_instance ().get_views ())
view.highlight_current_line = val;
});
......@@ -105,7 +105,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
foreach (Document doc in LatexilaApp.get_instance ().get_documents ())
foreach (Document doc in GlatexApp.get_instance ().get_documents ())
doc.highlight_matching_brackets = val;
});
......@@ -113,7 +113,7 @@ public class AppSettings : GLib.Settings
{
bool val = setting.get_boolean (key);
foreach (Document doc in LatexilaApp.get_instance ().get_documents ())
foreach (Document doc in GlatexApp.get_instance ().get_documents ())
doc.tab.auto_save = val;
});
......@@ -122,14 +122,14 @@ public class AppSettings : GLib.Settings
uint val;
setting.get (key, "u", out val);
foreach (Document doc in LatexilaApp.get_instance ().get_documents ())
foreach (Document doc in GlatexApp.get_instance ().get_documents ())
doc.tab.auto_save_interval = val;
});
}
private void set_font (string font)
{
foreach (DocumentView view in LatexilaApp.get_instance ().get_views ())
foreach (DocumentView view in GlatexApp.get_instance ().get_views ())
view.set_font_from_string (font);
}
}
......@@ -371,7 +371,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
_calltip_window_label.set_markup (markup);
MainWindow? window = LatexilaApp.get_instance ().get_active_main_window ();
MainWindow? window = GlatexApp.get_instance ().get_active_main_window ();
return_if_fail (window != null);
_calltip_window.set_transient_for (window);
......
......@@ -25,8 +25,8 @@ public class Factory : Tepl.AbstractFactoryVala
public override Gtk.ApplicationWindow? create_main_window_vala (Gtk.Application gtk_app)
{
return_val_if_fail (gtk_app is LatexilaApp, null);
LatexilaApp app = gtk_app as LatexilaApp;
return_val_if_fail (gtk_app is GlatexApp, null);
GlatexApp app = gtk_app as GlatexApp;
MainWindow? active_main_window = app.get_active_main_window ();
if (active_main_window != null)
......@@ -41,7 +41,7 @@ public class Factory : Tepl.AbstractFactoryVala
return new_window;
}
private void reopen_files (LatexilaApp app)
private void reopen_files (GlatexApp app)
{
GLib.Settings editor_settings =
new GLib.Settings ("org.gnome.gnome-latex.preferences.editor");
......
......@@ -19,7 +19,7 @@
* Author: Sébastien Wilmet
*/
public class LatexilaApp : Gtk.Application
public class GlatexApp : Gtk.Application
{
static Gtk.CssProvider? _provider = null;
......@@ -34,7 +34,7 @@ public class LatexilaApp : Gtk.Application
{ "quit", quit_cb }
};
public LatexilaApp ()
public GlatexApp ()
{
Object (application_id: "org.gnome.gnome-latex");
set_flags (ApplicationFlags.HANDLES_OPEN);
......@@ -51,9 +51,9 @@ public class LatexilaApp : Gtk.Application
tepl_app.handle_activate ();
}
public static LatexilaApp get_instance ()
public static GlatexApp get_instance ()
{
return GLib.Application.get_default () as LatexilaApp;
return GLib.Application.get_default () as GlatexApp;
}
public MainWindow? get_active_main_window ()
......
......@@ -36,7 +36,7 @@ int main (string[] argv)
Factory factory = new Factory ();
factory.set_singleton_vala ();
LatexilaApp app = new LatexilaApp ();
GlatexApp app = new GlatexApp ();
int status = app.run (argv);
Tepl.finalize ();
......
......@@ -149,7 +149,7 @@ public class MainWindow : ApplicationWindow
/*************************************************************************/
// Construction
public MainWindow (LatexilaApp app)
public MainWindow (GlatexApp app)
{
Object (application: app);
......@@ -347,7 +347,7 @@ public class MainWindow : ApplicationWindow
add_accel_group (_ui_manager.get_accel_group ());
LatexilaApp app = LatexilaApp.get_instance ();
GlatexApp app = GlatexApp.get_instance ();
Amtk.utils_bind_g_action_to_gtk_action (app, "quit",
_action_group, "FileQuit");
Amtk.utils_bind_g_action_to_gtk_action (app, "help",
......@@ -537,7 +537,7 @@ public class MainWindow : ApplicationWindow
Gtk.drag_dest_add_uri_targets (this);
drag_data_received.connect ((dc, x, y, selection_data, info, time) =>
{
LatexilaApp app = LatexilaApp.get_instance ();
GlatexApp app = GlatexApp.get_instance ();
File[] files = {};
foreach (string uri in selection_data.get_uris ())
......@@ -626,7 +626,7 @@ public class MainWindow : ApplicationWindow
public DocumentTab? open_document (File location, bool jump_to = true)
{
/* check if the document is already opened */
foreach (Window window in LatexilaApp.get_instance ().get_windows ())
foreach (Window window in GlatexApp.get_instance ().get_windows ())
{
if (!(window is MainWindow))
continue;
......
......@@ -82,7 +82,7 @@ public class MainWindowBuildTools
ui_manager.insert_action_group (_static_action_group, 0);
LatexilaApp app = LatexilaApp.get_instance ();
GlatexApp app = GlatexApp.get_instance ();
Amtk.utils_bind_g_action_to_gtk_action (app, "manage-build-tools",
_static_action_group, "BuildToolsPreferences");
......@@ -128,7 +128,7 @@ public class MainWindowBuildTools
Gtk.Action stop_exec_action = _static_action_group.get_action ("BuildStopExecution");
stop_exec_action.set_sensitive (build_tool_is_running);
LatexilaApp app = LatexilaApp.get_instance ();
GlatexApp app = GlatexApp.get_instance ();
GLib.SimpleAction preferences_action = app.lookup_action ("manage-build-tools")
as GLib.SimpleAction;
......@@ -374,7 +374,7 @@ public class MainWindowBuildTools
// Save all the documents belonging to the project
else
{
Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
Gee.List<Document> docs = GlatexApp.get_instance ().get_documents ();
foreach (Document doc in docs)
{
if (doc.project_id == project_id)
......
......@@ -283,7 +283,7 @@ public class MainWindowDocuments
return_if_fail (tab != null);
return_if_fail (_documents_panel != null);
MainWindow new_window = LatexilaApp.get_instance ().create_window ();
MainWindow new_window = GlatexApp.get_instance ().create_window ();
DocumentView view = tab.document_view;
_documents_panel.remove_tab (tab);
......
......@@ -88,7 +88,7 @@ public class MainWindowEdit
ui_manager.insert_action_group (_action_group, 0);
LatexilaApp app = LatexilaApp.get_instance ();
GlatexApp app = GlatexApp.get_instance ();
Amtk.utils_bind_g_action_to_gtk_action (main_window, "tepl-undo",
_action_group, "EditUndo");
......
......@@ -73,7 +73,7 @@ public class MainWindowFile
ui_manager.insert_action_group (_action_group, 0);
LatexilaApp app = LatexilaApp.get_instance ();
GlatexApp app = GlatexApp.get_instance ();
Amtk.utils_bind_g_action_to_gtk_action (app, "tepl-new-window",
_action_group, "FileNewWindow");
}
......
......@@ -80,7 +80,7 @@ public class Projects
private void update_all_menus ()
{
foreach (Gtk.Window window in LatexilaApp.get_instance ().get_windows ())
foreach (Gtk.Window window in GlatexApp.get_instance ().get_windows ())
{
if (window is MainWindow)
{
......@@ -108,7 +108,7 @@ public class Projects
modified = true;
// find if some opened documents are belonging to the new project
Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
Gee.List<Document> docs = GlatexApp.get_instance ().get_documents ();
foreach (Document doc in docs)
{
if (doc.project_id != -1 || doc.location == null)
......@@ -139,7 +139,7 @@ public class Projects
modified = true;
// refresh docs
Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
Gee.List<Document> docs = GlatexApp.get_instance ().get_documents ();
foreach (Document doc in docs)
{
if (doc.project_id == num)
......@@ -156,7 +156,7 @@ public class Projects
modified = true;
// refresh docs
Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
Gee.List<Document> docs = GlatexApp.get_instance ().get_documents ();
foreach (Document doc in docs)
{
if (doc.project_id == num)
......@@ -178,7 +178,7 @@ public class Projects
private void update_all_documents ()
{
Gee.List<Document> docs = LatexilaApp.get_instance ().get_documents ();
Gee.List<Document> docs = GlatexApp.get_instance ().get_documents ();
foreach (Document doc in docs)
{
doc.project_id = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment