[gnome-games] ui: Explain QuitDialog.use_header_bar workaround



commit 786f658157639fa6ba70eb42240f5567941552f7
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Aug 17 12:44:41 2016 +0200

    ui: Explain QuitDialog.use_header_bar workaround
    
    Explain why we work around "use-header-bar" not being set by GtkBuilder
    as we now know the reason.

 data/ui/quit-dialog.ui  |    1 -
 src/ui/quit-dialog.vala |    3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/quit-dialog.ui b/data/ui/quit-dialog.ui
index 916aed2..b5ad25e 100644
--- a/data/ui/quit-dialog.ui
+++ b/data/ui/quit-dialog.ui
@@ -2,7 +2,6 @@
 <interface>
   <requires lib="gtk+" version="3.16"/>
   <template class="GamesQuitDialog" parent="GtkDialog">
-    <property name="use-header-bar">1</property>
     <property name="modal">True</property>
     <property name="destroy-with-parent">True</property>
     <child internal-child="vbox">"
diff --git a/src/ui/quit-dialog.vala b/src/ui/quit-dialog.vala
index a5f4796..580b643 100644
--- a/src/ui/quit-dialog.vala
+++ b/src/ui/quit-dialog.vala
@@ -3,6 +3,7 @@
 [GtkTemplate (ui = "/org/gnome/Games/ui/quit-dialog.ui")]
 private class Games.QuitDialog : Gtk.Dialog {
        construct {
-               use_header_bar = 1; // FIXME: Why doesn't this work from UI file?
+               // GtkBuilder can't set construct properties so we have to set 'use-header-bar' manually.
+               use_header_bar = 1;
        }
 }


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