[gnome-usage/add-speedometer] speedometer: Don't add GtkLabel twice to Speedometer
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-usage/add-speedometer] speedometer: Don't add GtkLabel twice to Speedometer
- Date: Tue, 8 Jan 2019 15:08:16 +0000 (UTC)
commit ef3e0cb725850ab0235dadc3b89dd8efcf92ff0d
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Jan 8 15:07:08 2019 +0000
speedometer: Don't add GtkLabel twice to Speedometer
Fixes #56
src/speedometer.vala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/speedometer.vala b/src/speedometer.vala
index f307f5e..c7adc89 100644
--- a/src/speedometer.vala
+++ b/src/speedometer.vala
@@ -88,9 +88,12 @@ namespace Usage
{
/* This is a Vala bug. It will cause a "warning".
(content_area as Buildable).add_child(builder, child, type);*/
- if (child is Gtk.Label)
+ if (child is Gtk.Label) {
content_area.add(child as Gtk.Widget);
+ return;
+ }
+
base.add_child(builder, child, type);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]