[gnome-builder] build-tools: hook up View Output button to build output



commit e9380d84ffa2fffdd1ab73a14177975e044c0f4a
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jun 26 15:41:05 2016 -0700

    build-tools: hook up View Output button to build output

 libide/workbench/ide-omni-bar.ui                |    1 +
 plugins/build-tools/gbp-build-workbench-addin.c |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/libide/workbench/ide-omni-bar.ui b/libide/workbench/ide-omni-bar.ui
index 86c25c0..9989269 100644
--- a/libide/workbench/ide-omni-bar.ui
+++ b/libide/workbench/ide-omni-bar.ui
@@ -270,6 +270,7 @@
             </child>
             <child>
               <object class="GtkButton" id="popover_view_output_button">
+                <property name="action-name">build-tools.view-output</property>
                 <property name="label" translatable="yes">View Output</property>
               </object>
               <packing>
diff --git a/plugins/build-tools/gbp-build-workbench-addin.c b/plugins/build-tools/gbp-build-workbench-addin.c
index 6545032..b805705 100644
--- a/plugins/build-tools/gbp-build-workbench-addin.c
+++ b/plugins/build-tools/gbp-build-workbench-addin.c
@@ -242,6 +242,19 @@ gbp_build_workbench_addin_cancel (GSimpleAction *action,
 }
 
 static void
+gbp_build_workbench_addin_view_output (GSimpleAction *action,
+                                       GVariant      *param,
+                                       gpointer       user_data)
+{
+  GbpBuildWorkbenchAddin *self = user_data;
+
+  g_assert (G_IS_SIMPLE_ACTION (action));
+  g_assert (GBP_IS_BUILD_WORKBENCH_ADDIN (self));
+
+  ide_workbench_focus (self->workbench, GTK_WIDGET (self->build_log_panel));
+}
+
+static void
 gbp_build_workbench_addin_configure (GSimpleAction *action,
                                      GVariant      *param,
                                      gpointer       user_data)
@@ -273,6 +286,7 @@ static const GActionEntry actions[] = {
   { "clean", gbp_build_workbench_addin_clean },
   { "cancel-build", gbp_build_workbench_addin_cancel },
   { "configure", gbp_build_workbench_addin_configure, "s" },
+  { "view-output", gbp_build_workbench_addin_view_output },
 };
 
 static void


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