[sysprof/wip/chergert/sysprof-3] libsysprof-ui: start attaching profiler button to record



commit a2ce8a6cde62122712fcff55fa89b280f8f99b3b
Author: Christian Hergert <chergert redhat com>
Date:   Thu May 16 22:40:27 2019 -0700

    libsysprof-ui: start attaching profiler button to record

 src/libsysprof-ui/sysprof-profiler-menu-button.c   |  8 ++----
 .../ui/sysprof-profiler-menu-button.ui             | 30 ++++++--------------
 src/sysprof/ui/sysprof-window.ui                   | 33 ++++++++++++++--------
 3 files changed, 32 insertions(+), 39 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-profiler-menu-button.c 
b/src/libsysprof-ui/sysprof-profiler-menu-button.c
index 361f5a3..9858dd6 100644
--- a/src/libsysprof-ui/sysprof-profiler-menu-button.c
+++ b/src/libsysprof-ui/sysprof-profiler-menu-button.c
@@ -30,8 +30,8 @@
 
 typedef struct
 {
-  SysprofProfiler           *profiler;
-  SysprofModelFilter        *process_filter;
+  SysprofProfiler      *profiler;
+  SysprofModelFilter   *process_filter;
 
   /* Gtk template widgets */
   GtkTreeModel         *environment_model;
@@ -39,7 +39,7 @@ typedef struct
   GtkPopover           *popover;
   GtkEntry             *process_filter_entry;
   GtkListBox           *process_list_box;
-  SysprofProcessModel       *process_model;
+  SysprofProcessModel  *process_model;
   GtkBox               *processes_box;
   GtkEntry             *spawn_entry;
   GtkStack             *stack;
@@ -930,6 +930,4 @@ sysprof_profiler_menu_button_init (SysprofProfilerMenuButton *self)
                            G_CALLBACK (sysprof_profiler_menu_button_env_key_editing_started),
                            self,
                            G_CONNECT_SWAPPED);
-
-  gtk_widget_set_sensitive (GTK_WIDGET (self), FALSE);
 }
diff --git a/src/libsysprof-ui/ui/sysprof-profiler-menu-button.ui 
b/src/libsysprof-ui/ui/sysprof-profiler-menu-button.ui
index 594dc4c..17fdaba 100644
--- a/src/libsysprof-ui/ui/sysprof-profiler-menu-button.ui
+++ b/src/libsysprof-ui/ui/sysprof-profiler-menu-button.ui
@@ -2,30 +2,10 @@
 <interface>
   <template class="SysprofProfilerMenuButton" parent="GtkMenuButton">
     <property name="popover">popover</property>
-    <property name="width-request">150</property>
     <child>
-      <object class="GtkBox">
-        <property name="orientation">horizontal</property>
-        <property name="spacing">6</property>
+      <object class="GtkImage">
+        <property name="icon-name">pan-down-symbolic</property>
         <property name="visible">true</property>
-        <child>
-          <object class="GtkLabel" id="label">
-            <property name="ellipsize">end</property>
-            <property name="visible">true</property>
-          </object>
-          <packing>
-            <property name="expand">true</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkImage">
-            <property name="icon-name">pan-down-symbolic</property>
-            <property name="visible">true</property>
-            <style>
-              <class name="dim-label"/>
-            </style>
-          </object>
-        </child>
       </object>
     </child>
   </template>
@@ -36,6 +16,12 @@
       <object class="GtkBox">
         <property name="orientation">vertical</property>
         <property name="visible">true</property>
+        <child>
+          <object class="GtkLabel" id="label">
+            <property name="xalign">0.0</property>
+            <property name="visible">true</property>
+          </object>
+        </child>
         <child>
           <object class="GtkStackSwitcher">
             <property name="border-width">6</property>
diff --git a/src/sysprof/ui/sysprof-window.ui b/src/sysprof/ui/sysprof-window.ui
index 109f877..88b6b76 100644
--- a/src/sysprof/ui/sysprof-window.ui
+++ b/src/sysprof/ui/sysprof-window.ui
@@ -54,21 +54,30 @@
           </object>
         </child>
         <child>
-          <object class="GtkButton" id="record_button">
-            <property name="label" translatable="yes" comments="Translators: This is a 
button.">_Record</property>
-            <property name="use-underline">true</property>
+          <object class="GtkBox">
             <property name="visible">true</property>
-            <property name="width-request">100</property>
             <style>
-              <class name="suggested-action"/>
+              <class name="linked"/>
             </style>
-          </object>
-        </child>
-        <child>
-          <object class="SysprofProfilerMenuButton" id="profiler_menu_button">
-            <property name="width-request">200</property>
-            <property name="visible">true</property>
-            <property name="halign">start</property>
+            <child>
+              <object class="GtkButton" id="record_button">
+                <property name="label" translatable="yes" comments="Translators: This is a 
button.">_Record</property>
+                <property name="use-underline">true</property>
+                <property name="visible">true</property>
+                <property name="width-request">100</property>
+                <style>
+                  <class name="suggested-action"/>
+                </style>
+              </object>
+            </child>
+            <child>
+              <object class="SysprofProfilerMenuButton" id="profiler_menu_button">
+                <property name="visible">true</property>
+                <style>
+                  <class name="suggested-action"/>
+                </style>
+              </object>
+            </child>
           </object>
         </child>
         <child>


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