[gnome-games/wip/exalm/runner-refactor: 12/58] runner: Rename try_init_phase_one() to prepare()



commit 0d55a0fb3f641a3a4c4534780e0c123d058764b3
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Mar 6 15:27:14 2020 +0500

    runner: Rename try_init_phase_one() to prepare()

 src/command/command-runner.vala | 2 +-
 src/core/runner.vala            | 2 +-
 src/retro/retro-runner.vala     | 2 +-
 src/ui/display-view.vala        | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/command/command-runner.vala b/src/command/command-runner.vala
index bcd07647..3e4813bb 100644
--- a/src/command/command-runner.vala
+++ b/src/command/command-runner.vala
@@ -32,7 +32,7 @@ public class Games.CommandRunner : Object, Runner {
                this.args = args;
        }
 
-       public void try_init_phase_one () throws RunnerError {
+       public void prepare () throws RunnerError {
                if (args.length <= 0)
                        throw new RunnerError.INVALID_GAME (_("The game doesn’t have a valid command."));
        }
diff --git a/src/core/runner.vala b/src/core/runner.vala
index 55a934ef..6a2da325 100644
--- a/src/core/runner.vala
+++ b/src/core/runner.vala
@@ -15,7 +15,7 @@ public interface Games.Runner : Object {
        public abstract Gtk.Widget get_display ();
        public abstract HeaderBarWidget? get_extra_widget ();
 
-       public abstract void try_init_phase_one () throws RunnerError;
+       public abstract void prepare () throws RunnerError;
        public abstract void start () throws Error;
        public abstract void restart ();
        public abstract void resume ();
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 9e531026..2785eee1 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -114,7 +114,7 @@ public class Games.RetroRunner : Object, Runner {
                return _("The system isn’t supported yet, but full support is planned.");
        }
 
-       public void try_init_phase_one () throws RunnerError {
+       public void prepare () throws RunnerError {
                try {
                        init_phase_one ();
                // TODO: Check for the two RetroErrors using RetroCoreManager
diff --git a/src/ui/display-view.vala b/src/ui/display-view.vala
index be1dc7e8..efd267a5 100644
--- a/src/ui/display-view.vala
+++ b/src/ui/display-view.vala
@@ -360,7 +360,7 @@ private class Games.DisplayView : Object, UiView {
                }
 
                try {
-                       runner.try_init_phase_one ();
+                       runner.prepare ();
                }
                catch (RunnerError e) {
                        reset_display_page ();


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