[gnome-games] runner: Don't throw Errors from resume()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] runner: Don't throw Errors from resume()
- Date: Fri, 9 Aug 2019 13:39:33 +0000 (UTC)
commit ecbcd324d03d16467e6fb080b350125e88538e04
Author: Yetizone <andreii lisita gmail com>
Date: Thu Aug 8 12:29:29 2019 +0300
runner: Don't throw Errors from resume()
src/command/command-runner.vala | 2 +-
src/core/runner.vala | 5 +++--
src/dummy/dummy-runner.vala | 2 +-
src/ui/display-view.vala | 14 ++------------
4 files changed, 7 insertions(+), 16 deletions(-)
---
diff --git a/src/command/command-runner.vala b/src/command/command-runner.vala
index ddc569e9..cbd7a84c 100644
--- a/src/command/command-runner.vala
+++ b/src/command/command-runner.vala
@@ -80,7 +80,7 @@ public class Games.CommandRunner : Object, Runner {
}
}
- public void resume () throws Error {
+ public void resume () {
}
public void pause () {
diff --git a/src/core/runner.vala b/src/core/runner.vala
index 055214a0..4504ab2a 100644
--- a/src/core/runner.vala
+++ b/src/core/runner.vala
@@ -10,11 +10,12 @@ public interface Games.Runner : Object {
public abstract MediaSet? media_set { get; }
public abstract InputMode input_mode { get; set; }
- public abstract bool try_init_phase_one (out string error_message);
public abstract Gtk.Widget get_display ();
public abstract Gtk.Widget? get_extra_widget ();
+
+ public abstract bool try_init_phase_one (out string error_message);
public abstract void start () throws Error;
- public abstract void resume () throws Error;
+ public abstract void resume ();
public abstract void pause ();
public abstract void stop ();
diff --git a/src/dummy/dummy-runner.vala b/src/dummy/dummy-runner.vala
index 84fa4c57..bcc106f1 100644
--- a/src/dummy/dummy-runner.vala
+++ b/src/dummy/dummy-runner.vala
@@ -46,7 +46,7 @@ private class Games.DummyRunner : Object, Runner {
public void start () throws Error {
}
- public void resume () throws Error {
+ public void resume () {
}
public void pause () {
diff --git a/src/ui/display-view.vala b/src/ui/display-view.vala
index 9d2ca269..4f8ef415 100644
--- a/src/ui/display-view.vala
+++ b/src/ui/display-view.vala
@@ -387,12 +387,7 @@ private class Games.DisplayView : Object, UiView {
private bool cancel_quitting_game () {
if (box.runner != null)
- try {
- box.runner.resume ();
- }
- catch (Error e) {
- warning (e.message);
- }
+ box.runner.resume ();
return false;
}
@@ -416,12 +411,7 @@ private class Games.DisplayView : Object, UiView {
return;
if (window.is_active)
- try {
- box.runner.resume ();
- }
- catch (Error e) {
- warning (e.message);
- }
+ box.runner.resume ();
else if (with_delay)
focus_out_timeout_id = Timeout.add (FOCUS_OUT_DELAY_MILLISECONDS,
on_focus_out_delay_elapsed);
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]