[gnome-builder] widget: do direct check for workbench



commit ed486bdd878a53ce312791f3b503f27e063cd46b
Author: Christian Hergert <chergert redhat com>
Date:   Mon Oct 12 21:08:03 2015 -0700

    widget: do direct check for workbench

 src/util/gb-widget.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/util/gb-widget.c b/src/util/gb-widget.c
index f256f8b..08e388c 100644
--- a/src/util/gb-widget.c
+++ b/src/util/gb-widget.c
@@ -37,6 +37,9 @@ gb_widget_get_workbench (GtkWidget *widget)
 
   g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
 
+  if (GB_IS_WORKBENCH (widget))
+    return GB_WORKBENCH (widget);
+
   toplevel = gtk_widget_get_toplevel (widget);
 
   if (GB_IS_WORKBENCH (toplevel))


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