[gnome-games] ui: Use Gtk.MessageDialog for resume-failed dialog



commit 2e6d3612dc6c60a24bbb768858d0106d4091239d
Author: theawless <theawless gmail com>
Date:   Sat Apr 1 16:41:48 2017 +0530

    ui: Use Gtk.MessageDialog for resume-failed dialog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771631

 data/ui/resume-failed-dialog.ui  |   22 ++++------------------
 src/ui/resume-failed-dialog.vala |    6 +-----
 2 files changed, 5 insertions(+), 23 deletions(-)
---
diff --git a/data/ui/resume-failed-dialog.ui b/data/ui/resume-failed-dialog.ui
index c31f2ec..a9ff491 100644
--- a/data/ui/resume-failed-dialog.ui
+++ b/data/ui/resume-failed-dialog.ui
@@ -1,26 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="3.16"/>
-  <template class="GamesResumeFailedDialog" parent="GtkDialog">
+  <template class="GamesResumeFailedDialog" parent="GtkMessageDialog">
     <property name="modal">True</property>
     <property name="destroy-with-parent">True</property>
-    <child internal-child="vbox">"
-      <object class="GtkBox" id="vbox">
-    <child>
-      <object class="GtkLabel" id="label">
-        <property name="visible">True</property>
-        <property name="hexpand">True</property>
-        <property name="vexpand">True</property>
-        <property name="margin-top">12</property>
-        <property name="margin-bottom">12</property>
-        <property name="margin-start">21</property>
-        <property name="margin-end">21</property>
-        <property name="label" translatable="yes">Resuming failed. Do you want to to restart the 
game?</property>
-      </object>
-    </child>
-      </object>
-    </child>
-
+    <property name="type_hint">dialog</property>
+    <property name="message_type">question</property>
+    <property name="text" translatable="yes">Resuming failed. Do you want to restart the game?</property>
     <child type="action">
       <object class="GtkButton" id="button_reset">
         <property name="visible">True</property>
diff --git a/src/ui/resume-failed-dialog.vala b/src/ui/resume-failed-dialog.vala
index 45eed72..6f53b24 100644
--- a/src/ui/resume-failed-dialog.vala
+++ b/src/ui/resume-failed-dialog.vala
@@ -1,9 +1,5 @@
 // This file is part of GNOME Games. License: GPLv3
 
 [GtkTemplate (ui = "/org/gnome/Games/ui/resume-failed-dialog.ui")]
-private class Games.ResumeFailedDialog : Gtk.Dialog {
-       construct {
-               // GtkBuilder can't set construct properties so we have to set 'use-header-bar' manually.
-               use_header_bar = 1;
-       }
+private class Games.ResumeFailedDialog : Gtk.MessageDialog {
 }


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