[gnome-boxes] util-app: Add function to unparent a gtk widget
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] util-app: Add function to unparent a gtk widget
- Date: Mon, 10 Feb 2014 12:55:08 +0000 (UTC)
commit 0cf532798d82a094f2409cc04a7379d177119c7d
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sun Feb 9 11:37:15 2014 +0100
util-app: Add function to unparent a gtk widget
src/util-app.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/util-app.vala b/src/util-app.vala
index 80139cf..731004a 100644
--- a/src/util-app.vala
+++ b/src/util-app.vala
@@ -169,6 +169,15 @@ namespace Boxes {
container.remove_child (actor);
}
+ public void widget_remove (Gtk.Widget widget) {
+ var container = widget.get_parent () as Gtk.Container;
+
+ if (container == null)
+ return;
+
+ container.remove (widget);
+ }
+
public Osinfo.Device? find_device_by_prop (Osinfo.DeviceList devices, string prop_name, string
prop_value) {
var filter = new Osinfo.Filter ();
filter.add_constraint (prop_name, prop_value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]