[gnome-builder] omnibar: start implementing new omnibar design



commit d1a9f0aa80181fb8049e47333cfdc1fb533ffa62
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jul 22 19:00:06 2017 -0700

    omnibar: start implementing new omnibar design
    
    This starts implementing some of the new omnibar design. Notably
    missing is the operations list. There were some details on here
    that I'd like to keep, but we can move them elsewhere. One such
    example is the Build System type, which we can display in build
    preferences going forward.

 data/themes/shared.css                |    1 +
 data/themes/shared/shared-omnibar.css |    8 +
 libide/libide.gresource.xml           |    1 +
 libide/workbench/ide-omni-bar.c       |  281 ++++--------------
 libide/workbench/ide-omni-bar.ui      |  509 +++++++++++++++++++--------------
 5 files changed, 364 insertions(+), 436 deletions(-)
---
diff --git a/data/themes/shared.css b/data/themes/shared.css
index e75e6af..11830c4 100644
--- a/data/themes/shared.css
+++ b/data/themes/shared.css
@@ -1,5 +1,6 @@
 @import url("resource:///org/gnome/builder/themes/shared/shared-layout.css");
 @import url("resource:///org/gnome/builder/themes/shared/shared-editor.css");
+@import url("resource:///org/gnome/builder/themes/shared/shared-omnibar.css");
 @import url("resource:///org/gnome/builder/themes/shared/shared-search.css");
 @import url("resource:///org/gnome/builder/themes/shared/shared-treeview.css");
 
diff --git a/data/themes/shared/shared-omnibar.css b/data/themes/shared/shared-omnibar.css
new file mode 100644
index 0000000..01f1abd
--- /dev/null
+++ b/data/themes/shared/shared-omnibar.css
@@ -0,0 +1,8 @@
+popover.messagepopover label.error {
+  color: @error_color;
+  font-weight: bold;
+}
+popover.messagepopover label.success {
+  color: shade(@success_color, 0.8);
+  font-weight: bold;
+}
diff --git a/libide/libide.gresource.xml b/libide/libide.gresource.xml
index 871438d..a5b295c 100644
--- a/libide/libide.gresource.xml
+++ b/libide/libide.gresource.xml
@@ -34,6 +34,7 @@
     <file compressed="true" alias="shared.css">../data/themes/shared.css</file>
     <file compressed="true" alias="shared/shared-editor.css">../data/themes/shared/shared-editor.css</file>
     <file compressed="true" alias="shared/shared-layout.css">../data/themes/shared/shared-layout.css</file>
+    <file compressed="true" alias="shared/shared-omnibar.css">../data/themes/shared/shared-omnibar.css</file>
     <file compressed="true" alias="shared/shared-search.css">../data/themes/shared/shared-search.css</file>
     <file compressed="true" 
alias="shared/shared-treeview.css">../data/themes/shared/shared-treeview.css</file>
   </gresource>
diff --git a/libide/workbench/ide-omni-bar.c b/libide/workbench/ide-omni-bar.c
index f301898..ab5b59f 100644
--- a/libide/workbench/ide-omni-bar.c
+++ b/libide/workbench/ide-omni-bar.c
@@ -30,6 +30,7 @@
 #include "buildsystem/ide-configuration.h"
 #include "buildsystem/ide-configuration-manager.h"
 #include "projects/ide-project.h"
+#include "runtimes/ide-runtime.h"
 #include "util/ide-gtk.h"
 #include "vcs/ide-vcs.h"
 #include "workbench/ide-omni-bar.h"
@@ -82,6 +83,12 @@ struct _IdeOmniBar
   DzlSignalGroup *config_manager_signals;
 
   /*
+   * This manages the bindings we need for the IdeProject which binds
+   * some information to the popover.
+   */
+  DzlBindingGroup *project_bindings;
+
+  /*
    * This manages the bindings we need for the IdeVcs such as the
    * current branch name.
    */
@@ -108,7 +115,6 @@ struct _IdeOmniBar
   GtkEventBox          *event_box;
   GtkLabel             *project_label;
   GtkBox               *branch_box;
-  GtkLabel             *build_result_mode_label;
   GtkImage             *build_result_diagnostics_image;
   GtkButton            *build_button;
   GtkShortcutsShortcut *build_button_shortcut;
@@ -117,17 +123,14 @@ struct _IdeOmniBar
   GtkStack             *message_stack;
   GtkPopover           *popover;
   GtkLabel             *popover_branch_label;
-  GtkButton            *popover_build_cancel_button;
-  GtkLabel             *popover_build_mode_label;
-  GtkLabel             *popover_build_running_time_label;
-  GtkLabel             *popover_build_system_label;
-  GtkListBox           *popover_configuration_list_box;
+  GtkLabel             *popover_config_label;
+  GtkLabel             *popover_build_result_label;
   GtkRevealer          *popover_details_revealer;
-  GtkLabel             *popover_failed_label;
+  GtkLabel             *popover_errors_label;
   GtkLabel             *popover_last_build_time_label;
-  GtkStack             *popover_time_stack;
-  GtkButton            *popover_view_output_button;
+  GtkLabel             *popover_runtime_label;
   GtkLabel             *popover_project_label;
+  GtkLabel             *popover_warnings_label;
 };
 
 G_DEFINE_TYPE (IdeOmniBar, ide_omni_bar, GTK_TYPE_BOX)
@@ -147,102 +150,15 @@ date_time_to_label (GBinding     *binding,
   g_assert (G_VALUE_HOLDS (to_value, G_TYPE_STRING));
 
   if (NULL != (dt = g_value_get_boxed (from_value)))
-    g_value_take_string (to_value,
-                         g_date_time_format (dt, "%a %B %e, %X"));
-
-  return TRUE;
-}
-
-static gboolean
-file_to_relative_path (GBinding     *binding,
-                       const GValue *from_value,
-                       GValue       *to_value,
-                       gpointer      user_data)
-{
-  GFile *file;
-
-  g_assert (G_IS_BINDING (binding));
-  g_assert (from_value != NULL);
-  g_assert (G_VALUE_HOLDS (from_value, G_TYPE_FILE));
-  g_assert (to_value != NULL);
-  g_assert (G_VALUE_HOLDS (to_value, G_TYPE_STRING));
-
-  if (NULL != (file = g_value_get_object (from_value)))
-    {
-      g_autoptr(GFile) home = NULL;
-      gchar *path;
-
-      home = g_file_new_for_path (g_get_home_dir ());
-
-      if (g_file_has_prefix (file, home))
-        path = g_file_get_relative_path (home, file);
-      else if (g_file_is_native (file))
-        path = g_file_get_path (file);
-      else
-        path = g_file_get_uri (file);
-
-      g_value_take_string (to_value, path);
-    }
+    g_value_take_string (to_value, g_date_time_format (dt, "%X"));
 
   return TRUE;
 }
 
 static void
-on_configure_row (IdeOmniBar    *self,
-                  IdeOmniBarRow *row)
-{
-  IdeConfiguration *config;
-  const gchar *id;
-
-  g_assert (IDE_IS_OMNI_BAR (self));
-  g_assert (IDE_IS_OMNI_BAR_ROW (row));
-
-  config = ide_omni_bar_row_get_item (row);
-  id = ide_configuration_get_id (config);
-
-  /*
-   * TODO: This can be removed once GtkListBoxRow can activate actions
-   *       in the "activate" signal (using something like action-name).
-   */
-
-  dzl_gtk_widget_action (GTK_WIDGET (self),
-                     "buildui",
-                     "configure",
-                     g_variant_new_string (id));
-
-  gtk_widget_hide (GTK_WIDGET (self->popover));
-}
-
-static GtkWidget *
-create_configuration_row (gpointer item,
-                          gpointer user_data)
-{
-  IdeConfiguration *configuration = item;
-  IdeOmniBar *self = user_data;
-  GtkWidget *ret;
-
-  g_assert (IDE_IS_CONFIGURATION (configuration));
-  g_assert (IDE_IS_OMNI_BAR (self));
-
-  ret = g_object_new (IDE_TYPE_OMNI_BAR_ROW,
-                      "item", configuration,
-                      "visible", TRUE,
-                      NULL);
-
-  g_signal_connect_object (ret,
-                           "configure",
-                           G_CALLBACK (on_configure_row),
-                           self,
-                           G_CONNECT_SWAPPED);
-
-  return ret;
-}
-
-static void
 ide_omni_bar_update (IdeOmniBar *self)
 {
   g_autofree gchar *branch_name = NULL;
-  g_autofree gchar *build_system_name = NULL;
   const gchar *project_name = NULL;
   IdeContext *context;
 
@@ -252,7 +168,6 @@ ide_omni_bar_update (IdeOmniBar *self)
 
   if (IDE_IS_CONTEXT (context))
     {
-      IdeBuildSystem *build_system;
       IdeProject *project;
       IdeVcs *vcs;
 
@@ -261,28 +176,11 @@ ide_omni_bar_update (IdeOmniBar *self)
 
       vcs = ide_context_get_vcs (context);
       branch_name = ide_vcs_get_branch_name (vcs);
-
-      build_system = ide_context_get_build_system (context);
-      build_system_name = ide_build_system_get_display_name (build_system);
     }
 
   gtk_label_set_label (self->project_label, project_name);
   gtk_label_set_label (self->branch_label, branch_name);
   gtk_label_set_label (self->popover_branch_label, branch_name);
-  gtk_label_set_label (self->popover_build_system_label, build_system_name);
-}
-
-static void
-ide_omni_bar_select_current_config (GtkWidget *widget,
-                                    gpointer   user_data)
-{
-  IdeConfiguration *current = user_data;
-  IdeOmniBarRow *row = (IdeOmniBarRow *)widget;
-
-  g_assert (IDE_IS_OMNI_BAR_ROW (row));
-  g_assert (IDE_IS_CONFIGURATION (current));
-
-  ide_omni_bar_row_set_active (row, (current == ide_omni_bar_row_get_item (row)));
 }
 
 static void
@@ -291,35 +189,21 @@ ide_omni_bar__config_manager__notify_current (IdeOmniBar              *self,
                                               IdeConfigurationManager *config_manager)
 {
   IdeConfiguration *current;
+  IdeRuntime *runtime;
 
   g_assert (IDE_IS_OMNI_BAR (self));
   g_assert (IDE_IS_CONFIGURATION_MANAGER (config_manager));
 
   current = ide_configuration_manager_get_current (config_manager);
+  runtime = ide_configuration_get_runtime (current);
 
-  gtk_container_foreach (GTK_CONTAINER (self->popover_configuration_list_box),
-                         ide_omni_bar_select_current_config,
-                         current);
-}
-
-static void
-ide_omni_bar_row_activated (IdeOmniBar    *self,
-                            IdeOmniBarRow *row,
-                            GtkListBox    *list_box)
-{
-  IdeConfiguration *config;
-  IdeConfigurationManager *config_manager;
-  IdeContext *context;
-
-  g_assert (IDE_IS_OMNI_BAR (self));
-  g_assert (IDE_IS_OMNI_BAR_ROW (row));
-  g_assert (GTK_IS_LIST_BOX (list_box));
-
-  context = ide_widget_get_context (GTK_WIDGET (self));
-  config_manager = ide_context_get_configuration_manager (context);
-  config = ide_omni_bar_row_get_item (row);
+  if (runtime != NULL)
+    gtk_label_set_label (self->popover_runtime_label, ide_runtime_get_display_name (runtime));
+  else
+    gtk_label_set_label (self->popover_runtime_label, "");
 
-  ide_configuration_manager_set_current (config_manager, config);
+  gtk_label_set_label (self->popover_config_label,
+                       ide_configuration_get_display_name (current));
 }
 
 static void
@@ -329,6 +213,7 @@ ide_omni_bar_context_set (GtkWidget  *widget,
   IdeOmniBar *self = (IdeOmniBar *)widget;
   IdeConfigurationManager *config_manager = NULL;
   IdeBuildManager *build_manager = NULL;
+  IdeProject *project = NULL;
   IdeVcs *vcs = NULL;
 
   IDE_ENTRY;
@@ -343,24 +228,18 @@ ide_omni_bar_context_set (GtkWidget  *widget,
       vcs = ide_context_get_vcs (context);
       build_manager = ide_context_get_build_manager (context);
       config_manager = ide_context_get_configuration_manager (context);
+      project = ide_context_get_project (context);
     }
 
   dzl_binding_group_set_source (self->build_manager_bindings, build_manager);
   dzl_signal_group_set_target (self->build_manager_signals, build_manager);
   dzl_binding_group_set_source (self->config_manager_bindings, config_manager);
   dzl_signal_group_set_target (self->config_manager_signals, config_manager);
+  dzl_binding_group_set_source (self->project_bindings, project);
   dzl_binding_group_set_source (self->vcs_bindings, vcs);
 
   if (config_manager != NULL)
-    {
-      gtk_list_box_bind_model (self->popover_configuration_list_box,
-                               G_LIST_MODEL (config_manager),
-                               create_configuration_row,
-                               self,
-                               NULL);
-
-      ide_omni_bar__config_manager__notify_current (self, NULL, config_manager);
-    }
+    ide_omni_bar__config_manager__notify_current (self, NULL, config_manager);
 
   IDE_EXIT;
 }
@@ -522,12 +401,12 @@ ide_omni_bar__build_manager__build_started (IdeOmniBar       *self,
   self->did_build = TRUE;
   self->seen_count = 0;
 
-  gtk_widget_hide (GTK_WIDGET (self->popover_failed_label));
-  gtk_widget_show (GTK_WIDGET (self->popover_build_cancel_button));
-
-  gtk_stack_set_visible_child_name (self->popover_time_stack, "current-build");
-
   gtk_revealer_set_reveal_child (self->popover_details_revealer, TRUE);
+
+  gtk_label_set_label (self->popover_build_result_label, _("Building"));
+  gtk_label_set_attributes (self->popover_build_result_label, NULL);
+  dzl_gtk_widget_remove_style_class (GTK_WIDGET (self->popover_build_result_label), "error");
+  dzl_gtk_widget_remove_style_class (GTK_WIDGET (self->popover_build_result_label), "success");
 }
 
 static void
@@ -539,11 +418,8 @@ ide_omni_bar__build_manager__build_failed (IdeOmniBar       *self,
   g_assert (IDE_IS_BUILD_PIPELINE (build_pipeline));
   g_assert (IDE_IS_BUILD_MANAGER (build_manager));
 
-  gtk_widget_set_visible (GTK_WIDGET (self->popover_failed_label), TRUE);
-
-  gtk_stack_set_visible_child_name (self->popover_time_stack, "last-build");
-
-  gtk_widget_hide (GTK_WIDGET (self->popover_build_cancel_button));
+  gtk_label_set_label (self->popover_build_result_label, _("Failed"));
+  dzl_gtk_widget_add_style_class (GTK_WIDGET (self->popover_build_result_label), "error");
 }
 
 static void
@@ -555,9 +431,8 @@ ide_omni_bar__build_manager__build_finished (IdeOmniBar       *self,
   g_assert (IDE_IS_BUILD_PIPELINE (build_pipeline));
   g_assert (IDE_IS_BUILD_MANAGER (build_manager));
 
-  gtk_widget_hide (GTK_WIDGET (self->popover_build_cancel_button));
-
-  gtk_stack_set_visible_child_name (self->popover_time_stack, "last-build");
+  gtk_label_set_label (self->popover_build_result_label, _("Success"));
+  dzl_gtk_widget_add_style_class (GTK_WIDGET (self->popover_build_result_label), "success");
 }
 
 static void
@@ -576,20 +451,6 @@ ide_omni_bar__build_button__query_tooltip (IdeOmniBar *self,
 }
 
 static void
-ide_omni_bar_finalize (GObject *object)
-{
-  IdeOmniBar *self = (IdeOmniBar *)object;
-
-  g_clear_object (&self->build_manager_bindings);
-  g_clear_object (&self->build_manager_signals);
-  g_clear_object (&self->config_manager_bindings);
-  g_clear_object (&self->config_manager_signals);
-  g_clear_object (&self->vcs_bindings);
-
-  G_OBJECT_CLASS (ide_omni_bar_parent_class)->finalize (object);
-}
-
-static void
 ide_omni_bar_destroy (GtkWidget *widget)
 {
   IdeOmniBar *self = (IdeOmniBar *)widget;
@@ -599,6 +460,13 @@ ide_omni_bar_destroy (GtkWidget *widget)
   g_clear_pointer (&self->looper_source, g_source_destroy);
   g_clear_object (&self->gesture);
 
+  g_clear_object (&self->build_manager_bindings);
+  g_clear_object (&self->build_manager_signals);
+  g_clear_object (&self->config_manager_bindings);
+  g_clear_object (&self->config_manager_signals);
+  g_clear_object (&self->project_bindings);
+  g_clear_object (&self->vcs_bindings);
+
   GTK_WIDGET_CLASS (ide_omni_bar_parent_class)->destroy (widget);
 }
 
@@ -609,7 +477,6 @@ ide_omni_bar_class_init (IdeOmniBarClass *klass)
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   object_class->constructed = ide_omni_bar_constructed;
-  object_class->finalize = ide_omni_bar_finalize;
 
   widget_class->destroy = ide_omni_bar_destroy;
 
@@ -620,24 +487,20 @@ ide_omni_bar_class_init (IdeOmniBarClass *klass)
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_button);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_button_shortcut);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_result_diagnostics_image);
-  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, build_result_mode_label);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, cancel_button);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, config_name_label);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, event_box);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, message_stack);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_branch_label);
-  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_build_cancel_button);
-  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_build_mode_label);
-  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_build_running_time_label);
-  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_configuration_list_box);
+  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_build_result_label);
+  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_config_label);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_details_revealer);
-  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_failed_label);
+  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_errors_label);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_last_build_time_label);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_project_label);
-  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_build_system_label);
-  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_time_stack);
-  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_view_output_button);
+  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_runtime_label);
+  gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, popover_warnings_label);
   gtk_widget_class_bind_template_child (widget_class, IdeOmniBar, project_label);
 }
 
@@ -682,32 +545,20 @@ ide_omni_bar_init (IdeOmniBar *self)
                           "visible",
                           G_BINDING_SYNC_CREATE);
 
-  dzl_binding_group_bind_full (self->build_manager_bindings,
-                               "last-build-time",
-                               self->popover_last_build_time_label,
-                               "label",
-                               G_BINDING_SYNC_CREATE,
-                               date_time_to_label,
-                               NULL,
-                               NULL,
-                               NULL);
-
-  dzl_binding_group_bind (self->build_manager_bindings, "message",
-                          self->build_result_mode_label, "label",
+  dzl_binding_group_bind (self->build_manager_bindings, "error-count",
+                          self->popover_errors_label, "label",
                           G_BINDING_SYNC_CREATE);
 
-  dzl_binding_group_bind (self->build_manager_bindings,
-                          "message",
-                          self->popover_build_mode_label,
-                          "label",
+  dzl_binding_group_bind (self->build_manager_bindings, "warning-count",
+                          self->popover_warnings_label, "label",
                           G_BINDING_SYNC_CREATE);
 
   dzl_binding_group_bind_full (self->build_manager_bindings,
-                               "running-time",
-                               self->popover_build_running_time_label,
+                               "last-build-time",
+                               self->popover_last_build_time_label,
                                "label",
                                G_BINDING_SYNC_CREATE,
-                               dzl_g_time_span_to_label_mapping,
+                               date_time_to_label,
                                NULL,
                                NULL,
                                NULL);
@@ -733,6 +584,16 @@ ide_omni_bar_init (IdeOmniBar *self)
                                    G_CONNECT_SWAPPED);
 
   /*
+   * Project bindings.
+   */
+
+  self->project_bindings = dzl_binding_group_new ();
+
+  dzl_binding_group_bind (self->project_bindings, "name",
+                          self->popover_project_label, "label",
+                          G_BINDING_SYNC_CREATE);
+
+  /*
    * IdeVcs bindings and signals.
    */
 
@@ -750,16 +611,6 @@ ide_omni_bar_init (IdeOmniBar *self)
                           "label",
                           G_BINDING_SYNC_CREATE);
 
-  dzl_binding_group_bind_full (self->vcs_bindings,
-                               "working-directory",
-                               self->popover_project_label,
-                               "label",
-                               G_BINDING_SYNC_CREATE,
-                               file_to_relative_path,
-                               NULL,
-                               NULL,
-                               NULL);
-
   /*
    * IdeConfigurationManager bindings and signals.
    */
@@ -780,12 +631,6 @@ ide_omni_bar_init (IdeOmniBar *self)
                                    self,
                                    G_CONNECT_SWAPPED);
 
-  g_signal_connect_object (self->popover_configuration_list_box,
-                           "row-activated",
-                           G_CALLBACK (ide_omni_bar_row_activated),
-                           self,
-                           G_CONNECT_SWAPPED);
-
   /*
    * Enable various events for state tracking.
    */
diff --git a/libide/workbench/ide-omni-bar.ui b/libide/workbench/ide-omni-bar.ui
index f743b77..89f27ae 100644
--- a/libide/workbench/ide-omni-bar.ui
+++ b/libide/workbench/ide-omni-bar.ui
@@ -162,126 +162,131 @@
         <child>
           <object class="GtkBox">
             <property name="orientation">vertical</property>
-            <property name="spacing">20</property>
             <property name="visible">true</property>
             <style>
               <class name="popover-content-area"/>
             </style>
             <child>
-              <object class="GtkGrid">
-                <property name="column-spacing">20</property>
-                <property name="row-spacing">10</property>
-                <property name="visible">true</property>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="label" translatable="yes">Project</property>
-                    <property name="visible">true</property>
-                    <property name="xalign">0.0</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="popover_project_label">
-                    <property name="hexpand">true</property>
-                    <property name="visible">true</property>
-                    <property name="xalign">0.0</property>
-                    <property name="ellipsize">start</property>
-                  </object>
-                  <packing>
-                    <property name="left-attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="label" translatable="yes">Branch</property>
-                    <property name="visible">true</property>
-                    <property name="xalign">0.0</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="popover_branch_label">
-                    <property name="hexpand">true</property>
-                    <property name="visible">true</property>
-                    <property name="xalign">0.0</property>
-                  </object>
-                  <packing>
-                    <property name="left-attach">1</property>
-                    <property name="top-attach">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="label" translatable="yes">Build System</property>
-                    <property name="visible">true</property>
-                    <property name="xalign">0.0</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="popover_build_system_label">
-                    <property name="hexpand">true</property>
-                    <property name="visible">true</property>
-                    <property name="xalign">0.0</property>
-                  </object>
-                  <packing>
-                    <property name="left-attach">1</property>
-                    <property name="top-attach">2</property>
-                  </packing>
-                </child>
-              </object>
-            </child>
-            <child>
               <object class="GtkBox">
                 <property name="orientation">vertical</property>
-                <property name="spacing">10</property>
                 <property name="visible">true</property>
                 <child>
-                  <object class="GtkLabel">
-                    <property name="label" translatable="yes">Build Profile</property>
+                  <object class="GtkBox">
+                    <property name="hexpand">true</property>
+                    <property name="orientation">horizontal</property>
                     <property name="visible">true</property>
-                    <property name="xalign">0.0</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
+                    <child>
+                      <object class="GtkLabel" id="popover_project_label">
+                        <property name="valign">baseline</property>
+                        <property name="hexpand">true</property>
+                        <property name="visible">true</property>
+                        <property name="xalign">0.0</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton">
+                        <property name="focus-on-click">false</property>
+                        <property name="halign">end</property>
+                        <property name="valign">baseline</property>
+                        <property name="action-name">win.perspective</property>
+                        <property name="action-target">'buildperspective'</property>
+                        <property name="tooltip-text" translatable="yes">Configure build 
preferences</property>
+                        <property name="visible">true</property>
+                        <style>
+                          <class name="image-button"/>
+                        </style>
+                        <child>
+                          <object class="GtkImage">
+                            <property name="icon-name">builder-build-configure-symbolic</property>
+                            <property name="visible">true</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
                   </object>
                 </child>
                 <child>
-                  <object class="GtkScrolledWindow">
-                    <property name="shadow-type">in</property>
-                    <property name="max-content-height">200</property>
-                    <property name="max-content-width">500</property>
-                    <property name="propagate-natural-height">true</property>
-                    <property name="propagate-natural-width">true</property>
+                  <object class="GtkGrid">
+                    <property name="column-spacing">18</property>
+                    <property name="row-spacing">6</property>
                     <property name="visible">true</property>
                     <child>
-                      <object class="GtkListBox" id="popover_configuration_list_box">
-                        <property name="selection-mode">none</property>
+                      <object class="GtkLabel">
+                        <property name="label" translatable="yes">Branch</property>
+                        <property name="visible">true</property>
+                        <property name="xalign">1.0</property>
+                        <style>
+                          <class name="dim-label"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="popover_branch_label">
+                        <property name="hexpand">true</property>
                         <property name="visible">true</property>
+                        <property name="xalign">0.0</property>
                       </object>
+                      <packing>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="build_profile_title">
+                        <property name="label" translatable="yes">Build Profile</property>
+                        <property name="visible">true</property>
+                        <property name="xalign">1.0</property>
+                        <style>
+                          <class name="dim-label"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="popover_config_label">
+                        <property name="hexpand">true</property>
+                        <property name="visible">true</property>
+                        <property name="xalign">0.0</property>
+                      </object>
+                      <packing>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="runtime_title">
+                        <property name="label" translatable="yes">Runtime</property>
+                        <property name="visible">true</property>
+                        <property name="xalign">1.0</property>
+                        <style>
+                          <class name="dim-label"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="popover_runtime_label">
+                        <property name="hexpand">true</property>
+                        <property name="visible">true</property>
+                        <property name="xalign">0.0</property>
+                      </object>
+                      <packing>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">2</property>
+                      </packing>
                     </child>
                   </object>
                 </child>
@@ -293,150 +298,207 @@
                 <property name="reveal-child">false</property>
                 <child>
                   <object class="GtkBox">
-                    <property name="spacing">12</property>
+                    <property name="margin-top">24</property>
+                    <property name="orientation">vertical</property>
                     <property name="visible">true</property>
                     <child>
-                      <object class="GtkStack" id="popover_time_stack">
-                        <property name="interpolate-size">true</property>
+                      <object class="GtkBox">
+                        <property name="hexpand">true</property>
+                        <property name="orientation">horizontal</property>
                         <property name="visible">true</property>
                         <child>
-                          <object class="GtkBox">
-                            <property name="orientation">vertical</property>
-                            <property name="valign">center</property>
+                          <object class="GtkLabel">
+                            <property name="valign">baseline</property>
+                            <property name="hexpand">true</property>
                             <property name="visible">true</property>
+                            <property name="xalign">0.0</property>
+                            <property name="label" translatable="yes">Build status</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                            </attributes>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkButton">
+                            <property name="focus-on-click">false</property>
+                            <property name="halign">end</property>
+                            <property name="valign">baseline</property>
+                            <property name="action-name">buildui.view-output</property>
+                            <property name="tooltip-text" translatable="yes">View build console 
contents</property>
+                            <property name="visible">true</property>
+                            <style>
+                              <class name="image-button"/>
+                            </style>
                             <child>
-                              <object class="GtkLabel">
-                                <property name="visible">true</property>
-                                <property name="label" translatable="yes">Last build</property>
-                                <property name="xalign">0.0</property>
-                                <attributes>
-                                  <attribute name="weight" value="bold"/>
-                                </attributes>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="popover_last_build_time_label">
-                                <property name="xalign">0.0</property>
+                              <object class="GtkImage">
+                                <property name="icon-name">utilities-terminal-symbolic</property>
                                 <property name="visible">true</property>
-                                <attributes>
-                                  <attribute name="scale" value="0.8333"/>
-                                </attributes>
                               </object>
                             </child>
                           </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkGrid" id="build_status_grid">
+                        <property name="column-spacing">18</property>
+                        <property name="row-spacing">6</property>
+                        <property name="visible">true</property>
+                        <child>
+                          <object class="GtkLabel" id="last_build_title">
+                            <property name="label" translatable="yes">Last build</property>
+                            <property name="hexpand">false</property>
+                            <property name="xalign">1.0</property>
+                            <property name="visible">true</property>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
+                          </object>
                           <packing>
-                            <property name="name">last-build</property>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">0</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkBox">
-                            <property name="orientation">horizontal</property>
+                          <object class="GtkLabel" id="popover_last_build_time_label">
                             <property name="hexpand">true</property>
+                            <property name="xalign">0.0</property>
                             <property name="visible">true</property>
-                            <child>
-                              <object class="GtkLabel" id="popover_build_mode_label">
-                                <property name="visible">true</property>
-                                <property name="xalign">0.0</property>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="popover_build_running_time_label">
-                                <property name="xalign">1.0</property>
-                                <property name="margin-end">8</property>
-                                <property name="margin-start">8</property>
-                                <property name="hexpand">true</property>
-                                <property name="visible">true</property>
-                              </object>
-                            </child>
+                            <property name="width-chars">10</property>
                           </object>
                           <packing>
-                            <property name="name">current-build</property>
+                            <property name="left-attach">1</property>
+                            <property name="top-attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="build_result_title">
+                            <property name="label" translatable="yes">Build result</property>
+                            <property name="hexpand">false</property>
+                            <property name="xalign">1.0</property>
+                            <property name="visible">true</property>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="popover_build_result_label">
+                            <property name="hexpand">true</property>
+                            <property name="xalign">0.0</property>
+                            <property name="visible">true</property>
+                            <property name="width-chars">10</property>
+                          </object>
+                          <packing>
+                            <property name="left-attach">1</property>
+                            <property name="top-attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="error_title">
+                            <property name="label" translatable="yes">Errors</property>
+                            <property name="hexpand">false</property>
+                            <property name="xalign">1.0</property>
+                            <property name="visible">true</property>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left-attach">2</property>
+                            <property name="top-attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="popover_errors_label">
+                            <property name="label">0</property>
+                            <property name="hexpand">true</property>
+                            <property name="xalign">0.0</property>
+                            <property name="visible">true</property>
+                            <property name="width-chars">10</property>
+                          </object>
+                          <packing>
+                            <property name="left-attach">3</property>
+                            <property name="top-attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="warning_title">
+                            <property name="label" translatable="yes">Warnings</property>
+                            <property name="hexpand">false</property>
+                            <property name="xalign">1.0</property>
+                            <property name="visible">true</property>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
+                          </object>
+                          <packing>
+                            <property name="left-attach">2</property>
+                            <property name="top-attach">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="popover_warnings_label">
+                            <property name="label">0</property>
+                            <property name="hexpand">true</property>
+                            <property name="xalign">0.0</property>
+                            <property name="visible">true</property>
+                            <property name="width-chars">10</property>
+                          </object>
+                          <packing>
+                            <property name="left-attach">3</property>
+                            <property name="top-attach">1</property>
                           </packing>
                         </child>
                       </object>
                     </child>
-                    <child>
-                      <object class="GtkLabel" id="popover_failed_label">
-                        <property name="label" translatable="yes">Failed</property>
-                        <property name="xalign">1.0</property>
-                        <property name="margin-end">8</property>
-                        <property name="margin-start">8</property>
-                        <attributes>
-                          <attribute name="weight" value="bold"/>
-                          <attribute name="foreground" value="red"/>
-                        </attributes>
-                      </object>
-                      <packing>
-                        <property name="position">2</property>
-                        <property name="pack-type">end</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="popover_view_output_button">
-                        <property name="action-name">buildui.view-output</property>
-                        <property name="label" translatable="yes">View Output</property>
-                        <property name="visible">true</property>
-                      </object>
-                      <packing>
-                        <property name="position">1</property>
-                        <property name="pack-type">end</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="popover_build_cancel_button">
-                        <property name="action-name">build-manager.cancel</property>
-                        <property name="label" translatable="yes">_Cancel</property>
-                        <property name="use-underline">true</property>
-                        <style>
-                          <class name="destructive-action"/>
-                        </style>
-                      </object>
-                      <packing>
-                        <property name="position">0</property>
-                        <property name="pack-type">end</property>
-                      </packing>
-                    </child>
                   </object>
                 </child>
               </object>
             </child>
-          </object>
-        </child>
-        <child>
-          <object class="GtkBox">
-            <property name="visible">true</property>
-            <style>
-              <class name="popover-action-area"/>
-            </style>
             <child>
-              <object class="GtkButton">
-                <property name="action-name">build-manager.build</property>
-                <property name="label" translatable="yes">Build</property>
-                <property name="visible">true</property>
-              </object>
-              <packing>
-                <property name="expand">true</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton">
-                <property name="action-name">build-manager.rebuild</property>
-                <property name="label" translatable="yes">Rebuild</property>
-                <property name="visible">true</property>
-              </object>
-              <packing>
-                <property name="expand">true</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton">
-                <property name="action-name">build-manager.clean</property>
-                <property name="label" translatable="yes">Clean</property>
+              <object class="GtkBox">
+                <property name="margin-top">24</property>
+                <property name="orientation">horizontal</property>
                 <property name="visible">true</property>
+                <property name="homogeneous">true</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkButton">
+                    <property name="action-name">build-manager.build</property>
+                    <property name="label" translatable="yes">Build</property>
+                    <property name="visible">true</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton">
+                    <property name="action-name">build-manager.rebuild</property>
+                    <property name="label" translatable="yes">Rebuild</property>
+                    <property name="visible">true</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton">
+                    <property name="action-name">build-manager.clean</property>
+                    <property name="label" translatable="yes">Clean</property>
+                    <property name="visible">true</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkButton">
+                    <property name="action-name">build-manager.export</property>
+                    <property name="label" translatable="yes">Export</property>
+                    <property name="visible">true</property>
+                    <style>
+                      <class name="suggested-action"/>
+                    </style>
+                  </object>
+                </child>
               </object>
-              <packing>
-                <property name="expand">true</property>
-              </packing>
             </child>
           </object>
         </child>
@@ -448,4 +510,15 @@
     <property name="title" translatable="yes">Build project</property>
     <property name="visible">true</property>
   </object>
+  <object class="GtkSizeGroup">
+    <property name="mode">horizontal</property>
+    <widgets>
+      <widget name="build_profile_title"/>
+      <widget name="build_result_title"/>
+      <widget name="error_title"/>
+      <widget name="last_build_title"/>
+      <widget name="runtime_title"/>
+      <widget name="warning_title"/>
+    </widgets>
+  </object>
 </interface>


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