mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-ui: port a number of properties to GTK 4
This commit is contained in:
@ -1,32 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.22.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<template class="SysprofAidIcon" parent="GtkFlowBoxChild">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<property name="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>
|
||||
<property name="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="width-request">92</property>
|
||||
<property name="icon_name">org.gnome.Sysprof-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</property>
|
||||
<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>
|
||||
@ -34,29 +25,17 @@
|
||||
</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="use_underline">True</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="wrap">1</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>
|
||||
</property>
|
||||
</template>
|
||||
</interface>
|
||||
|
||||
@ -9,7 +9,10 @@
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="EggThreeGrid" id="three_grid">
|
||||
<property name="margin">36</property>
|
||||
<property name="margin-start">36</property>
|
||||
<property name="margin-end">36</property>
|
||||
<property name="margin-top">36</property>
|
||||
<property name="margin-bottom">36</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="visible">true</property>
|
||||
|
||||
@ -70,7 +70,10 @@ sysprof_environ_editor_create_dummy_row (SysprofEnvironEditor *self)
|
||||
|
||||
label = g_object_new (GTK_TYPE_LABEL,
|
||||
"label", _("New variable…"),
|
||||
"margin", 6,
|
||||
"margin-start", 6,
|
||||
"margin-end", 6,
|
||||
"margin-top", 6,
|
||||
"margin-bottom", 6,
|
||||
"visible", TRUE,
|
||||
"xalign", 0.0f,
|
||||
NULL);
|
||||
|
||||
@ -12,7 +12,10 @@
|
||||
<child>
|
||||
<object class="GtkBox" id="details_box">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
|
||||
@ -72,7 +72,10 @@
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">16</property>
|
||||
<property name="margin-top">16</property>
|
||||
<property name="margin-bottom">16</property>
|
||||
<property name="margin-start">16</property>
|
||||
<property name="margin-end">16</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
|
||||
@ -4,7 +4,10 @@
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">true</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image">
|
||||
|
||||
@ -24,6 +24,8 @@
|
||||
|
||||
#include <sysprof.h>
|
||||
|
||||
#include "egg-three-grid.h"
|
||||
|
||||
#include "sysprof-platform.h"
|
||||
|
||||
#include "sysprof-aid-icon.h"
|
||||
@ -61,6 +63,7 @@ struct _SysprofProfilerAssistant
|
||||
GtkSwitch *whole_system_switch;
|
||||
GtkSwitch *launch_switch;
|
||||
GtkSwitch *inherit_switch;
|
||||
GtkWidget *scroller;
|
||||
};
|
||||
|
||||
enum {
|
||||
@ -352,6 +355,7 @@ sysprof_profiler_assistant_dispose (GObject *object)
|
||||
SysprofProfilerAssistant *self = (SysprofProfilerAssistant *)object;
|
||||
|
||||
g_clear_object (&self->process_model);
|
||||
g_clear_pointer (&self->scroller, gtk_widget_unparent);
|
||||
|
||||
G_OBJECT_CLASS (sysprof_profiler_assistant_parent_class)->dispose (object);
|
||||
}
|
||||
@ -392,6 +396,9 @@ sysprof_profiler_assistant_class_init (SysprofProfilerAssistantClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, launch_switch);
|
||||
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, inherit_switch);
|
||||
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, search_entry);
|
||||
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, scroller);
|
||||
|
||||
g_type_ensure (EGG_TYPE_THREE_GRID);
|
||||
|
||||
g_type_ensure (SYSPROF_TYPE_AID_ICON);
|
||||
g_type_ensure (SYSPROF_TYPE_BATTERY_AID);
|
||||
|
||||
@ -63,19 +63,22 @@
|
||||
</object>
|
||||
<template class="SysprofProfilerAssistant" parent="GtkWidget">
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<object class="GtkScrolledWindow" id="scroller">
|
||||
<property name="propagate-natural-width">true</property>
|
||||
<property name="propagate-natural-height">true</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">36</property>
|
||||
<property name="margin-top">36</property>
|
||||
<property name="margin-bottom">36</property>
|
||||
<property name="margin-start">36</property>
|
||||
<property name="margin-end">36</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="DzlThreeGrid" id="three_grid">
|
||||
<object class="EggThreeGrid" id="three_grid">
|
||||
<property name="column-spacing">12</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="visible">true</property>
|
||||
@ -198,11 +201,11 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">center</property>
|
||||
<property name="row">5</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="column">center</property>
|
||||
<property name="row">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
@ -212,11 +215,11 @@
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">left</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="column">left</property>
|
||||
<property name="row">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="whole_system_switch">
|
||||
@ -224,11 +227,11 @@
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="visible">true</property>
|
||||
<layout>
|
||||
<property name="column">center</property>
|
||||
<property name="row">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="column">center</property>
|
||||
<property name="row">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
@ -270,7 +273,6 @@
|
||||
</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>
|
||||
@ -281,8 +283,8 @@
|
||||
<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="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
<property name="label" translatable="yes">Loading Processes…</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="visible">true</property>
|
||||
@ -299,11 +301,11 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">center</property>
|
||||
<property name="row">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="column">center</property>
|
||||
<property name="row">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
@ -314,11 +316,11 @@
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">left</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="column">left</property>
|
||||
<property name="row">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
@ -398,7 +400,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="SysprofEnvironEditor" id="environ_editor">
|
||||
@ -451,11 +452,11 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">center</property>
|
||||
<property name="row">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="column">center</property>
|
||||
<property name="row">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
@ -466,11 +467,11 @@
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">left</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="column">left</property>
|
||||
<property name="row">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
@ -500,11 +501,11 @@
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="column">center</property>
|
||||
<property name="row">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="column">center</property>
|
||||
<property name="row">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="record_button">
|
||||
@ -518,17 +519,13 @@
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="column">center</property>
|
||||
<property name="row">4</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="column">center</property>
|
||||
<property name="row">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack-type">start</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@ -109,7 +109,10 @@ _sysprof_visualizer_group_header_add_row (SysprofVisualizerGroupHeader *self,
|
||||
label = g_object_new (GTK_TYPE_LABEL,
|
||||
"attributes", attrs,
|
||||
"ellipsize", PANGO_ELLIPSIZE_MIDDLE,
|
||||
"margin", 6,
|
||||
"margin-top", 6,
|
||||
"margin-bottom", 6,
|
||||
"margin-start", 6,
|
||||
"margin-end", 6,
|
||||
"hexpand", TRUE,
|
||||
"label", title,
|
||||
"visible", TRUE,
|
||||
|
||||
Reference in New Issue
Block a user