[sysprof/wip/chergert/sysprof-3] libsysprof-ui: start on data collection icons
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/sysprof-3] libsysprof-ui: start on data collection icons
- Date: Sat, 18 May 2019 23:44:13 +0000 (UTC)
commit 13e52d7ec2f885869f64ead92dc1f8bbb7fe735b
Author: Christian Hergert <chergert redhat com>
Date: Sat May 18 16:44:02 2019 -0700
libsysprof-ui: start on data collection icons
src/libsysprof-ui/libsysprof-ui.gresource.xml | 1 +
src/libsysprof-ui/meson.build | 1 +
src/libsysprof-ui/sysprof-aid-icon.c | 187 ++++++++
src/libsysprof-ui/sysprof-aid-icon.h | 38 ++
src/libsysprof-ui/sysprof-profiler-assistant.c | 22 +
src/libsysprof-ui/ui/sysprof-aid-icon.ui | 61 +++
src/libsysprof-ui/ui/sysprof-profiler-assistant.ui | 494 ++++++++++++---------
src/sysprof/ui/sysprof-window.ui | 27 --
8 files changed, 590 insertions(+), 241 deletions(-)
---
diff --git a/src/libsysprof-ui/libsysprof-ui.gresource.xml b/src/libsysprof-ui/libsysprof-ui.gresource.xml
index 1f43823..e59b934 100644
--- a/src/libsysprof-ui/libsysprof-ui.gresource.xml
+++ b/src/libsysprof-ui/libsysprof-ui.gresource.xml
@@ -10,6 +10,7 @@
<file
alias="icons/scalable/apps/org.gnome.Sysprof.svg">../../data/icons/scalable/apps/org.gnome.Sysprof.svg</file>
<file
alias="icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg">../../data/icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg</file>
+ <file preprocess="xml-stripblanks">ui/sysprof-aid-icon.ui</file>
<file preprocess="xml-stripblanks">ui/sysprof-callgraph-view.ui</file>
<file preprocess="xml-stripblanks">ui/sysprof-capture-view.ui</file>
<file preprocess="xml-stripblanks">ui/sysprof-display.ui</file>
diff --git a/src/libsysprof-ui/meson.build b/src/libsysprof-ui/meson.build
index eff755b..53c5c64 100644
--- a/src/libsysprof-ui/meson.build
+++ b/src/libsysprof-ui/meson.build
@@ -27,6 +27,7 @@ libsysprof_ui_public_sources = [
libsysprof_ui_private_sources = [
'pointcache.c',
'rectangles.c',
+ 'sysprof-aid-icon.c',
'sysprof-details-view.c',
'sysprof-cairo.c',
'sysprof-cell-renderer-duration.c',
diff --git a/src/libsysprof-ui/sysprof-aid-icon.c b/src/libsysprof-ui/sysprof-aid-icon.c
new file mode 100644
index 0000000..6ee91a7
--- /dev/null
+++ b/src/libsysprof-ui/sysprof-aid-icon.c
@@ -0,0 +1,187 @@
+/* sysprof-aid-icon.c
+ *
+ * Copyright 2019 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "sysprof-aid-icon"
+
+#include "config.h"
+
+#include "sysprof-aid-icon.h"
+
+struct _SysprofAidIcon
+{
+ GtkFlowBoxChild parent_instance;
+
+ SysprofAid *aid;
+
+ /* Template Objects */
+ GtkLabel *label;
+ GtkImage *image;
+ GtkImage *check;
+};
+
+G_DEFINE_TYPE (SysprofAidIcon, sysprof_aid_icon, GTK_TYPE_FLOW_BOX_CHILD)
+
+enum {
+ PROP_0,
+ PROP_AID,
+ N_PROPS
+};
+
+static GParamSpec *properties [N_PROPS];
+
+/**
+ * sysprof_aid_icon_new:
+ *
+ * Create a new #SysprofAidIcon.
+ *
+ * Returns: (transfer full): a newly created #SysprofAidIcon
+ */
+GtkWidget *
+sysprof_aid_icon_new (SysprofAid *aid)
+{
+ g_return_val_if_fail (SYSPROF_IS_AID (aid), NULL);
+
+ return g_object_new (SYSPROF_TYPE_AID_ICON,
+ "aid", aid,
+ NULL);
+}
+
+/**
+ * sysprof_aid_icon_get_aid:
+ *
+ * Get the aid that is represented by the icon.
+ *
+ * Returns: (transfer none): a #SysprofAid
+ *
+ * Since: 3.34
+ */
+SysprofAid *
+sysprof_aid_icon_get_aid (SysprofAidIcon *self)
+{
+ g_return_val_if_fail (SYSPROF_IS_AID_ICON (self), NULL);
+
+ return self->aid;
+}
+
+static void
+sysprof_aid_icon_set_aid (SysprofAidIcon *self,
+ SysprofAid *aid)
+{
+ g_return_if_fail (SYSPROF_IS_AID_ICON (self));
+ g_return_if_fail (SYSPROF_IS_AID (aid));
+
+ if (g_set_object (&self->aid, aid))
+ {
+ GIcon *icon = sysprof_aid_get_icon (aid);
+ const gchar *title = sysprof_aid_get_display_name (aid);
+
+ g_object_set (self->image, "gicon", icon, NULL);
+ gtk_label_set_label (self->label, title);
+ }
+}
+
+static void
+sysprof_aid_icon_finalize (GObject *object)
+{
+ SysprofAidIcon *self = (SysprofAidIcon *)object;
+
+ g_clear_object (&self->aid);
+
+ G_OBJECT_CLASS (sysprof_aid_icon_parent_class)->finalize (object);
+}
+
+static void
+sysprof_aid_icon_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ SysprofAidIcon *self = SYSPROF_AID_ICON (object);
+
+ switch (prop_id)
+ {
+ case PROP_AID:
+ g_value_set_object (value, sysprof_aid_icon_get_aid (self));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+sysprof_aid_icon_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ SysprofAidIcon *self = SYSPROF_AID_ICON (object);
+
+ switch (prop_id)
+ {
+ case PROP_AID:
+ sysprof_aid_icon_set_aid (self, g_value_get_object (value));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+sysprof_aid_icon_class_init (SysprofAidIconClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ object_class->finalize = sysprof_aid_icon_finalize;
+ object_class->get_property = sysprof_aid_icon_get_property;
+ object_class->set_property = sysprof_aid_icon_set_property;
+
+ properties [PROP_AID] =
+ g_param_spec_object ("aid",
+ "Aid",
+ "The aid for the icon",
+ SYSPROF_TYPE_AID,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_properties (object_class, N_PROPS, properties);
+
+ gtk_widget_class_set_css_name (widget_class, "sysprofaidicon");
+ gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-aid-icon.ui");
+ gtk_widget_class_bind_template_child (widget_class, SysprofAidIcon, check);
+ gtk_widget_class_bind_template_child (widget_class, SysprofAidIcon, image);
+ gtk_widget_class_bind_template_child (widget_class, SysprofAidIcon, label);
+}
+
+static void
+sysprof_aid_icon_init (SysprofAidIcon *self)
+{
+ gtk_widget_init_template (GTK_WIDGET (self));
+}
+
+void
+sysprof_aid_icon_toggle (SysprofAidIcon *self)
+{
+ g_return_if_fail (SYSPROF_IS_AID_ICON (self));
+
+ gtk_widget_set_visible (GTK_WIDGET (self->check),
+ !gtk_widget_get_visible (GTK_WIDGET (self->check)));
+}
diff --git a/src/libsysprof-ui/sysprof-aid-icon.h b/src/libsysprof-ui/sysprof-aid-icon.h
new file mode 100644
index 0000000..b49726b
--- /dev/null
+++ b/src/libsysprof-ui/sysprof-aid-icon.h
@@ -0,0 +1,38 @@
+/* sysprof-aid-icon.h
+ *
+ * Copyright 2019 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <gtk/gtk.h>
+#include <sysprof.h>
+
+#include "sysprof-aid.h"
+
+G_BEGIN_DECLS
+
+#define SYSPROF_TYPE_AID_ICON (sysprof_aid_icon_get_type())
+
+G_DECLARE_FINAL_TYPE (SysprofAidIcon, sysprof_aid_icon, SYSPROF, AID_ICON, GtkFlowBoxChild)
+
+GtkWidget *sysprof_aid_icon_new (SysprofAid *aid);
+SysprofAid *sysprof_aid_icon_get_aid (SysprofAidIcon *self);
+void sysprof_aid_icon_toggle (SysprofAidIcon *self);
+
+G_END_DECLS
diff --git a/src/libsysprof-ui/sysprof-profiler-assistant.c b/src/libsysprof-ui/sysprof-profiler-assistant.c
index 34ee350..37fedda 100644
--- a/src/libsysprof-ui/sysprof-profiler-assistant.c
+++ b/src/libsysprof-ui/sysprof-profiler-assistant.c
@@ -24,6 +24,7 @@
#include <sysprof.h>
+#include "sysprof-aid-icon.h"
#include "sysprof-environ-editor.h"
#include "sysprof-profiler-assistant.h"
#include "sysprof-process-model-row.h"
@@ -37,6 +38,7 @@ struct _SysprofProfilerAssistant
GtkRevealer *process_revealer;
GtkListBox *process_list_box;
SysprofEnvironEditor *environ_editor;
+ GtkFlowBox *aid_flow_box;
};
G_DEFINE_TYPE (SysprofProfilerAssistant, sysprof_profiler_assistant, GTK_TYPE_BIN)
@@ -56,6 +58,18 @@ sysprof_profiler_assistant_new (void)
return g_object_new (SYSPROF_TYPE_PROFILER_ASSISTANT, NULL);
}
+static void
+sysprof_profiler_assistant_aid_activated_cb (SysprofProfilerAssistant *self,
+ SysprofAidIcon *icon,
+ GtkFlowBox *flow_box)
+{
+ g_assert (SYSPROF_IS_PROFILER_ASSISTANT (self));
+ g_assert (SYSPROF_IS_AID_ICON (icon));
+ g_assert (GTK_IS_FLOW_BOX (flow_box));
+
+ sysprof_aid_icon_toggle (icon);
+}
+
static GtkWidget *
create_process_row_cb (gpointer item_,
gpointer user_data)
@@ -128,11 +142,13 @@ sysprof_profiler_assistant_class_init (SysprofProfilerAssistantClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/sysprof/ui/sysprof-profiler-assistant.ui");
+ gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, aid_flow_box);
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, command_line);
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, environ_editor);
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, process_list_box);
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, process_revealer);
+ g_type_ensure (SYSPROF_TYPE_AID_ICON);
g_type_ensure (SYSPROF_TYPE_ENVIRON_EDITOR);
}
@@ -161,5 +177,11 @@ sysprof_profiler_assistant_init (SysprofProfilerAssistant *self)
self,
G_CONNECT_SWAPPED);
+ g_signal_connect_object (self->aid_flow_box,
+ "child-activated",
+ G_CALLBACK (sysprof_profiler_assistant_aid_activated_cb),
+ self,
+ G_CONNECT_SWAPPED);
+
sysprof_environ_editor_set_environ (self->environ_editor, environ);
}
diff --git a/src/libsysprof-ui/ui/sysprof-aid-icon.ui b/src/libsysprof-ui/ui/sysprof-aid-icon.ui
new file mode 100644
index 0000000..cf9f86b
--- /dev/null
+++ b/src/libsysprof-ui/ui/sysprof-aid-icon.ui
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.0 -->
+<interface>
+ <requires lib="gtk+" version="3.12"/>
+ <template class="SysprofAidIcon" parent="GtkFlowBoxChild">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkOverlay">
+ <property name="halign">center</property>
+ <property name="visible">true</property>
+ <child>
+ <object class="GtkImage" id="image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">64</property>
+ <property name="icon_name">dialog-warning</property>
+ </object>
+ </child>
+ <child type="overlay">
+ <object class="GtkImage" id="check">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixel_size">16</property>
+ <property name="icon_name">object-select-symbolic</property>
+ <property name="halign">end</property>
+ <property name="valign">start</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Aid Description</property>
+ <property name="use_underline">True</property>
+ <property name="wrap">True</property>
+ <property name="mnemonic_widget">SysprofAidIcon</property>
+ <property name="max_width_chars">12</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/src/libsysprof-ui/ui/sysprof-profiler-assistant.ui
b/src/libsysprof-ui/ui/sysprof-profiler-assistant.ui
index 10cca39..3628240 100644
--- a/src/libsysprof-ui/ui/sysprof-profiler-assistant.ui
+++ b/src/libsysprof-ui/ui/sysprof-profiler-assistant.ui
@@ -8,96 +8,155 @@
<property name="hscrollbar-policy">never</property>
<property name="visible">true</property>
<child>
- <object class="DzlThreeGrid" id="three_grid">
+ <object class="GtkBox">
<property name="margin">36</property>
- <property name="column-spacing">12</property>
- <property name="row-spacing">6</property>
+ <property name="spacing">12</property>
+ <property name="orientation">vertical</property>
<property name="visible">true</property>
<child>
- <object class="GtkLabel" id="label1">
- <property name="label" translatable="yes">All Processes</property>
- <property name="xalign">1.0</property>
- <property name="visible">true</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="column">left</property>
- <property name="row">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkSwitch" id="whole_system_switch">
- <property name="active">true</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="visible">true</property>
- </object>
- <packing>
- <property name="column">center</property>
- <property name="row">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="orientation">vertical</property>
+ <object class="DzlThreeGrid" id="three_grid">
+ <property name="column-spacing">12</property>
+ <property name="row-spacing">6</property>
<property name="visible">true</property>
<child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Enable to generate callgraph information for
all applications and the operating system kernel. This may not be possible on some system system
configurations.</property>
- <property name="margin-bottom">6</property>
- <property name="max-width-chars">10</property>
- <property name="wrap">true</property>
+ <object class="GtkLabel" id="label0">
+ <property name="label" translatable="yes">Data Collection</property>
+ <property name="xalign">1.0</property>
+ <property name="valign">start</property>
<property name="visible">true</property>
- <property name="xalign">0.0</property>
- <attributes>
- <attribute name="scale" value="0.8333"/>
- </attributes>
<style>
<class name="dim-label"/>
</style>
</object>
+ <packing>
+ <property name="column">left</property>
+ <property name="row">0</property>
+ </packing>
</child>
<child>
- <object class="GtkRevealer" id="process_revealer">
- <property name="reveal-child" bind-source="whole_system_switch" bind-property="active"
bind-flags="sync-create|invert-boolean"/>
+ <object class="GtkFlowBox" id="aid_flow_box">
+ <property name="activate-on-single-click">true</property>
+ <property name="column-spacing">24</property>
+ <property name="row-spacing">12</property>
+ <property name="max-children-per-line">4</property>
+ <property name="min-children-per-line">4</property>
+ <property name="halign">fill</property>
+ <property name="selection-mode">single</property>
+ <property name="margin-bottom">24</property>
<property name="visible">true</property>
<child>
- <object class="GtkBox">
- <property name="margin-bottom">12</property>
- <property name="orientation">vertical</property>
+ <object class="SysprofAidIcon">
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="SysprofAidIcon">
<property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="SysprofAidIcon">
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="SysprofAidIcon">
+ <property name="visible">true</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="label" translatable="yes">All Processes</property>
+ <property name="xalign">1.0</property>
+ <property name="visible">true</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="column">left</property>
+ <property name="row">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="whole_system_switch">
+ <property name="active">true</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="visible">true</property>
+ </object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="visible">true</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Include all applications and operating
system kernel in callgraph. This may not be possible on some system system configurations.</property>
+ <property name="margin-bottom">6</property>
+ <property name="max-width-chars">10</property>
+ <property name="wrap">true</property>
+ <property name="visible">true</property>
+ <property name="xalign">0.0</property>
+ <attributes>
+ <attribute name="scale" value="0.8333"/>
+ </attributes>
<style>
- <class name="linked"/>
+ <class name="dim-label"/>
</style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRevealer" id="process_revealer">
+ <property name="reveal-child" bind-source="whole_system_switch"
bind-property="active" bind-flags="sync-create|invert-boolean"/>
+ <property name="visible">true</property>
<child>
- <object class="GtkSearchEntry">
- <property name="placeholder-text" translatable="yes">Search Processes…</property>
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkScrolledWindow">
- <property name="shadow-type">in</property>
- <property name="hscrollbar-policy">never</property>
- <property name="min-content-height">175</property>
- <property name="max-content-height">175</property>
+ <object class="GtkBox">
+ <property name="margin-bottom">12</property>
+ <property name="orientation">vertical</property>
<property name="visible">true</property>
+ <style>
+ <class name="linked"/>
+ </style>
<child>
- <object class="GtkListBox" id="process_list_box">
- <property name="selection-mode">none</property>
+ <object class="GtkSearchEntry">
+ <property name="placeholder-text" translatable="yes">Search
Processes…</property>
<property name="visible">true</property>
- <child type="placeholder">
- <object class="GtkLabel">
- <property name="margin-left">12</property>
- <property name="margin-right">12</property>
- <property name="label" translatable="yes">Loading Processes…</property>
- <property name="valign">center</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="shadow-type">in</property>
+ <property name="hscrollbar-policy">never</property>
+ <property name="min-content-height">175</property>
+ <property name="max-content-height">175</property>
+ <property name="visible">true</property>
+ <child>
+ <object class="GtkListBox" id="process_list_box">
+ <property name="selection-mode">none</property>
<property name="visible">true</property>
- <style>
- <class name="dim-label"/>
- </style>
+ <child type="placeholder">
+ <object class="GtkLabel">
+ <property name="margin-left">12</property>
+ <property name="margin-right">12</property>
+ <property name="label" translatable="yes">Loading
Processes…</property>
+ <property name="valign">center</property>
+ <property name="visible">true</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
</object>
</child>
</object>
@@ -107,179 +166,185 @@
</object>
</child>
</object>
- </child>
- </object>
- <packing>
- <property name="column">center</property>
- <property name="row">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="label" translatable="yes">Launch Application</property>
- <property name="xalign">1.0</property>
- <property name="valign">start</property>
- <property name="visible">true</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="column">left</property>
- <property name="row">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <property name="width-request">500</property>
- <property name="valign">start</property>
- <property name="visible">true</property>
- <child>
- <object class="GtkSwitch" id="launch_switch">
- <property name="active">false</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="visible">true</property>
- </object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">2</property>
+ </packing>
</child>
<child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Enable to launch a program of your choosing
before profiling.</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="max-width-chars">10</property>
- <property name="wrap">true</property>
+ <object class="GtkLabel" id="label2">
+ <property name="label" translatable="yes">Launch Application</property>
+ <property name="xalign">1.0</property>
+ <property name="valign">start</property>
<property name="visible">true</property>
- <property name="xalign">0.0</property>
- <attributes>
- <attribute name="scale" value="0.8333"/>
- </attributes>
<style>
<class name="dim-label"/>
</style>
</object>
+ <packing>
+ <property name="column">left</property>
+ <property name="row">3</property>
+ </packing>
</child>
<child>
- <object class="GtkRevealer" id="launch_revealer">
- <property name="reveal-child" bind-source="launch_switch" bind-property="active"
bind-flags="sync-create"/>
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="width-request">500</property>
+ <property name="valign">start</property>
<property name="visible">true</property>
<child>
- <object class="GtkBox">
+ <object class="GtkSwitch" id="launch_switch">
+ <property name="active">false</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Enable to launch a program of your
choosing before profiling.</property>
<property name="margin-top">6</property>
- <property name="spacing">6</property>
- <property name="margin-bottom">12</property>
- <property name="orientation">vertical</property>
+ <property name="margin-bottom">6</property>
+ <property name="max-width-chars">10</property>
+ <property name="wrap">true</property>
+ <property name="visible">true</property>
+ <property name="xalign">0.0</property>
+ <attributes>
+ <attribute name="scale" value="0.8333"/>
+ </attributes>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkRevealer" id="launch_revealer">
+ <property name="reveal-child" bind-source="launch_switch" bind-property="active"
bind-flags="sync-create"/>
<property name="visible">true</property>
<child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Command Line</property>
- <property name="xalign">0.0</property>
- <property name="visible">true</property>
- <attributes>
- <attribute name="scale" value="0.8333"/>
- <attribute name="weight" value="bold"/>
- </attributes>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkEntry" id="command_line">
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Environment</property>
- <property name="margin-top">12</property>
- <property name="xalign">0.0</property>
- <property name="visible">true</property>
- <attributes>
- <attribute name="scale" value="0.8333"/>
- <attribute name="weight" value="bold"/>
- </attributes>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkFrame">
- <property name="shadow-type">in</property>
+ <object class="GtkBox">
+ <property name="margin-top">6</property>
+ <property name="spacing">6</property>
+ <property name="margin-bottom">12</property>
+ <property name="orientation">vertical</property>
<property name="visible">true</property>
<child>
- <object class="SysprofEnvironEditor" id="environ_editor">
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Command Line</property>
+ <property name="xalign">0.0</property>
<property name="visible">true</property>
+ <attributes>
+ <attribute name="scale" value="0.8333"/>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkEntry" id="command_line">
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Environment</property>
+ <property name="margin-top">12</property>
+ <property name="xalign">0.0</property>
+ <property name="visible">true</property>
+ <attributes>
+ <attribute name="scale" value="0.8333"/>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="shadow-type">in</property>
+ <property name="visible">true</property>
+ <child>
+ <object class="SysprofEnvironEditor" id="environ_editor">
+ <property name="visible">true</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Inherit Environment</property>
+ <property name="margin-top">12</property>
+ <property name="max-width-chars">10</property>
+ <property name="wrap">true</property>
+ <property name="visible">true</property>
+ <property name="xalign">0.0</property>
+ <attributes>
+ <attribute name="scale" value="0.8333"/>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="inherit_switch">
+ <property name="active">true</property>
+ <property name="halign">start</property>
+ <property name="visible">true</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Enable to ensure your application
shares the display, message-bus, and other desktop environment settings.</property>
+ <property name="margin-bottom">12</property>
+ <property name="max-width-chars">10</property>
+ <property name="wrap">true</property>
+ <property name="visible">true</property>
+ <property name="xalign">0.0</property>
+ <attributes>
+ <attribute name="scale" value="0.8333"/>
+ </attributes>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Inherit Environment</property>
- <property name="margin-top">12</property>
- <property name="max-width-chars">10</property>
- <property name="wrap">true</property>
- <property name="visible">true</property>
- <property name="xalign">0.0</property>
- <attributes>
- <attribute name="scale" value="0.8333"/>
- <attribute name="weight" value="bold"/>
- </attributes>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkSwitch" id="inherit_switch">
- <property name="active">true</property>
- <property name="halign">start</property>
- <property name="visible">true</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Enable to ensure your application
shares the display, message-bus, and other desktop environment settings.</property>
- <property name="margin-bottom">12</property>
- <property name="max-width-chars">10</property>
- <property name="wrap">true</property>
- <property name="visible">true</property>
- <property name="xalign">0.0</property>
- <attributes>
- <attribute name="scale" value="0.8333"/>
- </attributes>
- <style>
- <class name="dim-label"/>
- </style>
</object>
</child>
</object>
</child>
</object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="record_button">
+ <property name="label" translatable="yes">_Record</property>
+ <property name="use-underline">true</property>
+ <property name="halign">end</property>
+ <property name="width-request">125</property>
+ <property name="visible">true</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">24</property>
+ <style>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ <packing>
+ <property name="column">center</property>
+ <property name="row">4</property>
+ </packing>
</child>
</object>
<packing>
- <property name="column">center</property>
- <property name="row">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="record_button">
- <property name="label" translatable="yes">_Record</property>
- <property name="use-underline">true</property>
- <property name="halign">end</property>
- <property name="width-request">125</property>
- <property name="visible">true</property>
- <style>
- <class name="suggested-action"/>
- </style>
- </object>
- <packing>
- <property name="column">center</property>
- <property name="row">4</property>
+ <property name="pack-type">start</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -290,6 +355,7 @@
<object class="GtkSizeGroup">
<property name="mode">vertical</property>
<widgets>
+ <widget name="label0"/>
<widget name="label1"/>
<widget name="whole_system_switch"/>
</widgets>
diff --git a/src/sysprof/ui/sysprof-window.ui b/src/sysprof/ui/sysprof-window.ui
index 0467721..63110d2 100644
--- a/src/sysprof/ui/sysprof-window.ui
+++ b/src/sysprof/ui/sysprof-window.ui
@@ -53,33 +53,6 @@
</child>
</object>
</child>
- <child>
- <object class="GtkBox">
- <property name="visible">true</property>
- <style>
- <class name="linked"/>
- </style>
- <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>
<object class="GtkLabel" id="stat_label">
<property name="margin-end">12</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]