From 9b47056c7bb8ba3554c2052dc1f0944b0e90a930 Mon Sep 17 00:00:00 2001
From: Mathieu Bridon <bochecha@daitauha.fr>
Date: Mon, 15 Aug 2016 01:02:25 +0200
Subject: [PATCH] Drop the cancel button when starting a game

The player just asked us to start a game, why would they want to cancel?

This seems like such a rare use-case that we don't need a button here,
especially as there's a workaround: they could just resume, and click
the back arrow to get back to the home page.

This makes the resume dialog less heavy, as it felt very crowded with 3
buttons for just a short line of text.

https://bugzilla.gnome.org/show_bug.cgi?id=769924
---
 data/ui/resume-dialog.ui       | 9 +--------
 src/ui/application-window.vala | 5 -----
 2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/data/ui/resume-dialog.ui b/data/ui/resume-dialog.ui
index bf67905..5a1011b 100644
--- a/data/ui/resume-dialog.ui
+++ b/data/ui/resume-dialog.ui
@@ -35,16 +35,9 @@
         <property name="label" translatable="yes">Restart</property>
       </object>
     </child>
-    <child type="action">
-      <object class="GtkButton" id="button_cancel">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">Cancel</property>
-      </object>
-    </child>
     <action-widgets>
       <action-widget response="accept" default="true">button_resume</action-widget>
-      <action-widget response="reject">button_reset</action-widget>
-      <action-widget response="cancel">button_cancel</action-widget>
+      <action-widget response="cancel">button_reset</action-widget>
     </action-widgets>
   </template>
 </interface>
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 52edf26..604d401 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -210,11 +210,6 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
 
 			switch (response) {
 			case Gtk.ResponseType.CANCEL:
-				display_box.runner = null;
-				ui_state = UiState.COLLECTION;
-
-				return;
-			case Gtk.ResponseType.REJECT:
 				resume = false;
 
 				break;
-- 
2.7.4