[gnome-latex] Factory: subclass TeplAbstractFactory, not TeplAbstractFactoryVala



commit 18a2946c9214211562b08324fe9b7744fd3799ca
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Apr 19 13:47:14 2020 +0200

    Factory: subclass TeplAbstractFactory, not TeplAbstractFactoryVala

 src/factory.vala | 8 ++++----
 src/main.vala    | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/factory.vala b/src/factory.vala
index 3928f26..bdc860c 100644
--- a/src/factory.vala
+++ b/src/factory.vala
@@ -1,7 +1,7 @@
 /*
  * This file is part of GNOME LaTeX.
  *
- * Copyright © 2017 Sébastien Wilmet
+ * Copyright © 2017-2020 Sébastien Wilmet
  *
  * GNOME LaTeX is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,13 +17,13 @@
  * along with GNOME LaTeX.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-public class Factory : Tepl.AbstractFactoryVala
+public class Factory : Tepl.AbstractFactory
 {
     public Factory ()
     {
     }
 
-    public override Gtk.ApplicationWindow? create_main_window_vala (Gtk.Application gtk_app)
+    public override unowned Gtk.ApplicationWindow? create_main_window (Gtk.Application gtk_app)
     {
         return_val_if_fail (gtk_app is GlatexApp, null);
         GlatexApp app = gtk_app as GlatexApp;
@@ -38,7 +38,7 @@ public class Factory : Tepl.AbstractFactoryVala
         if (first_window)
             reopen_files (app);
 
-        return new_window;
+        return new_window.ref () as MainWindow;
     }
 
     private void reopen_files (GlatexApp app)
diff --git a/src/main.vala b/src/main.vala
index c24fe03..820d25e 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -34,7 +34,7 @@ int main (string[] argv)
 
     Tepl.init ();
     Factory factory = new Factory ();
-    factory.set_singleton_vala ();
+    factory.set_singleton ();
 
     GlatexApp app = new GlatexApp ();
     int status = app.run (argv);


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