[gnome-mahjongg/arnaudb/wip/gtk4: 12/23] Widgets are visible.



commit 6bb4346ad19ac6e5589a5bd3da5a76eaf41b462e
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Fri Mar 27 19:04:17 2020 +0100

    Widgets are visible.

 src/gnome-mahjongg.vala | 3 +--
 src/score-dialog.vala   | 6 ------
 2 files changed, 1 insertion(+), 8 deletions(-)
---
diff --git a/src/gnome-mahjongg.vala b/src/gnome-mahjongg.vala
index bc8937d..569dda7 100644
--- a/src/gnome-mahjongg.vala
+++ b/src/gnome-mahjongg.vala
@@ -169,7 +169,6 @@ public class Mahjongg : Gtk.Application
         vbox.add (game_view);
 
         window.add (vbox);
-        window.show_all ();
 
         settings.changed.connect (conf_value_changed_cb);
 
@@ -508,7 +507,7 @@ public class Mahjongg : Gtk.Application
         if (!dialogs_use_header)
             preferences_dialog.add_button (_("_Close"), Gtk.ResponseType.CLOSE);
 
-        preferences_dialog.show_all ();
+        preferences_dialog.present ();
     }
 
     private void preferences_dialog_response_cb (Gtk.Dialog dialog, int response)
diff --git a/src/score-dialog.vala b/src/score-dialog.vala
index b1d8269..4d1cd9c 100644
--- a/src/score-dialog.vala
+++ b/src/score-dialog.vala
@@ -34,15 +34,12 @@ public class ScoreDialog : Gtk.Dialog
 
         var vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 5);
         vbox.border_width = 6;
-        vbox.show ();
         get_content_area ().add (vbox);
 
         var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
-        hbox.show ();
         vbox.add (hbox);
 
         var label = new Gtk.Label (_("Layout:"));
-        label.show ();
         hbox.add (label);
 
         size_model = new Gtk.ListStore (2, typeof (string), typeof (string));
@@ -53,13 +50,11 @@ public class ScoreDialog : Gtk.Dialog
         var renderer = new Gtk.CellRendererText ();
         size_combo.pack_start (renderer, true);
         size_combo.add_attribute (renderer, "text", 0);
-        size_combo.show ();
         hbox.add (size_combo);
 
         var scroll = new Gtk.ScrolledWindow (null, null);
         scroll.shadow_type = Gtk.ShadowType.ETCHED_IN;
         scroll.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
-        scroll.show ();
         vbox.add (scroll);
 
         score_model = new Gtk.ListStore (3, typeof (string), typeof (string), typeof (int));
@@ -71,7 +66,6 @@ public class ScoreDialog : Gtk.Dialog
         renderer.xalign = 1.0f;
         scores.insert_column_with_attributes (-1, _("Time"), renderer, "text", 1, "weight", 2);
         scores.model = score_model;
-        scores.show ();
         scroll.add (scores);
 
         foreach (var entry in history.entries)


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