[gnome-games] ui: Add RestartDialog
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] ui: Add RestartDialog
- Date: Sat, 14 Mar 2020 16:32:05 +0000 (UTC)
commit 6eff9d2b55b1363ac99664e21f9b89256015cb4f
Author: Neville <nevilleantony98 gmail com>
Date: Thu Mar 12 16:25:39 2020 +0530
ui: Add RestartDialog
data/org.gnome.Games.gresource.xml | 1 +
data/ui/restart-dialog.ui | 32 ++++++++++++++++++++++++++++++++
src/meson.build | 1 +
src/ui/restart-dialog.vala | 5 +++++
4 files changed, 39 insertions(+)
---
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index cba31dd4..f83b61ae 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -46,6 +46,7 @@
<file preprocess="xml-stripblanks">ui/quit-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/remote-display.ui</file>
<file preprocess="xml-stripblanks">ui/reset-controller-mapping-dialog.ui</file>
+ <file preprocess="xml-stripblanks">ui/restart-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/resume-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/resume-failed-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/search-bar.ui</file>
diff --git a/data/ui/restart-dialog.ui b/data/ui/restart-dialog.ui
new file mode 100644
index 00000000..a1eb075a
--- /dev/null
+++ b/data/ui/restart-dialog.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="3.24"/>
+ <template class="GamesRestartDialog" parent="GamesMessageDialog">
+ <property name="modal">True</property>
+ <property name="destroy-with-parent">True</property>
+ <property name="type-hint">dialog</property>
+ <property name="message-type">question</property>
+ <property name="text" translatable="yes">Are you sure you want to restart?</property>
+ <property name="secondary-text" translatable="yes">All unsaved progress will be lost.</property>
+ <child type="action">
+ <object class="GtkButton" id="button_cancel">
+ <property name="visible">True</property>
+ <property name="can-default">True</property>
+ <property name="label" translatable="yes">Cancel</property>
+ </object>
+ </child>
+ <child type="action">
+ <object class="GtkButton" id="button_restart">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Restart</property>
+ <style>
+ <class name="destructive-action"/>
+ </style>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="accept">button_restart</action-widget>
+ <action-widget response="cancel" default="true">button_cancel</action-widget>
+ </action-widgets>
+ </template>
+</interface>
diff --git a/src/meson.build b/src/meson.build
index 651a305a..14445037 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -146,6 +146,7 @@ vala_sources = [
'ui/quit-dialog.vala',
'ui/remote-display.vala',
'ui/reset-controller-mapping-dialog.vala',
+ 'ui/restart-dialog.vala',
'ui/resume-dialog.vala',
'ui/resume-failed-dialog.vala',
'ui/search-bar.vala',
diff --git a/src/ui/restart-dialog.vala b/src/ui/restart-dialog.vala
new file mode 100644
index 00000000..0da61e9d
--- /dev/null
+++ b/src/ui/restart-dialog.vala
@@ -0,0 +1,5 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+[GtkTemplate (ui = "/org/gnome/Games/ui/restart-dialog.ui")]
+private class Games.RestartDialog : MessageDialog {
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]