[gnome-games] resume-failed-dialog: Drop and construct manually
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] resume-failed-dialog: Drop and construct manually
- Date: Thu, 15 Oct 2020 23:40:23 +0000 (UTC)
commit ee7f9661ae32d1c0d8c1c553ef5fc3ab1e45d465
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Oct 16 04:24:37 2020 +0500
resume-failed-dialog: Drop and construct manually
data/org.gnome.Games.gresource.xml | 1 -
data/ui/resume-failed-dialog.ui | 28 ----------------------------
src/meson.build | 1 -
src/ui/display-view.vala | 14 +++++++++++---
src/ui/resume-failed-dialog.vala | 5 -----
5 files changed, 11 insertions(+), 38 deletions(-)
---
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index 13949855..d6d2e85d 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -47,7 +47,6 @@
<file preprocess="xml-stripblanks">ui/quit-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/remote-display.ui</file>
<file preprocess="xml-stripblanks">ui/restart-dialog.ui</file>
- <file preprocess="xml-stripblanks">ui/resume-failed-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/search-bar.ui</file>
<file preprocess="xml-stripblanks">ui/selection-action-bar.ui</file>
<file preprocess="xml-stripblanks">ui/shortcuts-window.ui</file>
diff --git a/src/meson.build b/src/meson.build
index b8aec809..363c7e2c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -158,7 +158,6 @@ vala_sources = [
'ui/quit-dialog.vala',
'ui/remote-display.vala',
'ui/restart-dialog.vala',
- 'ui/resume-failed-dialog.vala',
'ui/search-bar.vala',
'ui/selection-action-bar.vala',
'ui/shortcuts-window.vala',
diff --git a/src/ui/display-view.vala b/src/ui/display-view.vala
index bcd248c6..308d4f18 100644
--- a/src/ui/display-view.vala
+++ b/src/ui/display-view.vala
@@ -127,7 +127,7 @@ private class Games.DisplayView : Gtk.Box, UiView {
private Cancellable quit_game_cancellable;
private Gtk.MessageDialog resume_dialog;
- private ResumeFailedDialog resume_failed_dialog;
+ private Gtk.MessageDialog resume_failed_dialog;
private QuitDialog quit_dialog;
private RestartDialog restart_dialog;
@@ -480,8 +480,16 @@ private class Games.DisplayView : Gtk.Box, UiView {
if (resume_failed_dialog != null)
return;
- resume_failed_dialog = new ResumeFailedDialog ();
- resume_failed_dialog.transient_for = window;
+ resume_failed_dialog = new Gtk.MessageDialog (
+ window,
+ Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
+ Gtk.MessageType.QUESTION,
+ Gtk.ButtonsType.CANCEL,
+ "%s",
+ _("Resume last game?")
+ );
+
+ resume_failed_dialog.add_button (C_("Resuming a game failed dialog", "Reset"),
Gtk.ResponseType.ACCEPT);
cancellable.cancelled.connect (() => {
resume_failed_dialog.destroy ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]