[gnome-boxes/wip/less-actors: 2/5] 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/wip/less-actors: 2/5] util-app: Add function to unparent a gtk widget
- Date: Sun, 9 Feb 2014 19:55:02 +0000 (UTC)
commit a4708723b41f0205123b30d256887d16c3f6d35c
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]