Projects
openEuler:Mainline
sysprof
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:sysprof.spec
Changed
@@ -1,22 +1,39 @@ -%global glib2_version 2.67.4 +%global glib2_version 2.73.0 Name: sysprof -Version: 3.44.0 +Version: 3.46.0 Release: 1 Summary: A system-wide Linux profiler License: GPLv3+ URL: http://www.sysprof.com -Source0: https://download.gnome.org/sources/sysprof/3.44/sysprof-%{version}.tar.xz - -BuildRequires: gcc gcc-c++ gettext itstool meson json-glib-devel libunwind-devel -BuildRequires: libdazzle-devel systemd-devel polkit-devel libappstream-glib desktop-file-utils -BuildRequires: glib2-devel >= %{glib2_version} pkgconfig(gtk+-3.0) >= 3.22.0 +Source0: https://download.gnome.org/sources/sysprof/3.46/sysprof-%{version}.tar.xz + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: gettext +BuildRequires: itstool +BuildRequires: meson +BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(libadwaita-1) +BuildRequires: pkgconfig(libdazzle-1.0) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libunwind-generic) +BuildRequires: pkgconfig(polkit-gobject-1) +BuildRequires: pkgconfig(systemd) +BuildRequires: libappstream-glib desktop-file-utils Requires: glib2%{?_isa} >= %{glib2_version} Requires: hicolor-icon-theme Requires: %{name}-cli%{?_isa} = %{version}-%{release} Requires: libsysprof-ui%{?_isa} = %{version}-%{release} +Provides: %{name}-agent%{?_isa} = %{version}-%{release} + %description Sysprof is a sampling CPU profiler for Linux that collects accurate. @@ -47,6 +64,7 @@ %prep %autosetup -p1 + %build %meson %meson_build @@ -63,10 +81,11 @@ %license COPYING %doc NEWS AUTHORS %{_bindir}/sysprof -%{_datadir}/applications/org.gnome.Sysprof3.desktop -%{_datadir}/glib-2.0/schemas/org.gnome.sysprof3.gschema.xml +%{_bindir}/sysprof-agent +%{_datadir}/applications/org.gnome.Sysprof.desktop +#%%{_datadir}/glib-2.0/schemas/org.gnome.sysprof3.gschema.xml %{_datadir}/icons/hicolor/*/*/* -%{_datadir}/metainfo/org.gnome.Sysprof3.appdata.xml +%{_datadir}/metainfo/org.gnome.Sysprof.appdata.xml %{_datadir}/mime/packages/sysprof-mime.xml %files cli -f %{name}.lang @@ -76,6 +95,7 @@ %{_libdir}/libsysprof-memory-4.so %{_libdir}/libsysprof-speedtrack-4.so %{_libexecdir}/sysprofd +%{_datadir}/dbus-1/interfaces/org.gnome.Sysprof.Agent.xml %{_datadir}/dbus-1/interfaces/org.gnome.Sysprof2.xml %{_datadir}/dbus-1/interfaces/org.gnome.Sysprof3.Profiler.xml %{_datadir}/dbus-1/interfaces/org.gnome.Sysprof3.Service.xml @@ -89,20 +109,25 @@ %files -n libsysprof-ui %license COPYING -%{_libdir}/libsysprof-ui-4.so +%{_libdir}/libsysprof-ui-5.so %files devel %license src/libsysprof-capture/COPYING %{_includedir}/sysprof-4/ +%{_includedir}/sysprof-ui-5/ %{_libdir}/pkgconfig/sysprof-4.pc %{_libdir}/pkgconfig/sysprof-capture-4.pc -%{_libdir}/pkgconfig/sysprof-ui-4.pc +#%%{_libdir}/pkgconfig/sysprof-ui-4.pc +%{_libdir}/pkgconfig/sysprof-ui-5.pc %{_libdir}/libsysprof-capture-4.a %files help %doc README.md %changelog +* Mon Jan 02 2023 lin zhang <lin.zhang@turbolinux.com.cn> - 3.46.0-1 +- Update to 3.46.0 + * Wed Apr 20 2022 dillon chen <dillon.chen@gmail.com> - 3.44.0-1 - Update to 3.44.0 @@ -113,4 +138,4 @@ - upgrade to 3.38.1 * Sat Sep 19 2020 chengguipeng<chengguipeng1@huawei.com> - 3.36.0-1 -- Package init +- Package init
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/sysprof.git</param> - <param name="revision">a8640507467f6d19de6e55f7a40ddcd642525510</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/build-aux/flatpak/org.gnome.Sysprof3.json
Deleted
@@ -1,133 +0,0 @@ -{ - "app-id" : "org.gnome.Sysprof3", - "runtime" : "org.gnome.Platform", - "runtime-version" : "master", - "sdk" : "org.gnome.Sdk", - "command" : "sysprof", - "tags" : - "nightly" - , - "desktop-file-name-prefix" : "(Nightly) ", - "finish-args" : - "--require-version=0.10.0", - "--allow=devel", - "--share=ipc", - "--socket=x11", - "--socket=wayland", - "--talk-name=org.gtk.vfs.*", - "--system-talk-name=org.freedesktop.PolicyKit1", - "--system-talk-name=org.gnome.Sysprof3", - "--filesystem=home", - "--filesystem=host", - "--filesystem=xdg-run/dconf", - "--filesystem=~/.config/dconf:ro", - "--talk-name=ca.desrt.dconf", - "--env=DCONF_USER_CONFIG_DIR=.config/dconf" - , - "build-options" : { - "cflags" : "-O2 -g", - "cxxflags" : "-O2 -g", - "env" : { - "V" : "1" - } - }, - "cleanup" : - "/include", - "/lib/pkgconfig", - "/share/pkgconfig", - "/share/aclocal", - "/man", - "/share/man", - "/share/gtk-doc", - "/share/doc", - "/share/vala", - "/share/bash-completions", - "*.la", - "*.a" - , - "modules" : - { - "name": "intltool", - "cleanup": "*" , - "sources": - { - "type": "archive", - "url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz", - "sha256": "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd" - } - - }, - { - "name" : "polkit", - "config-opts" : - "--disable-polkitd", - "--disable-man-pages", - "--disable-introspection", - "--disable-examples", - "--disable-gtk-doc", - "--disable-libelogind", - "--disable-libsystemd-login", - "--with-systemdsystemunitdir=no", - "--with-authdb=dummy", - "--with-authfw=none" - , - "rm-configure" : true, - "cleanup" : - "/bin/*", - "/etc/pam.d", - "/etc/dbus-1", - "/share/dbus-1/system-services/*", - "/share/polkit-1/actions/*", - "/lib/polkit-1" - , - "sources" : - { - "type" : "archive", - "url" : "https://www.freedesktop.org/software/polkit/releases/polkit-0.116.tar.gz", - "sha256" : "88170c9e711e8db305a12fdb8234fac5706c61969b94e084d0f117d8ec5d34b1" - }, - { - "type" : "patch", - "path" : "polkit-build-Add-option-to-build-without-polkitd.patch" - }, - { - "type" : "file", - "path" : "polkit-autogen", - "dest-filename" : "autogen.sh" - } - - }, - { - "name" : "libdazzle", - "config-opts" : - "--libdir=/app/lib", - "--buildtype=debugoptimized" - , - "buildsystem" : "meson", - "builddir" : true, - "sources" : - { - "type" : "git", - "url" : "https://gitlab.gnome.org/GNOME/libdazzle.git" - } - - }, - { - "name" : "sysprof", - "config-opts" : - "--libdir=/app/lib", - "--buildtype=debugoptimized", - "-Denable_gtk=true", - "-Dwith_sysprofd=host" - , - "buildsystem" : "meson", - "builddir" : true, - "sources" : - { - "type" : "git", - "url" : "https://gitlab.gnome.org/GNOME/sysprof.git" - } - - } - -}
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/build-aux/meson
Deleted
-(directory)
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/build-aux/meson/post_install.sh
Deleted
@@ -1,24 +0,0 @@ -#!/bin/sh - -if -z $MESON_INSTALL_PREFIX ; then - echo 'This is meant to be ran from Meson only!' - exit 1 -fi - -if -z $DESTDIR ; then - - echo 'Compiling GSchema' - glib-compile-schemas "$MESON_INSTALL_PREFIX/share/glib-2.0/schemas" - echo 'Updating mime database' - update-mime-database "$MESON_INSTALL_PREFIX/share/mime" - - if -e "$MESON_INSTALL_PREFIX/bin/sysprof" ; then - - echo 'Updating icon cache' - gtk-update-icon-cache -qtf "$MESON_INSTALL_PREFIX/share/icons/hicolor" - echo 'Updating desktop database' - update-desktop-database -q "$MESON_INSTALL_PREFIX/share/applications" - - fi - -fi
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/data/icons/scalable/apps
Deleted
-(directory)
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/data/org.gnome.Sysprof3.appdata.xml.in
Deleted
@@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<component type="desktop-application"> - <id>org.gnome.Sysprof3.desktop</id> - <translation type="gettext">sysprof</translation> - <name>Sysprof</name> - <summary>Profile an application or entire system</summary> - <project_license>GPL-3.0+</project_license> - <project_group>GNOME</project_group> - <developer_name>The GNOME Foundation</developer_name> - - <description> - <p>Sysprof allows you to profile applications to aid in debugging and optimization.</p> - </description> - - <url type="homepage">https://wiki.gnome.org/Apps/Sysprof</url> - <url type="bugtracker">https://gitlab.gnome.org/GNOME/sysprof/issues</url> - <url type="donation">https://www.gnome.org/friends</url> - - <screenshots> - <screenshot type="default"> - <image>https://git.gnome.org/browse/sysprof/plain/data/screenshots/sysprof-main-window.png</image> - </screenshot> - </screenshots> - - <kudos> - <kudo>AppMenu</kudo> - <kudo>HiDpiIcon</kudo> - <kudo>ModernToolkit</kudo> - <kudo>UserDocs</kudo> - </kudos> - - <provides> - <binary>sysprof</binary> - <binary>sysprof-cli</binary> - <dbus type="system">org.gnome.Sysprof2</dbus> - <dbus type="system">org.gnome.Sysprof3</dbus> - </provides> - - <releases> - <release version="3.44.0" date="2022-03-18"/> - <release version="3.43.90" date="2022-03-07"/> - <release version="3.42.1" date="2021-11-04"/> - <release version="3.42.0" date="2021-09-21"/> - </releases> - - <metadata_license>CC0-1.0</metadata_license> - <update_contact>chergert_AT_redhat.com</update_contact> -</component>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/data/org.gnome.Sysprof3.desktop.in
Deleted
@@ -1,14 +0,0 @@ -Desktop Entry -Version=1.0 -Name=Sysprof -GenericName=Profiler -Comment=Profile an application or entire system. -Exec=sysprof %u -TryExec=sysprof -# Translators: Do NOT translate or transliterate this text (this is an icon file name)! -Icon=org.gnome.Sysprof -StartupNotify=true -Terminal=false -Type=Application -Categories=GNOME;GTK;Development; -MimeType=application/x-sysprof-capture;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/data/org.gnome.sysprof3.gschema.xml
Deleted
@@ -1,34 +0,0 @@ -<schemalist> - <schema id="org.gnome.sysprof3" path="/org/gnome/sysprof/" gettext-domain="sysprof"> - <key name="window-size" type="(ii)"> - <default>(-1, -1)</default> - <summary>Window size</summary> - <description>Window size (width and height).</description> - </key> - <key name="window-position" type="(ii)"> - <default>(-1,-1)</default> - <summary>Window position</summary> - <description>Window position (x and y).</description> - </key> - <key name="window-maximized" type="b"> - <default>true</default> - <summary>Window maximized</summary> - <description>Window maximized state</description> - </key> - <key name="last-spawn-argv" type="s"> - <default>''</default> - <summary>Last Spawn Program</summary> - <description>The last spawned program, which will be set in the UI upon restart of the application.</description> - </key> - <key name="last-spawn-inherit-env" type="b"> - <default>true</default> - <summary>Last Spawn Inherit Environment</summary> - <description>If the last spawned environment inherits the parent environment.</description> - </key> - <key name="last-spawn-env" type="as"> - <default></default> - <summary>Last Spawn Environment</summary> - <description>The last spawned environment, which will be set in the UI upon restart of the application.</description> - </key> - </schema> -</schemalist>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-time-label.ui
Deleted
@@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.0 --> -<interface> - <requires lib="gtk+" version="3.0"/> - <template class="SysprofTimeLabel" parent="GtkBox"> - <property name="can_focus">False</property> - <property name="spacing">2</property> - <child type="center"> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label">:</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="minute"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label">00</property> - <property name="width_chars">2</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="second"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label">00</property> - <property name="width_chars">2</property> - <property name="xalign">0</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="pack_type">end</property> - <property name="position">4</property> - </packing> - </child> - </template> -</interface>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/sysprof-window-settings.c
Deleted
@@ -1,175 +0,0 @@ -/* sysprof-window-settings.c - * - * Copyright 2016 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/>. - */ - -#include "sysprof-window.h" -#include "sysprof-window-settings.h" - -#define WINDOW_MIN_WIDTH 1200 -#define WINDOW_MIN_HEIGHT 700 -#define SAVE_TIMEOUT_SECS 1 - -static GSettings *settings; - -static gboolean -sysprof_window_settings__window_save_settings_cb (gpointer data) -{ - GtkWindow *window = data; - GdkRectangle geom; - gboolean maximized; - - g_assert (GTK_IS_WINDOW (window)); - g_assert (G_IS_SETTINGS (settings)); - - g_object_set_data (G_OBJECT (window), "SETTINGS_HANDLER_ID", NULL); - - gtk_window_get_size (window, &geom.width, &geom.height); - gtk_window_get_position (window, &geom.x, &geom.y); - maximized = gtk_window_is_maximized (window); - - g_settings_set (settings, "window-size", "(ii)", geom.width, geom.height); - g_settings_set (settings, "window-position", "(ii)", geom.x, geom.y); - g_settings_set_boolean (settings, "window-maximized", maximized); - - return G_SOURCE_REMOVE; -} - -static gboolean -sysprof_window_settings__window_configure_event (GtkWindow *window, - GdkEventConfigure *event) -{ - guint handler; - - g_assert (GTK_IS_WINDOW (window)); - g_assert (event != NULL); - g_assert (G_IS_SETTINGS (settings)); - - handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (window), "SETTINGS_HANDLER_ID")); - - if (handler == 0) - { - handler = g_timeout_add_seconds (SAVE_TIMEOUT_SECS, - sysprof_window_settings__window_save_settings_cb, - window); - g_object_set_data (G_OBJECT (window), "SETTINGS_HANDLER_ID", GINT_TO_POINTER (handler)); - } - - return GDK_EVENT_PROPAGATE; -} - -static void -sysprof_window_settings__window_realize (GtkWindow *window) -{ - GtkApplication *app; - GdkRectangle geom = { 0 }; - gboolean maximized = FALSE; - GList *list; - guint count = 0; - - g_assert (GTK_IS_WINDOW (window)); - g_assert (G_IS_SETTINGS (settings)); - - g_settings_get (settings, "window-position", "(ii)", &geom.x, &geom.y); - g_settings_get (settings, "window-size", "(ii)", &geom.width, &geom.height); - g_settings_get (settings, "window-maximized", "b", &maximized); - - geom.width = MAX (geom.width, WINDOW_MIN_WIDTH); - geom.height = MAX (geom.height, WINDOW_MIN_HEIGHT); - gtk_window_set_default_size (window, geom.width, geom.height); - - /* - * If there are other windows currently visible other than this one, - * then ignore positioning and let the window manager decide. - */ - count = 0; - app = GTK_APPLICATION (g_application_get_default ()); - list = gtk_application_get_windows (app); - for (; list != NULL; list = list->next) - { - GtkWindow *ele = list->data; - - if (SYSPROF_IS_WINDOW (ele) && (ele != window) && - gtk_widget_get_visible (GTK_WIDGET (window))) - count++; - } - - if (count == 0) - gtk_window_move (window, geom.x, geom.y); - - if (maximized) - gtk_window_maximize (window); -} - -static void -sysprof_window_settings__window_destroy (GtkWindow *window) -{ - guint handler; - - g_assert (GTK_IS_WINDOW (window)); - g_assert (G_IS_SETTINGS (settings)); - - handler = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (window), "SETTINGS_HANDLER_ID")); - - if (handler != 0) - { - g_source_remove (handler); - g_object_set_data (G_OBJECT (window), "SETTINGS_HANDLER_ID", NULL); - } - - g_signal_handlers_disconnect_by_func (window, - G_CALLBACK (sysprof_window_settings__window_configure_event), - NULL); - - g_signal_handlers_disconnect_by_func (window, - G_CALLBACK (sysprof_window_settings__window_destroy), - NULL); - - g_signal_handlers_disconnect_by_func (window, - G_CALLBACK (sysprof_window_settings__window_realize), - NULL); - - g_object_unref (settings); -} - -void -sysprof_window_settings_register (GtkWindow *window) -{ - if (settings == NULL) - { - settings = g_settings_new ("org.gnome.sysprof3"); - g_object_add_weak_pointer (G_OBJECT (settings), (gpointer *)&settings); - } - else - { - g_object_ref (settings); - } - - g_signal_connect (window, - "configure-event", - G_CALLBACK (sysprof_window_settings__window_configure_event), - NULL); - - g_signal_connect (window, - "destroy", - G_CALLBACK (sysprof_window_settings__window_destroy), - NULL); - - g_signal_connect (window, - "realize", - G_CALLBACK (sysprof_window_settings__window_realize), - NULL); -}
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/sysprof-window-settings.h
Deleted
@@ -1,30 +0,0 @@ -/* sysprof-window-settings.h - * - * Copyright 2016 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/>. - */ - -#ifndef SYSPROF_WINDOW_SETTINGS_H -#define SYSPROF_WINDOW_SETTINGS_H - -#include <gtk/gtk.h> - -G_BEGIN_DECLS - -void sysprof_window_settings_register (GtkWindow *window); - -G_END_DECLS - -#endif /* SYSPROF_WINDOW_SETTINGS_H */
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/theme/Adwaita-shared.css
Deleted
@@ -1,18 +0,0 @@ -/* development styles */ -window.development-version headerbar { - background: transparent -gtk-icontheme("system-run-symbolic") 80% 0/128px 128px no-repeat, - linear-gradient(to left, - mix(@theme_fg_color, @theme_bg_color, 0.5) 0%, - @theme_bg_color 25%); - color: alpha(@theme_fg_color, 0.2); -} - -window.development-version headerbar box label { - color: @theme_fg_color; -} - -button.sysprofprofilermenubutton.popup.suggested-action:checked { - background: shade(@theme_selected_bg_color,0.9); - border: 1px solid shade(@theme_selected_bg_color, 0.8); - color: alpha(@theme_selected_fg_color,0.9); -}
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/ui
Deleted
-(directory)
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/ui/sysprof-window.ui
Deleted
@@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<interface> - <template class="SysprofWindow" parent="DzlApplicationWindow"> - <property name="default-height">750</property> - <property name="icon-name">org.gnome.Sysprof-symbolic</property> - <property name="show-menubar">false</property> - <child type="titlebar"> - <object class="GtkHeaderBar"> - <property name="show-close-button">true</property> - <property name="visible">true</property> - <property name="title" translatable="yes">Sysprof</property> - <child> - <object class="DzlMenuButton" id="menu_button"> - <property name="icon-name">open-menu-symbolic</property> - <property name="show-accels">true</property> - <property name="menu-id">win-menu</property> - <property name="visible">true</property> - <style> - <class name="image-button"/> - </style> - </object> - <packing> - <property name="pack-type">end</property> - </packing> - </child> - <child> - <object class="GtkButton" id="open_button"> - <property name="label" translatable="yes">_Open</property> - <property name="action-name">app.open-capture</property> - <property name="use-underline">true</property> - <property name="tooltip-text" translatable="yes">Open Recording… (Ctrl+O)</property> - <property name="visible">true</property> - </object> - <packing> - <property name="pack-type">start</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="stat_label"> - <property name="margin-end">12</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="pack-type">end</property> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - <child> - <object class="SysprofNotebook" id="notebook"> - <property name="visible">true</property> - <child> - <object class="SysprofDisplay"> - <property name="visible">true</property> - </object> - </child> - </object> - </child> - </template> -</interface>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/subprojects
Deleted
-(directory)
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/subprojects/libdazzle.wrap
Deleted
@@ -1,5 +0,0 @@ -wrap-file -directory=libdazzle-3.35.3 -source_url=https://download.gnome.org/sources/libdazzle/3.35/libdazzle-3.35.3.tar.xz -source_filename=libdazzle-3.35.3.tar.xz -source_hash=df67f7a68096e4b33a70ee0bad14cd8a6778425deb087879b5cd8fef8f671304
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/.gitlab-ci.yml
Added
@@ -0,0 +1,20 @@ +include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml' + +flatpak: + extends: .flatpak + timeout: 60m + variables: + GIT_SUBMODULE_STRATEGY: normal + + # Replace with your manifest path + MANIFEST_PATH: "org.gnome.Sysprof.Devel.json" + RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo" + # Replace with your application name, as written in the manifest + FLATPAK_MODULE: "sysprof" + APP_ID: "org.gnome.Sysprof.Devel" + BUNDLE: "sysprof-git.flatpak" + +nightly: + extends: '.publish_nightly' + needs: + - 'flatpak'
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/NEWS -> _service:tar_scm:sysprof-3.46.0.tar.xz/NEWS
Changed
@@ -1,3 +1,42 @@ +Overview of changes in Sysprof 3.46.0 +===================================== + + * sysprof-cli is now statically linked + * sysprof-agent now has a --decode option to decode symbols at the end + of a capture, similar to what sysprof-cli can do. + * A crash in the Elf symbol resolver has been fixed. + * Translation updates + +Overview of changes in Sysprof 3.45.1 +===================================== + +This release of Sysprof is a development release and is not intended for +end users. + + * Addition of sysprof-agent to aid in cross-container profiling and + instrumentation. (Use -Dagent=(true|false) to control + * Additional porting to libadwaita + * Remove unused settings schemas + * Nightly Flatpak builds now use org.gnome.Sysprof.Devel as the + application-id + * The application now uses org.gnome.Sysprof as the application-id + instead of org.gnome.Sysprof3. + * Icon updates + * Translation updates + +Overview of changes in Sysprof 3.45.0 +===================================== + +This release of Sysprof is a development release and is not intended for +end users. + + * Initial port to GTK 4 + * A number of build configuration options where simplified and will need + changing by distributions to match the new, more consistent, naming. + * Libadwaita has been added as a dependency + * The profiler assistant has received styling changes + * libsysprof-ui had it's ABI bumped to libsysprof-ui-5 which targets GTK 4. + Overview of changes in Sysprof 3.44.0 =====================================
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/README.md -> _service:tar_scm:sysprof-3.46.0.tar.xz/README.md
Changed
@@ -24,9 +24,9 @@ ---------------- You need some packages installed. The package names may vary depending on your -distribution, the following command works on Fedora 25: +distribution, the following command works on Fedora 36: - sudo dnf install gcc gcc-c++ ninja-build gtk3-devel + sudo dnf install gcc gcc-c++ ninja-build gtk4-devel libadwaita-devel Then do the following:
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/config.h.meson -> _service:tar_scm:sysprof-3.46.0.tar.xz/config.h.meson
Changed
@@ -1,5 +1,9 @@ #mesondefine API_VERSION_S +#mesondefine APP_ID + +#mesondefine APP_ID_S + #mesondefine DEBUGDIR #mesondefine DEVELOPMENT_BUILD
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/data/icons/meson.build
Added
@@ -0,0 +1,7 @@ +icondir = join_paths(datadir, 'icons/hicolor') + +foreach kind: 'scalable', 'symbolic' + install_subdir(kind, install_dir: icondir) +endforeach + +install_data('@0@.svg'.format(app_id), install_dir: join_paths(icondir, 'scalable/apps'))
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/data/icons/org.gnome.Sysprof.Devel.svg
Added
@@ -0,0 +1,244 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <defs> + <linearGradient id="a" gradientTransform="matrix(0.755256 0.352182 -0.633927 1.359462 157.24072 -248.021909)" gradientUnits="userSpaceOnUse" x1="58" x2="70" y1="189" y2="189"> + <stop offset="0" stop-color="#77767b"/> + <stop offset="0.0889297" stop-color="#9a9996"/> + <stop offset="0.4" stop-color="#deddda"/> + <stop offset="0.8" stop-color="#a9a8a9"/> + <stop offset="1" stop-color="#77767b"/> + </linearGradient> + <filter id="b" height="100%" width="100%" x="0%" y="0%"> + <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/> + </filter> + <mask id="c"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <mask id="d"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <mask id="e"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <radialGradient id="f" cx="63.678799" cy="186.932092" gradientUnits="userSpaceOnUse" r="16"> + <stop offset="0" stop-color="#77767b"/> + <stop offset="0.729" stop-color="#77767b"/> + <stop offset="0.81" stop-color="#abaaa9"/> + <stop offset="0.9" stop-color="#c0bfbc"/> + <stop offset="1" stop-color="#77767b"/> + </radialGradient> + <linearGradient id="g" gradientUnits="userSpaceOnUse" x1="60" x2="68" y1="27.986841" y2="27.986841"> + <stop offset="0" stop-color="#9a9996"/> + <stop offset="0.119491" stop-color="#c0bfbc"/> + <stop offset="0.350902" stop-color="#deddda"/> + <stop offset="0.601801" stop-color="#d2d1ce"/> + <stop offset="0.852699" stop-color="#bbbab7"/> + <stop offset="1" stop-color="#9a9996"/> + </linearGradient> + <linearGradient id="h" gradientUnits="userSpaceOnUse" x1="58" x2="70" y1="17.130838" y2="17.130838"> + <stop offset="0" stop-color="#77767b"/> + <stop offset="0.075" stop-color="#9a9996"/> + <stop offset="0.445" stop-color="#deddda"/> + <stop offset="0.8335" stop-color="#b9b8b8"/> + <stop offset="1" stop-color="#77767b"/> + </linearGradient> + <radialGradient id="i" cx="64.000008" cy="75.832742" gradientUnits="userSpaceOnUse" r="46"> + <stop offset="0" stop-color="#5e5c64"/> + <stop offset="0.73913" stop-color="#c0bfbc"/> + <stop offset="0.895652" stop-color="#deddda"/> + <stop offset="1" stop-color="#77767b"/> + </radialGradient> + <linearGradient id="j" gradientTransform="matrix(0 1.117647 -1.117647 0 343.411774 6.601425)" gradientUnits="userSpaceOnUse" x1="30" x2="98" y1="250" y2="250"> + <stop offset="0" stop-color="#7a8599"/> + <stop offset="1" stop-color="#a4acb7"/> + </linearGradient> + <linearGradient id="k" gradientTransform="matrix(0.965926 -0.258819 0.258819 0.965926 -0 -171.869163)" gradientUnits="userSpaceOnUse" x1="4.879063" x2="-11.685356" y1="229.0681" y2="290.88736"> + <stop offset="0" stop-color="#ffffff"/> + <stop offset="1" stop-color="#f6f5f4"/> + </linearGradient> + <mask id="l"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <mask id="m"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <mask id="n"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <mask id="o"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <mask id="p"> + <g filter="url(#b)"> + <rect fill-opacity="0.05" height="128" width="128"/> + </g> + </mask> + <mask id="q"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <clipPath id="r"> + <rect height="152" width="192"/> + </clipPath> + <g id="s" clip-path="url(#r)"> + <path d="m 94.214844 39.390625 l -3.378906 7.25 l -1.8125 -0.84375 l 3.378906 -7.25 z m 0 0"/> + </g> + <mask id="t"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <clipPath id="u"> + <rect height="152" width="192"/> + </clipPath> + <g id="v" clip-path="url(#u)"> + <path d="m 97.839844 41.082031 l -3.378906 7.25 l -1.8125 -0.84375 l 3.378906 -7.253906 z m 0 0"/> + </g> + <mask id="w"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <clipPath id="x"> + <rect height="152" width="192"/> + </clipPath> + <g id="y" clip-path="url(#x)"> + <path d="m 101.464844 42.773438 l -3.378906 7.25 l -1.8125 -0.847657 l 3.378906 -7.25 z m 0 0"/> + </g> + <mask id="z"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <clipPath id="A"> + <rect height="152" width="192"/> + </clipPath> + <g id="B" clip-path="url(#A)"> + <path d="m 68 38.128906 h 8 v 2 h -8 z m 0 0"/> + </g> + <mask id="C"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <clipPath id="D"> + <rect height="152" width="192"/> + </clipPath> + <g id="E" clip-path="url(#D)"> + <path d="m 70 28.128906 v 8 h -2 v -8 z m 0 0"/> + </g> + <mask id="F"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <clipPath id="G"> + <rect height="152" width="192"/> + </clipPath> + <g id="H" clip-path="url(#G)"> + <path d="m 74 28.128906 v 8 h -2 v -8 z m 0 0"/> + </g> + <mask id="I"> + <g filter="url(#b)"> + <rect fill-opacity="0.2" height="128" width="128"/> + </g> + </mask> + <clipPath id="J"> + <rect height="152" width="192"/> + </clipPath> + <g id="K" clip-path="url(#J)"> + <path d="m 78 28.128906 v 8 h -2 v -8 z m 0 0"/> + </g> + <mask id="L"> + <g filter="url(#b)"> + <rect fill-opacity="0.05" height="128" width="128"/> + </g> + </mask> + <clipPath id="M"> + <rect height="152" width="192"/> + </clipPath> + <g id="N" clip-path="url(#M)"> + <path d="m 73.375 58.15625 c -3.605469 -0.136719 -7.210938 0.265625 -10.691406 1.199219 c -15.863282 4.273437 -26.820313 18.738281 -26.636719 35.164062 c 0.699219 -15.679687 11.476563 -29.09375 26.636719 -33.164062 c 19.203125 -5.144531 38.945312 6.253906 44.089844 25.457031 c 0.765624 2.914062 1.160156 5.914062 1.179687 8.929688 c 0.167969 -3.683594 -0.230469 -7.367188 -1.179687 -10.929688 c -4.085938 -15.246094 -17.625 -26.054688 -33.398438 -26.65625 z m 0 0"/> + </g> + <clipPath id="O"> + <rect height="128" width="128"/> + </clipPath> + <clipPath id="P"> + <rect height="128" width="128"/> + </clipPath> + <mask id="Q"> + <g clip-path="url(#P)" filter="url(#b)"> + <g clip-path="url(#O)"> + <path d="m 84.402344 22.546875 l 9.0625 4.226563 l -6.339844 13.59375 l -9.0625 -4.226563 z m 0 0" fill="url(#a)"/> + <use mask="url(#q)" transform="matrix(1 0 0 1 -8 -16)" xlink:href="#s"/> + <use mask="url(#t)" transform="matrix(1 0 0 1 -8 -16)" xlink:href="#v"/> + <use mask="url(#w)" transform="matrix(1 0 0 1 -8 -16)" xlink:href="#y"/> + <path d="m 78 188.128906 c 0 7.734375 -6.269531 14 -14 14 s -14 -6.265625 -14 -14 c 0 -7.730468 6.269531 -14 14 -14 s 14 6.269532 14 14 z m 0 0" fill="none" stroke="url(#f)" stroke-linejoin="round" stroke-width="4" transform="matrix(1 0 0 1 0 -172)"/> + <path d="m 60 18.128906 h 8 v 20 h -8 z m 0 0" fill="url(#g)"/> + <path d="m 58 12.128906 h 12 v 10 h -12 z m 0 0" fill="url(#h)"/> + <path d="m 110 78.128906 c 0 25.40625 -20.59375 46 -46 46 s -46 -20.59375 -46 -46 c 0 -25.402344 20.59375 -46 46 -46 s 46 20.597656 46 46 z m 0 0" fill="url(#i)"/> + <path d="m 64 116.128906 c -20.988281 0 -38 -17.011718 -38 -38 c 0 -20.984375 17.011719 -38 38 -38 s 38 17.015625 38 38 c 0 20.988282 -17.011719 38 -38 38 z m 0 0" fill="url(#j)"/> + <path d="m 98.773438 68.8125 c 5.144531 19.207031 -6.25 38.945312 -25.457032 44.089844 c -19.203125 5.148437 -38.945312 -6.25 -44.089844 -25.453125 c -5.144531 -19.207031 6.25 -38.945313 25.457032 -44.089844 c 19.203125 -5.148437 38.945312 6.25 44.089844 25.453125 z m 0 0" fill="url(#k)"/> + <path d="m 63 45.128906 l -0.746094 27.203125 c -2.632812 0.691407 -4.25 3.074219 -4.253906 5.796875 c 0.003906 2.480469 1.53125 4.703125 3.84375 5.59375 l -0.21875 3.902344 c 0 0.847656 0.453125 1.632812 1.1875 2.054688 c 0.734375 0.425781 1.640625 0.425781 2.375 0 c 0.734375 -0.421876 1.1875 -1.207032 1.1875 -2.054688 l -0.21875 -3.898438 c 2.316406 -0.890624 3.84375 -3.113281 3.84375 -5.597656 c -0.003906 -2.722656 -1.707031 -5.101562 -4.34375 -5.796875 l -0.65625 -27.203125 z m 1 29 c 2.210938 0 4 1.792969 4 4 c 0 2.210938 -1.789062 4 -4 4 s -4 -1.789062 -4 -4 c 0 -2.207031 1.789062 -4 4 -4 z m 0 0" fill="#414045"/> + <use mask="url(#z)" transform="matrix(1 0 0 1 -8 -16)" xlink:href="#B"/> + <use mask="url(#C)" transform="matrix(1 0 0 1 -8 -16)" xlink:href="#E"/>
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/data/icons/org.gnome.Sysprof.Source.svg
Added
@@ -0,0 +1,1854 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + inkscape:export-ydpi="96" + inkscape:export-xdpi="96" + inkscape:export-filename="Template.png" + width="192" + height="152" + id="svg11300" + sodipodi:version="0.32" + inkscape:version="1.2 (dc2aedaf03, 2022-05-15)" + sodipodi:docname="org.gnome.Sysprof.Source.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + version="1.0" + style="display:inline;enable-background:new" + viewBox="0 0 192 152" + xml:space="preserve" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><title + id="title4162">Adwaita Icon Template</title><defs + id="defs3"><linearGradient + y2="236" + x2="96" + y1="236" + x1="32" + gradientTransform="translate(604.81684,170.58641)" + gradientUnits="userSpaceOnUse" + id="linearGradient1099" + xlink:href="#linearGradient1036" /><linearGradient + id="linearGradient1036"><stop + id="stop1032" + offset="0" + style="stop-color:#d5d3cf;stop-opacity:1;" /><stop + id="stop1034" + offset="1" + style="stop-color:#f6f5f4;stop-opacity:1" /></linearGradient><radialGradient + r="32" + fy="-76" + fx="-244" + cy="-76" + cx="-244" + gradientTransform="matrix(0.88333331,0,0,0.88333331,-460.35018,463.11973)" + gradientUnits="userSpaceOnUse" + id="radialGradient1103" + xlink:href="#linearGradient1069" /><linearGradient + id="linearGradient1069"><stop + id="stop1065" + offset="0" + style="stop-color:#d5d3cf;stop-opacity:1" /><stop + id="stop1067-1" + offset="1" + style="stop-color:#949390;stop-opacity:1" /></linearGradient><linearGradient + gradientUnits="userSpaceOnUse" + y2="232" + x2="64" + y1="262.5" + x1="64" + id="linearGradient1027" + xlink:href="#linearGradient1025" + gradientTransform="translate(-470.5864,432.81685)" /><linearGradient + id="linearGradient1025"><stop + id="stop1021" + offset="0" + style="stop-color:#9a9996;stop-opacity:1" /><stop + id="stop1023" + offset="1" + style="stop-color:#77767b;stop-opacity:1" /></linearGradient><inkscape:path-effect + effect="spiro" + id="path-effect35304-9" + is_visible="true" /><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1609-7"><path + sodipodi:nodetypes="cccccc" + inkscape:connector-curvature="0" + id="path1611-5" + d="m 252,116 28,-28 v -8 h -36 v 36 z" + style="fill:#e74747;stroke:none;stroke-width:0.25px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /></clipPath><linearGradient + id="linearGradient1697"><stop + id="stop1685" + offset="0" + style="stop-color:#deddda;stop-opacity:1" /><stop + style="stop-color:#eeeeec;stop-opacity:1" + offset="0.04545455" + id="stop1687" /><stop + id="stop1689" + offset="0.09090909" + style="stop-color:#deddda;stop-opacity:1" /><stop + style="stop-color:#deddda;stop-opacity:1" + offset="0.90909094" + id="stop1691" /><stop + id="stop1693" + offset="0.95454544" + style="stop-color:#eeeeec;stop-opacity:1" /><stop + id="stop1695" + offset="1" + style="stop-color:#c0bfbc;stop-opacity:1" /></linearGradient><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1289"><path + style="display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" + d="m 64,-148 h 64 l 64,-64 64,64 h 192 c 17.728,0 32,14.272 32,32 v 288 c 0,17.728 -14.272,32 -32,32 H 256 l -64,-64 -64,64 H 64 C 46.272,204 32,189.728 32,172 v -288 c 0,-17.728 14.408898,-34.19889 32,-32 z" + id="path1291" + inkscape:connector-curvature="0" + sodipodi:nodetypes="scccsssscccssss" /></clipPath><linearGradient + id="paint3_linear-2-6-5" + x2="1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0,6,-12,0,-64,209.99687)"><stop + stop-color="#C01C27" + id="stop91-0-7-4" /><stop + offset="1" + stop-color="#E01B24" + id="stop93-2-5-7" /></linearGradient><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1609"><path + sodipodi:nodetypes="cccccc" + inkscape:connector-curvature="0" + id="path1611" + d="m 252,116 28,-28 v -8 h -36 v 36 z" + style="fill:#e74747;stroke:none;stroke-width:0.25px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /></clipPath><linearGradient + inkscape:collect="always" + xlink:href="#linearGradient1544" + id="linearGradient1546" + x1="12" + y1="64" + x2="116" + y2="64" + gradientUnits="userSpaceOnUse" /><linearGradient + inkscape:collect="always" + id="linearGradient1544"><stop + style="stop-color:#f5b212;stop-opacity:1;" + offset="0" + id="stop1540" /><stop + id="stop1552" + offset="0.03378323" + style="stop-color:#ffd469;stop-opacity:0.99607843" /><stop + style="stop-color:#f5b212;stop-opacity:0.99215686;" + offset="0.06490385" + id="stop1554" /><stop + id="stop1550" + offset="0.89428228" + style="stop-color:#f5b212;stop-opacity:0.94901961;" /><stop + id="stop1548" + offset="0.9554742" + style="stop-color:#ffd776;stop-opacity:0.94901961" /><stop + style="stop-color:#f5b212;stop-opacity:0.94957983" + offset="1" + id="stop1542" /></linearGradient><radialGradient + inkscape:collect="always" + xlink:href="#linearGradient1686" + id="radialGradient1688" + cx="62.975918" + cy="186.01036" + fx="62.975918" + fy="186.01036" + r="52" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.312227,0,0,1,-82.5907,0)" /><linearGradient + inkscape:collect="always" + id="linearGradient1686"><stop + style="stop-color:#f9f06b;stop-opacity:1" + offset="0" + id="stop1682" /><stop + style="stop-color:#f8e45c;stop-opacity:1" + offset="1" + id="stop1684" /></linearGradient><radialGradient + inkscape:collect="always" + xlink:href="#linearGradient1325" + id="radialGradient1327" + cx="64" + cy="267.70789" + fx="64" + fy="267.70789" + r="46" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.0406179,0,0,1.3526206,-130.59955,-94.107222)" /><linearGradient + inkscape:collect="always" + id="linearGradient1325"><stop + style="stop-color:#fbf495;stop-opacity:1" + offset="0" + id="stop1321" /><stop + id="stop1329" + offset="0.59426469" + style="stop-color:#f9f06b;stop-opacity:1" /><stop + style="stop-color:#f5c211;stop-opacity:1" + offset="1" + id="stop1323" /></linearGradient><linearGradient + inkscape:collect="always" + xlink:href="#linearGradient1147" + id="linearGradient1336" + gradientUnits="userSpaceOnUse" + x1="58" + y1="189"
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/data/icons/org.gnome.Sysprof.svg
Changed
(renamed from data/icons/scalable/apps/org.gnome.Sysprof.svg)
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/data/icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg -> _service:tar_scm:sysprof-3.46.0.tar.xz/data/icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg
Changed
@@ -1,30 +1,100 @@ -<?xml version='1.0' encoding='UTF-8' standalone='no'?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='sysprof-symbolic.svg' height='16' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' inkscape:version='0.91 r13725' width='16' xmlns='http://www.w3.org/2000/svg'> - <metadata id='metadata90'> - <rdf:RDF> - <cc:Work rdf:about=''> - <dc:format>image/svg+xml</dc:format> - <dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/> - <dc:title>Gnome Symbolic Icon Theme</dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <sodipodi:namedview inkscape:bbox-nodes='true' inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer9' inkscape:cx='9.9751016' inkscape:cy='-7.30721' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#555753' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-edge-midpoints='true' inkscape:snap-bbox-midpoints='true' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='true' inkscape:snap-others='true' inkscape:snap-to-guides='true' inkscape:window-height='1250' inkscape:window-maximized='0' inkscape:window-width='1590' inkscape:window-x='150' inkscape:window-y='153' inkscape:zoom='1'> - <inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-282' originy='-322' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/> - </sodipodi:namedview> - <title id='title9167'>Gnome Symbolic Icon Theme</title> - <defs id='defs7386'> - <linearGradient id='linearGradient7212' osb:paint='solid'> - <stop id='stop7214' offset='0' style='stop-color:#000000;stop-opacity:1;'/> - </linearGradient> - </defs> - <g inkscape:groupmode='layer' id='layer9' inkscape:label='apps' style='display:inline' transform='translate(-523.0002,105)'> - - <path inkscape:connector-curvature='0' d='m 531.0002,-100 c -2.76142,0 -5,2.23858 -5,5 0,2.76142 2.23858,5 5,5 2.76142,0 5,-2.23858 5,-5 0,-2.76142 -2.23858,-5 -5,-5 z m 0,1 0.28516,3.04297 A 1,1 0 0 1 532.0002,-95 a 1,1 0 0 1 -0.54297,0.88867 l 0.0527,0.55274 c 0.0442,0.35355 -0.21646,0.62421 -0.50977,0.60351 -0.25733,-0.0182 -0.55067,-0.29415 -0.48438,-0.60351 l 0.0488,-0.54297 A 1,1 0 0 1 530.0002,-95 a 1,1 0 0 1 0.73047,-0.96289 L 531.0002,-99 Z' id='path9349' style='color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new'/> - <rect height='1' id='rect9351' style='color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new' width='2' x='530.00018' y='-102'/> - <path inkscape:connector-curvature='0' d='m 531.02734,-104.49805 c -0.686,0 -1.37137,0.23238 -1.92773,0.69922 -1.11273,0.93369 -1.3962,2.54088 -0.66992,3.79883 l 0.86523,-0.5 c -0.48695,-0.84343 -0.29879,-1.90523 0.44727,-2.53125 0.74605,-0.62602 1.82425,-0.62602 2.57031,0 0.74606,0.62602 0.93422,1.68782 0.44727,2.53125 l 0.86523,0.5 c 0.72628,-1.25795 0.4428,-2.86514 -0.66992,-3.79883 -0.55636,-0.46684 -1.24174,-0.69922 -1.92774,-0.69922 z' id='path9353' style='color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new'/> - <rect height='1' id='rect9373' style='color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:new' transform='matrix(0.69053214,0.72330171,-0.72330171,0.69053214,0,0)' width='2' x='296.77777' y='-456.22092'/> - </g> +<?xml version="1.0" encoding="UTF-8"?> +<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <filter id="a" height="100%" width="100%" x="0%" y="0%"> + <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/> + </filter> + <mask id="b"> + <g filter="url(#a)"> + <rect fill-opacity="0.2" height="16" width="16"/> + </g> + </mask> + <clipPath id="c"> + <rect height="152" width="192"/> + </clipPath> + <mask id="d"> + <g filter="url(#a)"> + <rect fill-opacity="0.2" height="16" width="16"/> + </g> + </mask> + <clipPath id="e"> + <rect height="152" width="192"/> + </clipPath> + <mask id="f"> + <g filter="url(#a)"> + <rect fill-opacity="0.2" height="16" width="16"/> + </g> + </mask> + <clipPath id="g"> + <rect height="152" width="192"/> + </clipPath> + <mask id="h"> + <g filter="url(#a)"> + <rect fill-opacity="0.2" height="16" width="16"/> + </g> + </mask> + <clipPath id="i"> + <rect height="152" width="192"/> + </clipPath> + <mask id="j"> + <g filter="url(#a)"> + <rect fill-opacity="0.2" height="16" width="16"/> + </g> + </mask> + <clipPath id="k"> + <rect height="152" width="192"/> + </clipPath> + <mask id="l"> + <g filter="url(#a)"> + <rect fill-opacity="0.2" height="16" width="16"/> + </g> + </mask> + <clipPath id="m"> + <rect height="152" width="192"/> + </clipPath> + <mask id="n"> + <g filter="url(#a)"> + <rect fill-opacity="0.2" height="16" width="16"/> + </g> + </mask> + <clipPath id="o"> + <rect height="152" width="192"/> + </clipPath> + <mask id="p"> + <g filter="url(#a)"> + <rect fill-opacity="0.05" height="16" width="16"/> + </g> + </mask> + <clipPath id="q"> + <rect height="152" width="192"/> + </clipPath> + <g clip-path="url(#c)" mask="url(#b)" transform="matrix(1 0 0 1 -168 -16)"> + <path d="m 94.214844 39.390625 l -3.378906 7.25 l -1.8125 -0.84375 l 3.378906 -7.25 z m 0 0"/> + </g> + <g clip-path="url(#e)" mask="url(#d)" transform="matrix(1 0 0 1 -168 -16)"> + <path d="m 97.839844 41.082031 l -3.378906 7.25 l -1.8125 -0.84375 l 3.378906 -7.253906 z m 0 0"/> + </g> + <g clip-path="url(#g)" mask="url(#f)" transform="matrix(1 0 0 1 -168 -16)"> + <path d="m 101.464844 42.773438 l -3.378906 7.25 l -1.8125 -0.847657 l 3.378906 -7.25 z m 0 0"/> + </g> + <g clip-path="url(#i)" mask="url(#h)" transform="matrix(1 0 0 1 -168 -16)"> + <path d="m 68 38.128906 h 8 v 2 h -8 z m 0 0"/> + </g> + <g clip-path="url(#k)" mask="url(#j)" transform="matrix(1 0 0 1 -168 -16)"> + <path d="m 70 28.128906 v 8 h -2 v -8 z m 0 0"/> + </g> + <g clip-path="url(#m)" mask="url(#l)" transform="matrix(1 0 0 1 -168 -16)"> + <path d="m 74 28.128906 v 8 h -2 v -8 z m 0 0"/> + </g> + <g clip-path="url(#o)" mask="url(#n)" transform="matrix(1 0 0 1 -168 -16)"> + <path d="m 78 28.128906 v 8 h -2 v -8 z m 0 0"/> + </g> + <g clip-path="url(#q)" mask="url(#p)" transform="matrix(1 0 0 1 -168 -16)"> + <path d="m 73.375 58.15625 c -3.605469 -0.136719 -7.210938 0.265625 -10.691406 1.199219 c -15.863282 4.273437 -26.820313 18.738281 -26.636719 35.164062 c 0.699219 -15.679687 11.476563 -29.09375 26.636719 -33.164062 c 19.203125 -5.144531 38.945312 6.253906 44.089844 25.457031 c 0.765624 2.914062 1.160156 5.914062 1.179687 8.929688 c 0.167969 -3.683594 -0.230469 -7.367188 -1.179687 -10.929688 c -4.085938 -15.246094 -17.625 -26.054688 -33.398438 -26.65625 z m 0 0"/> + </g> + <g fill="#bebebe"> + <path d="m 8 1 c -4.128906 0 -7.5 3.371094 -7.5 7.5 s 3.371094 7.5 7.5 7.5 s 7.5 -3.371094 7.5 -7.5 s -3.371094 -7.5 -7.5 -7.5 z m 0 2.144531 c 2.972656 0 5.355469 2.382813 5.355469 5.355469 s -2.382813 5.359375 -5.355469 5.359375 s -5.359375 -2.386719 -5.359375 -5.359375 s 2.386719 -5.355469 5.359375 -5.355469 z m 0 0"/> + <path d="m 8 4.03125 c -0.550781 0 -1 0.449219 -1 1 v 2.203125 c -0.617188 0.355469 -0.996094 1.015625 -1 1.726563 c 0.003906 0.710937 0.382812 1.371093 1 1.726562 v 0.273438 c 0 0.550781 0.449219 1 1 1 s 1 -0.449219 1 -1 v -0.273438 c 0.617188 -0.355469 0.996094 -1.015625 1 -1.726562 c 0 -0.714844 -0.382812 -1.375 -1 -1.730469 v -2.199219 c 0 -0.550781 -0.449219 -1 -1 -1 z m 0 3.929688 c 0.550781 0 1 0.449218 1 1 c 0 0.550781 -0.449219 1 -1 1 s -1 -0.449219 -1 -1 c 0 -0.550782 0.449219 -1 1 -1 z m 0 0"/> + <path d="m 7 0 h 2 c 0.550781 0 1 0.449219 1 1 s -0.449219 1 -1 1 h -2 c -0.550781 0 -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 z m 0 0"/> + <path d="m 13.65625 1.914062 l 1.414062 1.414063 c 0.390626 0.390625 0.390626 1.023437 0 1.414063 l -0.550781 0.550781 c -0.390625 0.390625 -1.023437 0.390625 -1.414062 0 l -1.414063 -1.414063 c -0.390625 -0.390625 -0.390625 -1.023437 0 -1.414062 l 0.550782 -0.550782 c 0.390624 -0.390624 1.023437 -0.390624 1.414062 0 z m 0 0"/> + </g> </svg>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/data/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/data/meson.build
Changed
@@ -1,35 +1,34 @@ -if get_option('enable_gtk') and get_option('libsysprof') - +if get_option('gtk') and get_option('libsysprof') install_data('sysprof-mime.xml', install_dir: join_paths(datadir, 'mime/packages') ) - install_data('org.gnome.sysprof3.gschema.xml', - install_dir: join_paths(datadir, 'glib-2.0/schemas') + appdata_in = configure_file( + input: 'org.gnome.Sysprof.appdata.xml.in.in', + output: 'org.gnome.Sysprof.appdata.xml.in', + configuration: config_h, ) - i18n.merge_file( - input: 'org.gnome.Sysprof3.appdata.xml.in', - output: 'org.gnome.Sysprof3.appdata.xml', + input: appdata_in, + output: '@0@.appdata.xml'.format(app_id), po_dir: podir, install: true, install_dir: join_paths(datadir, 'metainfo') ) + desktop_in = configure_file( + input: 'org.gnome.Sysprof.desktop.in.in', + output: 'org.gnome.Sysprof.desktop.in', + configuration: config_h, + ) i18n.merge_file( - input: 'org.gnome.Sysprof3.desktop.in', - output: 'org.gnome.Sysprof3.desktop', + input: desktop_in, + output: '@0@.desktop'.format(app_id), type: 'desktop', po_dir: podir, install: true, install_dir: join_paths(datadir, 'applications') ) - icon_sizes = 'scalable', 'symbolic' - foreach size: icon_sizes - install_subdir('icons/' + size, - install_dir: join_paths(datadir, 'icons/hicolor') - ) - endforeach - + subdir('icons') endif
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/data/org.gnome.Sysprof.appdata.xml.in.in
Added
@@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="desktop-application"> + <id>@APP_ID@.desktop</id> + <translation type="gettext">sysprof</translation> + <name>Sysprof</name> + <summary>Profile an application or entire system</summary> + <project_license>GPL-3.0+</project_license> + <project_group>GNOME</project_group> + <developer_name>The GNOME Foundation</developer_name> + + <description> + <p>Sysprof allows you to profile applications to aid in debugging and optimization.</p> + </description> + + <url type="homepage">https://wiki.gnome.org/Apps/Sysprof</url> + <url type="bugtracker">https://gitlab.gnome.org/GNOME/sysprof/issues</url> + <url type="donation">https://www.gnome.org/friends</url> + + <screenshots> + <screenshot type="default"> + <image>https://git.gnome.org/browse/sysprof/plain/data/screenshots/sysprof-main-window.png</image> + </screenshot> + </screenshots> + + <kudos> + <kudo>AppMenu</kudo> + <kudo>HiDpiIcon</kudo> + <kudo>ModernToolkit</kudo> + <kudo>UserDocs</kudo> + </kudos> + + <provides> + <binary>sysprof</binary> + <binary>sysprof-agent</binary> + <binary>sysprof-cli</binary> + <dbus type="system">org.gnome.Sysprof2</dbus> + <dbus type="system">org.gnome.Sysprof3</dbus> + </provides> + + <releases> + <release version="3.45.0" date="2022-07-11"/> + </releases> + + <metadata_license>CC0-1.0</metadata_license> + <update_contact>chergert_AT_redhat.com</update_contact> +</component>
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/data/org.gnome.Sysprof.desktop.in.in
Added
@@ -0,0 +1,14 @@ +Desktop Entry +Version=1.0 +Name=Sysprof +GenericName=Profiler +Comment=Profile an application or entire system. +Exec=sysprof %u +TryExec=sysprof +# Translators: Do NOT translate or transliterate this text (this is an icon file name)! +Icon=@APP_ID@ +StartupNotify=true +Terminal=false +Type=Application +Categories=GNOME;GTK;Development; +MimeType=application/x-sysprof-capture;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/data/sysprof-mime.xml -> _service:tar_scm:sysprof-3.46.0.tar.xz/data/sysprof-mime.xml
Changed
@@ -3,5 +3,6 @@ <mime-type type="application/x-sysprof-capture"> <comment>Sysprof Capture</comment> <glob pattern="*.syscap"/> + <generic-icon name="org.gnome.Sysprof"/> </mime-type> </mime-info>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/examples/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/examples/meson.build
Changed
@@ -1,7 +1,3 @@ -if get_option('enable_examples') - app = executable('example-app', 'app.c', dependencies: dependency('glib-2.0'), libsysprof_capture_dep, ) - -endif
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/help/LINGUAS -> _service:tar_scm:sysprof-3.46.0.tar.xz/help/LINGUAS
Changed
@@ -4,6 +4,7 @@ de el es +id pl pt_BR sv
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/help/id
Added
+(directory)
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/help/id/id.po
Added
@@ -0,0 +1,453 @@ +# Indonesian translation for sysprof. +# Copyright (C) 2022 sysprof's COPYRIGHT HOLDER +# This file is distributed under the same license as the sysprof package. +# Andika Triwidada <andika@gmail.com>, 2022. +# +msgid "" +msgstr "" +"Project-Id-Version: sysprof sysprof-3-44\n" +"POT-Creation-Date: 2022-05-09 02:14+0000\n" +"PO-Revision-Date: 2022-07-03 15:36+0700\n" +"Language-Team: Indonesian <gnome-l10n-id@googlegroups.com>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: id\n" +"Last-Translator: Andika Triwidada <andika@gmail.com>\n" +"X-Generator: Poedit 3.0\n" + +#. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2 +msgctxt "_" +msgid "translator-credits" +msgstr "Andika Triwidada <andika@gmail.com>, 2022" + +#. (itstool) path: credit/name +#: C/introduction.page:15 +msgid "Christian Hergert" +msgstr "Christian Hergert" + +#. (itstool) path: credit/years +#: C/introduction.page:17 +msgid "2016" +msgstr "2016" + +#. (itstool) path: info/desc +#: C/introduction.page:22 +msgid "Welcome to <app>Sysprof</app>!" +msgstr "Selamat datang di <app>Sysprof</app>!" + +#. (itstool) path: page/title +#: C/introduction.page:25 +msgid "Introduction" +msgstr "Pengantar" + +#. (itstool) path: page/p +#: C/introduction.page:27 +msgid "" +"<app>Sysprof</app> is a system profiler for Linux that targets the GNOME " +"desktop." +msgstr "" +"<app>Sysprof</app> adalah profiler sistem untuk Linux yang menargetkan " +"desktop GNOME." + +#. (itstool) path: info/desc +#: C/introduction.page:33 +msgid "Differences between tracing and sampling" +msgstr "Perbedaan antara tracing dan sampling" + +#. (itstool) path: section/title +#: C/introduction.page:35 +msgid "What is a Profiler?" +msgstr "Apa itu Profiler?" + +#. (itstool) path: section/p +#: C/introduction.page:37 +msgid "" +"A profiler is an application that records information about an application " +"or system while it runs. That information can be explored to gain insight " +"into how the application could be changed to perform better." +msgstr "" +"Profiler adalah aplikasi yang merekam informasi tentang aplikasi atau sistem " +"saat dijalankan. Informasi itu dapat dieksplorasi untuk mendapatkan wawasan " +"tentang bagaimana aplikasi dapat diubah agar berkinerja lebih baik." + +#. (itstool) path: section/p +#: C/introduction.page:42 +msgid "" +"Two common categories of software profilers exist, commonly referred to as " +"either tracing or sampling profilers. What is meant by tracing profiler is " +"that every function call executed by the program is known to the profiler. A " +"sampling profiler works by inspecting the state of the program on a regular " +"frequency and therefore does not see every function call executed by the " +"program." +msgstr "" +"Ada dua kategori umum profiler perangkat lunak, yang biasa disebut sebagai " +"profiler pelacakan atau pengambilan sampel. Yang dimaksud dengan tracing " +"profiler adalah bahwa setiap panggilan fungsi yang dijalankan oleh program " +"diketahui oleh profiler. Profiler pengambilan sampel bekerja dengan " +"memeriksa keadaan program pada frekuensi reguler dan oleh karena itu tidak " +"melihat setiap panggilan fungsi yang dijalankan oleh program." + +#. (itstool) path: section/p +#: C/introduction.page:49 +msgid "" +"Both tracing and sampling profilers have their advantages. A notable " +"advantage of a sampling profiler is that the overhead is much less than that " +"of a tracing profiler, making it easier to use for software that requires " +"interactivity." +msgstr "" +"Baik profiler tracing maupun sampling memiliki kelebihan masing-masing. " +"Keuntungan penting dari profiler pengambilan sampel adalah bahwa overhead " +"jauh lebih sedikit daripada profiler pelacakan, sehingga lebih mudah " +"digunakan untuk perangkat lunak yang memerlukan interaktivitas." + +#. (itstool) path: section/p +#: C/introduction.page:54 +msgid "<app>Sysprof</app> is a sampling profiler." +msgstr "<app>Sysprof</app> adalah profiler sampling." + +#. (itstool) path: page/title +#. (itstool) path: section/title +#: C/profiling.page:6 C/index.page:15 +msgid "Profiling" +msgstr "Memprofil" + +#. (itstool) path: section/title +#: C/profiling.page:12 +msgid "How to profile your system" +msgstr "Cara membuat profil sistem Anda" + +#. (itstool) path: section/p +#: C/profiling.page:13 +msgid "" +"When <app>Sysprof</app> profiles your system, it records stack information " +"for all applications executing, including the Linux kernel. This can " +"sometimes be confusing if you only want to look at a single process. If your " +"application does not interact much with the host system, you may have more " +"success by using <app>Sysprof</app> to <link href=\"profiling#new-process-" +"profiling\">spawn a new process</link>." +msgstr "" +"Ketika <app>Sysprof</app> membuat profil sistem Anda, ia merekam informasi " +"stack untuk semua aplikasi yang dijalankan, termasuk kernel Linux. Ini " +"terkadang bisa membingungkan jika Anda hanya ingin melihat satu proses. Jika " +"aplikasi Anda tidak banyak berinteraksi dengan sistem host, Anda mungkin " +"lebih sukses dengan menggunakan <app>Sysprof</app> untuk <link href=" +"\"profiling#new-process-profiling\">men-spawn proses baru</link>." + +#. (itstool) path: section/p +#: C/profiling.page:20 +msgid "" +"To profile your entire system, ensure the target button is set to <em>All " +"Processes</em> and click <em>Record</em>." +msgstr "" +"Untuk membuat profil seluruh sistem Anda, pastikan tombol target diatur ke " +"<em>Semua Proses</em> dan klik <em>Rekam</em>." + +#. (itstool) path: section/p +#: C/profiling.page:23 +msgid "" +"At this point, you may be asked to <em>authorize</em> access to profile the " +"system. This is required as the Linux kernel's perf implementation requires " +"root to perform whole-system profiling." +msgstr "" +"Pada titik ini, Anda mungkin diminta untuk <em>mengotorisasi</em> akses ke " +"profil sistem. Ini diperlukan karena implementasi perf kernel Linux " +"memerlukan root untuk melakukan pembuatan profil seluruh sistem." + +#. (itstool) path: section/p +#: C/profiling.page:27 +msgid "" +"During the profiling session, you will see the number of seconds the profile " +"has been active. Clicking the <em>Record</em> button again will stop the " +"profiling session. Afterwhich, the callgraph will be displayed." +msgstr "" +"Selama sesi pembuatan profil, Anda akan melihat berapa detik profil telah " +"aktif. Mengklik tombol <em>Rekam</em> lagi akan menghentikan sesi pembuatan " +"profil. Setelah itu, grafik pemanggilan akan ditampilkan." + +#. (itstool) path: note/p +#: C/profiling.page:33 +msgid "" +"If you find that the <app>sysprof</app> application is showing up in your " +"profiling callgraph, you might consider recording the profiling session with " +"<cmd>sysprof-cli</cmd>. This is a command line program that will capture " +"your profiling session to disk to be viewed at a later time." +msgstr "" +"Jika Anda menemukan bahwa aplikasi <app>sysprof</app> muncul di grafik " +"pemanggilan profiling Anda, Anda dapat mempertimbangkan untuk merekam sesi " +"pembuatan profil dengan <cmd>sysprof-cli</cmd>. Ini adalah program baris " +"perintah yang akan menangkap sesi pembuatan profil Anda ke disk untuk " +"dilihat di lain waktu." + +#. (itstool) path: section/p +#: C/profiling.page:39 C/profiling.page:62 +msgid "" +"See <link href=\"profiling#interpreting-results\">interpreting results</" +"link> for more guidance." +msgstr "" +"Lihat <link href=\"profiling#interpreting-results\">menafsirkan hasil</link> " +"untuk panduan selengkapnya." + +#. (itstool) path: section/title +#: C/profiling.page:48 +msgid "Profile an existing process" +msgstr "Membuat profil proses yang sudah ada" + +#. (itstool) path: section/p +#: C/profiling.page:49 +msgid "" +"With <app>Sysprof</app>, you can profile one or more existing processes on "
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/help/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/help/meson.build
Changed
@@ -1,7 +1,5 @@ -if get_option('help') - find_program('itstool', required: true) +find_program('itstool') - gnome.yelp('sysprof', - sources: 'index.page', 'introduction.page', 'profiling.page', 'faq.page', 'legal.xml', - ) -endif +gnome.yelp('sysprof', + sources: 'index.page', 'introduction.page', 'profiling.page', 'faq.page', 'legal.xml', +)
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/help/uk/uk.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/help/uk/uk.po
Changed
@@ -2,21 +2,21 @@ # Copyright (C) 2020 sysprof's COPYRIGHT HOLDER # This file is distributed under the same license as the sysprof package. # -# Yuri Chornoivan <yurchor@ukr.net>, 2020. +# Yuri Chornoivan <yurchor@ukr.net>, 2020, 2022. msgid "" msgstr "" "Project-Id-Version: sysprof sysprof-3-36\n" -"POT-Creation-Date: 2020-03-29 15:01+0000\n" -"PO-Revision-Date: 2020-06-20 19:48+0300\n" +"POT-Creation-Date: 2022-07-11 20:12+0000\n" +"PO-Revision-Date: 2022-07-14 16:37+0300\n" "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" "Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n" +"Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: uk\n" "Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" "%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Lokalize 20.07.70\n" +"X-Generator: Lokalize 20.12.0\n" #. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2 msgctxt "_" @@ -24,83 +24,6 @@ msgstr "Юрій Чорноіван <yurchor@ukr.net>, 2020" #. (itstool) path: page/title -#: C/faq.page:9 -msgid "What does heap mean?" -msgstr "Що таке «купа»?" - -#. (itstool) path: section/title -#: C/faq.page:12 -msgid "What does \"In file heap\" mean?" -msgstr "Що означає «У файлі купа»?" - -#. (itstool) path: section/p -#: C/faq.page:14 -msgid "" -"This means that sysprof believes a function was called from somewhere in the " -"program's heap (where <code>malloc</code> allocates memory) rather than the " -"code section (where executable code normally lives.) There are several " -"possible explanations." -msgstr "" -"Це означає, що sysprof вважає, що функцію було викликано звідкись з купи" -" програми (області, де пам'ять розподіляє <code>malloc</code>), а не з" -" розділу коду (де зазвичай міститься виконуваний код). У цього може бути" -" декілька пояснень." - -#. (itstool) path: section/title -#: C/faq.page:22 -msgid "JIT (Just in Time) compilers" -msgstr "Компілятори JIT («на льоту»)" - -#. (itstool) path: section/p -#: C/faq.page:24 -msgid "" -"Languages like Java can generate executable code while a program is running " -"and store it in the heap. Sysprof is accurately reporting the situation in " -"this case." -msgstr "" -"Для мов, подібних до Java, можливе створення виконуваного коду безпосередньо" -" під час запуску програми із збереженням його у купі. Sysprof у цьому випадку" -" точно повідомляє про стан речей." - -#. (itstool) path: section/title -#: C/faq.page:30 -msgid "Optimizing compilers" -msgstr "Компілятори із оптимізацією" - -#. (itstool) path: section/p -#: C/faq.page:32 -msgid "" -"C and C++ compilers can optimize away information needed to determine a " -"function's caller, so it is mistaken for heap. You can still tell how " -"often each function is called by the program, but not always from where." -msgstr "" -"Компілятори C і C++ можуть оптимізувати (вилучати) дані, потрібні для" -" визначення джерела виклику функції, тому таке джерело для купи буде" -" помилковим. Ви зможете визначати, як часто викликається певна функція у" -" програмі, але не завжди зможете визначити, звідки її виликають." - -#. (itstool) path: note/p -#: C/faq.page:38 -msgid "" -"For gcc, the flag <code>-fno-omit-frame-pointer</code> will prevent this " -"optimization. The flag is not always needed, for example on x86_64 machines " -"it is only needed with -O3 optimization." -msgstr "" -"У gcc прапорець <code>-fno-omit-frame-pointer</code> вимикає оптимізацію" -" такого різновиду. Явним чином вказувати цей прапорець не завжди потрібно." -" Наприклад, на архітектурі x86_64 він потрібен лише із оптимізацією -O3." - -#. (itstool) path: note/p -#: C/faq.page:44 -msgid "" -"To get the most detailed and accurate call tree from un-optimized code, use " -"these flags: <code>-ggdb -fno-omit-frame-pointer -O0</code>" -msgstr "" -"Щоб отримати найдокладніше і найточніше дерево викликів з неоптимізованого" -" коду, скористайтеся такими прапорцями: <code>-ggdb -fno-omit-frame-pointer" -" -O0</code>" - -#. (itstool) path: page/title #: C/index.page:12 msgid "Sysprof" msgstr "Sysprof" @@ -142,8 +65,8 @@ "<app>Sysprof</app> is a system profiler for Linux that targets the GNOME " "desktop." msgstr "" -"<app>Sysprof</app> — засіб профілювання системи для Linux, який призначено" -" для стільничного середовища GNOME." +"<app>Sysprof</app> — засіб профілювання системи для Linux, який призначено " +"для стільничного середовища GNOME." #. (itstool) path: info/desc #: C/introduction.page:33 @@ -162,9 +85,9 @@ "or system while it runs. That information can be explored to gain insight " "into how the application could be changed to perform better." msgstr "" -"Засіб профілювання — програма, яка під час своєї роботи записує дані щодо" -" програми або системи. Ці дані можна вивчити для того, щоб змінити програму" -" так, щоб вона працювала оптимальніше." +"Засіб профілювання — програма, яка під час своєї роботи записує дані щодо " +"програми або системи. Ці дані можна вивчити для того, щоб змінити програму " +"так, щоб вона працювала оптимальніше." #. (itstool) path: section/p #: C/introduction.page:42 @@ -176,13 +99,13 @@ "frequency and therefore does not see every function call executed by the " "program." msgstr "" -"Існує дві загальні категорії засобів профілювання програмного забезпечення," -" які називають засобами профілювання із трасуванням та засоби профілювання із" -" вибірковим дослідженням. Це означає, що засіб профілювання із трасуванням" -" визначає параметри кожного виклику функції у програмі. Засіб профілювання із" -" вибірковим дослідженням працює шляхом вивчення стану програми із регулярною" -" частотою, тому не може визначити моменти виконання кожного виклику функції" -" програмі." +"Існує дві загальні категорії засобів профілювання програмного забезпечення, " +"які називають засобами профілювання із трасуванням та засоби профілювання із " +"вибірковим дослідженням. Це означає, що засіб профілювання із трасуванням " +"визначає параметри кожного виклику функції у програмі. Засіб профілювання із " +"вибірковим дослідженням працює шляхом вивчення стану програми із регулярною " +"частотою, тому не може визначити моменти виконання кожного виклику функції " +"програмі." #. (itstool) path: section/p #: C/introduction.page:49 @@ -192,11 +115,11 @@ "of a tracing profiler, making it easier to use for software that requires " "interactivity." msgstr "" -"У кожного з типів засобів профілювання, із трасуванням та із вибірковим" -" дослідженням, є свої переваги. Помітною перевагою засобу профілювання із" -" вибірковим дослідженням є те, що накладні витрати ресурсів системи у ньому є" -" набагато меншими за витрати у засобі профілювання із трасуванням, що спрощує" -" його використання для програмного забезпечення, яке потребує інтерактивності." +"У кожного з типів засобів профілювання, із трасуванням та із вибірковим " +"дослідженням, є свої переваги. Помітною перевагою засобу профілювання із " +"вибірковим дослідженням є те, що накладні витрати ресурсів системи у ньому є " +"набагато меншими за витрати у засобі профілювання із трасуванням, що спрощує " +"його використання для програмного забезпечення, яке потребує інтерактивності." #. (itstool) path: section/p #: C/introduction.page:54 @@ -218,13 +141,13 @@ "success by using <app>Sysprof</app> to <link href=\"profiling#new-process-" "profiling\">spawn a new process</link>." msgstr "" -"Коли <app>Sysprof</app> виконує профілювання вашої системи, вона записує дані" -" стека для програм, які виконуються, включно із ядром Linux. Іноді," -" користуватися отриманими значенням незручно, якщо вам потрібні лише дані" -" окремого процесу. Якщо досліджувана програма не надто взаємодії із основною" -" системою, можливо, доцільнішим буде використання <app>Sysprof</app> для <" -"link href=\"profiling#new-process-" -"profiling\">породження нового процесу</link>." +"Коли <app>Sysprof</app> виконує профілювання вашої системи, вона записує " +"дані стека для програм, які виконуються, включно із ядром Linux. Іноді, " +"користуватися отриманими значенням незручно, якщо вам потрібні лише дані " +"окремого процесу. Якщо досліджувана програма не надто взаємодії із основною " +"системою, можливо, доцільнішим буде використання <app>Sysprof</app> для " +"<link href=\"profiling#new-process-profiling\">породження нового процесу</" +"link>." #. (itstool) path: section/p #: C/profiling.page:20 @@ -232,8 +155,8 @@ "To profile your entire system, ensure the target button is set to <em>All " "Processes</em> and click <em>Record</em>." msgstr "" -"Щоб виконати профілювання усієї системи, переконайтеся, що кнопку цілі" -" встановлено у значення <em>Усі процеси</em>, і натисніть <em>Записати</em>."
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/meson.build
Changed
@@ -1,34 +1,41 @@ project('sysprof', 'c', license: 'GPL3+', 'GPL2+', - version: '3.44.0', - meson_version: '>=0.51.0', + version: '3.46.0', + meson_version: '>=0.59.0', default_options: 'c_std=gnu11', 'cpp_std=c++11', 'warning_level=2', ) -symbolic_version = '42.0' +symbolic_version = '43.0' -gnome = import('gnome') +gnome = import('gnome', required: get_option('gtk')) pkgconfig = import('pkgconfig') i18n = import('i18n') +if get_option('development') + app_id = 'org.gnome.Sysprof.Devel' +else + app_id = 'org.gnome.Sysprof' +endif + libsysprof_api_version = 4 +libsysprof_ui_api_version = 5 + version_split = meson.project_version().split('.') datadir = get_option('datadir') datadir_for_pc_file = join_paths('${prefix}', datadir) -podir = join_paths(meson.source_root(), 'po') +podir = join_paths(meson.current_source_dir(), 'po') -glib_req_version = '>= 2.67.4' -gtk_req_version = '>= 3.22' +glib_req_version = '>= 2.73.0' +gtk_req_version = '>= 4.6' polkit_req_version = '>= 0.105' -dazzle_req_version = '>= 3.30.0' cc = meson.get_compiler('c') -if get_option('libsysprof') - add_languages('cpp') +if get_option('libsysprof') or get_option('agent') + add_languages('cpp', native: false) cxx = meson.get_compiler('cpp') endif @@ -44,6 +51,8 @@ config_h.set('PACKAGE_TARNAME', 'PACKAGE_STRING') config_h.set('PACKAGE', 'PACKAGE_NAME') config_h.set('VERSION', 'PACKAGE_VERSION') +config_h.set('APP_ID', app_id) +config_h.set_quoted('APP_ID_S', app_id) # Detect and set symbol visibility if get_option('default_library') != 'static' @@ -81,13 +90,17 @@ config_h.set10('HAVE_POLKIT', polkit_dep.found()) if get_option('libunwind') - libunwind_dep = dependency('libunwind-generic') + # Force libunwind usage if it's specified to avoid back compiles + # and backtrace() showing up in builds + libunwind_dep = dependency('libunwind-generic', required: true) config_h.set('ENABLE_LIBUNWIND', libunwind_dep.found()) config_h.set('HAVE_UNW_SET_CACHE_SIZE', libunwind_dep.found() and cc.has_header_symbol('libunwind.h', 'unw_set_cache_size', dependencies: libunwind_dep)) endif # Development build setup -config_h.set('DEVELOPMENT_BUILD', version_split1.to_int().is_odd()) +if get_option('development') + config_h.set10('DEVELOPMENT_BUILD', true) +endif has_use_clockid = cc.has_member('struct perf_event_attr', 'use_clockid', prefix: '#include <linux/perf_event.h>') has_clockid = cc.has_member('struct perf_event_attr', 'clockid', prefix: '#include <linux/perf_event.h>') @@ -191,21 +204,33 @@ return 0; } ''') - config_h.set10('HAVE_STDATOMIC_H', 1) + config_h.set10('HAVE_STDATOMIC_H', true) endif +needs_service_access = get_option('libsysprof') or get_option('agent') +install_service_files = needs_service_access or get_option('sysprofd') == 'bundled' + subdir('src') subdir('data') -subdir('examples') -subdir('help') subdir('po') +if get_option('help') + subdir('help') +endif + +if get_option('examples') + subdir('examples') +endif + configure_file( input: 'config.h.meson', output: 'config.h', configuration: config_h ) -if get_option('enable_gtk') - meson.add_install_script('build-aux/meson/post_install.sh') +if get_option('gtk') and gnome.found() + gnome.post_install( + gtk_update_icon_cache: true, + update_desktop_database: true + ) endif
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/meson_options.txt -> _service:tar_scm:sysprof-3.46.0.tar.xz/meson_options.txt
Changed
@@ -1,16 +1,24 @@ +# If this is a development build, which is used for our Flatpak build +# so that we have a different app-id (.Devel suffix) than the regular +# application. +option('development', type: 'boolean', value: 'false') + # Optionally disable the GTK application in case you're building the # sysprof-cli only for your platform. Might be useful in IoT or various # server scenarios. -option('enable_gtk', type: 'boolean') +option('gtk', type: 'boolean') # Disable libsysprof/ui (in situations you only want sysprof-capture) option('libsysprof', type: 'boolean') +# Allow disabling the installation of libsysprof-capture*.a +option('install-static', type: 'boolean') + # Optionally compile sysprofd, which is needed to get elevated privileges. # You only really want to ignore this if you are running from a container # and are talking to a host daemon. Also, if you're compiling for something # other than Linux to allow viewing syscap files. -option('with_sysprofd', type: 'combo', +option('sysprofd', type: 'combo', choices: 'host', 'bundled', 'none', value: 'bundled', ) @@ -35,12 +43,16 @@ # Optionally disable the tools (this is mostly only useful for building only # libsysprof-capture as a subproject) -option('enable_tools', type: 'boolean') +option('tools', type: 'boolean') # Optionally disable the tests (this is mostly only useful for building only # libsysprof-capture as a subproject) -option('enable_tests', type: 'boolean') +option('tests', type: 'boolean') # Optionally disable the examples (this is mostly only useful for building only # libsysprof-capture as a subproject) -option('enable_examples', type: 'boolean') +option('examples', type: 'boolean') + +# Optionally build the sysprof-agent tool to allow profiling inside of +# containers from external system +option('agent', type: 'boolean', description: 'Build the sysprof-agent utility')
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/org.gnome.Sysprof.Devel.json
Added
@@ -0,0 +1,123 @@ +{ + "app-id" : "org.gnome.Sysprof.Devel", + "runtime" : "org.gnome.Platform", + "runtime-version" : "master", + "sdk" : "org.gnome.Sdk", + "command" : "sysprof", + "tags" : + "nightly" + , + "desktop-file-name-suffix" : " (Nightly)", + "finish-args" : + "--require-version=1.0.0", + "--allow=devel", + "--talk-name=org.freedesktop.Flatpak", + "--device=dri", + "--share=ipc", + "--socket=fallback-x11", + "--socket=wayland", + "--socket=session-bus", + "--socket=system-bus", + "--filesystem=home", + "--filesystem=host", + "--share=network", + "--talk-name=org.gtk.vfs.*", + "--system-talk-name=org.freedesktop.PolicyKit1", + "--system-talk-name=org.gnome.Sysprof3", + "--system-talk-name=org.freedesktop.Avahi", + "--filesystem=xdg-run/gvfsd", + "--filesystem=/var/lib/flatpak" + , + "build-options" : { + "cflags" : "-O2 -g -fno-omit-frame-pointer", + "cxxflags" : "-O2 -g -fno-omit-frame-pointer" + }, + "cleanup" : + "/include", + "/lib/pkgconfig", + "/share/pkgconfig", + "/share/aclocal", + "/man", + "/share/man", + "/share/gtk-doc", + "/share/doc", + "/share/vala", + "/share/bash-completions", + "*.la", + "*.a" + , + "modules" : + { + "name": "intltool", + "cleanup": "*" , + "sources": + { + "type": "archive", + "url": "https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz", + "sha256": "67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd" + } + + }, + { + "name" : "polkit", + "config-opts" : + "--disable-polkitd", + "--disable-man-pages", + "--disable-introspection", + "--disable-examples", + "--disable-gtk-doc", + "--disable-libelogind", + "--disable-libsystemd-login", + "--with-systemdsystemunitdir=no", + "--with-authdb=dummy", + "--with-authfw=none" + , + "rm-configure" : true, + "cleanup" : + "/bin/*", + "/etc/pam.d", + "/etc/dbus-1", + "/share/dbus-1/system-services/*", + "/share/polkit-1/actions/*", + "/lib/polkit-1" + , + "sources" : + { + "type" : "archive", + "url" : "https://www.freedesktop.org/software/polkit/releases/polkit-0.116.tar.gz", + "sha256" : "88170c9e711e8db305a12fdb8234fac5706c61969b94e084d0f117d8ec5d34b1" + }, + { + "type" : "patch", + "path" : "build-aux/flatpak/polkit-build-Add-option-to-build-without-polkitd.patch" + }, + { + "type" : "file", + "path" : "build-aux/flatpak/polkit-autogen", + "dest-filename" : "autogen.sh" + } + + }, + { + "name" : "sysprof", + "config-opts" : + "--libdir=/app/lib", + "--buildtype=debugoptimized", + "-Dagent=true", + "-Ddevelopment=true", + "-Dlibsysprof=true", + "-Dgtk=true", + "-Dsysprofd=host" + , + "buildsystem" : "meson", + "builddir" : true, + "sources" : + { + "type" : "git", + "url" : "https://gitlab.gnome.org/GNOME/sysprof.git", + "branch" : "master" + } + + } + +}
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/POTFILES.in -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/POTFILES.in
Changed
@@ -1,8 +1,7 @@ # List of source files containing translatable strings. # Please keep this file sorted alphabetically. -data/org.gnome.Sysprof3.appdata.xml.in -data/org.gnome.Sysprof3.desktop.in -data/org.gnome.sysprof3.gschema.xml +data/org.gnome.Sysprof.appdata.xml.in.in +data/org.gnome.Sysprof.desktop.in.in src/libsysprof/sysprof-callgraph-profile.c src/libsysprof/sysprof-perf-source.c src/libsysprof-ui/sysprof-battery-aid.c @@ -10,6 +9,7 @@ src/libsysprof-ui/sysprof-callgraph-page.c src/libsysprof-ui/sysprof-callgraph-page.ui src/libsysprof-ui/sysprof-cell-renderer-percent.c +src/libsysprof-ui/sysprof-cell-renderer-progress.c src/libsysprof-ui/sysprof-counters-aid.c src/libsysprof-ui/sysprof-cpu-aid.c src/libsysprof-ui/sysprof-depth-visualizer.c @@ -45,6 +45,6 @@ src/sysprof/gtk/menus.ui src/sysprof/sysprof-application.c src/sysprof/sysprof-window.c -src/sysprof/ui/sysprof-window.ui +src/sysprof/sysprof-window.ui src/tools/sysprof-cli.c src/tools/sysprof-profiler-ctl.c
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/da.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/da.po
Changed
@@ -6,19 +6,20 @@ msgstr "" "Project-Id-Version: sysprof master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/sysprof/issues\n" -"POT-Creation-Date: 2020-07-02 00:51+0000\n" -"PO-Revision-Date: 2020-10-10 00:00+0200\n" -"Last-Translator: scootergrisen\n" +"POT-Creation-Date: 2022-02-03 16:15+0000\n" +"PO-Revision-Date: 2022-03-27 16:44+0200\n" +"Last-Translator: Alan Mortensen <alanmortensen.am@gmail.com>\n" "Language-Team: Danish <dansk@dansk-gruppen.dk>\n" "Language: da\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.3\n" #: data/org.gnome.Sysprof3.appdata.xml.in:5 #: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:202 -#: src/sysprof/sysprof-application.c:329 src/sysprof/ui/sysprof-window.ui:12 +#: src/sysprof/sysprof-application.c:329 src/sysprof/ui/sysprof-window.ui:11 msgid "Sysprof" msgstr "Sysprof" @@ -103,26 +104,26 @@ "Miljøet som sidst blev startet, som indstilles i brugerfladen når programmet " "genstartes." -#: src/libsysprof/sysprof-callgraph-profile.c:445 +#: src/libsysprof/sysprof-callgraph-profile.c:447 msgid "Sysprof was unable to generate a callgraph from the system capture." msgstr "Sysprof kunne ikke generere en kaldegraf fra systemoptagelsen." -#: src/libsysprof/sysprof-perf-source.c:476 +#: src/libsysprof/sysprof-perf-source.c:472 #, c-format msgid "Sysprof failed to find field “%s”." msgstr "Sysprof kunne ikke finde feltet “%s”." -#: src/libsysprof/sysprof-perf-source.c:489 +#: src/libsysprof/sysprof-perf-source.c:485 #, c-format msgid "Sysprof failed to parse offset for “%s”." msgstr "Sysprof kunne ikke fortolke forskydning for “%s”." -#: src/libsysprof/sysprof-perf-source.c:553 +#: src/libsysprof/sysprof-perf-source.c:549 #, c-format msgid "Sysprof failed to get perf_event ID." msgstr "Sysprof kunne ikke hente id for perf_event." -#: src/libsysprof/sysprof-perf-source.c:659 +#: src/libsysprof/sysprof-perf-source.c:655 #, c-format msgid "An error occurred while attempting to access performance counters" msgstr "Der opstod en fejl ved forsøg på at tilgå ydelsestællerne" @@ -159,35 +160,35 @@ msgstr "Kaldegraf" #: src/libsysprof-ui/sysprof-callgraph-page.ui:27 -#: src/libsysprof-ui/sysprof-memprof-page.ui:236 +#: src/libsysprof-ui/sysprof-memprof-page.ui:245 msgid "Functions" msgstr "Funktioner" #: src/libsysprof-ui/sysprof-callgraph-page.ui:43 #: src/libsysprof-ui/sysprof-callgraph-page.ui:104 #: src/libsysprof-ui/sysprof-callgraph-page.ui:159 -#: src/libsysprof-ui/sysprof-memprof-page.ui:253 -#: src/libsysprof-ui/sysprof-memprof-page.ui:315 -#: src/libsysprof-ui/sysprof-memprof-page.ui:371 +#: src/libsysprof-ui/sysprof-memprof-page.ui:262 +#: src/libsysprof-ui/sysprof-memprof-page.ui:324 +#: src/libsysprof-ui/sysprof-memprof-page.ui:380 msgid "Self" msgstr "Eget" #: src/libsysprof-ui/sysprof-callgraph-page.ui:59 #: src/libsysprof-ui/sysprof-callgraph-page.ui:120 #: src/libsysprof-ui/sysprof-callgraph-page.ui:175 -#: src/libsysprof-ui/sysprof-memprof-page.ui:269 -#: src/libsysprof-ui/sysprof-memprof-page.ui:331 -#: src/libsysprof-ui/sysprof-memprof-page.ui:387 +#: src/libsysprof-ui/sysprof-memprof-page.ui:278 +#: src/libsysprof-ui/sysprof-memprof-page.ui:340 +#: src/libsysprof-ui/sysprof-memprof-page.ui:396 msgid "Total" msgstr "Samlet" #: src/libsysprof-ui/sysprof-callgraph-page.ui:88 -#: src/libsysprof-ui/sysprof-memprof-page.ui:298 +#: src/libsysprof-ui/sysprof-memprof-page.ui:307 msgid "Callers" msgstr "Kaldere" #: src/libsysprof-ui/sysprof-callgraph-page.ui:151 -#: src/libsysprof-ui/sysprof-memprof-page.ui:362 +#: src/libsysprof-ui/sysprof-memprof-page.ui:371 msgid "Descendants" msgstr "Underordnede" @@ -205,12 +206,12 @@ msgstr "Sysprof er ved at oprette den valgte kaldegraf." #: src/libsysprof-ui/sysprof-callgraph-page.ui:224 -#: src/libsysprof-ui/sysprof-memprof-page.ui:433 +#: src/libsysprof-ui/sysprof-memprof-page.ui:442 msgid "Not Enough Samples" msgstr "Ikke nok datapunkter" #: src/libsysprof-ui/sysprof-callgraph-page.ui:225 -#: src/libsysprof-ui/sysprof-memprof-page.ui:434 +#: src/libsysprof-ui/sysprof-memprof-page.ui:443 msgid "More samples are necessary to display a callgraph." msgstr "Der skal være flere datapunkter for at kunne vise en kaldegraf." @@ -242,11 +243,11 @@ msgid "Processes" msgstr "Processer" -#: src/libsysprof-ui/sysprof-details-page.c:224 +#: src/libsysprof-ui/sysprof-details-page.c:220 msgid "Memory Capture" msgstr "Hukommelsesoptagelse" -#: src/libsysprof-ui/sysprof-details-page.c:238 +#: src/libsysprof-ui/sysprof-details-page.c:234 #, c-format msgid "%0.4lf seconds" msgstr "%0.4lf sekunder" @@ -290,7 +291,6 @@ msgstr "Tællere optaget" #: src/libsysprof-ui/sysprof-details-page.ui:151 -#| msgid "Counters Captured" msgid "Allocations Captured" msgstr "Allokeringer optaget" @@ -334,35 +334,33 @@ # scootergrisen: tjek at det er oversat korrekt #. translators: %s is replaced with locale specific time of recording -#: src/libsysprof-ui/sysprof-display.c:258 +#: src/libsysprof-ui/sysprof-display.c:265 #, c-format -#| msgctxt "shortcut window" -#| msgid "Recording" msgid "Recording at %s" msgstr "Optagelse %s" -#: src/libsysprof-ui/sysprof-display.c:262 +#: src/libsysprof-ui/sysprof-display.c:269 msgid "New Recording" msgstr "Ny optagelse" -#: src/libsysprof-ui/sysprof-display.c:1087 +#: src/libsysprof-ui/sysprof-display.c:1094 msgid "The recording could not be opened" msgstr "Optagelsen kunne ikke åbnes" -#: src/libsysprof-ui/sysprof-display.c:1210 +#: src/libsysprof-ui/sysprof-display.c:1217 msgid "Save Recording" msgstr "Gem optagelse" -#: src/libsysprof-ui/sysprof-display.c:1213 +#: src/libsysprof-ui/sysprof-display.c:1220 msgid "Save" msgstr "Gem" #. Translators: This is a button. -#: src/libsysprof-ui/sysprof-display.c:1214 src/sysprof/sysprof-window.c:279 +#: src/libsysprof-ui/sysprof-display.c:1221 src/sysprof/sysprof-window.c:279 msgid "Cancel" msgstr "Annuller" -#: src/libsysprof-ui/sysprof-display.c:1240 +#: src/libsysprof-ui/sysprof-display.c:1247 #, c-format msgid "Failed to save recording: %s" msgstr "Kunne ikke gemme optagelse: %s" @@ -463,7 +461,6 @@ msgstr "Hukommelsesforbrug" #: src/libsysprof-ui/sysprof-memprof-aid.c:182 -#| msgid "Memory Usage" msgid "Memory" msgstr "Hukommelse" @@ -473,7 +470,6 @@ msgstr "Hukommelsesallokeringer" #: src/libsysprof-ui/sysprof-memprof-aid.c:224 -#| msgid "Launch Application" msgid "Track Allocations" msgstr "Spor allokeringer" @@ -495,21 +491,23 @@ msgid "Temporary Allocations"
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/de.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/de.po
Changed
@@ -2,24 +2,25 @@ # Copyright (C) 2016 sysprof's COPYRIGHT HOLDER # This file is distributed under the same license as the sysprof package. # -# Tim Sabsch <tim@sabsch.com>, 2018, 2020. +# Tim Sabsch <tim@sabsch.com>, 2018, 2020, 2022. # Mario Blättermann <mario.blaettermann@gmail.com>, 2016-2018, 2021. # Philipp Kiemle <philipp.kiemle@gmail.com>, 2021. +# Jürgen Benvenuti <gastornis@posteo.org>, 2022. # msgid "" msgstr "" "Project-Id-Version: sysprof master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/sysprof/issues\n" -"POT-Creation-Date: 2021-02-24 22:30+0000\n" -"PO-Revision-Date: 2021-02-25 23:08+0100\n" -"Last-Translator: Philipp Kiemle <philipp.kiemle@gmail.com>\n" +"POT-Creation-Date: 2022-05-09 02:14+0000\n" +"PO-Revision-Date: 2022-07-22 10:12+0200\n" +"Last-Translator: Tim Sabsch <tim@sabsch.com>\n" "Language-Team: German <gnome-de@gnome.org>\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.4.1\n" +"X-Generator: Poedit 3.1\n" #: data/org.gnome.Sysprof3.appdata.xml.in:5 #: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:202 @@ -29,7 +30,7 @@ #: data/org.gnome.Sysprof3.appdata.xml.in:6 msgid "Profile an application or entire system" -msgstr "Eine Anwendung oder ein gesamtes System analysieren" +msgstr "Ein Profil einer Anwendung oder ein gesamtes Systems erstellen" #: data/org.gnome.Sysprof3.appdata.xml.in:9 msgid "The GNOME Foundation" @@ -40,8 +41,8 @@ "Sysprof allows you to profile applications to aid in debugging and " "optimization." msgstr "" -"Sysprof ermöglicht Ihnen das Profiling von Anwendungen zwecks Fehlerdiagnose " -"und Optimierung." +"Sysprof ermöglicht Ihnen die Profilerstellung von Anwendungen zwecks " +"Fehlerdiagnose und Optimierung." #: data/org.gnome.Sysprof3.desktop.in:5 msgid "Profiler" @@ -49,7 +50,7 @@ #: data/org.gnome.Sysprof3.desktop.in:6 msgid "Profile an application or entire system." -msgstr "Eine Anwendung oder ein ganzes System analysieren." +msgstr "Ein Profil einer Anwendung oder eines ganzes System erstellen." #: data/org.gnome.sysprof3.gschema.xml:5 msgid "Window size" @@ -167,35 +168,35 @@ msgstr "Aufrufgraph" #: src/libsysprof-ui/sysprof-callgraph-page.ui:27 -#: src/libsysprof-ui/sysprof-memprof-page.ui:236 +#: src/libsysprof-ui/sysprof-memprof-page.ui:245 msgid "Functions" msgstr "Funktionen" #: src/libsysprof-ui/sysprof-callgraph-page.ui:43 #: src/libsysprof-ui/sysprof-callgraph-page.ui:104 #: src/libsysprof-ui/sysprof-callgraph-page.ui:159 -#: src/libsysprof-ui/sysprof-memprof-page.ui:253 -#: src/libsysprof-ui/sysprof-memprof-page.ui:315 -#: src/libsysprof-ui/sysprof-memprof-page.ui:371 +#: src/libsysprof-ui/sysprof-memprof-page.ui:262 +#: src/libsysprof-ui/sysprof-memprof-page.ui:324 +#: src/libsysprof-ui/sysprof-memprof-page.ui:380 msgid "Self" msgstr "Selbst" #: src/libsysprof-ui/sysprof-callgraph-page.ui:59 #: src/libsysprof-ui/sysprof-callgraph-page.ui:120 #: src/libsysprof-ui/sysprof-callgraph-page.ui:175 -#: src/libsysprof-ui/sysprof-memprof-page.ui:269 -#: src/libsysprof-ui/sysprof-memprof-page.ui:331 -#: src/libsysprof-ui/sysprof-memprof-page.ui:387 +#: src/libsysprof-ui/sysprof-memprof-page.ui:278 +#: src/libsysprof-ui/sysprof-memprof-page.ui:340 +#: src/libsysprof-ui/sysprof-memprof-page.ui:396 msgid "Total" msgstr "Gesamt" #: src/libsysprof-ui/sysprof-callgraph-page.ui:88 -#: src/libsysprof-ui/sysprof-memprof-page.ui:298 +#: src/libsysprof-ui/sysprof-memprof-page.ui:307 msgid "Callers" msgstr "Aufrufer" #: src/libsysprof-ui/sysprof-callgraph-page.ui:151 -#: src/libsysprof-ui/sysprof-memprof-page.ui:362 +#: src/libsysprof-ui/sysprof-memprof-page.ui:371 msgid "Descendants" msgstr "Nachfolger" @@ -214,12 +215,12 @@ "Sysprof ist damit beschäftigt, den ausgewählten Aufrufgraphen zu erstellen." #: src/libsysprof-ui/sysprof-callgraph-page.ui:224 -#: src/libsysprof-ui/sysprof-memprof-page.ui:433 +#: src/libsysprof-ui/sysprof-memprof-page.ui:442 msgid "Not Enough Samples" msgstr "Nicht genug Proben" #: src/libsysprof-ui/sysprof-callgraph-page.ui:225 -#: src/libsysprof-ui/sysprof-memprof-page.ui:434 +#: src/libsysprof-ui/sysprof-memprof-page.ui:443 msgid "More samples are necessary to display a callgraph." msgstr "" "Weitere Proben sind erforderlich, um einen Aufrufgraphen anzeigen zu können." @@ -342,33 +343,33 @@ msgstr "Aufnahme läuft …" #. translators: %s is replaced with locale specific time of recording -#: src/libsysprof-ui/sysprof-display.c:258 +#: src/libsysprof-ui/sysprof-display.c:265 #, c-format msgid "Recording at %s" msgstr "Aufnahme vom %s" -#: src/libsysprof-ui/sysprof-display.c:262 +#: src/libsysprof-ui/sysprof-display.c:269 msgid "New Recording" msgstr "Neue Aufnahme" -#: src/libsysprof-ui/sysprof-display.c:1087 +#: src/libsysprof-ui/sysprof-display.c:1094 msgid "The recording could not be opened" msgstr "Die Aufnahme konnte nicht geöffnet werden" -#: src/libsysprof-ui/sysprof-display.c:1210 +#: src/libsysprof-ui/sysprof-display.c:1217 msgid "Save Recording" msgstr "Aufnahme speichern" -#: src/libsysprof-ui/sysprof-display.c:1213 +#: src/libsysprof-ui/sysprof-display.c:1220 msgid "Save" msgstr "Speichern" #. Translators: This is a button. -#: src/libsysprof-ui/sysprof-display.c:1214 src/sysprof/sysprof-window.c:279 +#: src/libsysprof-ui/sysprof-display.c:1221 src/sysprof/sysprof-window.c:279 msgid "Cancel" msgstr "Abbrechen" -#: src/libsysprof-ui/sysprof-display.c:1240 +#: src/libsysprof-ui/sysprof-display.c:1247 #, c-format msgid "Failed to save recording: %s" msgstr "Fehler beim Speichern der Aufnahme: %s" @@ -393,8 +394,8 @@ #: src/libsysprof-ui/sysprof-failed-state-view.ui:39 msgid "Something unexpectedly went wrong while trying to profile your system." msgstr "" -"Es ist etwas unerwartet schief gelaufen beim Versuch Ihr System zu " -"analysieren." +"Es ist etwas unerwartet schief gelaufen beim Versuch, ein Profil Ihres " +"Systems zu erstellen." #: src/libsysprof-ui/sysprof-log-model.c:210 #: src/libsysprof-ui/sysprof-logs-page.ui:58 @@ -481,7 +482,7 @@ msgstr "Zuweisungen nachvollziehen" #. translators: %s is replaced with the the lower and upper bound memory sizes in bytes -#: src/libsysprof-ui/sysprof-memprof-page.c:234 +#: src/libsysprof-ui/sysprof-memprof-page.c:235 #, c-format msgid "> %s to %s" msgstr "> %s zu %s" @@ -492,21 +493,25 @@ #: src/libsysprof-ui/sysprof-memprof-page.ui:31 msgid "All Allocations" -msgstr "Alle Zuordnungen" +msgstr "Alle Zuweisungen" #: src/libsysprof-ui/sysprof-memprof-page.ui:40 msgid "Temporary Allocations" msgstr "Vorübergehende Zuweisungen" -#: src/libsysprof-ui/sysprof-memprof-page.ui:402 +#: src/libsysprof-ui/sysprof-memprof-page.ui:49 +msgid "Leaked Allocations" +msgstr "Speicherlecks" + +#: src/libsysprof-ui/sysprof-memprof-page.ui:411 msgid "Size" msgstr "Größe"
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/id.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/id.po
Changed
@@ -2,13 +2,13 @@ # Copyright (C) 2017 sysprof's COPYRIGHT HOLDER # This file is distributed under the same license as the sysprof package. # Andika Triwidada <atriwidada@gnome.org>, 2017. -# Kukuh Syafaat <kukuhsyafaat@gnome.org>, 2018-2021. +# Kukuh Syafaat <kukuhsyafaat@gnome.org>, 2018-2022. msgid "" msgstr "" "Project-Id-Version: sysprof master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/sysprof/issues\n" -"POT-Creation-Date: 2021-03-09 00:11+0000\n" -"PO-Revision-Date: 2021-03-14 19:21+0700\n" +"POT-Creation-Date: 2022-04-03 11:18+0000\n" +"PO-Revision-Date: 2022-04-19 10:31+0700\n" "Last-Translator: Kukuh Syafaat <kukuhsyafaat@gnome.org>\n" "Language-Team: Indonesian <gnome-l10n-id@googlegroups.com>\n" "Language: id\n" @@ -16,11 +16,11 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural= n!=1;\n" -"X-Generator: Poedit 2.4.2\n" +"X-Generator: Poedit 3.0.1\n" #: data/org.gnome.Sysprof3.appdata.xml.in:5 -#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:202 -#: src/sysprof/sysprof-application.c:329 src/sysprof/ui/sysprof-window.ui:11 +#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:208 +#: src/sysprof/sysprof-application.c:332 src/sysprof/sysprof-window.ui:9 msgid "Sysprof" msgstr "Sysprof" @@ -49,34 +49,10 @@ msgstr "Memantau profil suatu aplikasi atau seluruh sistem." #: data/org.gnome.sysprof3.gschema.xml:5 -msgid "Window size" -msgstr "Ukuran jendela" - -#: data/org.gnome.sysprof3.gschema.xml:6 -msgid "Window size (width and height)." -msgstr "Ukuran jendela (lebar dan tinggi)." - -#: data/org.gnome.sysprof3.gschema.xml:10 -msgid "Window position" -msgstr "Posisi jendela" - -#: data/org.gnome.sysprof3.gschema.xml:11 -msgid "Window position (x and y)." -msgstr "Posisi jendela (x dan y)." - -#: data/org.gnome.sysprof3.gschema.xml:15 -msgid "Window maximized" -msgstr "Jendela termaksimalkan" - -#: data/org.gnome.sysprof3.gschema.xml:16 -msgid "Window maximized state" -msgstr "Keadaan jendela termaksimalkan" - -#: data/org.gnome.sysprof3.gschema.xml:20 msgid "Last Spawn Program" msgstr "Program yang Terakhir Di-spawn" -#: data/org.gnome.sysprof3.gschema.xml:21 +#: data/org.gnome.sysprof3.gschema.xml:6 msgid "" "The last spawned program, which will be set in the UI upon restart of the " "application." @@ -84,19 +60,19 @@ "Program yang terakhir di-spawn, yang akan ditata dalam UI saat start ulang " "aplikasi." -#: data/org.gnome.sysprof3.gschema.xml:25 +#: data/org.gnome.sysprof3.gschema.xml:10 msgid "Last Spawn Inherit Environment" msgstr "Lingkungan Warisan Spawn Terakhir" -#: data/org.gnome.sysprof3.gschema.xml:26 +#: data/org.gnome.sysprof3.gschema.xml:11 msgid "If the last spawned environment inherits the parent environment." msgstr "Apakah lingkungan yang di-spawn terakhir mewarisi lingkungan induk." -#: data/org.gnome.sysprof3.gschema.xml:30 +#: data/org.gnome.sysprof3.gschema.xml:15 msgid "Last Spawn Environment" msgstr "Lingkungan Spawn Terakhir" -#: data/org.gnome.sysprof3.gschema.xml:31 +#: data/org.gnome.sysprof3.gschema.xml:16 msgid "" "The last spawned environment, which will be set in the UI upon restart of " "the application." @@ -159,62 +135,70 @@ msgid "Callgraph" msgstr "Callgraph" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:27 -#: src/libsysprof-ui/sysprof-memprof-page.ui:236 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:23 +#: src/libsysprof-ui/sysprof-memprof-page.ui:220 msgid "Functions" msgstr "Fungsi" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:43 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:104 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:159 -#: src/libsysprof-ui/sysprof-memprof-page.ui:253 -#: src/libsysprof-ui/sysprof-memprof-page.ui:315 -#: src/libsysprof-ui/sysprof-memprof-page.ui:371 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:39 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:96 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:147 +#: src/libsysprof-ui/sysprof-memprof-page.ui:237 +#: src/libsysprof-ui/sysprof-memprof-page.ui:295 +#: src/libsysprof-ui/sysprof-memprof-page.ui:346 msgid "Self" msgstr "Self" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:59 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:120 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:175 -#: src/libsysprof-ui/sysprof-memprof-page.ui:269 -#: src/libsysprof-ui/sysprof-memprof-page.ui:331 -#: src/libsysprof-ui/sysprof-memprof-page.ui:387 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:55 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:112 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:163 +#: src/libsysprof-ui/sysprof-memprof-page.ui:253 +#: src/libsysprof-ui/sysprof-memprof-page.ui:311 +#: src/libsysprof-ui/sysprof-memprof-page.ui:362 msgid "Total" msgstr "Total" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:88 -#: src/libsysprof-ui/sysprof-memprof-page.ui:298 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:80 +#: src/libsysprof-ui/sysprof-memprof-page.ui:278 msgid "Callers" msgstr "Pemanggil" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:151 -#: src/libsysprof-ui/sysprof-memprof-page.ui:362 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:139 +#: src/libsysprof-ui/sysprof-memprof-page.ui:337 msgid "Descendants" msgstr "Turunan" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:190 -#: src/libsysprof-ui/sysprof-details-page.ui:322 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:178 +#: src/libsysprof-ui/sysprof-details-page.ui:309 msgid "Hits" msgstr "Hit" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:213 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:198 msgid "Generating Callgraph" msgstr "Membuat Callgraph" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:214 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:199 msgid "Sysprof is busy creating the selected callgraph." msgstr "Sysprof sibuk menciptakan callgraph yang dipilih." -#: src/libsysprof-ui/sysprof-callgraph-page.ui:224 -#: src/libsysprof-ui/sysprof-memprof-page.ui:433 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:205 +#: src/libsysprof-ui/sysprof-memprof-page.ui:401 msgid "Not Enough Samples" msgstr "Tidak Cukup Cuplikan" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:225 -#: src/libsysprof-ui/sysprof-memprof-page.ui:434 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:206 +#: src/libsysprof-ui/sysprof-memprof-page.ui:402 msgid "More samples are necessary to display a callgraph." msgstr "Perlu lebih cuplikan untuk menampilkan suatu callgraph." +#: src/libsysprof-ui/sysprof-cell-renderer-progress.c:102 +#: src/libsysprof-ui/sysprof-cell-renderer-progress.c:292 +#: src/libsysprof-ui/sysprof-cell-renderer-progress.c:322 +#, c-format +msgctxt "progress bar label" +msgid "%d %%" +msgstr "%d %%" + #: src/libsysprof-ui/sysprof-counters-aid.c:221 #: src/libsysprof-ui/sysprof-counters-aid.c:226 msgid "Counters" @@ -243,11 +227,11 @@ msgid "Processes" msgstr "Proses" -#: src/libsysprof-ui/sysprof-details-page.c:220 +#: src/libsysprof-ui/sysprof-details-page.c:237 msgid "Memory Capture" msgstr "Tangkapan Memori" -#: src/libsysprof-ui/sysprof-details-page.c:234 +#: src/libsysprof-ui/sysprof-details-page.c:251
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/meson.build
Changed
@@ -2,5 +2,5 @@ i18n.gettext('sysprof-workaround', preset: 'glib', install: false) if get_option('libsysprof') -i18n.gettext('sysprof', preset: 'glib') + i18n.gettext('sysprof', preset: 'glib') endif
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/pl.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/pl.po
Changed
@@ -1,15 +1,15 @@ # Polish translation for sysprof. -# Copyright © 2016-2021 the sysprof authors. +# Copyright © 2016-2022 the sysprof authors. # This file is distributed under the same license as the sysprof package. -# Piotr Drąg <piotrdrag@gmail.com>, 2016-2021. -# Aviary.pl <community-poland@mozilla.org>, 2016-2021. +# Piotr Drąg <piotrdrag@gmail.com>, 2016-2022. +# Aviary.pl <community-poland@mozilla.org>, 2016-2022. # msgid "" msgstr "" "Project-Id-Version: sysprof\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/sysprof/issues\n" -"POT-Creation-Date: 2021-11-05 04:10+0000\n" -"PO-Revision-Date: 2021-11-07 13:47+0100\n" +"POT-Creation-Date: 2022-07-24 06:22+0000\n" +"PO-Revision-Date: 2022-07-24 16:52+0200\n" "Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n" "Language-Team: Polish <community-poland@mozilla.org>\n" "Language: pl\n" @@ -19,21 +19,21 @@ "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2;\n" -#: data/org.gnome.Sysprof3.appdata.xml.in:5 -#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:202 -#: src/sysprof/sysprof-application.c:329 src/sysprof/ui/sysprof-window.ui:11 +#: data/org.gnome.Sysprof.appdata.xml.in.in:5 +#: data/org.gnome.Sysprof.desktop.in.in:4 src/sysprof/sysprof-application.c:196 +#: src/sysprof/sysprof-application.c:321 src/sysprof/sysprof-window.ui:10 msgid "Sysprof" msgstr "Sysprof" -#: data/org.gnome.Sysprof3.appdata.xml.in:6 +#: data/org.gnome.Sysprof.appdata.xml.in.in:6 msgid "Profile an application or entire system" msgstr "Profilowanie programów lub całego systemu" -#: data/org.gnome.Sysprof3.appdata.xml.in:9 +#: data/org.gnome.Sysprof.appdata.xml.in.in:9 msgid "The GNOME Foundation" msgstr "Fundacja GNOME" -#: data/org.gnome.Sysprof3.appdata.xml.in:12 +#: data/org.gnome.Sysprof.appdata.xml.in.in:12 msgid "" "Sysprof allows you to profile applications to aid in debugging and " "optimization." @@ -41,70 +41,14 @@ "Sysprof umożliwia profilowanie programów, aby wspomóc debugowanie " "i optymalizację." -#: data/org.gnome.Sysprof3.desktop.in:5 +#: data/org.gnome.Sysprof.desktop.in.in:5 msgid "Profiler" msgstr "Profiler" -#: data/org.gnome.Sysprof3.desktop.in:6 +#: data/org.gnome.Sysprof.desktop.in.in:6 msgid "Profile an application or entire system." msgstr "Profilowanie programu lub całego systemu" -#: data/org.gnome.sysprof3.gschema.xml:5 -msgid "Window size" -msgstr "Rozmiar okna" - -#: data/org.gnome.sysprof3.gschema.xml:6 -msgid "Window size (width and height)." -msgstr "Rozmiar okna (szerokość i wysokość)." - -#: data/org.gnome.sysprof3.gschema.xml:10 -msgid "Window position" -msgstr "Położenie okna" - -#: data/org.gnome.sysprof3.gschema.xml:11 -msgid "Window position (x and y)." -msgstr "Położenie okna (na osi X i Y)." - -#: data/org.gnome.sysprof3.gschema.xml:15 -msgid "Window maximized" -msgstr "Maksymalizacja okna" - -#: data/org.gnome.sysprof3.gschema.xml:16 -msgid "Window maximized state" -msgstr "Stan maksymalizacji okna" - -#: data/org.gnome.sysprof3.gschema.xml:20 -msgid "Last Spawn Program" -msgstr "Ostatnio uruchomiony program" - -#: data/org.gnome.sysprof3.gschema.xml:21 -msgid "" -"The last spawned program, which will be set in the UI upon restart of the " -"application." -msgstr "" -"Ostatnio uruchomiony program, który zostanie ustawiony w interfejsie po " -"ponownym uruchomieniu." - -#: data/org.gnome.sysprof3.gschema.xml:25 -msgid "Last Spawn Inherit Environment" -msgstr "Ostatnio uruchomione środowisko dziedziczy środowisko" - -#: data/org.gnome.sysprof3.gschema.xml:26 -msgid "If the last spawned environment inherits the parent environment." -msgstr "Czy ostatnio uruchomione środowisko dziedziczy środowisko nadrzędne." - -#: data/org.gnome.sysprof3.gschema.xml:30 -msgid "Last Spawn Environment" -msgstr "Ostatnio uruchomione środowisko" - -#: data/org.gnome.sysprof3.gschema.xml:31 -msgid "" -"The last spawned environment, which will be set in the UI upon restart of " -"the application." -msgstr "" -"Ostatnio uruchomione środowisko, które zostanie ustawione w interfejsie po " -"ponownym uruchomieniu." - #: src/libsysprof/sysprof-callgraph-profile.c:447 msgid "Sysprof was unable to generate a callgraph from the system capture." msgstr "Nie można utworzyć wykresu wywołań z przechwytywania systemu." @@ -138,12 +82,12 @@ msgstr "Poziom naładowania akumulatora (wszystkie)" #: src/libsysprof-ui/sysprof-battery-aid.c:240 -#: src/libsysprof-ui/sysprof-counters-aid.c:282 msgid "Battery" msgstr "Akumulator" #: src/libsysprof-ui/sysprof-callgraph-aid.c:212 #: src/libsysprof-ui/sysprof-callgraph-aid.c:218 +#: src/libsysprof-ui/sysprof-details-page.ui:73 msgid "Stack Traces" msgstr "Ślady stosu" @@ -160,64 +104,74 @@ msgid "Callgraph" msgstr "Wykres wywołań" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:27 -#: src/libsysprof-ui/sysprof-memprof-page.ui:245 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:23 +#: src/libsysprof-ui/sysprof-memprof-page.ui:90 msgid "Functions" msgstr "Funkcje" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:43 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:104 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:159 -#: src/libsysprof-ui/sysprof-memprof-page.ui:262 -#: src/libsysprof-ui/sysprof-memprof-page.ui:324 -#: src/libsysprof-ui/sysprof-memprof-page.ui:380 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:39 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:96 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:147 +#: src/libsysprof-ui/sysprof-memprof-page.ui:107 +#: src/libsysprof-ui/sysprof-memprof-page.ui:165 +#: src/libsysprof-ui/sysprof-memprof-page.ui:216 msgid "Self" msgstr "Własne" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:59 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:120 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:175 -#: src/libsysprof-ui/sysprof-memprof-page.ui:278 -#: src/libsysprof-ui/sysprof-memprof-page.ui:340 -#: src/libsysprof-ui/sysprof-memprof-page.ui:396 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:55 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:112 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:163 +#: src/libsysprof-ui/sysprof-memprof-page.ui:123 +#: src/libsysprof-ui/sysprof-memprof-page.ui:181 +#: src/libsysprof-ui/sysprof-memprof-page.ui:232 msgid "Total" msgstr "Razem" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:88 -#: src/libsysprof-ui/sysprof-memprof-page.ui:307 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:80 +#: src/libsysprof-ui/sysprof-memprof-page.ui:148 msgid "Callers" msgstr "Wywołania" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:151 -#: src/libsysprof-ui/sysprof-memprof-page.ui:371 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:139 +#: src/libsysprof-ui/sysprof-memprof-page.ui:207 msgid "Descendants" msgstr "Elementy potomne" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:190 -#: src/libsysprof-ui/sysprof-details-page.ui:322 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:178 +#: src/libsysprof-ui/sysprof-details-page.ui:189 msgid "Hits" msgstr "Trafienia" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:213 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:198
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/pt_BR.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/pt_BR.po
Changed
@@ -2,40 +2,40 @@ # Copyright (C) 2022 sysprof's COPYRIGHT HOLDER # This file is distributed under the same license as the sysprof package. # Rafael Fontenelle <rafaelff@gnome.org>, 2016-2020. -# Enrico Nicoletto <liverig@gmail.com>, 2016-2018, 2021. # Matheus Barbosa <mdpb.matheus@gmail.com>, 2022. +# Enrico Nicoletto <hiko@duck.com>, 2016-2018, 2021-2022. # msgid "" msgstr "" "Project-Id-Version: sysprof master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/sysprof/issues\n" -"POT-Creation-Date: 2022-01-19 20:27+0000\n" -"PO-Revision-Date: 2022-01-25 19:58-0300\n" -"Last-Translator: Matheus Barbosa <mdpb.matheus@gmail.com>\n" +"POT-Creation-Date: 2022-07-24 06:22+0000\n" +"PO-Revision-Date: 2022-09-07 20:38-0300\n" +"Last-Translator: Enrico Nicoletto <hiko@duck.com>\n" "Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1)\n" -"X-Generator: Gtranslator 40.0\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.0.1\n" "X-Project-Style: gnome\n" -#: data/org.gnome.Sysprof3.appdata.xml.in:5 -#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:202 -#: src/sysprof/sysprof-application.c:329 src/sysprof/ui/sysprof-window.ui:11 +#: data/org.gnome.Sysprof.appdata.xml.in.in:5 +#: data/org.gnome.Sysprof.desktop.in.in:4 src/sysprof/sysprof-application.c:196 +#: src/sysprof/sysprof-application.c:321 src/sysprof/sysprof-window.ui:10 msgid "Sysprof" msgstr "Sysprof" -#: data/org.gnome.Sysprof3.appdata.xml.in:6 +#: data/org.gnome.Sysprof.appdata.xml.in.in:6 msgid "Profile an application or entire system" msgstr "Perfile um aplicativo ou todo o sistema" -#: data/org.gnome.Sysprof3.appdata.xml.in:9 +#: data/org.gnome.Sysprof.appdata.xml.in.in:9 msgid "The GNOME Foundation" msgstr "A Fundação GNOME" -#: data/org.gnome.Sysprof3.appdata.xml.in:12 +#: data/org.gnome.Sysprof.appdata.xml.in.in:12 msgid "" "Sysprof allows you to profile applications to aid in debugging and " "optimization." @@ -43,70 +43,14 @@ "Sysprof permite que você crie perfis para aplicativos para auxiliar na " "depuração e otimização." -#: data/org.gnome.Sysprof3.desktop.in:5 +#: data/org.gnome.Sysprof.desktop.in.in:5 msgid "Profiler" msgstr "Perfilador" -#: data/org.gnome.Sysprof3.desktop.in:6 +#: data/org.gnome.Sysprof.desktop.in.in:6 msgid "Profile an application or entire system." msgstr "Perfile um aplicativo ou todo o sistema." -#: data/org.gnome.sysprof3.gschema.xml:5 -msgid "Window size" -msgstr "Tamanho da janela" - -#: data/org.gnome.sysprof3.gschema.xml:6 -msgid "Window size (width and height)." -msgstr "Tamanho da janela (largura e altura)." - -#: data/org.gnome.sysprof3.gschema.xml:10 -msgid "Window position" -msgstr "Posição da janela" - -#: data/org.gnome.sysprof3.gschema.xml:11 -msgid "Window position (x and y)." -msgstr "Posição da janela (x e y)." - -#: data/org.gnome.sysprof3.gschema.xml:15 -msgid "Window maximized" -msgstr "Janela maximizada" - -#: data/org.gnome.sysprof3.gschema.xml:16 -msgid "Window maximized state" -msgstr "Estado de janela maximizada" - -#: data/org.gnome.sysprof3.gschema.xml:20 -msgid "Last Spawn Program" -msgstr "Último programa aberto" - -#: data/org.gnome.sysprof3.gschema.xml:21 -msgid "" -"The last spawned program, which will be set in the UI upon restart of the " -"application." -msgstr "" -"O último programa aberto, o qual será definido na interface gráfica ao " -"reiniciar o aplicativo." - -#: data/org.gnome.sysprof3.gschema.xml:25 -msgid "Last Spawn Inherit Environment" -msgstr "Último ambiente herdado aberto" - -#: data/org.gnome.sysprof3.gschema.xml:26 -msgid "If the last spawned environment inherits the parent environment." -msgstr "Se o último ambiente aberto herda o ambiente pai." - -#: data/org.gnome.sysprof3.gschema.xml:30 -msgid "Last Spawn Environment" -msgstr "Último ambiente aberto" - -#: data/org.gnome.sysprof3.gschema.xml:31 -msgid "" -"The last spawned environment, which will be set in the UI upon restart of " -"the application." -msgstr "" -"O último ambiente aberto, o qual será definido na interface gráfica ao " -"reiniciar o aplicativo." - #: src/libsysprof/sysprof-callgraph-profile.c:447 msgid "Sysprof was unable to generate a callgraph from the system capture." msgstr "" @@ -141,12 +85,12 @@ msgstr "Carga de bateria (todas)" #: src/libsysprof-ui/sysprof-battery-aid.c:240 -#: src/libsysprof-ui/sysprof-counters-aid.c:282 msgid "Battery" msgstr "Bateria" #: src/libsysprof-ui/sysprof-callgraph-aid.c:212 #: src/libsysprof-ui/sysprof-callgraph-aid.c:218 +#: src/libsysprof-ui/sysprof-details-page.ui:73 msgid "Stack Traces" msgstr "Rastros de pilha" @@ -163,64 +107,74 @@ msgid "Callgraph" msgstr "Gráfico de chamadas" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:27 -#: src/libsysprof-ui/sysprof-memprof-page.ui:245 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:23 +#: src/libsysprof-ui/sysprof-memprof-page.ui:90 msgid "Functions" msgstr "Funções" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:43 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:104 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:159 -#: src/libsysprof-ui/sysprof-memprof-page.ui:262 -#: src/libsysprof-ui/sysprof-memprof-page.ui:324 -#: src/libsysprof-ui/sysprof-memprof-page.ui:380 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:39 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:96 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:147 +#: src/libsysprof-ui/sysprof-memprof-page.ui:107 +#: src/libsysprof-ui/sysprof-memprof-page.ui:165 +#: src/libsysprof-ui/sysprof-memprof-page.ui:216 msgid "Self" msgstr "Individual" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:59 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:120 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:175 -#: src/libsysprof-ui/sysprof-memprof-page.ui:278 -#: src/libsysprof-ui/sysprof-memprof-page.ui:340 -#: src/libsysprof-ui/sysprof-memprof-page.ui:396 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:55 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:112 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:163 +#: src/libsysprof-ui/sysprof-memprof-page.ui:123 +#: src/libsysprof-ui/sysprof-memprof-page.ui:181 +#: src/libsysprof-ui/sysprof-memprof-page.ui:232 msgid "Total" msgstr "Total" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:88 -#: src/libsysprof-ui/sysprof-memprof-page.ui:307 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:80 +#: src/libsysprof-ui/sysprof-memprof-page.ui:148 msgid "Callers" msgstr "Chamadores" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:151 -#: src/libsysprof-ui/sysprof-memprof-page.ui:371 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:139 +#: src/libsysprof-ui/sysprof-memprof-page.ui:207 msgid "Descendants" msgstr "Descendentes" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:190 -#: src/libsysprof-ui/sysprof-details-page.ui:322 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:178 +#: src/libsysprof-ui/sysprof-details-page.ui:189 msgid "Hits"
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/sr.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/sr.po
Changed
@@ -1,26 +1,27 @@ # Serbian translation for sysprof. # Copyright © 2016 sysprof's COPYRIGHT HOLDER # This file is distributed under the same license as the sysprof package. -# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2016–2021. +# Мирослав Николић <miroslavnikolić@rocketmail.com>, 2016–2022. +# msgid "" msgstr "" "Project-Id-Version: sysprof master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/sysprof/issues\n" -"POT-Creation-Date: 2021-11-05 04:10+0000\n" -"PO-Revision-Date: 2021-12-30 14:02+0200\n" -"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n" -"Language-Team: Serbian <(nothing)>\n" +"POT-Creation-Date: 2022-05-17 22:46+0000\n" +"PO-Revision-Date: 2022-06-18 10:00+0200\n" +"Last-Translator: Мирослав Николић <miroslavnikolić@rocketmail.com>\n" +"Language-Team: Serbian <српски <gnome-sr@googlegroups.org>>\n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : n" -"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2\n" "X-Project-Style: gnome\n" #: data/org.gnome.Sysprof3.appdata.xml.in:5 -#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:202 -#: src/sysprof/sysprof-application.c:329 src/sysprof/ui/sysprof-window.ui:11 +#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:208 +#: src/sysprof/sysprof-application.c:332 src/sysprof/sysprof-window.ui:9 msgid "Sysprof" msgstr "Профилатор система" @@ -49,34 +50,10 @@ msgstr "Профилишите неки програм или читав систем." #: data/org.gnome.sysprof3.gschema.xml:5 -msgid "Window size" -msgstr "Величина прозора" - -#: data/org.gnome.sysprof3.gschema.xml:6 -msgid "Window size (width and height)." -msgstr "Величина прозора (ширина и висина)." - -#: data/org.gnome.sysprof3.gschema.xml:10 -msgid "Window position" -msgstr "Положај прозора" - -#: data/org.gnome.sysprof3.gschema.xml:11 -msgid "Window position (x and y)." -msgstr "Положај прозора (водоравно и усправно)." - -#: data/org.gnome.sysprof3.gschema.xml:15 -msgid "Window maximized" -msgstr "Увећан прозор" - -#: data/org.gnome.sysprof3.gschema.xml:16 -msgid "Window maximized state" -msgstr "Стање увећаног прозора" - -#: data/org.gnome.sysprof3.gschema.xml:20 msgid "Last Spawn Program" msgstr "Последњи изрођени програм" -#: data/org.gnome.sysprof3.gschema.xml:21 +#: data/org.gnome.sysprof3.gschema.xml:6 msgid "" "The last spawned program, which will be set in the UI upon restart of the " "application." @@ -84,19 +61,19 @@ "Последњи изрођени програм, који ће бити подешен у корисничком сучељу након " "поновног покретања програма." -#: data/org.gnome.sysprof3.gschema.xml:25 +#: data/org.gnome.sysprof3.gschema.xml:10 msgid "Last Spawn Inherit Environment" msgstr "Последње изрођено наслеђује окружење" -#: data/org.gnome.sysprof3.gschema.xml:26 +#: data/org.gnome.sysprof3.gschema.xml:11 msgid "If the last spawned environment inherits the parent environment." msgstr "Да ли последње изрођено окружење наслеђује родитељско окружење." -#: data/org.gnome.sysprof3.gschema.xml:30 +#: data/org.gnome.sysprof3.gschema.xml:15 msgid "Last Spawn Environment" msgstr "Последње изрођено окружење" -#: data/org.gnome.sysprof3.gschema.xml:31 +#: data/org.gnome.sysprof3.gschema.xml:16 msgid "" "The last spawned environment, which will be set in the UI upon restart of " "the application." @@ -161,62 +138,70 @@ msgid "Callgraph" msgstr "График позива" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:27 -#: src/libsysprof-ui/sysprof-memprof-page.ui:245 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:23 +#: src/libsysprof-ui/sysprof-memprof-page.ui:220 msgid "Functions" msgstr "Функције" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:43 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:104 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:159 -#: src/libsysprof-ui/sysprof-memprof-page.ui:262 -#: src/libsysprof-ui/sysprof-memprof-page.ui:324 -#: src/libsysprof-ui/sysprof-memprof-page.ui:380 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:39 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:96 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:147 +#: src/libsysprof-ui/sysprof-memprof-page.ui:237 +#: src/libsysprof-ui/sysprof-memprof-page.ui:295 +#: src/libsysprof-ui/sysprof-memprof-page.ui:346 msgid "Self" msgstr "Једна" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:59 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:120 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:175 -#: src/libsysprof-ui/sysprof-memprof-page.ui:278 -#: src/libsysprof-ui/sysprof-memprof-page.ui:340 -#: src/libsysprof-ui/sysprof-memprof-page.ui:396 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:55 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:112 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:163 +#: src/libsysprof-ui/sysprof-memprof-page.ui:253 +#: src/libsysprof-ui/sysprof-memprof-page.ui:311 +#: src/libsysprof-ui/sysprof-memprof-page.ui:362 msgid "Total" msgstr "Укупно" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:88 -#: src/libsysprof-ui/sysprof-memprof-page.ui:307 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:80 +#: src/libsysprof-ui/sysprof-memprof-page.ui:278 msgid "Callers" msgstr "Позивачи" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:151 -#: src/libsysprof-ui/sysprof-memprof-page.ui:371 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:139 +#: src/libsysprof-ui/sysprof-memprof-page.ui:337 msgid "Descendants" msgstr "Наследници" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:190 -#: src/libsysprof-ui/sysprof-details-page.ui:322 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:178 +#: src/libsysprof-ui/sysprof-details-page.ui:309 msgid "Hits" msgstr "Погодака" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:213 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:198 msgid "Generating Callgraph" msgstr "Стварам график позива" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:214 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:199 msgid "Sysprof is busy creating the selected callgraph." msgstr "Профилатор система је заузет стварањем изабраног графика позива." -#: src/libsysprof-ui/sysprof-callgraph-page.ui:224 -#: src/libsysprof-ui/sysprof-memprof-page.ui:442 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:205 +#: src/libsysprof-ui/sysprof-memprof-page.ui:401 msgid "Not Enough Samples" msgstr "Нема довољно узорака" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:225 -#: src/libsysprof-ui/sysprof-memprof-page.ui:443 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:206 +#: src/libsysprof-ui/sysprof-memprof-page.ui:402 msgid "More samples are necessary to display a callgraph." msgstr "Још узорака је потребно за приказ графика позива." +#: src/libsysprof-ui/sysprof-cell-renderer-progress.c:102 +#: src/libsysprof-ui/sysprof-cell-renderer-progress.c:292 +#: src/libsysprof-ui/sysprof-cell-renderer-progress.c:322 +#, c-format +msgctxt "progress bar label" +msgid "%d %%" +msgstr "%d %%" + #: src/libsysprof-ui/sysprof-counters-aid.c:221 #: src/libsysprof-ui/sysprof-counters-aid.c:226 msgid "Counters" @@ -245,11 +230,11 @@ msgid "Processes" msgstr "Процеси" -#: src/libsysprof-ui/sysprof-details-page.c:220 +#: src/libsysprof-ui/sysprof-details-page.c:237 msgid "Memory Capture"
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/sv.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/sv.po
Changed
@@ -1,7 +1,7 @@ # Swedish translation for sysprof. -# Copyright © 2016-2021 sysprof's COPYRIGHT HOLDER +# Copyright © 2016-2022 sysprof's COPYRIGHT HOLDER # This file is distributed under the same license as the sysprof package. -# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2016, 2018, 2019, 2020, 2021. +# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2016, 2018, 2019, 2020, 2021, 2022. # Josef Andersson <l10nl18nsweja@gmail.com>, 2017. # Luna Jernberg <droidbittin@gmail.com>, 2021. # @@ -9,32 +9,32 @@ msgstr "" "Project-Id-Version: sysprof master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/sysprof/issues\n" -"POT-Creation-Date: 2021-11-05 12:43+0000\n" -"PO-Revision-Date: 2021-11-06 12:05+0100\n" -"Last-Translator: Luna Jernberg <droidbittin@gmail.com>\n" +"POT-Creation-Date: 2022-07-23 11:09+0000\n" +"PO-Revision-Date: 2022-09-11 21:38+0200\n" +"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.0\n" +"X-Generator: Poedit 3.1.1\n" -#: data/org.gnome.Sysprof3.appdata.xml.in:5 -#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:202 -#: src/sysprof/sysprof-application.c:329 src/sysprof/ui/sysprof-window.ui:11 +#: data/org.gnome.Sysprof.appdata.xml.in.in:5 +#: data/org.gnome.Sysprof.desktop.in.in:4 src/sysprof/sysprof-application.c:196 +#: src/sysprof/sysprof-application.c:321 src/sysprof/sysprof-window.ui:10 msgid "Sysprof" msgstr "Sysprof" -#: data/org.gnome.Sysprof3.appdata.xml.in:6 +#: data/org.gnome.Sysprof.appdata.xml.in.in:6 msgid "Profile an application or entire system" msgstr "Profilera ett program eller hela systemet" -#: data/org.gnome.Sysprof3.appdata.xml.in:9 +#: data/org.gnome.Sysprof.appdata.xml.in.in:9 msgid "The GNOME Foundation" msgstr "GNOME Foundation" -#: data/org.gnome.Sysprof3.appdata.xml.in:12 +#: data/org.gnome.Sysprof.appdata.xml.in.in:12 msgid "" "Sysprof allows you to profile applications to aid in debugging and " "optimization." @@ -42,70 +42,14 @@ "Sysprof låter dig profilera program för att hjälpa till med felsökning och " "optimering." -#: data/org.gnome.Sysprof3.desktop.in:5 +#: data/org.gnome.Sysprof.desktop.in.in:5 msgid "Profiler" msgstr "Profilerare" -#: data/org.gnome.Sysprof3.desktop.in:6 +#: data/org.gnome.Sysprof.desktop.in.in:6 msgid "Profile an application or entire system." msgstr "Profilera ett program eller hela systemet." -#: data/org.gnome.sysprof3.gschema.xml:5 -msgid "Window size" -msgstr "Fönsterstorlek" - -#: data/org.gnome.sysprof3.gschema.xml:6 -msgid "Window size (width and height)." -msgstr "Fönsterstorlek (bredd och höjd)." - -#: data/org.gnome.sysprof3.gschema.xml:10 -msgid "Window position" -msgstr "Fönsterposition" - -#: data/org.gnome.sysprof3.gschema.xml:11 -msgid "Window position (x and y)." -msgstr "Fönsterposition (x och y)." - -#: data/org.gnome.sysprof3.gschema.xml:15 -msgid "Window maximized" -msgstr "Fönster maximerat" - -#: data/org.gnome.sysprof3.gschema.xml:16 -msgid "Window maximized state" -msgstr "Maximerat tillstånd för fönster" - -#: data/org.gnome.sysprof3.gschema.xml:20 -msgid "Last Spawn Program" -msgstr "Senast startade program" - -#: data/org.gnome.sysprof3.gschema.xml:21 -msgid "" -"The last spawned program, which will be set in the UI upon restart of the " -"application." -msgstr "" -"Det senast startade programmet, vilket kommer ställas in i " -"användargränssnittet då programmet startas om." - -#: data/org.gnome.sysprof3.gschema.xml:25 -msgid "Last Spawn Inherit Environment" -msgstr "Senast startad ärver miljö" - -#: data/org.gnome.sysprof3.gschema.xml:26 -msgid "If the last spawned environment inherits the parent environment." -msgstr "Om den senast startade miljön ärver den överordnade miljön." - -#: data/org.gnome.sysprof3.gschema.xml:30 -msgid "Last Spawn Environment" -msgstr "Senast startade miljö" - -#: data/org.gnome.sysprof3.gschema.xml:31 -msgid "" -"The last spawned environment, which will be set in the UI upon restart of " -"the application." -msgstr "" -"Den senast startade miljön, vilken kommer ställas in i användargränssnittet " -"då programmet startas om." - #: src/libsysprof/sysprof-callgraph-profile.c:447 msgid "Sysprof was unable to generate a callgraph from the system capture." msgstr "Sysprof kunde inte skapa en anropsgraf från systemfångsten." @@ -139,86 +83,96 @@ msgstr "Batteriladdning (Alla)" #: src/libsysprof-ui/sysprof-battery-aid.c:240 -#: src/libsysprof-ui/sysprof-counters-aid.c:282 msgid "Battery" msgstr "Batteri" #: src/libsysprof-ui/sysprof-callgraph-aid.c:212 #: src/libsysprof-ui/sysprof-callgraph-aid.c:218 +#: src/libsysprof-ui/sysprof-details-page.ui:73 msgid "Stack Traces" msgstr "Stackspår" #: src/libsysprof-ui/sysprof-callgraph-aid.c:226 msgid "Stack Traces (In Kernel)" -msgstr "Stackspår (I kärna)" +msgstr "Stackspår (i kärna)" #: src/libsysprof-ui/sysprof-callgraph-aid.c:234 msgid "Stack Traces (In User)" -msgstr "Stackspår (I användare)" +msgstr "Stackspår (i användare)" #: src/libsysprof-ui/sysprof-callgraph-aid.c:243 #: src/libsysprof-ui/sysprof-callgraph-aid.c:273 msgid "Callgraph" msgstr "Anropsgraf" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:27 -#: src/libsysprof-ui/sysprof-memprof-page.ui:245 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:23 +#: src/libsysprof-ui/sysprof-memprof-page.ui:90 msgid "Functions" msgstr "Funktioner" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:43 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:104 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:159 -#: src/libsysprof-ui/sysprof-memprof-page.ui:262 -#: src/libsysprof-ui/sysprof-memprof-page.ui:324 -#: src/libsysprof-ui/sysprof-memprof-page.ui:380 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:39 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:96 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:147 +#: src/libsysprof-ui/sysprof-memprof-page.ui:107 +#: src/libsysprof-ui/sysprof-memprof-page.ui:165 +#: src/libsysprof-ui/sysprof-memprof-page.ui:216 msgid "Self" msgstr "Själv" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:59 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:120 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:175 -#: src/libsysprof-ui/sysprof-memprof-page.ui:278 -#: src/libsysprof-ui/sysprof-memprof-page.ui:340 -#: src/libsysprof-ui/sysprof-memprof-page.ui:396 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:55 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:112 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:163 +#: src/libsysprof-ui/sysprof-memprof-page.ui:123 +#: src/libsysprof-ui/sysprof-memprof-page.ui:181 +#: src/libsysprof-ui/sysprof-memprof-page.ui:232 msgid "Total" msgstr "Totalt" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:88 -#: src/libsysprof-ui/sysprof-memprof-page.ui:307 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:80 +#: src/libsysprof-ui/sysprof-memprof-page.ui:148 msgid "Callers" msgstr "Anropare" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:151
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/uk.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/uk.po
Changed
@@ -2,37 +2,38 @@ # Copyright (C) 2020 sysprof's COPYRIGHT HOLDER # This file is distributed under the same license as the sysprof package. # -# Yuri Chornoivan <yurchor@ukr.net>, 2020, 2021. +# Yuri Chornoivan <yurchor@ukr.net>, 2020, 2021, 2022. msgid "" msgstr "" "Project-Id-Version: sysprof sysprof-3-36\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/sysprof/issues\n" -"POT-Creation-Date: 2021-11-05 04:10+0000\n" -"PO-Revision-Date: 2021-11-05 08:57+0200\n" +"POT-Creation-Date: 2022-07-23 11:09+0000\n" +"PO-Revision-Date: 2022-07-24 09:21+0300\n" "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" "Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Lokalize 20.12.0\n" -#: data/org.gnome.Sysprof3.appdata.xml.in:5 -#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:202 -#: src/sysprof/sysprof-application.c:329 src/sysprof/ui/sysprof-window.ui:11 +#: data/org.gnome.Sysprof.appdata.xml.in.in:5 +#: data/org.gnome.Sysprof.desktop.in.in:4 src/sysprof/sysprof-application.c:196 +#: src/sysprof/sysprof-application.c:321 src/sysprof/sysprof-window.ui:10 msgid "Sysprof" msgstr "Sysprof" -#: data/org.gnome.Sysprof3.appdata.xml.in:6 +#: data/org.gnome.Sysprof.appdata.xml.in.in:6 msgid "Profile an application or entire system" msgstr "Профілювання програми або усієї системи" -#: data/org.gnome.Sysprof3.appdata.xml.in:9 +#: data/org.gnome.Sysprof.appdata.xml.in.in:9 msgid "The GNOME Foundation" msgstr "Фундація GNOME" -#: data/org.gnome.Sysprof3.appdata.xml.in:12 +#: data/org.gnome.Sysprof.appdata.xml.in.in:12 msgid "" "Sysprof allows you to profile applications to aid in debugging and " "optimization." @@ -40,70 +41,14 @@ "За допомогою Sysprof ви зможете профілювати програми з метою діагностики та " "оптимізації." -#: data/org.gnome.Sysprof3.desktop.in:5 +#: data/org.gnome.Sysprof.desktop.in.in:5 msgid "Profiler" msgstr "Profiler" -#: data/org.gnome.Sysprof3.desktop.in:6 +#: data/org.gnome.Sysprof.desktop.in.in:6 msgid "Profile an application or entire system." msgstr "Профілювання програми або усієї системи." -#: data/org.gnome.sysprof3.gschema.xml:5 -msgid "Window size" -msgstr "Розмір вікна" - -#: data/org.gnome.sysprof3.gschema.xml:6 -msgid "Window size (width and height)." -msgstr "Розмір вікна (ширина і висота)." - -#: data/org.gnome.sysprof3.gschema.xml:10 -msgid "Window position" -msgstr "Розташування вікна" - -#: data/org.gnome.sysprof3.gschema.xml:11 -msgid "Window position (x and y)." -msgstr "Розташування вікна (x та y)." - -#: data/org.gnome.sysprof3.gschema.xml:15 -msgid "Window maximized" -msgstr "Вікно розгорнуто" - -#: data/org.gnome.sysprof3.gschema.xml:16 -msgid "Window maximized state" -msgstr "Стан розгорнутого вікна" - -#: data/org.gnome.sysprof3.gschema.xml:20 -msgid "Last Spawn Program" -msgstr "Остання запущена програма" - -#: data/org.gnome.sysprof3.gschema.xml:21 -msgid "" -"The last spawned program, which will be set in the UI upon restart of the " -"application." -msgstr "" -"Остання запущена програма, яку буде встановлено у інтерфейсі користувача " -"після перезапуску програми." - -#: data/org.gnome.sysprof3.gschema.xml:25 -msgid "Last Spawn Inherit Environment" -msgstr "Остання запущена успадковує середовище" - -#: data/org.gnome.sysprof3.gschema.xml:26 -msgid "If the last spawned environment inherits the parent environment." -msgstr "Чи успадковує остання запущена програма батьківське середовище." - -#: data/org.gnome.sysprof3.gschema.xml:30 -msgid "Last Spawn Environment" -msgstr "Середовище останньої запущеної" - -#: data/org.gnome.sysprof3.gschema.xml:31 -msgid "" -"The last spawned environment, which will be set in the UI upon restart of " -"the application." -msgstr "" -"Середовище останньої запущеної програми, яке буде встановлено у інтерфейсі " -"користувача після перезапуску програми." - #: src/libsysprof/sysprof-callgraph-profile.c:447 msgid "Sysprof was unable to generate a callgraph from the system capture." msgstr "Sysprof не вдалося створити граф викликів із записаних даних системи." @@ -138,12 +83,12 @@ msgstr "Заряд акумулятора (усе)" #: src/libsysprof-ui/sysprof-battery-aid.c:240 -#: src/libsysprof-ui/sysprof-counters-aid.c:282 msgid "Battery" msgstr "Акумулятор" #: src/libsysprof-ui/sysprof-callgraph-aid.c:212 #: src/libsysprof-ui/sysprof-callgraph-aid.c:218 +#: src/libsysprof-ui/sysprof-details-page.ui:73 msgid "Stack Traces" msgstr "Трасування стека" @@ -160,64 +105,74 @@ msgid "Callgraph" msgstr "Граф викликів" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:27 -#: src/libsysprof-ui/sysprof-memprof-page.ui:245 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:23 +#: src/libsysprof-ui/sysprof-memprof-page.ui:90 msgid "Functions" msgstr "Функції" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:43 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:104 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:159 -#: src/libsysprof-ui/sysprof-memprof-page.ui:262 -#: src/libsysprof-ui/sysprof-memprof-page.ui:324 -#: src/libsysprof-ui/sysprof-memprof-page.ui:380 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:39 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:96 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:147 +#: src/libsysprof-ui/sysprof-memprof-page.ui:107 +#: src/libsysprof-ui/sysprof-memprof-page.ui:165 +#: src/libsysprof-ui/sysprof-memprof-page.ui:216 msgid "Self" msgstr "Набутий" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:59 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:120 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:175 -#: src/libsysprof-ui/sysprof-memprof-page.ui:278 -#: src/libsysprof-ui/sysprof-memprof-page.ui:340 -#: src/libsysprof-ui/sysprof-memprof-page.ui:396 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:55 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:112 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:163 +#: src/libsysprof-ui/sysprof-memprof-page.ui:123 +#: src/libsysprof-ui/sysprof-memprof-page.ui:181 +#: src/libsysprof-ui/sysprof-memprof-page.ui:232 msgid "Total" msgstr "Разом" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:88 -#: src/libsysprof-ui/sysprof-memprof-page.ui:307 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:80 +#: src/libsysprof-ui/sysprof-memprof-page.ui:148 msgid "Callers" msgstr "Зовнішні виклики" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:151 -#: src/libsysprof-ui/sysprof-memprof-page.ui:371 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:139 +#: src/libsysprof-ui/sysprof-memprof-page.ui:207 msgid "Descendants" msgstr "Похідні" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:190 -#: src/libsysprof-ui/sysprof-details-page.ui:322 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:178 +#: src/libsysprof-ui/sysprof-details-page.ui:189 msgid "Hits" msgstr "Вдалі спроби" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:213 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:198
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/po/zh_CN.po -> _service:tar_scm:sysprof-3.46.0.tar.xz/po/zh_CN.po
Changed
@@ -9,20 +9,20 @@ msgstr "" "Project-Id-Version: sysprof master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/sysprof/issues\n" -"POT-Creation-Date: 2021-11-05 04:10+0000\n" -"PO-Revision-Date: 2022-02-03 10:56+0800\n" +"POT-Creation-Date: 2022-04-03 12:00+0000\n" +"PO-Revision-Date: 2022-04-13 20:54+0800\n" "Last-Translator: lumingzh <lumingzh@qq.com>\n" "Language-Team: Chinese - China <i18n-zh@googlegroups.com>\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Gtranslator 41.0\n" +"X-Generator: Gtranslator 42.0\n" "Plural-Forms: nplurals=1; plural=0\n" #: data/org.gnome.Sysprof3.appdata.xml.in:5 -#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:202 -#: src/sysprof/sysprof-application.c:329 src/sysprof/ui/sysprof-window.ui:11 +#: data/org.gnome.Sysprof3.desktop.in:4 src/sysprof/sysprof-application.c:208 +#: src/sysprof/sysprof-application.c:332 src/sysprof/sysprof-window.ui:9 msgid "Sysprof" msgstr "Sysprof" @@ -49,52 +49,28 @@ msgstr "对应用程序或整个系统进行性能分析。" #: data/org.gnome.sysprof3.gschema.xml:5 -msgid "Window size" -msgstr "窗口大小" - -#: data/org.gnome.sysprof3.gschema.xml:6 -msgid "Window size (width and height)." -msgstr "窗口大小(宽度和高度)。" - -#: data/org.gnome.sysprof3.gschema.xml:10 -msgid "Window position" -msgstr "窗口位置" - -#: data/org.gnome.sysprof3.gschema.xml:11 -msgid "Window position (x and y)." -msgstr "窗口位置(x 和 y)。" - -#: data/org.gnome.sysprof3.gschema.xml:15 -msgid "Window maximized" -msgstr "窗口最大化" - -#: data/org.gnome.sysprof3.gschema.xml:16 -msgid "Window maximized state" -msgstr "窗口最大化状态" - -#: data/org.gnome.sysprof3.gschema.xml:20 msgid "Last Spawn Program" msgstr "上一次生成的程序" -#: data/org.gnome.sysprof3.gschema.xml:21 +#: data/org.gnome.sysprof3.gschema.xml:6 msgid "" "The last spawned program, which will be set in the UI upon restart of the " "application." msgstr "上一次生成的程序,会被设置于重新启动应用程序后的用户界面中。" -#: data/org.gnome.sysprof3.gschema.xml:25 +#: data/org.gnome.sysprof3.gschema.xml:10 msgid "Last Spawn Inherit Environment" msgstr "上一次生成继承环境" -#: data/org.gnome.sysprof3.gschema.xml:26 +#: data/org.gnome.sysprof3.gschema.xml:11 msgid "If the last spawned environment inherits the parent environment." msgstr "上一次生成的环境是否继承上层环境。" -#: data/org.gnome.sysprof3.gschema.xml:30 +#: data/org.gnome.sysprof3.gschema.xml:15 msgid "Last Spawn Environment" msgstr "上一次生成的环境" -#: data/org.gnome.sysprof3.gschema.xml:31 +#: data/org.gnome.sysprof3.gschema.xml:16 msgid "" "The last spawned environment, which will be set in the UI upon restart of " "the application." @@ -155,62 +131,70 @@ msgid "Callgraph" msgstr "调用图" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:27 -#: src/libsysprof-ui/sysprof-memprof-page.ui:245 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:23 +#: src/libsysprof-ui/sysprof-memprof-page.ui:220 msgid "Functions" msgstr "函数" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:43 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:104 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:159 -#: src/libsysprof-ui/sysprof-memprof-page.ui:262 -#: src/libsysprof-ui/sysprof-memprof-page.ui:324 -#: src/libsysprof-ui/sysprof-memprof-page.ui:380 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:39 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:96 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:147 +#: src/libsysprof-ui/sysprof-memprof-page.ui:237 +#: src/libsysprof-ui/sysprof-memprof-page.ui:295 +#: src/libsysprof-ui/sysprof-memprof-page.ui:346 msgid "Self" msgstr "自身" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:59 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:120 -#: src/libsysprof-ui/sysprof-callgraph-page.ui:175 -#: src/libsysprof-ui/sysprof-memprof-page.ui:278 -#: src/libsysprof-ui/sysprof-memprof-page.ui:340 -#: src/libsysprof-ui/sysprof-memprof-page.ui:396 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:55 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:112 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:163 +#: src/libsysprof-ui/sysprof-memprof-page.ui:253 +#: src/libsysprof-ui/sysprof-memprof-page.ui:311 +#: src/libsysprof-ui/sysprof-memprof-page.ui:362 msgid "Total" msgstr "总计" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:88 -#: src/libsysprof-ui/sysprof-memprof-page.ui:307 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:80 +#: src/libsysprof-ui/sysprof-memprof-page.ui:278 msgid "Callers" msgstr "调用者" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:151 -#: src/libsysprof-ui/sysprof-memprof-page.ui:371 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:139 +#: src/libsysprof-ui/sysprof-memprof-page.ui:337 msgid "Descendants" msgstr "后代" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:190 -#: src/libsysprof-ui/sysprof-details-page.ui:322 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:178 +#: src/libsysprof-ui/sysprof-details-page.ui:309 msgid "Hits" msgstr "采样数" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:213 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:198 msgid "Generating Callgraph" msgstr "生成调用图" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:214 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:199 msgid "Sysprof is busy creating the selected callgraph." msgstr "Sysprof 正在创建选定的调用图。" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:224 -#: src/libsysprof-ui/sysprof-memprof-page.ui:442 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:205 +#: src/libsysprof-ui/sysprof-memprof-page.ui:401 msgid "Not Enough Samples" msgstr "样本不足" -#: src/libsysprof-ui/sysprof-callgraph-page.ui:225 -#: src/libsysprof-ui/sysprof-memprof-page.ui:443 +#: src/libsysprof-ui/sysprof-callgraph-page.ui:206 +#: src/libsysprof-ui/sysprof-memprof-page.ui:402 msgid "More samples are necessary to display a callgraph." msgstr "需要更多样本才能显示调用图。" +#: src/libsysprof-ui/sysprof-cell-renderer-progress.c:102 +#: src/libsysprof-ui/sysprof-cell-renderer-progress.c:292 +#: src/libsysprof-ui/sysprof-cell-renderer-progress.c:322 +#, c-format +msgctxt "progress bar label" +msgid "%d %%" +msgstr "%d %%" + #: src/libsysprof-ui/sysprof-counters-aid.c:221 #: src/libsysprof-ui/sysprof-counters-aid.c:226 msgid "Counters" @@ -239,11 +223,11 @@ msgid "Processes" msgstr "进程" -#: src/libsysprof-ui/sysprof-details-page.c:220 +#: src/libsysprof-ui/sysprof-details-page.c:237 msgid "Memory Capture" msgstr "内存采集" -#: src/libsysprof-ui/sysprof-details-page.c:234 +#: src/libsysprof-ui/sysprof-details-page.c:251 #, c-format msgid "%0.4lf seconds" msgstr "%0.4lf 秒" @@ -256,54 +240,54 @@ msgid "Captured at" msgstr "采集于" -#: src/libsysprof-ui/sysprof-details-page.ui:50
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-capture/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-capture/meson.build
Changed
@@ -1,3 +1,5 @@ +install_static = not meson.is_subproject() and get_option('install-static') + libsysprof_capture_headers = files( 'sysprof-address.h', 'sysprof-clock.h', @@ -50,7 +52,7 @@ dependencies: libsysprof_capture_deps, c_args: '-DSYSPROF_CAPTURE_COMPILATION' , install_dir: get_option('libdir'), - install: not meson.is_subproject(), + install: install_static, gnu_symbol_visibility: 'hidden', pic: true, ) @@ -63,7 +65,7 @@ include_directories: libsysprof_capture_include_dirs, ) -if not meson.is_subproject() +if install_static pkgconfig.generate( libsysprof_capture, subdirs: sysprof_header_subdir ,
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-capture/sysprof-version-macros.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-capture/sysprof-version-macros.h
Changed
@@ -90,6 +90,7 @@ #define SYSPROF_VERSION_3_36 (SYSPROF_ENCODE_VERSION (3, 36, 0)) #define SYSPROF_VERSION_3_38 (SYSPROF_ENCODE_VERSION (3, 38, 0)) #define SYSPROF_VERSION_3_40 (SYSPROF_ENCODE_VERSION (3, 40, 0)) +#define SYSPROF_VERSION_3_46 (SYSPROF_ENCODE_VERSION (3, 46, 0)) #if (SYSPROF_MINOR_VERSION == 99) # define SYSPROF_VERSION_CUR_STABLE (SYSPROF_ENCODE_VERSION (SYSPROF_MAJOR_VERSION + 1, 0, 0)) @@ -217,3 +218,17 @@ #else # define SYSPROF_AVAILABLE_IN_3_40 _SYSPROF_EXTERN #endif + +#if SYSPROF_VERSION_MIN_REQUIRED >= SYSPROF_VERSION_3_46 +# define SYSPROF_DEPRECATED_IN_3_46 SYSPROF_DEPRECATED +# define SYSPROF_DEPRECATED_IN_3_46_FOR(f) SYSPROF_DEPRECATED_FOR(f) +#else +# define SYSPROF_DEPRECATED_IN_3_46 _SYSPROF_EXTERN +# define SYSPROF_DEPRECATED_IN_3_46_FOR(f) _SYSPROF_EXTERN +#endif + +#if SYSPROF_VERSION_MAX_ALLOWED < SYSPROF_VERSION_3_46 +# define SYSPROF_AVAILABLE_IN_3_46 SYSPROF_UNAVAILABLE(3, 46) +#else +# define SYSPROF_AVAILABLE_IN_3_46 _SYSPROF_EXTERN +#endif
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/css/SysprofDisplay-shared.css -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/css/SysprofDisplay-shared.css
Changed
@@ -1,7 +1,3 @@ -SysprofDisplay dzlmultipaned { - -DzlMultiPaned-handle-size: 0; - } - SysprofVisualizer { background: @content_view_bg; } @@ -34,11 +30,11 @@ background: transparent; } -SysprofVisualizersFrame scrollbar.horizontal contents trough { +SysprofVisualizersFrame scrollbar.horizontal range trough { background: transparent; } -SysprofVisualizersFrame scrollbar.horizontal contents trough slider { +SysprofVisualizersFrame scrollbar.horizontal range trough slider { margin-left: 1px; margin-right: 1px; padding: 6px; @@ -81,10 +77,6 @@ border-color: @borders; } -SysprofDisplay > dzlmultipaned > :nth-child(2) { - border-top: 1px solid @borders; - } - SysprofVisualizersFrame .selection { border-radius: 3px; background-color: alpha(@theme_selected_bg_color, 0.35);
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/css/SysprofProfilerAssistant-shared.css
Added
@@ -0,0 +1,7 @@ +sysprofaidicon image.right.top { + border-radius: 9999px; + background-color: @theme_selected_bg_color; + color: @theme_selected_fg_color; + padding: 2px; + margin: 0px; +}
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/egg-handle-private.h
Added
@@ -0,0 +1,35 @@ +/* egg-handle.h + * + * Copyright 2021 Christian Hergert <chergert@redhat.com> + * + * This file is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) + * any later version. + * + * This file 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 Lesser 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: LGPL-3.0-or-later + */ + +#pragma once + +#include <gtk/gtk.h> + +G_BEGIN_DECLS + +#define EGG_TYPE_HANDLE (egg_handle_get_type()) + +G_DECLARE_FINAL_TYPE (EggHandle, egg_handle, EGG, HANDLE, GtkWidget) + +GtkWidget *egg_handle_new (GtkPositionType position); +void egg_handle_set_position (EggHandle *self, + GtkPositionType position); + +G_END_DECLS
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/egg-handle.c
Added
@@ -0,0 +1,145 @@ +/* egg-handle.c + * + * Copyright 2021 Christian Hergert <chergert@redhat.com> + * + * This file is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) + * any later version. + * + * This file 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 Lesser 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: LGPL-3.0-or-later + */ + +#include "config.h" + +#include "egg-handle-private.h" + +#define EXTRA_SIZE 8 + +struct _EggHandle +{ + GtkWidget parent_instance; + GtkWidget *separator; + GtkPositionType position : 3; +}; + +G_DEFINE_TYPE (EggHandle, egg_handle, GTK_TYPE_WIDGET) + +static gboolean +egg_handle_contains (GtkWidget *widget, + double x, + double y) +{ + EggHandle *self = (EggHandle *)widget; + graphene_rect_t area; + + g_assert (EGG_IS_HANDLE (self)); + + if (!gtk_widget_compute_bounds (GTK_WIDGET (self->separator), + GTK_WIDGET (self), + &area)) + return FALSE; + + switch (self->position) + { + case GTK_POS_LEFT: + area.origin.x -= EXTRA_SIZE; + area.size.width = EXTRA_SIZE; + break; + + case GTK_POS_RIGHT: + area.size.width = EXTRA_SIZE; + break; + + case GTK_POS_TOP: + area.origin.y -= EXTRA_SIZE; + area.size.height = EXTRA_SIZE; + break; + + case GTK_POS_BOTTOM: + area.size.height = EXTRA_SIZE; + break; + + default: + g_assert_not_reached (); + break; + } + + return graphene_rect_contains_point (&area, &GRAPHENE_POINT_INIT (x, y)); +} + +static void +egg_handle_dispose (GObject *object) +{ + EggHandle *self = (EggHandle *)object; + + g_clear_pointer (&self->separator, gtk_widget_unparent); + + G_OBJECT_CLASS (egg_handle_parent_class)->dispose (object); +} + +static void +egg_handle_class_init (EggHandleClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + + object_class->dispose = egg_handle_dispose; + + widget_class->contains = egg_handle_contains; + + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); +} + +static void +egg_handle_init (EggHandle *self) +{ + self->separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); + gtk_widget_set_parent (GTK_WIDGET (self->separator), GTK_WIDGET (self)); +} + +void +egg_handle_set_position (EggHandle *self, + GtkPositionType position) +{ + g_return_if_fail (EGG_IS_HANDLE (self)); + + self->position = position; + + switch (position) + { + case GTK_POS_LEFT: + case GTK_POS_RIGHT: + gtk_widget_set_cursor_from_name (GTK_WIDGET (self), "col-resize"); + gtk_orientable_set_orientation (GTK_ORIENTABLE (self->separator), GTK_ORIENTATION_VERTICAL); + break; + + case GTK_POS_TOP: + case GTK_POS_BOTTOM: + gtk_widget_set_cursor_from_name (GTK_WIDGET (self), "row-resize"); + gtk_orientable_set_orientation (GTK_ORIENTABLE (self->separator), GTK_ORIENTATION_HORIZONTAL); + break; + + default: + g_assert_not_reached (); + } +} + +GtkWidget * +egg_handle_new (GtkPositionType position) +{ + EggHandle *self; + + self = g_object_new (EGG_TYPE_HANDLE, NULL); + egg_handle_set_position (self, position); + + return GTK_WIDGET (self); +}
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/egg-paned-private.h
Added
@@ -0,0 +1,48 @@ +/* egg-paned.h + * + * Copyright 2021 Christian Hergert <chergert@redhat.com> + * + * This file is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) + * any later version. + * + * This file 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 Lesser 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: LGPL-3.0-or-later + */ + +#pragma once + +#include <gtk/gtk.h> + +G_BEGIN_DECLS + +#define EGG_TYPE_PANED (egg_paned_get_type()) + +G_DECLARE_FINAL_TYPE (EggPaned, egg_paned, EGG, PANED, GtkWidget) + +GtkWidget *egg_paned_new (void); +void egg_paned_append (EggPaned *self, + GtkWidget *child); +void egg_paned_prepend (EggPaned *self, + GtkWidget *child); +void egg_paned_insert (EggPaned *self, + int position, + GtkWidget *child); +void egg_paned_insert_after (EggPaned *self, + GtkWidget *child, + GtkWidget *sibling); +void egg_paned_remove (EggPaned *self, + GtkWidget *child); +guint egg_paned_get_n_children (EggPaned *self); +GtkWidget *egg_paned_get_nth_child (EggPaned *self, + guint nth); + +G_END_DECLS
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/egg-paned.c
Added
@@ -0,0 +1,593 @@ +/* egg-paned.c + * + * Copyright 2021 Christian Hergert <chergert@redhat.com> + * + * This file is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) + * any later version. + * + * This file 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 Lesser 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: LGPL-3.0-or-later + */ + +#include "config.h" + +#include <string.h> + +#include "egg-paned-private.h" +#include "egg-resizer-private.h" + +struct _EggPaned +{ + GtkWidget parent_instance; + GtkOrientation orientation; +}; + +static void buildable_iface_init (GtkBuildableIface *iface); + +G_DEFINE_TYPE_WITH_CODE (EggPaned, egg_paned, GTK_TYPE_WIDGET, + G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, buildable_iface_init) + G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)) + +enum { + PROP_0, + N_PROPS, + + PROP_ORIENTATION, +}; + +static void +update_orientation (GtkWidget *widget, + GtkOrientation orientation) +{ + if (orientation == GTK_ORIENTATION_HORIZONTAL) + { + gtk_widget_remove_css_class (widget, "vertical"); + gtk_widget_add_css_class (widget, "horizontal"); + } + else + { + gtk_widget_remove_css_class (widget, "horizontal"); + gtk_widget_add_css_class (widget, "vertical"); + } + + gtk_accessible_update_property (GTK_ACCESSIBLE (widget), + GTK_ACCESSIBLE_PROPERTY_ORIENTATION, orientation, + -1); +} + +/** + * egg_paned_new: + * + * Create a new #EggPaned. + * + * Returns: (transfer full): a newly created #EggPaned + */ +GtkWidget * +egg_paned_new (void) +{ + return g_object_new (EGG_TYPE_PANED, NULL); +} + +static void +egg_paned_set_orientation (EggPaned *self, + GtkOrientation orientation) +{ + GtkPositionType pos; + + g_assert (EGG_IS_PANED (self)); + g_assert (orientation == GTK_ORIENTATION_HORIZONTAL || + orientation == GTK_ORIENTATION_VERTICAL); + + if (self->orientation == orientation) + return; + + self->orientation = orientation; + + if (self->orientation == GTK_ORIENTATION_HORIZONTAL) + pos = GTK_POS_LEFT; + else + pos = GTK_POS_TOP; + + for (GtkWidget *child = gtk_widget_get_last_child (GTK_WIDGET (self)); + child != NULL; + child = gtk_widget_get_prev_sibling (child)) + { + g_assert (EGG_IS_RESIZER (child)); + + egg_resizer_set_position (EGG_RESIZER (child), pos); + } + + update_orientation (GTK_WIDGET (self), self->orientation); + gtk_widget_queue_resize (GTK_WIDGET (self)); + g_object_notify (G_OBJECT (self), "orientation"); +} + +static void +egg_paned_measure (GtkWidget *widget, + GtkOrientation orientation, + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) +{ + EggPaned *self = (EggPaned *)widget; + + g_assert (EGG_IS_PANED (self)); + + *minimum = 0; + *natural = 0; + *minimum_baseline = -1; + *natural_baseline = -1; + + for (GtkWidget *child = gtk_widget_get_first_child (widget); + child != NULL; + child = gtk_widget_get_next_sibling (child)) + { + int child_min, child_nat; + + gtk_widget_measure (child, orientation, for_size, &child_min, &child_nat, NULL, NULL); + + if (orientation == self->orientation) + { + *minimum += child_min; + *natural += child_nat; + } + else + { + *minimum = MAX (*minimum, child_min); + *natural = MAX (*natural, child_nat); + } + } +} + +typedef struct +{ + GtkWidget *widget; + GtkRequisition min_request; + GtkRequisition nat_request; + GtkAllocation alloc; +} ChildAllocation; + +static void +egg_paned_size_allocate (GtkWidget *widget, + int width, + int height, + int baseline) +{ + EggPaned *self = (EggPaned *)widget; + ChildAllocation *allocs; + ChildAllocation *last_alloc = NULL; + GtkOrientation orientation; + guint n_children = 0; + guint n_expand = 0; + guint i; + int extra_width = width; + int extra_height = height; + int expand_width; + int expand_height; + int x, y; + + g_assert (EGG_IS_PANED (self)); + + GTK_WIDGET_CLASS (egg_paned_parent_class)->size_allocate (widget, width, height, baseline); + + n_children = egg_paned_get_n_children (self); + + if (n_children == 1) + { + GtkWidget *child = gtk_widget_get_first_child (widget); + GtkAllocation alloc = { 0, 0, width, height }; + + if (gtk_widget_get_visible (child)) + { + gtk_widget_size_allocate (child, &alloc, -1); + return; + } + } + + orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (self)); + allocs = g_newa (ChildAllocation, n_children);
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/egg-resizer-private.h
Added
@@ -0,0 +1,40 @@ +/* egg-resizer.h + * + * Copyright 2021 Christian Hergert <chergert@redhat.com> + * + * This file is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) + * any later version. + * + * This file 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 Lesser 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: LGPL-3.0-or-later + */ + +#pragma once + +#include <gtk/gtk.h> + +G_BEGIN_DECLS + +#define EGG_TYPE_RESIZER (egg_resizer_get_type()) + +G_DECLARE_FINAL_TYPE (EggResizer, egg_resizer, EGG, RESIZER, GtkWidget) + +GtkWidget *egg_resizer_new (GtkPositionType position); +GtkPositionType egg_resizer_get_position (EggResizer *self); +void egg_resizer_set_position (EggResizer *self, + GtkPositionType position); +GtkWidget *egg_resizer_get_child (EggResizer *self); +void egg_resizer_set_child (EggResizer *self, + GtkWidget *child); +GtkWidget *egg_resizer_get_handle (EggResizer *self); + +G_END_DECLS
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/egg-resizer.c
Added
@@ -0,0 +1,495 @@ +/* egg-resizer.c + * + * Copyright 2021 Christian Hergert <chergert@redhat.com> + * + * This file is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) + * any later version. + * + * This file 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 Lesser 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: LGPL-3.0-or-later + */ + +#include "config.h" + +#include "egg-handle-private.h" +#include "egg-resizer-private.h" + +#define HANDLE_SIZE 8 + +struct _EggResizer +{ + GtkWidget parent_instance; + + EggHandle *handle; + GtkWidget *child; + + double drag_orig_size; + double drag_position; + + GtkPositionType position : 3; +}; + +G_DEFINE_TYPE (EggResizer, egg_resizer, GTK_TYPE_WIDGET) + +enum { + PROP_0, + PROP_CHILD, + N_PROPS +}; + +static GParamSpec *properties N_PROPS; + +static void +egg_resizer_drag_begin_cb (EggResizer *self, + double start_x, + double start_y, + GtkGestureDrag *drag) +{ + GtkAllocation child_alloc; + GtkAllocation handle_alloc; + + g_assert (EGG_IS_RESIZER (self)); + g_assert (GTK_IS_GESTURE_DRAG (drag)); + + if (self->child == NULL) + return; + + switch (self->position) + { + case GTK_POS_LEFT: + if (start_x > gtk_widget_get_width (GTK_WIDGET (self)) - HANDLE_SIZE) + goto start_drag; + break; + + case GTK_POS_RIGHT: + if (start_x <= HANDLE_SIZE) + goto start_drag; + break; + + case GTK_POS_TOP: + if (start_y > gtk_widget_get_height (GTK_WIDGET (self)) - HANDLE_SIZE) + goto start_drag; + break; + + case GTK_POS_BOTTOM: + if (start_y <= HANDLE_SIZE) + goto start_drag; + break; + + default: + g_assert_not_reached (); + break; + } + + gtk_gesture_set_state (GTK_GESTURE (drag), + GTK_EVENT_SEQUENCE_DENIED); + + return; + +start_drag: + + gtk_widget_get_allocation (self->child, &child_alloc); + gtk_widget_get_allocation (GTK_WIDGET (self->handle), &handle_alloc); + + if (self->position == GTK_POS_LEFT || + self->position == GTK_POS_RIGHT) + { + self->drag_orig_size = child_alloc.width + handle_alloc.width; + gtk_widget_set_hexpand (self->child, FALSE); + } + else + { + self->drag_orig_size = child_alloc.height + handle_alloc.height; + gtk_widget_set_vexpand (self->child, FALSE); + } + + self->drag_position = self->drag_orig_size; + + gtk_widget_queue_resize (GTK_WIDGET (self)); +} + +static void +egg_resizer_drag_update_cb (EggResizer *self, + double offset_x, + double offset_y, + GtkGestureDrag *drag) +{ + g_assert (EGG_IS_RESIZER (self)); + g_assert (GTK_IS_GESTURE_DRAG (drag)); + + if (self->position == GTK_POS_LEFT) + self->drag_position = self->drag_orig_size + offset_x; + else if (self->position == GTK_POS_RIGHT) + self->drag_position = gtk_widget_get_width (GTK_WIDGET (self)) - offset_x; + else if (self->position == GTK_POS_TOP) + self->drag_position = self->drag_orig_size + offset_y; + else if (self->position == GTK_POS_BOTTOM) + self->drag_position = gtk_widget_get_height (GTK_WIDGET (self)) - offset_y; + + gtk_widget_queue_resize (GTK_WIDGET (self)); +} + +static void +egg_resizer_drag_end_cb (EggResizer *self, + double offset_x, + double offset_y, + GtkGestureDrag *drag) +{ + g_assert (EGG_IS_RESIZER (self)); + g_assert (GTK_IS_GESTURE_DRAG (drag)); +} + +GtkWidget * +egg_resizer_new (GtkPositionType position) +{ + EggResizer *self; + + self = g_object_new (EGG_TYPE_RESIZER, NULL); + self->position = position; + self->handle = EGG_HANDLE (egg_handle_new (position)); + gtk_widget_set_parent (GTK_WIDGET (self->handle), GTK_WIDGET (self)); + + return GTK_WIDGET (self); +} + +static void +egg_resizer_measure (GtkWidget *widget, + GtkOrientation orientation, + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) +{ + EggResizer *self = (EggResizer *)widget; + + g_assert (EGG_IS_RESIZER (self)); + + *minimum = 0; + *natural = 0; + *minimum_baseline = -1; + *natural_baseline = -1; + + if (self->child != NULL) + gtk_widget_measure (self->child, + orientation, + for_size, + minimum, natural, + NULL, NULL); + + if ((orientation == GTK_ORIENTATION_HORIZONTAL && + (self->position == GTK_POS_LEFT || + self->position == GTK_POS_RIGHT)) || + (orientation == GTK_ORIENTATION_VERTICAL && + (self->position == GTK_POS_TOP || + self->position == GTK_POS_BOTTOM))) + { + int handle_min, handle_nat; + + if (self->drag_position != 0) + {
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/libsysprof-ui.gresource.xml -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/libsysprof-ui.gresource.xml
Changed
@@ -3,9 +3,10 @@ <gresource prefix="/org/gnome/sysprof"> <file compressed="true">css/SysprofEnvironEditor-shared.css</file> <file compressed="true">css/SysprofDisplay-shared.css</file> + <file compressed="true">css/SysprofProfilerAssistant-shared.css</file> <!-- Application icons --> - <file alias="icons/scalable/apps/org.gnome.Sysprof.svg">../../data/icons/scalable/apps/org.gnome.Sysprof.svg</file> + <file alias="icons/scalable/apps/org.gnome.Sysprof.svg">../../data/icons/org.gnome.Sysprof.svg</file> <file alias="icons/scalable/apps/org.gnome.Sysprof-symbolic.svg">../../data/icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg</file> <file alias="icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg">../../data/icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg</file> </gresource> @@ -24,7 +25,6 @@ <file preprocess="xml-stripblanks">sysprof-profiler-assistant.ui</file> <file preprocess="xml-stripblanks">sysprof-recording-state-view.ui</file> <file preprocess="xml-stripblanks">sysprof-tab.ui</file> - <file preprocess="xml-stripblanks">sysprof-time-label.ui</file> <file preprocess="xml-stripblanks">sysprof-visualizers-frame.ui</file> </gresource> </gresources>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/meson.build
Changed
@@ -1,5 +1,3 @@ -if get_option('enable_gtk') and get_option('libsysprof') - libsysprof_ui_public_sources = 'sysprof-check.c', 'sysprof-display.c', @@ -13,6 +11,10 @@ libsysprof_ui_private_sources = + 'egg-handle.c', + 'egg-paned.c', + 'egg-resizer.c', + 'pointcache.c', 'rectangles.c', 'sysprof-aid.c', @@ -23,6 +25,7 @@ 'sysprof-callgraph-page.c', 'sysprof-cell-renderer-duration.c', 'sysprof-cell-renderer-percent.c', + 'sysprof-cell-renderer-progress.c', 'sysprof-color-cycle.c', 'sysprof-counters-aid.c', 'sysprof-cpu-aid.c', @@ -87,7 +90,8 @@ # Subset of dependencies used in generating the pkg-config file libsysprof_ui_pkg_deps = dependency('gio-2.0', version: glib_req_version), - dependency('gtk+-3.0', version: gtk_req_version), + dependency('gtk4', version: gtk_req_version), + dependency('libadwaita-1'), libsysprof_ui_deps = libsysprof_ui_pkg_deps + @@ -98,15 +102,8 @@ # dependency object libsysprof_ui_pkg_deps += libsysprof -dazzle_dep = dependency('libdazzle-1.0', version: dazzle_req_version, fallback: 'libdazzle', 'libdazzle_dep') -libsysprof_ui_deps += dazzle_dep - -if dazzle_dep.type_name() == 'pkgconfig' - libsysprof_ui_pkg_deps += dazzle_dep -endif - libsysprof_ui = shared_library( - 'sysprof-ui-@0@'.format(libsysprof_api_version), + 'sysprof-ui-@0@'.format(libsysprof_ui_api_version), libsysprof_ui_public_sources + libsysprof_ui_private_sources + libsysprof_ui_resources, dependencies: libsysprof_ui_deps + librax_dep, @@ -124,16 +121,14 @@ pkgconfig.generate( libsysprof_ui, - subdirs: sysprof_header_subdir , + subdirs: sysprof_ui_header_subdir , description: 'The UI library for GTK applications embedding sysprof', install_dir: join_paths(get_option('libdir'), 'pkgconfig'), - requires: 'gio-2.0', 'gtk+-3.0' , + requires: 'gio-2.0', 'gtk4' , libraries_private: libsysprof_ui_pkg_deps, variables: 'datadir=' + datadir_for_pc_file, , ) -install_headers(libsysprof_ui_public_headers, subdir: sysprof_header_subdir) - -endif +install_headers(libsysprof_ui_public_headers, subdir: sysprof_ui_header_subdir)
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-aid-icon.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-aid-icon.ui
Changed
@@ -1,62 +1,41 @@ <?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> + <property name="pixel-size">48</property> + <property name="width-request">64</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="pixel-size">14</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="use_underline">True</property> + <property name="use-underline">1</property> <property name="justify">center</property> - <property name="wrap">True</property> - <property name="mnemonic_widget">SysprofAidIcon</property> - <property name="max_width_chars">12</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>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-battery-aid.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-battery-aid.c
Changed
@@ -218,7 +218,7 @@ if (found > 0) sysprof_display_add_group (present->display, group); else - gtk_widget_destroy (GTK_WIDGET (group)); + g_object_unref (g_object_ref_sink (group)); } return counters != NULL;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-callgraph-page.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-callgraph-page.c
Changed
@@ -39,11 +39,12 @@ #include "config.h" -#include <dazzle.h> #include <glib/gi18n.h> #include "../stackstash.h" +#include "egg-paned-private.h" + #include "sysprof-callgraph-page.h" #include "sysprof-cell-renderer-percent.h" @@ -56,6 +57,9 @@ GtkTreeView *descendants_view; GtkTreeViewColumn *descendants_name_column; GtkStack *stack; + GtkWidget *empty_state; + GtkWidget *loading_state; + GtkWidget *callgraph; GQueue *history; @@ -208,7 +212,7 @@ gtk_tree_selection_select_iter (selection, &iter); } - gtk_stack_set_visible_child_name (priv->stack, "callgraph"); + gtk_stack_set_visible_child (priv->stack, priv->callgraph); g_clear_object (&functions); } @@ -220,7 +224,7 @@ g_return_if_fail (SYSPROF_IS_CALLGRAPH_PAGE (self)); - gtk_stack_set_visible_child_name (priv->stack, "empty-state"); + gtk_stack_set_visible_child (priv->stack, priv->empty_state); } static void @@ -239,7 +243,7 @@ gtk_tree_view_set_model (priv->functions_view, NULL); gtk_tree_view_set_model (priv->descendants_view, NULL); - gtk_stack_set_visible_child_name (priv->stack, "empty-state"); + gtk_stack_set_visible_child (priv->stack, priv->empty_state); } /** @@ -664,10 +668,12 @@ sysprof_callgraph_page_set_node (self, node); } -static void +static gboolean descendants_view_move_cursor_cb (GtkTreeView *descendants_view, GtkMovementStep step, int direction, + gboolean extend, + gboolean modify, gpointer user_data) { if (step == GTK_MOVEMENT_VISUAL_POSITIONS) @@ -680,15 +686,19 @@ { gtk_tree_view_expand_row (descendants_view, path, FALSE); g_signal_stop_emission_by_name (descendants_view, "move-cursor"); + return FALSE; } else if (direction == -1) { gtk_tree_view_collapse_row (descendants_view, path); g_signal_stop_emission_by_name (descendants_view, "move-cursor"); + return FALSE; } gtk_tree_path_free (path); } + + return TRUE; } static void @@ -732,7 +742,7 @@ copy_tree_view_selection (GtkTreeView *tree_view) { g_autoptr(GString) str = NULL; - GtkClipboard *clipboard; + GdkClipboard *clipboard; g_assert (GTK_IS_TREE_VIEW (tree_view)); @@ -741,24 +751,26 @@ copy_tree_view_selection_cb, str); - clipboard = gtk_widget_get_clipboard (GTK_WIDGET (tree_view), GDK_SELECTION_CLIPBOARD); - gtk_clipboard_set_text (clipboard, str->str, str->len); + clipboard = gtk_widget_get_clipboard (GTK_WIDGET (tree_view)); + gdk_clipboard_set_text (clipboard, str->str); } static void -sysprof_callgraph_page_copy_cb (GtkWidget *widget, - SysprofCallgraphPage *self) +sysprof_callgraph_page_copy_cb (GtkWidget *widget, + const char *action_name, + GVariant *param) { + SysprofCallgraphPage *self = (SysprofCallgraphPage *)widget; SysprofCallgraphPagePrivate *priv = sysprof_callgraph_page_get_instance_private (self); - GtkWidget *toplevel; + GtkRoot *toplevel; GtkWidget *focus; g_assert (GTK_IS_WIDGET (widget)); g_assert (SYSPROF_IS_CALLGRAPH_PAGE (self)); - if (!(toplevel = gtk_widget_get_toplevel (widget)) || - !GTK_IS_WINDOW (toplevel) || - !(focus = gtk_window_get_focus (GTK_WINDOW (toplevel)))) + if (!(toplevel = gtk_widget_get_root (widget)) || + !GTK_IS_ROOT (toplevel) || + !(focus = gtk_root_get_focus (toplevel))) return; if (focus == GTK_WIDGET (priv->descendants_view)) @@ -891,7 +903,6 @@ GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); SysprofPageClass *page_class = SYSPROF_PAGE_CLASS (klass); - GtkBindingSet *bindings; object_class->finalize = sysprof_callgraph_page_finalize; object_class->get_property = sysprof_callgraph_page_get_property; @@ -926,10 +937,16 @@ gtk_widget_class_bind_template_child_private (widget_class, SysprofCallgraphPage, descendants_view); gtk_widget_class_bind_template_child_private (widget_class, SysprofCallgraphPage, descendants_name_column); gtk_widget_class_bind_template_child_private (widget_class, SysprofCallgraphPage, stack); + gtk_widget_class_bind_template_child_private (widget_class, SysprofCallgraphPage, callgraph); + gtk_widget_class_bind_template_child_private (widget_class, SysprofCallgraphPage, empty_state); + gtk_widget_class_bind_template_child_private (widget_class, SysprofCallgraphPage, loading_state); - bindings = gtk_binding_set_by_class (klass); - gtk_binding_entry_add_signal (bindings, GDK_KEY_Left, GDK_MOD1_MASK, "go-previous", 0); + gtk_widget_class_install_action (widget_class, "page.copy", NULL, sysprof_callgraph_page_copy_cb); + gtk_widget_class_add_binding_action (widget_class, GDK_KEY_c, GDK_CONTROL_MASK, "page.copy", NULL); + gtk_widget_class_add_binding_signal (widget_class, GDK_KEY_Left, GDK_ALT_MASK, "go-previous", NULL); + + g_type_ensure (EGG_TYPE_PANED); g_type_ensure (SYSPROF_TYPE_CELL_RENDERER_PERCENT); } @@ -937,7 +954,6 @@ sysprof_callgraph_page_init (SysprofCallgraphPage *self) { SysprofCallgraphPagePrivate *priv = sysprof_callgraph_page_get_instance_private (self); - DzlShortcutController *controller; GtkTreeSelection *selection; GtkCellRenderer *cell; @@ -945,7 +961,7 @@ gtk_widget_init_template (GTK_WIDGET (self)); - gtk_stack_set_visible_child_name (priv->stack, "empty-state"); + gtk_stack_set_visible_child (priv->stack, priv->loading_state); selection = gtk_tree_view_get_selection (priv->functions_view); @@ -991,16 +1007,6 @@ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (priv->descendants_view), GTK_SELECTION_MULTIPLE); - - controller = dzl_shortcut_controller_find (GTK_WIDGET (self)); - - dzl_shortcut_controller_add_command_callback (controller, - "org.gnome.sysprof3.capture.copy", - "<Control>c", - DZL_SHORTCUT_PHASE_BUBBLE, - (GtkCallback) sysprof_callgraph_page_copy_cb, - self, - NULL); } typedef struct _Descendant Descendant; @@ -1287,7 +1293,7 @@ priv->loading--; if (priv->loading) - gtk_stack_set_visible_child_name (priv->stack, "loading"); + gtk_stack_set_visible_child (priv->stack, priv->loading_state); else - gtk_stack_set_visible_child_name (priv->stack, "callgraph"); + gtk_stack_set_visible_child (priv->stack, priv->callgraph); }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-callgraph-page.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-callgraph-page.ui
Changed
@@ -2,23 +2,19 @@ <template class="SysprofCallgraphPage" parent="SysprofPage"> <child> <object class="GtkStack" id="stack"> - <property name="visible">true</property> <child> - <object class="GtkPaned"> + <object class="EggPaned" id="callgraph"> <property name="orientation">horizontal</property> - <property name="position">450</property> - <property name="visible">true</property> <child> - <object class="GtkPaned"> + <object class="EggPaned"> <property name="orientation">vertical</property> - <property name="visible">true</property> + <property name="width-request">400</property> <child> <object class="GtkScrolledWindow"> - <property name="visible">true</property> + <property name="vexpand">true</property> <child> <object class="GtkTreeView" id="functions_view"> <property name="fixed-height-mode">true</property> - <property name="visible">true</property> <child> <object class="GtkTreeViewColumn" id="function_name_column"> <property name="expand">true</property> @@ -70,16 +66,12 @@ </object> </child> </object> - <packing> - <property name="resize">true</property> - </packing> </child> <child> <object class="GtkScrolledWindow"> - <property name="visible">true</property> + <property name="vexpand">true</property> <child> <object class="GtkTreeView" id="callers_view"> - <property name="visible">true</property> <child> <object class="GtkTreeViewColumn" id="callers_name_column"> <property name="expand">true</property> @@ -131,18 +123,14 @@ </object> </child> </object> - <packing> - <property name="resize">true</property> - </packing> </child> </object> </child> <child> <object class="GtkScrolledWindow"> - <property name="visible">true</property> + <property name="hexpand">true</property> <child> <object class="GtkTreeView" id="descendants_view"> - <property name="visible">true</property> <child> <object class="GtkTreeViewColumn" id="descendants_name_column"> <property name="expand">true</property> @@ -203,31 +191,20 @@ </object> </child> </object> - <packing> - <property name="name">callgraph</property> - </packing> </child> <child> - <object class="DzlEmptyState"> + <object class="AdwStatusPage" id="loading_state"> <property name="icon-name">content-loading-symbolic</property> <property name="title" translatable="yes">Generating Callgraph</property> - <property name="subtitle" translatable="yes">Sysprof is busy creating the selected callgraph.</property> - <property name="visible">true</property> + <property name="description" translatable="yes">Sysprof is busy creating the selected callgraph.</property> </object> - <packing> - <property name="name">loading</property> - </packing> </child> <child> - <object class="DzlEmptyState"> + <object class="AdwStatusPage" id="empty_state"> <property name="icon-name">computer-fail-symbolic</property> <property name="title" translatable="yes">Not Enough Samples</property> - <property name="subtitle" translatable="yes">More samples are necessary to display a callgraph.</property> - <property name="visible">false</property> + <property name="description" translatable="yes">More samples are necessary to display a callgraph.</property> </object> - <packing> - <property name="name">empty-state</property> - </packing> </child> </object> </child>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-cell-renderer-duration.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-cell-renderer-duration.c
Changed
@@ -55,38 +55,87 @@ static GParamSpec *properties N_PROPS; +static inline void +rounded_rectangle (cairo_t *cr, + const GdkRectangle *rect, + int x_radius, + int y_radius) +{ + int x; + int y; + int width; + int height; + int x1, x2; + int y1, y2; + int xr1, xr2; + int yr1, yr2; + + g_assert (cr); + g_assert (rect); + + x = rect->x; + y = rect->y; + width = rect->width; + height = rect->height; + + x1 = x; + x2 = x1 + width; + y1 = y; + y2 = y1 + height; + + x_radius = MIN (x_radius, width / 2.0); + y_radius = MIN (y_radius, width / 2.0); + + xr1 = x_radius; + xr2 = x_radius / 2.0; + yr1 = y_radius; + yr2 = y_radius / 2.0; + + cairo_move_to (cr, x1 + xr1, y1); + cairo_line_to (cr, x2 - xr1, y1); + cairo_curve_to (cr, x2 - xr2, y1, x2, y1 + yr2, x2, y1 + yr1); + cairo_line_to (cr, x2, y2 - yr1); + cairo_curve_to (cr, x2, y2 - yr2, x2 - xr2, y2, x2 - xr1, y2); + cairo_line_to (cr, x1 + xr1, y2); + cairo_curve_to (cr, x1 + xr2, y2, x1, y2 - yr2, x1, y2 - yr1); + cairo_line_to (cr, x1, y1 + yr1); + cairo_curve_to (cr, x1, y1 + yr2, x1 + xr2, y1, x1 + xr1, y1); + cairo_close_path (cr); +} + static void -sysprof_cell_renderer_duration_render (GtkCellRenderer *renderer, - cairo_t *cr, - GtkWidget *widget, - const GdkRectangle *bg_area, - const GdkRectangle *cell_area, - GtkCellRendererState state) +sysprof_cell_renderer_duration_snapshot (GtkCellRenderer *renderer, + GtkSnapshot *snapshot, + GtkWidget *widget, + const GdkRectangle *bg_area, + const GdkRectangle *cell_area, + GtkCellRendererState state) { SysprofCellRendererDuration *self = (SysprofCellRendererDuration *)renderer; SysprofCellRendererDurationPrivate *priv = sysprof_cell_renderer_duration_get_instance_private (self); g_autoptr(GString) str = NULL; GtkStyleContext *style_context; + cairo_t *cr; gdouble x1, x2; GdkRGBA rgba; GdkRectangle r; gint64 duration; g_assert (SYSPROF_IS_CELL_RENDERER_DURATION (self)); - g_assert (cr != NULL); + g_assert (snapshot != NULL); g_assert (GTK_IS_WIDGET (widget)); if (priv->zoom_manager == NULL) return; + cr = gtk_snapshot_append_cairo (snapshot, &GRAPHENE_RECT_INIT (cell_area->x, cell_area->y, cell_area->width, cell_area->height)); + style_context = gtk_widget_get_style_context (widget); if (priv->color_set) rgba = priv->color; else - gtk_style_context_get_color (style_context, - gtk_style_context_get_state (style_context), - &rgba); + gtk_style_context_get_color (style_context, &rgba); duration = sysprof_zoom_manager_get_duration_for_width (priv->zoom_manager, bg_area->width); @@ -108,7 +157,7 @@ if (r.width > 3) { - dzl_cairo_rounded_rectangle (cr, &r, 2, 2); + rounded_rectangle (cr, &r, 2, 2); cairo_fill (cr); } else if (r.width > 1) @@ -166,6 +215,8 @@ g_object_unref (layout); } + + cairo_destroy (cr); } static GtkSizeRequestMode @@ -342,7 +393,7 @@ cell_class->get_preferred_height_for_width = sysprof_cell_renderer_duration_get_preferred_height_for_width; cell_class->get_preferred_width = sysprof_cell_renderer_duration_get_preferred_width; cell_class->get_request_mode = sysprof_cell_renderer_duration_get_request_mode; - cell_class->render = sysprof_cell_renderer_duration_render; + cell_class->snapshot = sysprof_cell_renderer_duration_snapshot; /* Note we do not emit ::notify() for these properties */
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-cell-renderer-percent.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-cell-renderer-percent.c
Changed
@@ -37,7 +37,7 @@ N_PROPS }; -G_DEFINE_TYPE_WITH_PRIVATE (SysprofCellRendererPercent, sysprof_cell_renderer_percent, GTK_TYPE_CELL_RENDERER_PROGRESS) +G_DEFINE_TYPE_WITH_PRIVATE (SysprofCellRendererPercent, sysprof_cell_renderer_percent, SYSPROF_TYPE_CELL_RENDERER_PROGRESS) static GParamSpec *properties N_PROPS;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-cell-renderer-percent.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-cell-renderer-percent.h
Changed
@@ -20,7 +20,7 @@ #pragma once -#include <gtk/gtk.h> +#include "sysprof-cell-renderer-progress.h" G_BEGIN_DECLS @@ -37,12 +37,12 @@ struct _SysprofCellRendererPercent { - GtkCellRendererProgress parent; + SysprofCellRendererProgress parent; }; struct _SysprofCellRendererPercentClass { - GtkCellRendererProgressClass parent_class; + SysprofCellRendererProgressClass parent_class; /*< private >*/ gpointer _reserved4;
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-cell-renderer-progress.c
Added
@@ -0,0 +1,712 @@ +/* gtkcellrendererprogress.c + * Copyright (C) 2002 Naba Kumar <kh_naba@users.sourceforge.net> + * heavily modified by Jörgen Scheibengruber <mfcn@gmx.de> + * heavily modified by Marco Pesenti Gritti <marco@gnome.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + */ +/* + * Modified by the GTK+ Team and others 1997-2007. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +#include "config.h" + +#include <glib/gi18n.h> +#include <stdlib.h> + +#include "sysprof-cell-renderer-progress.h" + + +enum +{ + PROP_0, + PROP_VALUE, + PROP_TEXT, + PROP_PULSE, + PROP_TEXT_XALIGN, + PROP_TEXT_YALIGN, + PROP_ORIENTATION, + PROP_INVERTED +}; + +struct _SysprofCellRendererProgressPrivate +{ + int value; + char *text; + char *label; + int min_h; + int min_w; + int pulse; + int offset; + float text_xalign; + float text_yalign; + GtkOrientation orientation; + gboolean inverted; +}; + +static void sysprof_cell_renderer_progress_finalize (GObject *object); +static void sysprof_cell_renderer_progress_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec); +static void sysprof_cell_renderer_progress_set_property (GObject *object, + guint param_id, + const GValue *value, + GParamSpec *pspec); +static void sysprof_cell_renderer_progress_set_value (SysprofCellRendererProgress *cellprogress, + int value); +static void sysprof_cell_renderer_progress_set_text (SysprofCellRendererProgress *cellprogress, + const char *text); +static void sysprof_cell_renderer_progress_set_pulse (SysprofCellRendererProgress *cellprogress, + int pulse); +static void compute_dimensions (GtkCellRenderer *cell, + GtkWidget *widget, + const char *text, + int *width, + int *height); +static void sysprof_cell_renderer_progress_snapshot (GtkCellRenderer *cell, + GtkSnapshot *snapshot, + GtkWidget *widget, + const GdkRectangle *background_area, + const GdkRectangle *cell_area, + GtkCellRendererState flags); + + +G_DEFINE_TYPE_WITH_CODE (SysprofCellRendererProgress, sysprof_cell_renderer_progress, GTK_TYPE_CELL_RENDERER, + G_ADD_PRIVATE (SysprofCellRendererProgress) + G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL)) + +static void +recompute_label (SysprofCellRendererProgress *cellprogress) +{ + SysprofCellRendererProgressPrivate *priv = sysprof_cell_renderer_progress_get_instance_private (cellprogress); + char *label; + + if (priv->text) + label = g_strdup (priv->text); + else if (priv->pulse < 0) + label = g_strdup_printf (C_("progress bar label", "%d %%"), priv->value); + else + label = NULL; + + g_free (priv->label); + priv->label = label; +} + +static void +sysprof_cell_renderer_progress_set_value (SysprofCellRendererProgress *cellprogress, + int value) +{ + SysprofCellRendererProgressPrivate *priv = sysprof_cell_renderer_progress_get_instance_private (cellprogress); + + if (priv->value != value) + { + priv->value = value; + recompute_label (cellprogress); + g_object_notify (G_OBJECT (cellprogress), "value"); + } +} + +static void +sysprof_cell_renderer_progress_set_text (SysprofCellRendererProgress *cellprogress, + const char *text) +{ + SysprofCellRendererProgressPrivate *priv = sysprof_cell_renderer_progress_get_instance_private (cellprogress); + char *new_text; + + new_text = g_strdup (text); + g_free (priv->text); + priv->text = new_text; + recompute_label (cellprogress); + g_object_notify (G_OBJECT (cellprogress), "text"); +} + +static void +sysprof_cell_renderer_progress_set_pulse (SysprofCellRendererProgress *cellprogress, + int pulse) +{ + SysprofCellRendererProgressPrivate *priv = sysprof_cell_renderer_progress_get_instance_private (cellprogress); + + if (pulse != priv->pulse) + { + if (pulse <= 0) + priv->offset = 0; + else + priv->offset = pulse; + g_object_notify (G_OBJECT (cellprogress), "pulse"); + } + + priv->pulse = pulse; + recompute_label (cellprogress); +} + +static void +sysprof_cell_renderer_progress_finalize (GObject *object) +{ + SysprofCellRendererProgress *cellprogress = SYSPROF_CELL_RENDERER_PROGRESS (object); + SysprofCellRendererProgressPrivate *priv = sysprof_cell_renderer_progress_get_instance_private (cellprogress); + + g_free (priv->text); + g_free (priv->label); + + G_OBJECT_CLASS (sysprof_cell_renderer_progress_parent_class)->finalize (object); +} + +static void +sysprof_cell_renderer_progress_get_property (GObject *object, + guint param_id, + GValue *value, + GParamSpec *pspec) +{ + SysprofCellRendererProgress *cellprogress = SYSPROF_CELL_RENDERER_PROGRESS (object); + SysprofCellRendererProgressPrivate *priv = sysprof_cell_renderer_progress_get_instance_private (cellprogress); + + switch (param_id) + { + case PROP_VALUE: + g_value_set_int (value, priv->value); + break; + case PROP_TEXT: + g_value_set_string (value, priv->text); + break; + case PROP_PULSE: + g_value_set_int (value, priv->pulse); + break; + case PROP_TEXT_XALIGN: + g_value_set_float (value, priv->text_xalign); + break; + case PROP_TEXT_YALIGN: + g_value_set_float (value, priv->text_yalign); + break; + case PROP_ORIENTATION: + g_value_set_enum (value, priv->orientation); + break; + case PROP_INVERTED: + g_value_set_boolean (value, priv->inverted);
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-cell-renderer-progress.h
Added
@@ -0,0 +1,53 @@ +/* gtkcellrendererprogress.h + * Copyright (C) 2002 Naba Kumar <kh_naba@users.sourceforge.net> + * modified by Jörgen Scheibengruber <mfcn@gmx.de> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * Modified by the GTK+ Team and others 1997-2004. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +#pragma once + +#include <gtk/gtk.h> + +G_BEGIN_DECLS + +#define SYSPROF_TYPE_CELL_RENDERER_PROGRESS (sysprof_cell_renderer_progress_get_type ()) +#define SYSPROF_CELL_RENDERER_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYSPROF_TYPE_CELL_RENDERER_PROGRESS, SysprofCellRendererProgress)) +#define SYSPROF_IS_CELL_RENDERER_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYSPROF_TYPE_CELL_RENDERER_PROGRESS)) + +typedef struct _SysprofCellRendererProgress SysprofCellRendererProgress; +typedef struct _SysprofCellRendererProgressClass SysprofCellRendererProgressClass; +typedef struct _SysprofCellRendererProgressPrivate SysprofCellRendererProgressPrivate; + +struct _SysprofCellRendererProgress +{ + GtkCellRenderer parent_instance; +}; + +struct _SysprofCellRendererProgressClass +{ + GtkCellRendererClass parent_class; +}; + +GType sysprof_cell_renderer_progress_get_type (void) G_GNUC_CONST; +GtkCellRenderer *sysprof_cell_renderer_progress_new (void); + +G_END_DECLS
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-counters-aid.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-counters-aid.c
Changed
@@ -279,6 +279,6 @@ static void sysprof_counters_aid_init (SysprofCountersAid *self) { - sysprof_aid_set_display_name (SYSPROF_AID (self), _("Battery")); - sysprof_aid_set_icon_name (SYSPROF_AID (self), "org.gnome.Sysprof3-symbolic"); + sysprof_aid_set_display_name (SYSPROF_AID (self), _("Counters")); + sysprof_aid_set_icon_name (SYSPROF_AID (self), "org.gnome.Sysprof-symbolic"); }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-cpu-aid.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-cpu-aid.c
Changed
@@ -221,7 +221,7 @@ "y-lower", 0.0, "y-upper", 100.0, NULL); - gtk_container_add (GTK_CONTAINER (freq), GTK_WIDGET (freq_row)); + sysprof_visualizer_group_insert (freq, freq_row, -1, FALSE); over_row = g_object_new (SYSPROF_TYPE_LINE_VISUALIZER, "title", _("CPU Usage (All)"), @@ -323,17 +323,17 @@ if (has_usage && !found_combined) sysprof_visualizer_group_insert (usage, over_row, 0, FALSE); else - gtk_widget_destroy (GTK_WIDGET (over_row)); + g_object_unref (g_object_ref_sink (over_row)); if (has_usage) sysprof_display_add_group (present->display, usage); else - gtk_widget_destroy (GTK_WIDGET (usage)); + g_object_unref (g_object_ref_sink (usage)); if (has_freq) sysprof_display_add_group (present->display, freq); else - gtk_widget_destroy (GTK_WIDGET (freq)); + g_object_unref (g_object_ref_sink (freq)); } return counters != NULL;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-depth-visualizer.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-depth-visualizer.c
Changed
@@ -34,7 +34,8 @@ PointCache *points; guint reload_source; guint mode; - GtkAllocation last_alloc; + int last_width; + int last_height; guint reloading : 1; guint needs_reload : 1; }; @@ -238,34 +239,46 @@ } } -static gboolean -sysprof_depth_visualizer_draw (GtkWidget *widget, - cairo_t *cr) +static void +sysprof_depth_visualizer_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { SysprofDepthVisualizer *self = (SysprofDepthVisualizer *)widget; GtkAllocation alloc; GdkRectangle clip; const Point *points; - gboolean ret; + cairo_t *cr; guint n_points = 0; GdkRGBA user; GdkRGBA system; g_assert (SYSPROF_IS_DEPTH_VISUALIZER (self)); - g_assert (cr != NULL); + g_assert (snapshot != NULL); - ret = GTK_WIDGET_CLASS (sysprof_depth_visualizer_parent_class)->draw (widget, cr); + GTK_WIDGET_CLASS (sysprof_depth_visualizer_parent_class)->snapshot (widget, snapshot); if (self->points == NULL) - return ret; + return; gdk_rgba_parse (&user, "#1a5fb4"); gdk_rgba_parse (&system, "#3584e4"); gtk_widget_get_allocation (widget, &alloc); + cr = gtk_snapshot_append_cairo (snapshot, &GRAPHENE_RECT_INIT (0, 0, alloc.width, alloc.height)); + + /* FIXME: we should abstract visualizer drawing into regions so that we + * can still know the region we're drawing. + */ +#if 0 if (!gdk_cairo_get_clip_rectangle (cr, &clip)) - return ret; + return; +#else + clip.x = alloc.x = 0; + clip.y = alloc.y = 0; + clip.width = alloc.width; + clip.height = alloc.height; +#endif /* Draw user-space stacks */ if (self->mode != SYSPROF_DEPTH_VISUALIZER_KERNEL_ONLY && @@ -355,7 +368,7 @@ cairo_stroke (cr); } - return ret; + cairo_destroy (cr); } static gboolean @@ -372,25 +385,23 @@ { g_assert (SYSPROF_IS_DEPTH_VISUALIZER (self)); - if (self->reload_source) - g_source_remove (self->reload_source); - - self->reload_source = gdk_threads_add_idle (sysprof_depth_visualizer_do_reload, self); + g_clear_handle_id (&self->reload_source, g_source_remove); + self->reload_source = g_idle_add (sysprof_depth_visualizer_do_reload, self); } static void -sysprof_depth_visualizer_size_allocate (GtkWidget *widget, - GtkAllocation *alloc) +sysprof_depth_visualizer_size_allocate (GtkWidget *widget, + int width, + int height, + int baseline) { SysprofDepthVisualizer *self = (SysprofDepthVisualizer *)widget; - GTK_WIDGET_CLASS (sysprof_depth_visualizer_parent_class)->size_allocate (widget, alloc); - - if (alloc->width != self->last_alloc.x || - alloc->height != self->last_alloc.height) + if (width != self->last_width || height != self->last_height) { sysprof_depth_visualizer_queue_reload (SYSPROF_DEPTH_VISUALIZER (widget)); - self->last_alloc = *alloc; + self->last_width = width; + self->last_height = height; } } @@ -400,12 +411,7 @@ SysprofDepthVisualizer *self = (SysprofDepthVisualizer *)object; g_clear_pointer (&self->reader, sysprof_capture_reader_unref); - - if (self->reload_source) - { - g_source_remove (self->reload_source); - self->reload_source = 0; - } + g_clear_handle_id (&self->reload_source, g_source_remove); G_OBJECT_CLASS (sysprof_depth_visualizer_parent_class)->finalize (object); } @@ -419,7 +425,7 @@ object_class->finalize = sysprof_depth_visualizer_finalize; - widget_class->draw = sysprof_depth_visualizer_draw; + widget_class->snapshot = sysprof_depth_visualizer_snapshot; widget_class->size_allocate = sysprof_depth_visualizer_size_allocate; row_class->set_reader = sysprof_depth_visualizer_set_reader;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-details-page.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-details-page.c
Changed
@@ -22,7 +22,6 @@ #include "config.h" -#include <dazzle.h> #include <glib/gi18n.h> #include <string.h> @@ -31,10 +30,9 @@ struct _SysprofDetailsPage { - SysprofPage parent_instance; + GtkWidget parent_instance; /* Template Objects */ - DzlThreeGrid *three_grid; GtkListStore *marks_store; GtkTreeView *marks_view; GtkLabel *counters; @@ -51,7 +49,7 @@ guint next_row; }; -G_DEFINE_TYPE (SysprofDetailsPage, sysprof_details_page, GTK_TYPE_BIN) +G_DEFINE_TYPE (SysprofDetailsPage, sysprof_details_page, GTK_TYPE_WIDGET) #if GLIB_CHECK_VERSION(2, 56, 0) # define _g_date_time_new_from_iso8601 g_date_time_new_from_iso8601 @@ -77,11 +75,27 @@ #endif static void +sysprof_details_page_dispose (GObject *object) +{ + SysprofDetailsPage *self = (SysprofDetailsPage *)object; + GtkWidget *child; + + while ((child = gtk_widget_get_first_child (GTK_WIDGET (self)))) + gtk_widget_unparent (child); + + G_OBJECT_CLASS (sysprof_details_page_parent_class)->dispose (object); +} + +static void sysprof_details_page_class_init (SysprofDetailsPageClass *klass) { GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->dispose = sysprof_details_page_dispose; gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-details-page.ui"); + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, allocations); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, counters); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, cpu_label); @@ -94,9 +108,6 @@ gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, processes); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, samples); gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, start_time); - gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, three_grid); - - g_type_ensure (DZL_TYPE_THREE_GRID); } static void @@ -255,30 +266,6 @@ } void -sysprof_details_page_add_item (SysprofDetailsPage *self, - GtkWidget *left, - GtkWidget *center) -{ - g_return_if_fail (SYSPROF_IS_DETAILS_PAGE (self)); - g_return_if_fail (!left || GTK_IS_WIDGET (left)); - g_return_if_fail (!center || GTK_IS_WIDGET (center)); - - if (left) - gtk_container_add_with_properties (GTK_CONTAINER (self->three_grid), left, - "row", self->next_row, - "column", DZL_THREE_GRID_COLUMN_LEFT, - NULL); - - if (center) - gtk_container_add_with_properties (GTK_CONTAINER (self->three_grid), center, - "row", self->next_row, - "column", DZL_THREE_GRID_COLUMN_CENTER, - NULL); - - self->next_row++; -} - -void sysprof_details_page_add_mark (SysprofDetailsPage *self, const gchar *mark, gint64 min,
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-details-page.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-details-page.h
Changed
@@ -39,7 +39,7 @@ #define SYSPROF_TYPE_DETAILS_PAGE (sysprof_details_page_get_type()) -G_DECLARE_FINAL_TYPE (SysprofDetailsPage, sysprof_details_page, SYSPROF, DETAILS_PAGE, GtkBin) +G_DECLARE_FINAL_TYPE (SysprofDetailsPage, sysprof_details_page, SYSPROF, DETAILS_PAGE, GtkWidget) GtkWidget *sysprof_details_page_new (void); void sysprof_details_page_set_reader (SysprofDetailsPage *self, @@ -53,8 +53,5 @@ gint64 max, gint64 avg, gint64 hits); -void sysprof_details_page_add_item (SysprofDetailsPage *self, - GtkWidget *left, - GtkWidget *center); G_END_DECLS
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-details-page.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-details-page.ui
Changed
@@ -1,308 +1,175 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.0 --> <interface> - <requires lib="gtk+" version="3.22"/> - <template class="SysprofDetailsPage" parent="GtkBin"> - <property name="can_focus">False</property> + <template class="SysprofDetailsPage" parent="GtkWidget"> <child> - <object class="GtkScrolledWindow"> - <property name="hscrollbar-policy">never</property> - <property name="propagate-natural-height">true</property> - <property name="visible">true</property> + <object class="AdwPreferencesPage"> <child> - <object class="DzlThreeGrid" id="three_grid"> - <property name="margin">36</property> - <property name="column-spacing">12</property> - <property name="row-spacing">6</property> - <property name="visible">true</property> + <object class="AdwPreferencesGroup"> + <property name="title" translatable="yes">Capture</property> <child> - <object class="GtkLabel"> - <property name="visible">true</property> - <property name="label" translatable="yes">Filename</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">0</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">true</property> - <property name="label" translatable="yes">Captured at</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">1</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Duration</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">2</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">CPU Model</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">3</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="margin-top">12</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Samples Captured</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">4</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="label" translatable="yes">Marks Captured</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">5</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="label" translatable="yes">Processes Captured</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">6</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="label" translatable="yes">Forks Captured</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">7</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="label" translatable="yes">Counters Captured</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">8</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="margin-bottom">12</property> - <property name="label" translatable="yes">Allocations Captured</property> - <property name="xalign">1</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">9</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="filename"> - <property name="width-chars">35</property> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="ellipsize">start</property> - <property name="xalign">0</property> - <property name="selectable">True</property> + <object class="AdwActionRow"> + <property name="activatable">false</property> + <property name="title" translatable="yes">Location</property> + <child type="suffix"> + <object class="GtkLabel" id="filename"> + <property name="hexpand">true</property> + <property name="xalign">1</property> + <property name="ellipsize">start</property> + <property name="selectable">true</property> + </object> + </child> </object> - <packing> - <property name="column">1</property> - <property name="row">0</property> - </packing> </child> <child> - <object class="GtkLabel" id="start_time"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="ellipsize">start</property> - <property name="xalign">0</property> - <property name="selectable">True</property> + <object class="AdwActionRow"> + <property name="activatable">false</property>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-diskstat-aid.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-diskstat-aid.c
Changed
@@ -245,7 +245,7 @@ if (counters->len > 0) sysprof_display_add_group (present->display, group); else - gtk_widget_destroy (GTK_WIDGET (group)); + g_object_unref (g_object_ref_sink (group)); } return counters != NULL;
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-display-private.h
Added
@@ -0,0 +1,29 @@ +/* sysprof-display-private.h + * + * Copyright 2021 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 "sysprof-display.h" + +G_BEGIN_DECLS + +void _sysprof_display_destroy (SysprofDisplay *self); + +G_END_DECLS
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-display.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-display.c
Changed
@@ -22,11 +22,12 @@ #include "config.h" -#include <dazzle.h> #include <glib/gi18n.h> +#include "egg-paned-private.h" + #include "sysprof-details-page.h" -#include "sysprof-display.h" +#include "sysprof-display-private.h" #include "sysprof-profiler-assistant.h" #include "sysprof-failed-state-view.h" #include "sysprof-recording-state-view.h" @@ -72,7 +73,7 @@ SysprofCaptureFlags flags; } SysprofDisplayPrivate; -G_DEFINE_TYPE_WITH_PRIVATE (SysprofDisplay, sysprof_display, GTK_TYPE_BIN) +G_DEFINE_TYPE_WITH_PRIVATE (SysprofDisplay, sysprof_display, GTK_TYPE_WIDGET) enum { PROP_0, @@ -96,10 +97,7 @@ if ((parent = gtk_widget_get_parent (GTK_WIDGET (self))) && GTK_IS_NOTEBOOK (parent)) { g_autofree gchar *title = sysprof_display_dup_title (self); - - gtk_container_child_set (GTK_CONTAINER (parent), GTK_WIDGET (self), - "menu-label", title, - NULL); + gtk_notebook_set_menu_label_text (GTK_NOTEBOOK (parent), GTK_WIDGET (self), title); } g_object_notify_by_pspec (G_OBJECT (self), properties PROP_TITLE); @@ -126,6 +124,7 @@ g_object_notify_by_pspec (G_OBJECT (self), properties PROP_RECORDING); g_object_notify_by_pspec (G_OBJECT (self), properties PROP_TITLE); + g_object_notify_by_pspec (G_OBJECT (self), properties PROP_CAN_REPLAY); } static void @@ -319,19 +318,17 @@ /* Opportunistically load pages */ if (priv->reader != NULL) { - GList *pages = gtk_container_get_children (GTK_CONTAINER (priv->pages)); - - for (const GList *iter = pages; iter; iter = iter->next) + for (GtkWidget *child = gtk_widget_get_first_child (GTK_WIDGET (priv->pages)); + child; + child = gtk_widget_get_next_sibling (child)) { - if (SYSPROF_IS_PAGE (iter->data)) - sysprof_page_load_async (iter->data, + if (SYSPROF_IS_PAGE (child)) + sysprof_page_load_async (SYSPROF_PAGE (child), priv->reader, selection, priv->filter, NULL, NULL, NULL); } - - g_list_free (pages); } } } @@ -372,15 +369,21 @@ } static void -sysprof_display_finalize (GObject *object) +sysprof_display_dispose (GObject *object) { SysprofDisplay *self = (SysprofDisplay *)object; SysprofDisplayPrivate *priv = sysprof_display_get_instance_private (self); + if (priv->stack) + { + gtk_widget_unparent (GTK_WIDGET (priv->stack)); + priv->stack = NULL; + } + g_clear_pointer (&priv->reader, sysprof_capture_reader_unref); g_clear_pointer (&priv->filter, sysprof_capture_condition_unref); - G_OBJECT_CLASS (sysprof_display_parent_class)->finalize (object); + G_OBJECT_CLASS (sysprof_display_parent_class)->dispose (object); } static void @@ -443,7 +446,7 @@ GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - object_class->finalize = sysprof_display_finalize; + object_class->dispose = sysprof_display_dispose; object_class->get_property = sysprof_display_get_property; object_class->set_property = sysprof_display_set_property; @@ -453,6 +456,7 @@ "/org/gnome/sysprof/css/SysprofDisplay-shared.css"); gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-display.ui"); + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); gtk_widget_class_set_css_name (widget_class, "SysprofDisplay"); gtk_widget_class_bind_template_child_private (widget_class, SysprofDisplay, assistant); gtk_widget_class_bind_template_child_private (widget_class, SysprofDisplay, details); @@ -499,7 +503,7 @@ g_object_class_install_properties (object_class, N_PROPS, properties); - g_type_ensure (DZL_TYPE_MULTI_PANED); + g_type_ensure (EGG_TYPE_PANED); g_type_ensure (SYSPROF_TYPE_DETAILS_PAGE); g_type_ensure (SYSPROF_TYPE_FAILED_STATE_VIEW); g_type_ensure (SYSPROF_TYPE_PROFILER_ASSISTANT); @@ -552,7 +556,7 @@ if (priv->reader != NULL) _sysprof_visualizer_group_set_reader (group, priv->reader); - gtk_container_add (GTK_CONTAINER (priv->visualizers), GTK_WIDGET (group)); + sysprof_visualizers_frame_add_group (priv->visualizers, group); } void @@ -567,10 +571,7 @@ g_return_if_fail (SYSPROF_IS_PAGE (page)); title = sysprof_page_get_title (page); - - gtk_container_add_with_properties (GTK_CONTAINER (priv->pages), GTK_WIDGET (page), - "title", title, - NULL); + gtk_stack_add_titled (priv->pages, GTK_WIDGET (page), NULL, title); selection = sysprof_visualizers_frame_get_selection (priv->visualizers); @@ -869,6 +870,8 @@ (const SysprofMarkStat *)(gpointer)marks->data, marks->len); + g_object_notify_by_pspec (G_OBJECT (self), properties PROP_CAN_REPLAY); + return g_task_propagate_boolean (G_TASK (result), error); } @@ -933,7 +936,6 @@ SysprofCaptureReader *reader; SysprofSelection *selection; GCancellable *cancellable; - GList *pages; g_assert (SYSPROF_IS_DISPLAY (self)); g_assert (G_IS_ASYNC_RESULT (result)); @@ -956,17 +958,17 @@ sysprof_details_page_set_reader (priv->details, reader); /* Opportunistically load pages */ - pages = gtk_container_get_children (GTK_CONTAINER (priv->pages)); - for (const GList *iter = pages; iter; iter = iter->next) + for (GtkWidget *child = gtk_widget_get_first_child (GTK_WIDGET (priv->pages)); + child; + child = gtk_widget_get_next_sibling (child)) { - if (SYSPROF_IS_PAGE (iter->data)) - sysprof_page_load_async (iter->data, + if (SYSPROF_IS_PAGE (child)) + sysprof_page_load_async (SYSPROF_PAGE (child), reader, selection, priv->filter, NULL, NULL, NULL); } - g_list_free (pages); gtk_stack_set_visible_child_name (priv->stack, "view"); } @@ -1097,16 +1099,23 @@ error->message); g_signal_connect (dialog, "response", - G_CALLBACK (gtk_widget_destroy), + G_CALLBACK (gtk_window_destroy), NULL); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window)); gtk_window_present (GTK_WINDOW (dialog)); - gtk_widget_destroy (GTK_WIDGET (self)); + + _sysprof_display_destroy (self); return; } + /* Jump right to the "view" page to avoid a quick view of the + * assistants page when loading. + */
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-display.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-display.h
Changed
@@ -32,11 +32,11 @@ #define SYSPROF_TYPE_DISPLAY (sysprof_display_get_type()) SYSPROF_AVAILABLE_IN_ALL -G_DECLARE_DERIVABLE_TYPE (SysprofDisplay, sysprof_display, SYSPROF, DISPLAY, GtkBin) +G_DECLARE_DERIVABLE_TYPE (SysprofDisplay, sysprof_display, SYSPROF, DISPLAY, GtkWidget) struct _SysprofDisplayClass { - GtkBinClass parent_class; + GtkWidgetClass parent_class; /*< private >*/ gpointer _reserved16;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-display.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-display.ui
Changed
@@ -1,77 +1,69 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> - <template class="SysprofDisplay" parent="GtkBin"> + <requires lib="gtk" version="4.0"/> + <template class="SysprofDisplay" parent="GtkWidget"> <child> <object class="GtkStack" id="stack"> - <property name="homogeneous">false</property> - <property name="visible">true</property> + <property name="hhomogeneous">0</property> + <property name="vhomogeneous">0</property> <child> - <object class="SysprofProfilerAssistant" id="assistant"> - <property name="visible">true</property> - </object> - <packing> + <object class="GtkStackPage"> <property name="name">assistant</property> - </packing> + <property name="child"> + <object class="SysprofProfilerAssistant" id="assistant"> + </object> + </property> + </object> </child> <child> - <object class="DzlMultiPaned"> - <property name="orientation">vertical</property> - <property name="visible">true</property> - <child> - <object class="GtkBox"> - <property name="vexpand">false</property> + <object class="GtkStackPage"> + <property name="name">view</property> + <property name="child"> + <object class="EggPaned"> <property name="orientation">vertical</property> - <property name="visible">true</property> <child> <object class="SysprofVisualizersFrame" id="visualizers"> - <property name="vexpand">true</property> - <property name="visible">true</property> + <property name="vexpand">false</property> </object> </child> <child> - <object class="GtkSeparator"> - <property name="orientation">horizontal</property> - <property name="visible">true</property> - </object> - </child> - </object> - </child> - <child> - <object class="GtkStack" id="pages"> - <property name="homogeneous">false</property> - <property name="vexpand">true</property> - <property name="visible">true</property> - <child> - <object class="SysprofDetailsPage" id="details"> - <property name="visible">true</property> + <object class="GtkStack" id="pages"> + <property name="hhomogeneous">0</property> + <property name="vhomogeneous">0</property> + <property name="vexpand">true</property> + <child> + <object class="GtkStackPage"> + <property name="title" translatable="yes">Details</property> + <property name="name">details</property> + <property name="child"> + <object class="SysprofDetailsPage" id="details"> + </object> + </property> + </object> + </child> </object> - <packing> - <property name="title" translatable="yes">Details</property> - <property name="name">details</property> - </packing> </child> </object> - </child> + </property> </object> - <packing> - <property name="name">view</property> - </packing> </child> <child> - <object class="SysprofRecordingStateView" id="recording_view"> - <property name="visible">true</property> - </object> - <packing> + <object class="GtkStackPage"> <property name="name">record</property> - </packing> + <property name="child"> + <object class="SysprofRecordingStateView" id="recording_view"> + </object> + </property> + </object> </child> <child> - <object class="SysprofFailedStateView" id="failed_view"> - <property name="visible">true</property> - </object> - <packing> + <object class="GtkStackPage"> <property name="name">failed</property> - </packing> + <property name="child"> + <object class="SysprofFailedStateView" id="failed_view"> + </object> + </property> + </object> </child> </object> </child>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-duplex-visualizer.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-duplex-visualizer.c
Changed
@@ -296,35 +296,37 @@ g_task_run_in_thread (task, sysprof_duplex_visualizer_worker); } -static gboolean -sysprof_duplex_visualizer_draw (GtkWidget *widget, - cairo_t *cr) +static void +sysprof_duplex_visualizer_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { static const gdouble dashes = { 1.0, 2.0 }; SysprofDuplexVisualizer *self = (SysprofDuplexVisualizer *)widget; PangoFontDescription *font_desc; GtkStyleContext *style_context; PangoLayout *layout; + cairo_t *cr; GtkAllocation alloc; - GdkRectangle clip; - gboolean ret; GdkRGBA fg; guint mid; g_assert (SYSPROF_IS_DUPLEX_VISUALIZER (self)); - g_assert (cr != NULL); + g_assert (snapshot != NULL); + + /* FIXME: This should all be drawn offscreen and then drawn to the snapshot + * using GdkMemoryTexture so that we can avoid extra GPU uploads. + */ gtk_widget_get_allocation (widget, &alloc); - gdk_cairo_get_clip_rectangle (cr, &clip); mid = alloc.height / 2; - ret = GTK_WIDGET_CLASS (sysprof_duplex_visualizer_parent_class)->draw (widget, cr); + GTK_WIDGET_CLASS (sysprof_duplex_visualizer_parent_class)->snapshot (widget, snapshot); + + cr = gtk_snapshot_append_cairo (snapshot, &GRAPHENE_RECT_INIT (0, 0, alloc.width, alloc.height)); style_context = gtk_widget_get_style_context (widget); - gtk_style_context_get_color (style_context, - gtk_style_context_get_state (style_context), - &fg); + gtk_style_context_get_color (style_context, &fg); fg.alpha *= 0.4; /* Draw our center line */ @@ -366,6 +368,7 @@ n_fpoints); /* Skip past data that we won't see anyway */ +#if 0 for (p = 0; p < n_fpoints; p++) { if (pointsp.x >= clip.x) @@ -373,7 +376,8 @@ } if (p >= n_fpoints) - return ret; + return; +#endif /* But get at least one data point to anchor out of view */ if (p > 0) @@ -398,8 +402,10 @@ last_x = pointsi.x; last_y = pointsi.y; +#if 0 if (pointsi.x > clip.x + clip.width) break; +#endif } cairo_line_to (cr, last_x, mid); @@ -436,6 +442,7 @@ points, n_fpoints); +#if 0 /* Skip past data that we won't see anyway */ for (p = 0; p < n_fpoints; p++) { @@ -445,6 +452,7 @@ if (p >= n_fpoints) return ret; +#endif /* But get at least one data point to anchor out of view */ if (p > 0) @@ -469,8 +477,10 @@ last_x = pointsi.x; last_y = pointsi.y; +#if 0 if (pointsi.x > clip.x + clip.width) break; +#endif } cairo_line_to (cr, last_x, mid); @@ -510,7 +520,7 @@ pango_font_description_free (font_desc); g_object_unref (layout); - return ret; + cairo_destroy (cr); } static void @@ -534,7 +544,7 @@ object_class->finalize = sysprof_duplex_visualizer_finalize; - widget_class->draw = sysprof_duplex_visualizer_draw; + widget_class->snapshot = sysprof_duplex_visualizer_snapshot; visualizer_class->set_reader = sysprof_duplex_visualizer_set_reader; }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-environ-editor-row.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-environ-editor-row.c
Changed
@@ -127,9 +127,9 @@ } static void -sysprof_environ_editor_row_destroy (GtkWidget *widget) +sysprof_environ_editor_row_dispose (GObject *object) { - SysprofEnvironEditorRow *self = (SysprofEnvironEditorRow *)widget; + SysprofEnvironEditorRow *self = (SysprofEnvironEditorRow *)object; if (self->variable != NULL) { @@ -137,7 +137,7 @@ g_clear_object (&self->variable); } - GTK_WIDGET_CLASS (sysprof_environ_editor_row_parent_class)->destroy (widget); + G_OBJECT_CLASS (sysprof_environ_editor_row_parent_class)->dispose (object); } static void @@ -184,11 +184,10 @@ GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + object_class->dispose = sysprof_environ_editor_row_dispose; object_class->get_property = sysprof_environ_editor_row_get_property; object_class->set_property = sysprof_environ_editor_row_set_property; - widget_class->destroy = sysprof_environ_editor_row_destroy; - gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-environ-editor-row.ui"); gtk_widget_class_bind_template_child (widget_class, SysprofEnvironEditorRow, delete_button); gtk_widget_class_bind_template_child (widget_class, SysprofEnvironEditorRow, key_entry);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-environ-editor-row.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-environ-editor-row.ui
Changed
@@ -1,78 +1,38 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.0 --> <interface> - <requires lib="gtk+" version="3.10"/> <template class="SysprofEnvironEditorRow" parent="GtkListBoxRow"> - <property name="can_focus">False</property> <child> <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> <property name="spacing">12</property> <child> <object class="GtkEntry" id="key_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="margin_start">3</property> - <property name="has_frame">False</property> + <property name="margin-start">3</property> + <property name="has-frame">False</property> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> </child> <child> <object class="GtkLabel" id="eq_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> <property name="label">=</property> <style> <class name="dim-label"/> </style> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> </child> <child> <object class="GtkEntry" id="value_entry"> - <property name="visible">True</property> - <property name="can_focus">True</property> <property name="hexpand">True</property> - <property name="has_frame">False</property> + <property name="has-frame">False</property> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> </child> <child> <object class="GtkButton" id="delete_button"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes">Remove environment variable</property> - <child> - <object class="GtkImage"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">list-remove-symbolic</property> - </object> - </child> + <property name="tooltip-text" translatable="yes">Remove environment variable</property> + <property name="icon-name">list-remove-symbolic</property> <style> <class name="image-button"/> <class name="flat"/> </style> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> </child> </object> </child>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-environ-editor.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-environ-editor.c
Changed
@@ -30,13 +30,14 @@ struct _SysprofEnvironEditor { - GtkListBox parent_instance; + GtkWidget parent_instance; + GtkListBox *list_box; SysprofEnviron *environ; GtkWidget *dummy_row; SysprofEnvironVariable *dummy; }; -G_DEFINE_TYPE (SysprofEnvironEditor, sysprof_environ_editor, GTK_TYPE_LIST_BOX) +G_DEFINE_TYPE (SysprofEnvironEditor, sysprof_environ_editor, GTK_TYPE_WIDGET) enum { PROP_0, @@ -68,8 +69,11 @@ g_assert (SYSPROF_IS_ENVIRON_EDITOR (self)); label = g_object_new (GTK_TYPE_LABEL, - "label", _("New variable…"), - "margin", 6, + "label", _("New environment variable…"), + "margin-start", 6, + "margin-end", 6, + "margin-top", 6, + "margin-bottom", 6, "visible", TRUE, "xalign", 0.0f, NULL); @@ -114,8 +118,7 @@ g_assert (SYSPROF_IS_ENVIRON_EDITOR (self)); g_assert (SYSPROF_IS_ENVIRON (self->environ)); - gtk_list_box_bind_model (GTK_LIST_BOX (self), NULL, NULL, NULL, NULL); - + gtk_list_box_bind_model (self->list_box, NULL, NULL, NULL, NULL); g_clear_object (&self->dummy); } @@ -125,12 +128,12 @@ g_assert (SYSPROF_IS_ENVIRON_EDITOR (self)); g_assert (SYSPROF_IS_ENVIRON (self->environ)); - gtk_list_box_bind_model (GTK_LIST_BOX (self), + gtk_list_box_bind_model (self->list_box, G_LIST_MODEL (self->environ), sysprof_environ_editor_create_row, self, NULL); self->dummy_row = sysprof_environ_editor_create_dummy_row (self); - gtk_container_add (GTK_CONTAINER (self), self->dummy_row); + gtk_list_box_append (self->list_box, self->dummy_row); } static void @@ -168,17 +171,19 @@ g_assert (SYSPROF_IS_ENVIRON_EDITOR (self)); g_assert (SYSPROF_IS_ENVIRON_VARIABLE (variable)); - gtk_container_foreach (GTK_CONTAINER (self), find_row_cb, &lookup); + for (GtkWidget *child = gtk_widget_get_first_child (GTK_WIDGET (self->list_box)); + child; + child = gtk_widget_get_next_sibling (child)) + find_row_cb (child, &lookup); return lookup.row; } static void -sysprof_environ_editor_row_activated (GtkListBox *list_box, - GtkListBoxRow *row) +sysprof_environ_editor_row_activated (SysprofEnvironEditor *self, + GtkListBoxRow *row, + GtkListBox *list_box) { - SysprofEnvironEditor *self = (SysprofEnvironEditor *)list_box; - g_assert (GTK_IS_LIST_BOX (list_box)); g_assert (GTK_IS_LIST_BOX_ROW (row)); @@ -196,13 +201,19 @@ } static void -sysprof_environ_editor_destroy (GtkWidget *widget) +sysprof_environ_editor_dispose (GObject *object) { - SysprofEnvironEditor *self = (SysprofEnvironEditor *)widget; + SysprofEnvironEditor *self = (SysprofEnvironEditor *)object; - GTK_WIDGET_CLASS (sysprof_environ_editor_parent_class)->destroy (widget); + if (self->list_box) + { + gtk_widget_unparent (GTK_WIDGET (self->list_box)); + self->list_box = NULL; + } g_clear_object (&self->environ); + + G_OBJECT_CLASS (sysprof_environ_editor_parent_class)->dispose (object); } static void @@ -248,16 +259,12 @@ { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - GtkListBoxClass *list_box_class = GTK_LIST_BOX_CLASS (klass); SysprofThemeManager *theme_manager = sysprof_theme_manager_get_default (); + object_class->dispose = sysprof_environ_editor_dispose; object_class->get_property = sysprof_environ_editor_get_property; object_class->set_property = sysprof_environ_editor_set_property; - widget_class->destroy = sysprof_environ_editor_destroy; - - list_box_class->row_activated = sysprof_environ_editor_row_activated; - properties PROP_ENVIRON = g_param_spec_object ("environ", "Environment", @@ -267,16 +274,26 @@ g_object_class_install_properties (object_class, N_PROPS, properties); + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); + sysprof_theme_manager_register_resource (theme_manager, NULL, NULL, "/org/gnome/sysprof/css/SysprofEnvironEditor-shared.css"); } static void sysprof_environ_editor_init (SysprofEnvironEditor *self) { - gtk_list_box_set_selection_mode (GTK_LIST_BOX (self), GTK_SELECTION_NONE); + self->list_box = GTK_LIST_BOX (gtk_list_box_new ()); + gtk_widget_set_parent (GTK_WIDGET (self->list_box), GTK_WIDGET (self)); + + gtk_list_box_set_selection_mode (self->list_box, GTK_SELECTION_NONE); - gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)), - "environ-editor"); + gtk_widget_add_css_class (GTK_WIDGET (self), "environ-editor"); + + g_signal_connect_object (self->list_box, + "row-activated", + G_CALLBACK (sysprof_environ_editor_row_activated), + self, + G_CONNECT_SWAPPED); } GtkWidget *
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-environ-editor.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-environ-editor.h
Changed
@@ -28,11 +28,11 @@ #define SYSPROF_TYPE_ENVIRON_EDITOR (sysprof_environ_editor_get_type()) -G_DECLARE_FINAL_TYPE (SysprofEnvironEditor, sysprof_environ_editor, SYSPROF, ENVIRON_EDITOR, GtkListBox) +G_DECLARE_FINAL_TYPE (SysprofEnvironEditor, sysprof_environ_editor, SYSPROF, ENVIRON_EDITOR, GtkWidget) GtkWidget *sysprof_environ_editor_new (void); SysprofEnviron *sysprof_environ_editor_get_environ (SysprofEnvironEditor *self); void sysprof_environ_editor_set_environ (SysprofEnvironEditor *self, - SysprofEnviron *environ); + SysprofEnviron *environ); G_END_DECLS
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-failed-state-view.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-failed-state-view.c
Changed
@@ -22,7 +22,7 @@ #include "sysprof-failed-state-view.h" -G_DEFINE_TYPE (SysprofFailedStateView, sysprof_failed_state_view, GTK_TYPE_BIN) +G_DEFINE_TYPE (SysprofFailedStateView, sysprof_failed_state_view, GTK_TYPE_WIDGET) GtkWidget * sysprof_failed_state_view_new (void) @@ -31,10 +31,26 @@ } static void +sysprof_failed_state_view_dispose (GObject *object) +{ + SysprofFailedStateView *self = (SysprofFailedStateView *)object; + GtkWidget *child; + + while ((child = gtk_widget_get_first_child (GTK_WIDGET (self)))) + gtk_widget_unparent (child); + + G_OBJECT_CLASS (sysprof_failed_state_view_parent_class)->dispose (object); +} + +static void sysprof_failed_state_view_class_init (SysprofFailedStateViewClass *klass) { + GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + object_class->dispose = sysprof_failed_state_view_dispose; + + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-failed-state-view.ui"); }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-failed-state-view.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-failed-state-view.h
Changed
@@ -27,13 +27,11 @@ #define SYSPROF_TYPE_FAILED_STATE_VIEW (sysprof_failed_state_view_get_type()) -G_DECLARE_DERIVABLE_TYPE (SysprofFailedStateView, sysprof_failed_state_view, SYSPROF, FAILED_STATE_VIEW, GtkBin) +G_DECLARE_DERIVABLE_TYPE (SysprofFailedStateView, sysprof_failed_state_view, SYSPROF, FAILED_STATE_VIEW, GtkWidget) struct _SysprofFailedStateViewClass { - GtkBinClass parent; - - gpointer padding4; + GtkWidgetClass parent; }; GtkWidget *sysprof_failed_state_view_new (void);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-failed-state-view.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-failed-state-view.ui
Changed
@@ -1,9 +1,14 @@ <?xml version="1.0"?> <interface> - <template class="SysprofFailedStateView" parent="GtkBin"> + <template class="SysprofFailedStateView" parent="GtkWidget"> + <property name="vexpand">true</property> + <property name="valign">center</property> <child> <object class="GtkBox"> - <property name="border-width">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="orientation">vertical</property> <property name="spacing">12</property> <property name="visible">true</property> @@ -17,7 +22,7 @@ </style> </object> </child> - <child> + <child type="end"> <object class="GtkLabel"> <property name="label" translatable="yes">Ouch, that hurt!</property> <property name="visible">true</property> @@ -29,12 +34,8 @@ <attribute name="weight" value="bold"/> </attributes> </object> - <packing> - <property name="pack-type">end</property> - <property name="position">2</property> - </packing> </child> - <child> + <child type="end"> <object class="GtkLabel"> <property name="label" translatable="yes">Something unexpectedly went wrong while trying to profile your system.</property> <property name="use-markup">true</property> @@ -43,20 +44,6 @@ <class name="dim-label"/> </style> </object> - <packing> - <property name="pack-type">end</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="vexpand">true</property> - <property name="visible">true</property> - </object> - <packing> - <property name="position">0</property> - <property name="pack-type">end</property> - </packing> </child> </object> </child>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-line-visualizer.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-line-visualizer.c
Changed
@@ -141,9 +141,9 @@ return ret; } -static gboolean -sysprof_line_visualizer_draw (GtkWidget *widget, - cairo_t *cr) +static void +sysprof_line_visualizer_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { static PangoAttrList *attrs = NULL; SysprofLineVisualizer *self = (SysprofLineVisualizer *)widget; @@ -151,28 +151,35 @@ g_autofree gchar *upper = NULL; GtkStyleContext *style_context; PangoLayout *layout; - GtkStateFlags flags; + cairo_t *cr; GtkAllocation alloc; GdkRectangle clip; GdkRGBA foreground; - gboolean ret; g_assert (SYSPROF_IS_LINE_VISUALIZER (widget)); - g_assert (cr != NULL); + g_assert (snapshot != NULL); gtk_widget_get_allocation (widget, &alloc); - ret = GTK_WIDGET_CLASS (sysprof_line_visualizer_parent_class)->draw (widget, cr); + GTK_WIDGET_CLASS (sysprof_line_visualizer_parent_class)->snapshot (widget, snapshot); if (priv->cache == NULL) - return ret; + return; +#if 0 if (!gdk_cairo_get_clip_rectangle (cr, &clip)) return ret; +#else + clip.x = 0; + clip.y = 0; + clip.width = alloc.width; + clip.height = alloc.height; +#endif + + cr = gtk_snapshot_append_cairo (snapshot, &GRAPHENE_RECT_INIT (0, 0, alloc.width, alloc.height)); style_context = gtk_widget_get_style_context (widget); - flags = gtk_widget_get_state_flags (widget); - gtk_style_context_get_color (style_context, flags, &foreground); + gtk_style_context_get_color (style_context, &foreground); for (guint line = 0; line < priv->lines->len; line++) { @@ -205,7 +212,7 @@ } if (p >= n_fpoints) - return ret; + goto cleanup; if (p > 0) p--; @@ -289,7 +296,8 @@ g_clear_object (&layout); } - return ret; +cleanup: + cairo_destroy (cr); } static void @@ -347,12 +355,10 @@ g_assert (SYSPROF_IS_LINE_VISUALIZER (self)); if (priv->queued_load == 0) - { - priv->queued_load = gdk_threads_add_idle_full (G_PRIORITY_LOW, - sysprof_line_visualizer_do_reload, - self, - NULL); - } + priv->queued_load = g_idle_add_full (G_PRIORITY_LOW, + sysprof_line_visualizer_do_reload, + self, + NULL); } static void @@ -390,11 +396,7 @@ g_clear_pointer (&priv->cache, point_cache_unref); g_clear_pointer (&priv->reader, sysprof_capture_reader_unref); - if (priv->queued_load != 0) - { - g_source_remove (priv->queued_load); - priv->queued_load = 0; - } + g_clear_handle_id (&priv->queued_load, g_source_remove); G_OBJECT_CLASS (sysprof_line_visualizer_parent_class)->finalize (object); } @@ -472,7 +474,7 @@ object_class->get_property = sysprof_line_visualizer_get_property; object_class->set_property = sysprof_line_visualizer_set_property; - widget_class->draw = sysprof_line_visualizer_draw; + widget_class->snapshot = sysprof_line_visualizer_snapshot; visualizer_class->set_reader = sysprof_line_visualizer_set_reader;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-mark-visualizer.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-mark-visualizer.c
Changed
@@ -70,25 +70,27 @@ return SYSPROF_VISUALIZER (g_steal_pointer (&self)); } -static gboolean -sysprof_mark_visualizer_draw (GtkWidget *widget, - cairo_t *cr) +static void +sysprof_mark_visualizer_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { SysprofMarkVisualizer *self = (SysprofMarkVisualizer *)widget; SysprofVisualizer *vis = (SysprofVisualizer *)widget; + static const GdkRGBA black = {0,0,0,1}; + const GdkRGBA *rgba = &black; GHashTableIter iter; GtkAllocation alloc; gpointer k, v; - gboolean ret; - gint n_groups = 0; - gint y = 0; + int n_groups = 0; + int y = 0; g_assert (SYSPROF_IS_MARK_VISUALIZER (self)); - g_assert (cr != NULL); + g_assert (snapshot != NULL); + + GTK_WIDGET_CLASS (sysprof_mark_visualizer_parent_class)->snapshot (widget, snapshot); - ret = GTK_WIDGET_CLASS (sysprof_mark_visualizer_parent_class)->draw (widget, cr); if (self->spans_by_group == NULL) - return ret; + return; gtk_widget_get_allocation (widget, &alloc); @@ -117,19 +119,14 @@ g_hash_table_iter_init (&iter, self->spans_by_group); while (g_hash_table_iter_next (&iter, &k, &v)) { - static const GdkRGBA black = {0, 0, 0, 1}; SysprofMarkTimeSpan *span; const gchar *group = k; const GArray *spans = v; - const GdkRGBA *rgba; const GdkRGBA *kindrgba; const GdkRGBA *grouprgba; if ((grouprgba = g_hash_table_lookup (self->rgba_by_group, group))) - { - rgba = grouprgba; - gdk_cairo_set_source_rgba (cr, rgba); - } + rgba = grouprgba; for (guint i = 0; i < spans->len; i++) { @@ -144,7 +141,6 @@ rgba = kindrgba; else if ((grouprgba = g_hash_table_lookup (self->rgba_by_group, group))) rgba = grouprgba; - gdk_cairo_set_source_rgba (cr, rgba); } x1 = span->x; @@ -180,31 +176,24 @@ break; } - cairo_rectangle (cr, x1, y, x2 - x1, RECT_HEIGHT); - - if (n_groups == 1) - cairo_fill (cr); + gtk_snapshot_append_color (snapshot, rgba, &GRAPHENE_RECT_INIT (x1, y, x2 - x1, RECT_HEIGHT)); } - if (n_groups > 1) - cairo_fill (cr); - y += RECT_HEIGHT + RECT_OVERLAP; } - - return ret; } static void -sysprof_mark_visualizer_size_allocate (GtkWidget *widget, - GtkAllocation *alloc) +sysprof_mark_visualizer_size_allocate (GtkWidget *widget, + int width, + int height, + int baseline) { SysprofMarkVisualizer *self = (SysprofMarkVisualizer *)widget; g_assert (SYSPROF_IS_MARK_VISUALIZER (self)); - g_assert (alloc != NULL); - GTK_WIDGET_CLASS (sysprof_mark_visualizer_parent_class)->size_allocate (widget, alloc); + GTK_WIDGET_CLASS (sysprof_mark_visualizer_parent_class)->size_allocate (widget, width, height, baseline); reset_positions (self); } @@ -230,7 +219,7 @@ object_class->finalize = sysprof_mark_visualizer_finalize; - widget_class->draw = sysprof_mark_visualizer_draw; + widget_class->snapshot = sysprof_mark_visualizer_snapshot; widget_class->size_allocate = sysprof_mark_visualizer_size_allocate; }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-marks-aid.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-marks-aid.c
Changed
@@ -47,6 +47,177 @@ G_DEFINE_TYPE (SysprofMarksAid, sysprof_marks_aid, SYSPROF_TYPE_AID) static void +rgb_to_hls (gdouble *r, + gdouble *g, + gdouble *b) +{ + gdouble min; + gdouble max; + gdouble red; + gdouble green; + gdouble blue; + gdouble h, l, s; + gdouble delta; + + red = *r; + green = *g; + blue = *b; + if (red > green) + { + if (red > blue) + max = red; + else + max = blue; + if (green < blue) + min = green; + else + min = blue; + } + else + { + if (green > blue) + max = green; + else + max = blue; + if (red < blue) + min = red; + else + min = blue; + } + l = (max + min) / 2; + s = 0; + h = 0; + if (max != min) + { + if (l <= 0.5) + s = (max - min) / (max + min); + else + s = (max - min) / (2 - max - min); + delta = max - min; + if (red == max) + h = (green - blue) / delta; + else if (green == max) + h = 2 + (blue - red) / delta; + else if (blue == max) + h = 4 + (red - green) / delta; + h *= 60; + if (h < 0.0) + h += 360; + } + *r = h; + *g = l; + *b = s; +} + +static void +hls_to_rgb (gdouble *h, + gdouble *l, + gdouble *s) +{ + gdouble hue; + gdouble lightness; + gdouble saturation; + gdouble m1, m2; + gdouble r, g, b; + + lightness = *l; + saturation = *s; + if (lightness <= 0.5) + m2 = lightness * (1 + saturation); + else + m2 = lightness + saturation - lightness * saturation; + m1 = 2 * lightness - m2; + if (saturation == 0) + { + *h = lightness; + *l = lightness; + *s = lightness; + } + else + { + hue = *h + 120; + while (hue > 360) + hue -= 360; + while (hue < 0) + hue += 360; + if (hue < 60) + r = m1 + (m2 - m1) * hue / 60; + else if (hue < 180) + r = m2; + else if (hue < 240) + r = m1 + (m2 - m1) * (240 - hue) / 60; + else + r = m1; + hue = *h; + while (hue > 360) + hue -= 360; + while (hue < 0) + hue += 360; + if (hue < 60) + g = m1 + (m2 - m1) * hue / 60; + else if (hue < 180) + g = m2; + else if (hue < 240) + g = m1 + (m2 - m1) * (240 - hue) / 60; + else + g = m1; + hue = *h - 120; + while (hue > 360) + hue -= 360; + while (hue < 0) + hue += 360; + if (hue < 60) + b = m1 + (m2 - m1) * hue / 60; + else if (hue < 180) + b = m2; + else if (hue < 240) + b = m1 + (m2 - m1) * (240 - hue) / 60; + else + b = m1; + *h = r; + *l = g; + *s = b; + } +} + +static void +rgba_shade (const GdkRGBA *rgba, + GdkRGBA *dst, + gdouble k) +{ + gdouble red; + gdouble green; + gdouble blue; + + red = rgba->red; + green = rgba->green; + blue = rgba->blue; + + rgb_to_hls (&red, &green, &blue); + + green *= k; + + if (green > 1.0) + green = 1.0; + else if (green < 0.0) + green = 0.0; + + blue *= k; + + if (blue > 1.0) + blue = 1.0; + else if (blue < 0.0) + blue = 0.0; + + hls_to_rgb (&red, &green, &blue); + + dst->red = red; + dst->green = green; + dst->blue = blue; + dst->alpha = rgba->alpha; +} + +static void present_free (gpointer data) { Present *p = data; @@ -275,7 +446,7 @@ if (!g_hash_table_contains (seen, GUINT_TO_POINTER (span->kind))) { - dzl_rgba_shade (&rgba, &kind_rgba, 1 + (ratio * span->kind)); + rgba_shade (&rgba, &kind_rgba, 1 + (ratio * span->kind)); g_hash_table_insert (seen, GUINT_TO_POINTER (span->kind), g_memdup2 (&kind_rgba, sizeof kind_rgba));
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-marks-page.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-marks-page.c
Changed
@@ -50,6 +50,8 @@ GtkLabel *end; GtkLabel *duration; GtkTextView *message; + GtkWidget *failed; + GtkWidget *marks; } SysprofMarksPagePrivate; enum { @@ -64,19 +66,21 @@ G_DEFINE_TYPE_WITH_PRIVATE (SysprofMarksPage, sysprof_marks_page, SYSPROF_TYPE_PAGE) static gboolean -sysprof_marks_page_tree_view_key_press_event_cb (SysprofMarksPage *self, - const GdkEventKey *key, - GtkTreeView *tree_view) +sysprof_marks_page_tree_view_key_press_event_cb (SysprofMarksPage *self, + guint keyval, + guint keycode, + GdkModifierType state, + GtkEventControllerKey *controller) { SysprofMarksPagePrivate *priv = sysprof_marks_page_get_instance_private (self); gint dir = 0; g_assert (SYSPROF_MARKS_PAGE (self)); - g_assert (key != NULL); + g_assert (GTK_IS_EVENT_CONTROLLER_KEY (controller)); - if (key->state == 0) + if ((state & (GDK_SHIFT_MASK|GDK_CONTROL_MASK|GDK_ALT_MASK)) == 0) { - switch (key->keyval) + switch (keyval) { case GDK_KEY_Left: dir = -1; @@ -308,9 +312,9 @@ gtk_tree_view_set_model (priv->tree_view, GTK_TREE_MODEL (model)); if (gtk_tree_model_iter_n_children (GTK_TREE_MODEL (model), NULL) == 0) - gtk_stack_set_visible_child_name (priv->stack, "empty-state"); + gtk_stack_set_visible_child (priv->stack, GTK_WIDGET (priv->failed)); else - gtk_stack_set_visible_child_name (priv->stack, "marks"); + gtk_stack_set_visible_child (priv->stack, GTK_WIDGET (priv->marks)); g_task_return_boolean (task, TRUE); } @@ -515,6 +519,8 @@ gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, duration); gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, time); gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, message); + gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, marks); + gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksPage, failed); properties PROP_KIND = g_param_spec_enum ("kind", NULL, NULL, @@ -536,6 +542,7 @@ sysprof_marks_page_init (SysprofMarksPage *self) { SysprofMarksPagePrivate *priv = sysprof_marks_page_get_instance_private (self); + GtkEventController *controller; priv->kind = SYSPROF_MARKS_MODEL_MARKS; @@ -544,11 +551,14 @@ gtk_tree_selection_set_mode (gtk_tree_view_get_selection (priv->tree_view), GTK_SELECTION_MULTIPLE); - g_signal_connect_object (priv->tree_view, - "key-press-event", + controller = gtk_event_controller_key_new (); + gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE); + g_signal_connect_object (controller, + "key-pressed", G_CALLBACK (sysprof_marks_page_tree_view_key_press_event_cb), self, G_CONNECT_SWAPPED); + gtk_widget_add_controller (GTK_WIDGET (self), controller); g_signal_connect_object (priv->tree_view, "row-activated",
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-marks-page.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-marks-page.ui
Changed
@@ -3,22 +3,21 @@ <template class="SysprofMarksPage" parent="SysprofPage"> <child> <object class="GtkStack" id="stack"> - <property name="homogeneous">false</property> - <property name="visible">true</property> + <property name="hhomogeneous">false</property> + <property name="vhomogeneous">false</property> <child> - <object class="GtkBox"> + <object class="GtkBox" id="marks"> <property name="orientation">horizontal</property> - <property name="visible">true</property> <child> <object class="GtkBox" id="details_box"> <property name="orientation">vertical</property> - <property name="margin">6</property> - <property name="visible">true</property> <child> <object class="GtkLabel"> <property name="label" translatable="yes">Details</property> <property name="xalign">0</property> - <property name="visible">true</property> + <property name="margin-top">6</property> + <property name="margin-start">6</property> + <property name="margin-end">6</property> <property name="margin-bottom">6</property> <attributes> <attribute name="weight" value="bold"/> @@ -30,164 +29,150 @@ <property name="hexpand">false</property> <property name="vexpand">true</property> <property name="margin-start">6</property> - <property name="visible">true</property> + <property name="margin-end">6</property> <property name="column-spacing">6</property> <property name="row-spacing">3</property> <child> <object class="GtkLabel"> <property name="label" translatable="yes">Group</property> - <property name="visible">true</property> <property name="xalign">1</property> <style> <class name="dim-label"/> </style> + <layout> + <property name="row">0</property> + <property name="column">0</property> + </layout> </object> - <packing> - <property name="top-attach">0</property> - <property name="left-attach">0</property> - </packing> </child> <child> <object class="GtkLabel"> <property name="label" translatable="yes">Mark</property> - <property name="visible">true</property> <property name="xalign">1</property> <property name="yalign">0</property> <style> <class name="dim-label"/> </style> + <layout> + <property name="row">1</property> + <property name="column">0</property> + </layout> </object> - <packing> - <property name="top-attach">1</property> - <property name="left-attach">0</property> - </packing> </child> <child> <object class="GtkLabel"> <property name="label" translatable="yes">Time</property> - <property name="visible">true</property> <property name="xalign">1</property> <style> <class name="dim-label"/> </style> + <layout> + <property name="row">2</property> + <property name="column">0</property> + </layout> </object> - <packing> - <property name="top-attach">2</property> - <property name="left-attach">0</property> - </packing> </child> <child> <object class="GtkLabel"> <property name="label" translatable="yes">End</property> - <property name="visible">true</property> <property name="xalign">1</property> <style> <class name="dim-label"/> </style> + <layout> + <property name="row">3</property> + <property name="column">0</property> + </layout> </object> - <packing> - <property name="top-attach">3</property> - <property name="left-attach">0</property> - </packing> </child> <child> <object class="GtkLabel"> <property name="label" translatable="yes">Duration</property> - <property name="visible">true</property> <property name="xalign">1</property> <style> <class name="dim-label"/> </style> + <layout> + <property name="row">4</property> + <property name="column">0</property> + </layout> </object> - <packing> - <property name="top-attach">4</property> - <property name="left-attach">0</property> - </packing> </child> <child> <object class="GtkLabel"> <property name="label" translatable="yes">Message</property> - <property name="visible">true</property> <property name="xalign">1</property> <property name="yalign">0</property> <style> <class name="dim-label"/> </style> + <layout> + <property name="row">5</property> + <property name="column">0</property> + </layout> </object> - <packing> - <property name="top-attach">5</property> - <property name="left-attach">0</property> - </packing> </child> <child> <object class="GtkLabel" id="group"> - <property name="visible">true</property> <property name="xalign">0</property> <property name="wrap">true</property> + <layout> + <property name="row">0</property> + <property name="column">1</property> + </layout> </object> - <packing> - <property name="top-attach">0</property> - <property name="left-attach">1</property> - </packing> </child> <child> <object class="GtkLabel" id="mark"> - <property name="visible">true</property> <property name="xalign">0</property> <property name="max-width-chars">5</property> <property name="ellipsize">end</property> + <layout> + <property name="row">1</property> + <property name="column">1</property> + </layout> </object> - <packing> - <property name="top-attach">1</property> - <property name="left-attach">1</property> - </packing> </child> <child> <object class="GtkLabel" id="time"> - <property name="visible">true</property> <property name="xalign">0</property> + <layout> + <property name="row">2</property> + <property name="column">1</property> + </layout> </object> - <packing> - <property name="top-attach">2</property> - <property name="left-attach">1</property> - </packing> </child> <child> <object class="GtkLabel" id="end"> - <property name="visible">true</property> <property name="xalign">0</property> + <layout> + <property name="row">3</property> + <property name="column">1</property> + </layout>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-memprof-page.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-memprof-page.c
Changed
@@ -39,11 +39,12 @@ #include "config.h" -#include <dazzle.h> #include <glib/gi18n.h> #include "../stackstash.h" +#include "egg-paned-private.h" + #include "sysprof-cell-renderer-percent.h" #include "sysprof-memprof-page.h" #include "sysprof-profile.h" @@ -59,15 +60,18 @@ GtkTreeViewColumn *function_size_column; GtkCellRendererText *function_size_cell; GtkStack *stack; - GtkRadioButton *summary; - GtkRadioButton *all_allocs; - GtkRadioButton *temp_allocs; - GtkRadioButton *leaked_allocs_button; + GtkToggleButton *summary; + GtkToggleButton *all_allocs; + GtkToggleButton *temp_allocs; + GtkToggleButton *leaked_allocs_button; GtkLabel *temp_allocs_count; GtkLabel *num_allocs; GtkLabel *leaked_allocs; - GtkLabel *peak_allocs; GtkListBox *by_size; + GtkWidget *callgraph; + GtkWidget *summary_page; + GtkWidget *loading_state; + GtkWidget *empty_state; GCancellable *cancellable; @@ -174,6 +178,7 @@ SysprofMemprofPagePrivate *priv = sysprof_memprof_page_get_instance_private (self); SysprofMemprofStats stats; g_autoptr(GString) str = NULL; + GtkWidget *child; g_assert (SYSPROF_IS_MEMPROF_PAGE (self)); g_assert (SYSPROF_IS_MEMPROF_PROFILE (profile)); @@ -194,9 +199,8 @@ gtk_label_set_label (priv->temp_allocs_count, str->str); g_string_truncate (str, 0); - gtk_container_foreach (GTK_CONTAINER (priv->by_size), - (GtkCallback)gtk_widget_destroy, - NULL); + while ((child = gtk_widget_get_first_child (GTK_WIDGET (priv->by_size)))) + gtk_list_box_remove (priv->by_size, child); for (guint i = 0; i < G_N_ELEMENTS (stats.by_size); i++) { @@ -220,7 +224,14 @@ title = gtk_label_new (NULL); subtitle = gtk_label_new (NULL); prog = gtk_level_bar_new_for_interval (0, stats.n_allocs); - box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3); + box = g_object_new (GTK_TYPE_BOX, + "orientation", GTK_ORIENTATION_VERTICAL, + "spacing", 6, + "margin-top", 6, + "margin-start", 6, + "margin-bottom", 6, + "margin-end", 6, + NULL); sizestr = g_format_size_full (stats.by_sizei.bucket, G_FORMAT_SIZE_IEC_UNITS); if (i == 0) @@ -237,7 +248,7 @@ gtk_label_set_label (GTK_LABEL (title), title_str); gtk_label_set_xalign (GTK_LABEL (title), 0); - dzl_gtk_widget_add_style_class (title, "dim-label"); + gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (title)), "dim-label"); gtk_widget_set_margin_start (box, 6); gtk_widget_set_margin_end (box, 6); @@ -267,13 +278,11 @@ gtk_level_bar_set_value (GTK_LEVEL_BAR (prog), stats.by_sizei.n_allocs); - gtk_container_add (GTK_CONTAINER (row), box); - gtk_container_add (GTK_CONTAINER (box), title); - gtk_container_add (GTK_CONTAINER (box), prog); - gtk_container_add (GTK_CONTAINER (box), subtitle); - gtk_container_add (GTK_CONTAINER (priv->by_size), row); - - gtk_widget_show_all (row); + gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (row), box); + gtk_box_append (GTK_BOX (box), title); + gtk_box_append (GTK_BOX (box), prog); + gtk_box_append (GTK_BOX (box), subtitle); + gtk_list_box_append (priv->by_size, row); } } @@ -310,7 +319,7 @@ if (sysprof_memprof_profile_is_empty (profile)) { - gtk_stack_set_visible_child_name (priv->stack, "summary"); + gtk_stack_set_visible_child (priv->stack, priv->summary_page); return; } @@ -345,7 +354,7 @@ gtk_tree_selection_select_iter (selection, &iter); } - gtk_stack_set_visible_child_name (priv->stack, "callgraph"); + gtk_stack_set_visible_child (priv->stack, priv->callgraph); g_clear_object (&functions); } @@ -357,7 +366,7 @@ g_return_if_fail (SYSPROF_IS_MEMPROF_PAGE (self)); - gtk_stack_set_visible_child_name (priv->stack, "empty-state"); + gtk_stack_set_visible_child (priv->stack, priv->empty_state); } static void @@ -376,7 +385,7 @@ gtk_tree_view_set_model (priv->functions_view, NULL); gtk_tree_view_set_model (priv->descendants_view, NULL); - gtk_stack_set_visible_child_name (priv->stack, "empty-state"); + gtk_stack_set_visible_child (priv->stack, priv->empty_state); } /** @@ -887,7 +896,7 @@ copy_tree_view_selection (GtkTreeView *tree_view) { g_autoptr(GString) str = NULL; - GtkClipboard *clipboard; + GdkClipboard *clipboard; g_assert (GTK_IS_TREE_VIEW (tree_view)); @@ -896,24 +905,25 @@ copy_tree_view_selection_cb, str); - clipboard = gtk_widget_get_clipboard (GTK_WIDGET (tree_view), GDK_SELECTION_CLIPBOARD); - gtk_clipboard_set_text (clipboard, str->str, str->len); + clipboard = gtk_widget_get_clipboard (GTK_WIDGET (tree_view)); + gdk_clipboard_set_text (clipboard, str->str); } static void -sysprof_memprof_page_copy_cb (GtkWidget *widget, - SysprofMemprofPage *self) +sysprof_memprof_page_copy_cb (GtkWidget *widget, + const char *action_name, + GVariant *param) { + SysprofMemprofPage *self = (SysprofMemprofPage *)widget; SysprofMemprofPagePrivate *priv = sysprof_memprof_page_get_instance_private (self); - GtkWidget *toplevel; GtkWidget *focus; + GtkRoot *toplevel; - g_assert (GTK_IS_WIDGET (widget)); g_assert (SYSPROF_IS_MEMPROF_PAGE (self)); - if (!(toplevel = gtk_widget_get_toplevel (widget)) || - !GTK_IS_WINDOW (toplevel) || - !(focus = gtk_window_get_focus (GTK_WINDOW (toplevel)))) + if (!(toplevel = gtk_widget_get_root (widget)) || + !GTK_IS_ROOT (toplevel) || + !(focus = gtk_root_get_focus (toplevel))) return; if (focus == GTK_WIDGET (priv->descendants_view)) @@ -973,7 +983,7 @@ else g_set_object (&priv->cancellable, cancellable); - gtk_stack_set_visible_child_name (priv->stack, "loading"); + gtk_stack_set_visible_child (priv->stack, priv->loading_state); task = g_task_new (self, cancellable, callback, user_data); g_task_set_source_tag (task, sysprof_memprof_page_load_async); @@ -1015,12 +1025,12 @@ static void mode_notify_active (SysprofMemprofPage *self, GParamSpec *pspec, - GtkRadioButton *button) + GtkToggleButton *button) { SysprofMemprofPagePrivate *priv = sysprof_memprof_page_get_instance_private (self);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-memprof-page.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-memprof-page.ui
Changed
@@ -1,242 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> <interface> <template class="SysprofMemprofPage" parent="SysprofPage"> <child> <object class="GtkBox"> <property name="orientation">vertical</property> - <property name="visible">true</property> - <child> - <object class="GtkBox"> - <property name="orientation">horizontal</property> - <property name="visible">true</property> - <child type="center"> - <object class="GtkBox"> - <property name="margin-top">6</property> - <property name="margin-bottom">6</property> - <property name="orientation">horizontal</property> - <property name="homogeneous">true</property> - <property name="visible">true</property> - <style> - <class name="linked"/> - </style> - <child> - <object class="GtkRadioButton" id="summary"> - <property name="label" translatable="yes">Summary</property> - <property name="draw-indicator">false</property> - <property name="visible">true</property> - <property name="active">false</property> - </object> - </child> - <child> - <object class="GtkRadioButton" id="all_allocs"> - <property name="label" translatable="yes">All Allocations</property> - <property name="draw-indicator">false</property> - <property name="visible">true</property> - <property name="group">summary</property> - <property name="active">true</property> - </object> - </child> - <child> - <object class="GtkRadioButton" id="temp_allocs"> - <property name="label" translatable="yes">Temporary Allocations</property> - <property name="draw-indicator">false</property> - <property name="visible">true</property> - <property name="active">false</property> - <property name="group">summary</property> - </object> - </child> - <child> - <object class="GtkRadioButton" id="leaked_allocs_button"> - <property name="label" translatable="yes">Leaked Allocations</property> - <property name="draw-indicator">false</property> - <property name="visible">true</property> - <property name="active">false</property> - <property name="group">summary</property> - </object> - </child> - </object> - </child> - </object> - </child> - <child> - <object class="GtkSeparator"> - <property name="orientation">horizontal</property> - <property name="visible">true</property> - </object> - </child> <child> <object class="GtkStack" id="stack"> - <property name="visible">true</property> <child> - <object class="GtkScrolledWindow"> - <property name="hscrollbar-policy">never</property> - <property name="visible">true</property> + <object class="AdwPreferencesPage" id="summary_page"> <child> - <object class="GtkBox"> - <property name="margin">16</property> - <property name="orientation">vertical</property> - <property name="visible">true</property> + <object class="AdwPreferencesGroup"> <child> - <object class="DzlThreeGrid"> - <property name="expand">true</property> - <property name="row-spacing">6</property> - <property name="column-spacing">18</property> - <property name="visible">true</property> - <child> - <object class="GtkLabel"> - <property name="label">Peak Allocation</property> - <property name="halign">end</property> - <property name="visible">false</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="peak_allocs"> - <property name="xalign">0</property> - <property name="selectable">true</property> - <property name="visible">false</property> - </object> - <packing> - <property name="column">center</property> - <property name="row">0</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="label">Number of Allocations</property> - <property name="halign">end</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="AdwActionRow"> + <property name="activatable">false</property> + <property name="title" translatable="yes">Number of Allocations</property> + <property name="subtitle" translatable="yes">Total number of allocation and free records</property> + <child type="suffix"> <object class="GtkLabel" id="num_allocs"> - <property name="xalign">0</property> + <property name="hexpand">true</property> + <property name="xalign">1</property> <property name="selectable">true</property> - <property name="visible">true</property> - </object> - <packing> - <property name="column">center</property> - <property name="row">1</property> - </packing> - </child> - <child> - <object class="GtkLabel"> - <property name="label">Leaked Allocations</property> - <property name="halign">end</property> - <property name="visible">false</property> - <style> - <class name="dim-label"/> - </style> </object> - <packing> - <property name="column">left</property> - <property name="row">2</property> - </packing> </child> - <child> + </object> + </child> + <child> + <object class="AdwActionRow"> + <property name="activatable">false</property> + <property name="title" translatable="yes">Leaked Allocations</property> + <property name="subtitle" translatable="yes">Number of allocations without a free record</property> + <child type="suffix"> <object class="GtkLabel" id="leaked_allocs"> - <property name="xalign">0</property> + <property name="hexpand">true</property> + <property name="xalign">1</property> <property name="selectable">true</property> - <property name="visible">false</property> </object> - <packing> - <property name="column">center</property> - <property name="row">2</property> - </packing> </child> - <child> - <object class="GtkLabel"> - <property name="label">Temporary Allocations</property> - <property name="halign">end</property> - <property name="visible">true</property> - <style> - <class name="dim-label"/> - </style> - </object> - <packing> - <property name="column">left</property> - <property name="row">3</property> - </packing> - </child> - <child> + </object> + </child> + <child> + <object class="AdwActionRow"> + <property name="activatable">false</property> + <property name="title" translatable="yes">Temporary Allocations</property>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-memprof-visualizer.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-memprof-visualizer.c
Changed
@@ -528,49 +528,46 @@ } static void -sysprof_memprof_visualizer_size_allocate (GtkWidget *widget, - GtkAllocation *alloc) +sysprof_memprof_visualizer_size_allocate (GtkWidget *widget, + int width, + int height, + int baseline) { - SysprofMemprofVisualizer *self = (SysprofMemprofVisualizer *)widget; - - g_assert (GTK_IS_WIDGET (widget)); - g_assert (alloc != NULL); - - GTK_WIDGET_CLASS (sysprof_memprof_visualizer_parent_class)->size_allocate (widget, alloc); - - sysprof_memprof_visualizer_queue_redraw (self); + sysprof_memprof_visualizer_queue_redraw (SYSPROF_MEMPROF_VISUALIZER (widget)); } static void -sysprof_memprof_visualizer_destroy (GtkWidget *widget) +sysprof_memprof_visualizer_dispose (GObject *object) { - SysprofMemprofVisualizer *self = (SysprofMemprofVisualizer *)widget; + SysprofMemprofVisualizer *self = (SysprofMemprofVisualizer *)object; g_clear_pointer (&self->reader, sysprof_capture_reader_unref); g_clear_pointer (&self->surface, cairo_surface_destroy); g_clear_handle_id (&self->queued_draw, g_source_remove); - GTK_WIDGET_CLASS (sysprof_memprof_visualizer_parent_class)->destroy (widget); + G_OBJECT_CLASS (sysprof_memprof_visualizer_parent_class)->dispose (object); } -static gboolean -sysprof_memprof_visualizer_draw (GtkWidget *widget, - cairo_t *cr) +static void +sysprof_memprof_visualizer_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { SysprofMemprofVisualizer *self = (SysprofMemprofVisualizer *)widget; - gboolean ret; g_assert (SYSPROF_IS_MEMPROF_VISUALIZER (self)); - g_assert (cr != NULL); + g_assert (GTK_IS_SNAPSHOT (snapshot)); - ret = GTK_WIDGET_CLASS (sysprof_memprof_visualizer_parent_class)->draw (widget, cr); + GTK_WIDGET_CLASS (sysprof_memprof_visualizer_parent_class)->snapshot (widget, snapshot); if (self->surface != NULL) { + cairo_t *cr; GtkAllocation alloc; gtk_widget_get_allocation (widget, &alloc); + cr = gtk_snapshot_append_cairo (snapshot, &GRAPHENE_RECT_INIT (0, 0, alloc.width, alloc.height)); + cairo_save (cr); cairo_rectangle (cr, 0, 0, alloc.width, alloc.height); @@ -590,19 +587,21 @@ cairo_set_source_surface (cr, self->surface, 0, 0); cairo_paint (cr); cairo_restore (cr); - } - return ret; + cairo_destroy (cr); + } } static void sysprof_memprof_visualizer_class_init (SysprofMemprofVisualizerClass *klass) { + GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); SysprofVisualizerClass *visualizer_class = SYSPROF_VISUALIZER_CLASS (klass); - widget_class->destroy = sysprof_memprof_visualizer_destroy; - widget_class->draw = sysprof_memprof_visualizer_draw; + object_class->dispose = sysprof_memprof_visualizer_dispose; + + widget_class->snapshot = sysprof_memprof_visualizer_snapshot; widget_class->size_allocate = sysprof_memprof_visualizer_size_allocate; visualizer_class->set_reader = sysprof_memprof_visualizer_set_reader;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-netdev-aid.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-netdev-aid.c
Changed
@@ -242,7 +242,7 @@ if (counters->len > 0) sysprof_display_add_group (present->display, group); else - gtk_widget_destroy (GTK_WIDGET (group)); + g_object_unref (g_object_ref_sink (group)); } return counters != NULL;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-notebook.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-notebook.c
Changed
@@ -29,10 +29,15 @@ typedef struct { + GtkNotebook *notebook; guint always_show_tabs : 1; } SysprofNotebookPrivate; -G_DEFINE_TYPE_WITH_PRIVATE (SysprofNotebook, sysprof_notebook, GTK_TYPE_NOTEBOOK) +static void buildable_iface_init (GtkBuildableIface *iface); + +G_DEFINE_TYPE_WITH_CODE (SysprofNotebook, sysprof_notebook, GTK_TYPE_WIDGET, + G_ADD_PRIVATE (SysprofNotebook) + G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, buildable_iface_init)) enum { PROP_0, @@ -83,15 +88,16 @@ } static void -sysprof_notebook_page_added (GtkNotebook *notebook, - GtkWidget *child, - guint page_num) +sysprof_notebook_page_added (SysprofNotebook *self, + GtkWidget *child, + guint page_num, + GtkNotebook *notebook) { - SysprofNotebook *self = (SysprofNotebook *)notebook; SysprofNotebookPrivate *priv = sysprof_notebook_get_instance_private (self); g_assert (SYSPROF_IS_NOTEBOOK (self)); g_assert (GTK_IS_WIDGET (child)); + g_assert (GTK_IS_NOTEBOOK (notebook)); gtk_notebook_set_show_tabs (notebook, (priv->always_show_tabs || @@ -107,13 +113,13 @@ g_signal_connect_object (child, "notify::can-replay", G_CALLBACK (sysprof_notebook_notify_can_replay_cb), - notebook, + self, G_CONNECT_SWAPPED); g_signal_connect_object (child, "notify::can-save", G_CALLBACK (sysprof_notebook_notify_can_save_cb), - notebook, + self, G_CONNECT_SWAPPED); g_object_notify_by_pspec (G_OBJECT (notebook), properties PROP_CAN_REPLAY); @@ -125,15 +131,16 @@ } static void -sysprof_notebook_page_removed (GtkNotebook *notebook, - GtkWidget *child, - guint page_num) +sysprof_notebook_page_removed (SysprofNotebook *self, + GtkWidget *child, + guint page_num, + GtkNotebook *notebook) { - SysprofNotebook *self = (SysprofNotebook *)notebook; SysprofNotebookPrivate *priv = sysprof_notebook_get_instance_private (self); g_assert (SYSPROF_IS_NOTEBOOK (self)); g_assert (GTK_IS_WIDGET (child)); + g_assert (GTK_IS_NOTEBOOK (notebook)); if (gtk_widget_in_destruction (GTK_WIDGET (notebook))) return; @@ -141,16 +148,16 @@ if (gtk_notebook_get_n_pages (notebook) == 0) { child = sysprof_display_new (); - gtk_container_add (GTK_CONTAINER (notebook), child); + gtk_notebook_append_page (notebook, child, NULL); gtk_widget_show (child); g_signal_handlers_disconnect_by_func (child, G_CALLBACK (sysprof_notebook_notify_can_save_cb), notebook); - g_object_notify_by_pspec (G_OBJECT (notebook), properties PROP_CAN_REPLAY); - g_object_notify_by_pspec (G_OBJECT (notebook), properties PROP_CAN_SAVE); - g_object_notify_by_pspec (G_OBJECT (notebook), properties PROP_CURRENT); + g_object_notify_by_pspec (G_OBJECT (self), properties PROP_CAN_REPLAY); + g_object_notify_by_pspec (G_OBJECT (self), properties PROP_CAN_SAVE); + g_object_notify_by_pspec (G_OBJECT (self), properties PROP_CURRENT); } gtk_notebook_set_show_tabs (notebook, @@ -159,18 +166,33 @@ } static void -sysprof_notebook_switch_page (GtkNotebook *notebook, - GtkWidget *widget, - guint page) +sysprof_notebook_switch_page (SysprofNotebook *self, + GtkWidget *widget, + guint page, + GtkNotebook *notebook) { + g_assert (SYSPROF_IS_NOTEBOOK (self)); g_assert (GTK_IS_NOTEBOOK (notebook)); g_assert (GTK_IS_WIDGET (widget)); - GTK_NOTEBOOK_CLASS (sysprof_notebook_parent_class)->switch_page (notebook, widget, page); + g_object_notify_by_pspec (G_OBJECT (self), properties PROP_CAN_REPLAY); + g_object_notify_by_pspec (G_OBJECT (self), properties PROP_CAN_SAVE); + g_object_notify_by_pspec (G_OBJECT (self), properties PROP_CURRENT); +} - g_object_notify_by_pspec (G_OBJECT (notebook), properties PROP_CAN_REPLAY); - g_object_notify_by_pspec (G_OBJECT (notebook), properties PROP_CAN_SAVE); - g_object_notify_by_pspec (G_OBJECT (notebook), properties PROP_CURRENT); +static void +sysprof_notebook_dispose (GObject *object) +{ + SysprofNotebook *self = (SysprofNotebook *)object; + SysprofNotebookPrivate *priv = sysprof_notebook_get_instance_private (self); + + if (priv->notebook) + { + gtk_widget_unparent (GTK_WIDGET (priv->notebook)); + priv->notebook = NULL; + } + + G_OBJECT_CLASS (sysprof_notebook_parent_class)->dispose (object); } static void @@ -227,15 +249,12 @@ sysprof_notebook_class_init (SysprofNotebookClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - GtkNotebookClass *notebook_class = GTK_NOTEBOOK_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + object_class->dispose = sysprof_notebook_dispose; object_class->get_property = sysprof_notebook_get_property; object_class->set_property = sysprof_notebook_set_property; - notebook_class->page_added = sysprof_notebook_page_added; - notebook_class->page_removed = sysprof_notebook_page_removed; - notebook_class->switch_page = sysprof_notebook_switch_page; - properties PROP_ALWAYS_SHOW_TABS = g_param_spec_boolean ("always-show-tabs", "Always Show Tabs", @@ -265,71 +284,86 @@ (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_properties (object_class, N_PROPS, properties); + + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); } static void sysprof_notebook_init (SysprofNotebook *self) { - gtk_notebook_set_show_border (GTK_NOTEBOOK (self), FALSE); - gtk_notebook_set_scrollable (GTK_NOTEBOOK (self), TRUE); - gtk_notebook_popup_enable (GTK_NOTEBOOK (self)); + SysprofNotebookPrivate *priv = sysprof_notebook_get_instance_private (self); + + priv->notebook = GTK_NOTEBOOK (gtk_notebook_new ()); + gtk_widget_set_parent (GTK_WIDGET (priv->notebook), GTK_WIDGET (self)); + + gtk_notebook_set_show_border (priv->notebook, FALSE); + gtk_notebook_set_scrollable (priv->notebook, TRUE); + gtk_notebook_popup_enable (priv->notebook); + + g_signal_connect_object (priv->notebook, + "page-added", + G_CALLBACK (sysprof_notebook_page_added), + self, + G_CONNECT_SWAPPED); + + g_signal_connect_object (priv->notebook, + "page-removed", + G_CALLBACK (sysprof_notebook_page_removed), + self, + G_CONNECT_SWAPPED); + + g_signal_connect_object (priv->notebook, + "switch-page", + G_CALLBACK (sysprof_notebook_switch_page), + self, + G_CONNECT_SWAPPED | G_CONNECT_AFTER); } void sysprof_notebook_close_current (SysprofNotebook *self) {
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-notebook.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-notebook.h
Changed
@@ -35,11 +35,11 @@ #define SYSPROF_TYPE_NOTEBOOK (sysprof_notebook_get_type()) SYSPROF_AVAILABLE_IN_ALL -G_DECLARE_DERIVABLE_TYPE (SysprofNotebook, sysprof_notebook, SYSPROF, NOTEBOOK, GtkNotebook) +G_DECLARE_DERIVABLE_TYPE (SysprofNotebook, sysprof_notebook, SYSPROF, NOTEBOOK, GtkWidget) struct _SysprofNotebookClass { - GtkNotebookClass parent_class; + GtkWidgetClass parent_class; /*< private >*/ gpointer _reserved16; @@ -70,5 +70,16 @@ SYSPROF_AVAILABLE_IN_ALL void sysprof_notebook_set_always_show_tabs (SysprofNotebook *self, gboolean always_show_tabs); +SYSPROF_AVAILABLE_IN_ALL +guint sysprof_notebook_get_n_pages (SysprofNotebook *self); +SYSPROF_AVAILABLE_IN_ALL +SysprofDisplay *sysprof_notebook_get_nth_page (SysprofNotebook *self, + guint nth); +SYSPROF_AVAILABLE_IN_ALL +void sysprof_notebook_set_current_page (SysprofNotebook *self, + int page); +SYSPROF_AVAILABLE_IN_ALL +int sysprof_notebook_append (SysprofNotebook *self, + SysprofDisplay *display); G_END_DECLS
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-page.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-page.c
Changed
@@ -31,7 +31,7 @@ gchar *title; } SysprofPagePrivate; -G_DEFINE_TYPE_WITH_PRIVATE (SysprofPage, sysprof_page, GTK_TYPE_BIN) +G_DEFINE_TYPE_WITH_PRIVATE (SysprofPage, sysprof_page, GTK_TYPE_WIDGET) enum { PROP_0, @@ -105,14 +105,18 @@ } static void -sysprof_page_finalize (GObject *object) +sysprof_page_dispose (GObject *object) { SysprofPage *self = (SysprofPage *)object; SysprofPagePrivate *priv = sysprof_page_get_instance_private (self); + GtkWidget *child; g_clear_pointer (&priv->title, g_free); - G_OBJECT_CLASS (sysprof_page_parent_class)->finalize (object); + while ((child = gtk_widget_get_first_child (GTK_WIDGET (self)))) + gtk_widget_unparent (child); + + G_OBJECT_CLASS (sysprof_page_parent_class)->dispose (object); } static void @@ -157,8 +161,9 @@ sysprof_page_class_init (SysprofPageClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - object_class->finalize = sysprof_page_finalize; + object_class->dispose = sysprof_page_dispose; object_class->get_property = sysprof_page_get_property; object_class->set_property = sysprof_page_set_property; @@ -173,11 +178,14 @@ (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS)); g_object_class_install_properties (object_class, N_PROPS, properties); + + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); } static void sysprof_page_init (SysprofPage *self) { + gtk_widget_set_vexpand (GTK_WIDGET (self), TRUE); } /**
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-page.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-page.h
Changed
@@ -32,11 +32,11 @@ #define SYSPROF_TYPE_PAGE (sysprof_page_get_type()) SYSPROF_AVAILABLE_IN_ALL -G_DECLARE_DERIVABLE_TYPE (SysprofPage, sysprof_page, SYSPROF, PAGE, GtkBin) +G_DECLARE_DERIVABLE_TYPE (SysprofPage, sysprof_page, SYSPROF, PAGE, GtkWidget) struct _SysprofPageClass { - GtkBinClass parent_class; + GtkWidgetClass parent_class; void (*load_async) (SysprofPage *self, SysprofCaptureReader *reader,
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-process-model-row.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-process-model-row.ui
Changed
@@ -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">
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-procs-visualizer.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-procs-visualizer.c
Changed
@@ -183,24 +183,24 @@ g_task_run_in_thread (task, discovery_worker); } -static gboolean -sysprof_procs_visualizer_draw (GtkWidget *widget, - cairo_t *cr) +static void +sysprof_procs_visualizer_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { SysprofProcsVisualizer *self = (SysprofProcsVisualizer *)widget; g_autofree SysprofVisualizerAbsolutePoint *points = NULL; - gboolean ret = GDK_EVENT_PROPAGATE; GtkAllocation alloc; GdkRGBA background; GdkRGBA foreground; const Point *fpoints; guint n_fpoints = 0; Discovery *d; + cairo_t *cr; gdouble last_x = 0; gdouble last_y = 0; g_assert (SYSPROF_IS_PROCS_VISUALIZER (self)); - g_assert (cr != NULL); + g_assert (snapshot != NULL); gtk_widget_get_allocation (widget, &alloc); @@ -208,14 +208,17 @@ background = foreground; background.alpha *= .5; - ret = GTK_WIDGET_CLASS (sysprof_procs_visualizer_parent_class)->draw (widget, cr); + GTK_WIDGET_CLASS (sysprof_procs_visualizer_parent_class)->snapshot (widget, snapshot); if (!(d = self->discovery) || d->cache == NULL) - return ret; + return; if (!(fpoints = point_cache_get_points (d->cache, 1, &n_fpoints))) - return ret; + return; + + /* This is all going to need offscreen drawing instead of new cairo every frame */ + cr = gtk_snapshot_append_cairo (snapshot, &GRAPHENE_RECT_INIT (0, 0, alloc.width, alloc.height)); points = g_new0 (SysprofVisualizerAbsolutePoint, n_fpoints); sysprof_visualizer_translate_points (SYSPROF_VISUALIZER (self), @@ -254,7 +257,7 @@ gdk_cairo_set_source_rgba (cr, &foreground); cairo_stroke (cr); - return ret; + cairo_destroy (cr); } static void @@ -276,7 +279,7 @@ object_class->finalize = sysprof_procs_visualizer_finalize; - widget_class->draw = sysprof_procs_visualizer_draw; + widget_class->snapshot = sysprof_procs_visualizer_snapshot; visualizer_class->set_reader = sysprof_procs_visualizer_set_reader; }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-profiler-assistant.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-profiler-assistant.c
Changed
@@ -22,6 +22,7 @@ #include "config.h" +#include <adwaita.h> #include <sysprof.h> #include "sysprof-platform.h" @@ -32,6 +33,7 @@ #include "sysprof-model-filter.h" #include "sysprof-profiler-assistant.h" #include "sysprof-process-model-row.h" +#include "sysprof-theme-manager.h" #include "sysprof-ui-private.h" #include "sysprof-battery-aid.h" @@ -45,16 +47,15 @@ struct _SysprofProfilerAssistant { - GtkBin parent_instance; + GtkWidget parent_instance; SysprofProcessModel *process_model; /* Template Objects */ GtkSwitch *allow_throttling; GtkButton *record_button; - GtkEntry *command_line; + AdwEntryRow *command_line; GtkSearchEntry *search_entry; - GtkRevealer *process_revealer; GtkListBox *process_list_box; SysprofEnvironEditor *environ_editor; GtkFlowBox *aid_flow_box; @@ -70,7 +71,7 @@ static guint signals N_SIGNALS; -G_DEFINE_TYPE (SysprofProfilerAssistant, sysprof_profiler_assistant, GTK_TYPE_BIN) +G_DEFINE_TYPE (SysprofProfilerAssistant, sysprof_profiler_assistant, GTK_TYPE_WIDGET) /** * sysprof_profiler_assistant_new: @@ -111,12 +112,15 @@ } static void -sysprof_profiler_assistant_notify_reveal_child_cb (SysprofProfilerAssistant *self, - GParamSpec *pspec, - GtkRevealer *revealer) +sysprof_profiler_assistant_notify_active_cb (SysprofProfilerAssistant *self, + GParamSpec *pspec, + GtkSwitch *switch_) { g_assert (SYSPROF_IS_PROFILER_ASSISTANT (self)); - g_assert (GTK_IS_REVEALER (revealer)); + g_assert (GTK_IS_SWITCH (switch_)); + + if (gtk_switch_get_active (switch_)) + return; if (self->process_model == NULL) { @@ -152,15 +156,15 @@ gint argc; g_assert (SYSPROF_IS_PROFILER_ASSISTANT (self)); - g_assert (GTK_IS_ENTRY (entry)); + g_assert (ADW_IS_ENTRY_ROW (entry)); style_context = gtk_widget_get_style_context (GTK_WIDGET (entry)); - text = gtk_entry_get_text (entry); + text = gtk_editable_get_text (GTK_EDITABLE (entry)); if (text == NULL || text0 == 0 || g_shell_parse_argv (text, &argc, &argv, NULL)) - gtk_style_context_remove_class (style_context, GTK_STYLE_CLASS_ERROR); + gtk_style_context_remove_class (style_context, "error"); else - gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_ERROR); + gtk_style_context_add_class (style_context, "error"); } static void @@ -222,9 +226,10 @@ sysprof_profiler_set_writer (profiler, writer); /* Add pids to profiler */ - gtk_container_foreach (GTK_CONTAINER (self->process_list_box), - (GtkCallback) sysprof_profiler_assistant_foreach_cb, - profiler); + for (GtkWidget *child = gtk_widget_get_first_child (GTK_WIDGET (self->process_list_box)); + child; + child = gtk_widget_get_next_sibling (child)) + sysprof_profiler_assistant_foreach_cb (child, profiler); /* Setup whole system profiling */ sysprof_profiler_set_whole_system (profiler, gtk_switch_get_active (self->whole_system_switch)); @@ -237,7 +242,7 @@ const gchar *command; gint argc; - command = gtk_entry_get_text (self->command_line); + command = gtk_editable_get_text (GTK_EDITABLE (self->command_line)); g_shell_parse_argv (command, &argc, &argv, NULL); sysprof_profiler_set_spawn (profiler, TRUE); @@ -269,9 +274,10 @@ sysprof_profiler_add_source (profiler, symbols_source); /* Now allow the aids to add their sources */ - gtk_container_foreach (GTK_CONTAINER (self->aid_flow_box), - (GtkCallback) sysprof_profiler_assistant_foreach_cb, - profiler); + for (GtkWidget *child = gtk_widget_get_first_child (GTK_WIDGET (self->aid_flow_box)); + child; + child = gtk_widget_get_next_sibling (child)) + sysprof_profiler_assistant_foreach_cb (child, profiler); g_signal_emit (self, signals START_RECORDING, 0, profiler); } @@ -309,20 +315,20 @@ static void sysprof_profiler_assistant_search_changed_cb (SysprofProfilerAssistant *self, - GtkSearchEntry *search_entry) + GtkEditable *search_entry) { g_autoptr(SysprofModelFilter) filter = NULL; - const gchar *text; + const char *text; g_assert (SYSPROF_IS_PROFILER_ASSISTANT (self)); - g_assert (GTK_IS_SEARCH_ENTRY (search_entry)); + g_assert (GTK_IS_EDITABLE (search_entry)); if (self->process_model == NULL) return; sysprof_process_model_queue_reload (self->process_model); - text = gtk_entry_get_text (GTK_ENTRY (search_entry)); + text = gtk_editable_get_text (GTK_EDITABLE (search_entry)); if (text0 == 0) { @@ -345,21 +351,26 @@ } static void -sysprof_profiler_assistant_destroy (GtkWidget *widget) +sysprof_profiler_assistant_dispose (GObject *object) { - SysprofProfilerAssistant *self = (SysprofProfilerAssistant *)widget; + SysprofProfilerAssistant *self = (SysprofProfilerAssistant *)object; + GtkWidget *child; g_clear_object (&self->process_model); - GTK_WIDGET_CLASS (sysprof_profiler_assistant_parent_class)->destroy (widget); + while ((child = gtk_widget_get_first_child (GTK_WIDGET (self)))) + gtk_widget_unparent (child); + + G_OBJECT_CLASS (sysprof_profiler_assistant_parent_class)->dispose (object); } static void sysprof_profiler_assistant_class_init (SysprofProfilerAssistantClass *klass) { + GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - widget_class->destroy = sysprof_profiler_assistant_destroy; + object_class->dispose = sysprof_profiler_assistant_dispose; /** * SysprofProfilerAssistant::start-recording: @@ -377,18 +388,23 @@ G_TYPE_NONE, 1, SYSPROF_TYPE_PROFILER); gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-profiler-assistant.ui"); + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, allow_throttling); 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); gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, record_button); gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, whole_system_switch); 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); + sysprof_theme_manager_register_resource (sysprof_theme_manager_get_default (), + NULL, + NULL, + "/org/gnome/sysprof/css/SysprofProfilerAssistant-shared.css"); + g_type_ensure (SYSPROF_TYPE_AID_ICON);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-profiler-assistant.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-profiler-assistant.h
Changed
@@ -28,7 +28,7 @@ #define SYSPROF_TYPE_PROFILER_ASSISTANT (sysprof_profiler_assistant_get_type()) -G_DECLARE_FINAL_TYPE (SysprofProfilerAssistant, sysprof_profiler_assistant, SYSPROF, PROFILER_ASSISTANT, GtkBin) +G_DECLARE_FINAL_TYPE (SysprofProfilerAssistant, sysprof_profiler_assistant, SYSPROF, PROFILER_ASSISTANT, GtkWidget) GtkWidget *sysprof_profiler_assistant_new (void); void sysprof_profiler_assistant_set_executable (SysprofProfilerAssistant *self,
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-profiler-assistant.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-profiler-assistant.ui
Changed
@@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> - <requires lib="gtk+" version="3.22"/> <object class="SysprofCpuAid" id="cpu_aid"> <property name="icon-name">sysprof-cpu</property> </object> @@ -62,494 +61,219 @@ <object class="SysprofDiskstatSource"/> </child> </object> - <template class="SysprofProfilerAssistant" parent="GtkBin"> + <template class="SysprofProfilerAssistant" parent="GtkWidget"> <child> - <object class="GtkScrolledWindow"> - <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> + <object class="AdwPreferencesPage"> <child> - <object class="GtkBox"> - <property name="margin">36</property> - <property name="spacing">12</property> - <property name="orientation">vertical</property> - <property name="visible">true</property> + <object class="AdwPreferencesGroup"> + <property name="title" translatable="yes">Profiling Target</property> <child> - <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="GtkBox"> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <property name="visible">true</property> - <child> - <object class="GtkLabel"> - <property name="label" translatable="yes">Profilers</property> - <property name="visible">true</property> - <style> - <class name="dim-label"/> - </style> - <attributes> - <attribute name="weight" value="bold"/> - <attribute name="scale" value="0.83333"/> - </attributes> - </object> - </child> - <child> - <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="homogeneous">true</property> - <property name="selection-mode">single</property> - <property name="margin-top">12</property> - <property name="margin-bottom">24</property> - <property name="visible">true</property> - <child> - <object class="SysprofAidIcon"> - <property name="aid">callgraph_aid</property> - <property name="selected">true</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="aid">cpu_aid</property> - <property name="selected">true</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="aid">memory_aid</property> - <property name="selected">false</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="aid">mutter_aid</property> - <property name="selected">false</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="aid">gjs_aid</property> - <property name="selected">false</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="aid">app_aid</property> - <property name="selected">true</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="aid">rapl_aid</property> - <property name="selected">false</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="aid">battery_aid</property> - <property name="selected">false</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="aid">network_aid</property> - <property name="selected">false</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="aid">diskstat_aid</property> - <property name="selected">false</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="tooltip-text" translatable="yes">Track application memory allocations (Sysprof must launch target application)</property> - <property name="aid">memprof_aid</property> - <property name="selected">false</property> - <property name="visible">true</property> - </object> - </child> - <child> - <object class="SysprofAidIcon"> - <property name="tooltip-text" translatable="yes">Track slow operations on your applications main loop</property> - <property name="aid">speedtrack_aid</property> - <property name="selected">false</property> - <property name="visible">true</property> - </object> - </child> - </object> - </child> - </object> - <packing> - <property name="column">center</property> - <property name="row">5</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">0</property> - </packing> - </child> - <child> + <object class="AdwExpanderRow" id="whole_system_row"> + <property name="title" translatable="yes">Profile Entire System</property> + <property name="subtitle" translatable="yes">Sysprof can generate callgraphs for one or more processes on your system.</property> + <property name="expanded" bind-source="whole_system_switch" bind-property="active" bind-flags="invert-boolean|bidirectional|sync-create"/> + <child type="action"> <object class="GtkSwitch" id="whole_system_switch"> <property name="active">true</property> - <property name="halign">start</property> + <property name="halign">end</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> - <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 configurations.</property> - <property name="margin-bottom">6</property> - <property name="max-width-chars">10</property> - <property name="wrap">true</property>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-rapl-aid.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-rapl-aid.c
Changed
@@ -227,7 +227,7 @@ if (found > 0) sysprof_display_add_group (present->display, energy); else - gtk_widget_destroy (GTK_WIDGET (energy)); + g_object_unref (g_object_ref_sink (energy)); } return counters != NULL;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-recording-state-view.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-recording-state-view.c
Changed
@@ -31,7 +31,7 @@ gulong notify_elapsed_handler; } SysprofRecordingStateViewPrivate; -G_DEFINE_TYPE_WITH_PRIVATE (SysprofRecordingStateView, sysprof_recording_state_view, GTK_TYPE_BIN) +G_DEFINE_TYPE_WITH_PRIVATE (SysprofRecordingStateView, sysprof_recording_state_view, GTK_TYPE_WIDGET) enum { PROP_0, @@ -79,18 +79,22 @@ } static void -sysprof_recording_state_view_destroy (GtkWidget *widget) +sysprof_recording_state_view_dispose (GObject *object) { - SysprofRecordingStateView *self = (SysprofRecordingStateView *)widget; + SysprofRecordingStateView *self = (SysprofRecordingStateView *)object; SysprofRecordingStateViewPrivate *priv = sysprof_recording_state_view_get_instance_private (self); + GtkWidget *child; + + while ((child = gtk_widget_get_first_child (GTK_WIDGET (self)))) + gtk_widget_unparent (child); if (priv->profiler != NULL) { - g_signal_handler_disconnect (priv->profiler, priv->notify_elapsed_handler); + g_clear_signal_handler (&priv->notify_elapsed_handler, priv->profiler); g_clear_object (&priv->profiler); } - GTK_WIDGET_CLASS (sysprof_recording_state_view_parent_class)->destroy (widget); + G_OBJECT_CLASS (sysprof_recording_state_view_parent_class)->dispose (object); } static void @@ -138,11 +142,10 @@ GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + object_class->dispose = sysprof_recording_state_view_dispose; object_class->get_property = sysprof_recording_state_view_get_property; object_class->set_property = sysprof_recording_state_view_set_property; - widget_class->destroy = sysprof_recording_state_view_destroy; - properties PROP_PROFILER = g_param_spec_object ("profiler", "Profiler", @@ -153,6 +156,7 @@ g_object_class_install_properties (object_class, N_PROPS, properties); gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-recording-state-view.ui"); + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); gtk_widget_class_bind_template_child_private (widget_class, SysprofRecordingStateView, elapsed); gtk_widget_class_bind_template_child_private (widget_class, SysprofRecordingStateView, samples);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-recording-state-view.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-recording-state-view.h
Changed
@@ -27,13 +27,11 @@ #define SYSPROF_TYPE_RECORDING_STATE_VIEW (sysprof_recording_state_view_get_type()) -G_DECLARE_DERIVABLE_TYPE (SysprofRecordingStateView, sysprof_recording_state_view, SYSPROF, RECORDING_STATE_VIEW, GtkBin) +G_DECLARE_DERIVABLE_TYPE (SysprofRecordingStateView, sysprof_recording_state_view, SYSPROF, RECORDING_STATE_VIEW, GtkWidget) struct _SysprofRecordingStateViewClass { - GtkBinClass parent; - - gpointer padding4; + GtkWidgetClass parent; }; GtkWidget *sysprof_recording_state_view_new (void);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-recording-state-view.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-recording-state-view.ui
Changed
@@ -1,11 +1,14 @@ <?xml version="1.0"?> <interface> - <template class="SysprofRecordingStateView" parent="GtkBin"> + <template class="SysprofRecordingStateView" parent="GtkWidget"> <child> <object class="GtkBox"> <property name="width-request">500</property> <property name="halign">center</property> - <property name="border-width">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="orientation">vertical</property> <property name="spacing">12</property> <property name="visible">true</property>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-scrollmap.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-scrollmap.c
Changed
@@ -28,7 +28,9 @@ struct _SysprofScrollmap { - GtkScrollbar parent_instance; + GtkWidget parent_instance; + + GtkWidget *scrollbar; gint64 begin_time; gint64 end_time; @@ -49,7 +51,7 @@ gint height; } Recalculate; -G_DEFINE_TYPE (SysprofScrollmap, sysprof_scrollmap, GTK_TYPE_SCROLLBAR) +G_DEFINE_TYPE (SysprofScrollmap, sysprof_scrollmap, GTK_TYPE_WIDGET) static void recalculate_free (gpointer data) @@ -152,68 +154,62 @@ return g_task_propagate_pointer (G_TASK (result), error); } -static void +static inline void draw_boxes (const GtkAllocation *alloc, - cairo_t *cr, - gint x, - gint n_boxes) + GtkSnapshot *snapshot, + int x, + int n_boxes, + const GdkRGBA *color) { - gint y; - - g_assert (cr != NULL); + int y = alloc->y + alloc->height - BOX_SIZE; - y = alloc->height - BOX_SIZE; - - for (gint i = 0; i < n_boxes; i++) + for (int i = 0; i < n_boxes; i++) { - cairo_rectangle (cr, x, y, BOX_SIZE, -BOX_SIZE); + gtk_snapshot_append_color (snapshot, color, &GRAPHENE_RECT_INIT (x, y, BOX_SIZE, -BOX_SIZE)); y -= (BOX_SIZE + 1); } - - cairo_fill (cr); } -static gboolean -sysprof_scrollmap_draw (GtkWidget *widget, - cairo_t *cr) +static void +sysprof_scrollmap_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { SysprofScrollmap *self = (SysprofScrollmap *)widget; GtkStyleContext *style_context; GtkAllocation alloc; GdkRGBA color; - gint max_boxes; + int max_boxes; g_assert (SYSPROF_IS_SCROLLMAP (self)); - g_assert (cr != NULL); + g_assert (GTK_IS_SNAPSHOT (snapshot)); if (self->buckets == NULL) goto chainup; gtk_widget_get_allocation (widget, &alloc); + + alloc.y += 3; + alloc.height -= 6; + max_boxes = alloc.height / (BOX_SIZE + 1) - 1; style_context = gtk_widget_get_style_context (widget); - gtk_style_context_get_color (style_context, - gtk_style_context_get_state (style_context), - &color); - gdk_cairo_set_source_rgba (cr, &color); + gtk_style_context_get_color (style_context, &color); for (guint i = 0; i < self->buckets->len; i++) { - gint n = g_array_index (self->buckets, gint, i); - gint x = 1 + i * (BOX_SIZE + 1); - gint b = max_boxes * (n / (gdouble)self->most); + int n = g_array_index (self->buckets, gint, i); + int x = 1 + i * (BOX_SIZE + 1); + int b = max_boxes * (n / (gdouble)self->most); -#if 1 if (n > 0) b = MAX (b, 1); -#endif - draw_boxes (&alloc, cr, x, b); + draw_boxes (&alloc, snapshot, x, b, &color); } chainup: - return GTK_WIDGET_CLASS (sysprof_scrollmap_parent_class)->draw (widget, cr); + GTK_WIDGET_CLASS (sysprof_scrollmap_parent_class)->snapshot (widget, snapshot); } static void @@ -246,14 +242,20 @@ } static void -sysprof_scrollmap_finalize (GObject *object) +sysprof_scrollmap_dispose (GObject *object) { SysprofScrollmap *self = (SysprofScrollmap *)object; + if (self->scrollbar) + { + gtk_widget_unparent (GTK_WIDGET (self->scrollbar)); + self->scrollbar = NULL; + } + g_clear_pointer (&self->buckets, g_array_unref); g_clear_pointer (&self->timings, g_array_unref); - G_OBJECT_CLASS (sysprof_scrollmap_parent_class)->finalize (object); + G_OBJECT_CLASS (sysprof_scrollmap_parent_class)->dispose (object); } static void @@ -262,14 +264,21 @@ GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - object_class->finalize = sysprof_scrollmap_finalize; + object_class->dispose = sysprof_scrollmap_dispose; - widget_class->draw = sysprof_scrollmap_draw; + widget_class->snapshot = sysprof_scrollmap_snapshot; + + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); + gtk_widget_class_set_css_name (widget_class, "scrollmap"); } static void sysprof_scrollmap_init (SysprofScrollmap *self) { + self->scrollbar = g_object_new (GTK_TYPE_SCROLLBAR, + "orientation", GTK_ORIENTATION_HORIZONTAL, + NULL); + gtk_widget_set_parent (GTK_WIDGET (self->scrollbar), GTK_WIDGET (self)); } void @@ -304,3 +313,21 @@ sysprof_scrollmap_recalculate_cb, NULL); } + +void +sysprof_scrollmap_set_adjustment (SysprofScrollmap *self, + GtkAdjustment *adjustment) +{ + g_return_if_fail (SYSPROF_IS_SCROLLMAP (self)); + g_return_if_fail (!adjustment || GTK_IS_ADJUSTMENT (adjustment)); + + gtk_scrollbar_set_adjustment (GTK_SCROLLBAR (self->scrollbar), adjustment); +} + +GtkAdjustment * +sysprof_scrollmap_get_adjustment (SysprofScrollmap *self) +{ + g_return_val_if_fail (SYSPROF_IS_SCROLLMAP (self), NULL); + + return gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (self->scrollbar)); +}
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-scrollmap.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-scrollmap.h
Changed
@@ -26,12 +26,15 @@ #define SYSPROF_TYPE_SCROLLMAP (sysprof_scrollmap_get_type()) -G_DECLARE_FINAL_TYPE (SysprofScrollmap, sysprof_scrollmap, SYSPROF, SCROLLMAP, GtkScrollbar) +G_DECLARE_FINAL_TYPE (SysprofScrollmap, sysprof_scrollmap, SYSPROF, SCROLLMAP, GtkWidget) -void sysprof_scrollmap_set_timings (SysprofScrollmap *self, - GArray *timings); -void sysprof_scrollmap_set_time_range (SysprofScrollmap *self, - gint64 begin_time, - gint64 end_time); +GtkAdjustment *sysprof_scrollmap_get_adjustment (SysprofScrollmap *self); +void sysprof_scrollmap_set_adjustment (SysprofScrollmap *self, + GtkAdjustment *adjustment); +void sysprof_scrollmap_set_timings (SysprofScrollmap *self, + GArray *timings); +void sysprof_scrollmap_set_time_range (SysprofScrollmap *self, + gint64 begin_time, + gint64 end_time); G_END_DECLS
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-tab.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-tab.c
Changed
@@ -22,14 +22,15 @@ #include "config.h" -#include "sysprof-display.h" +#include "sysprof-display-private.h" #include "sysprof-tab.h" #include "sysprof-ui-private.h" struct _SysprofTab { - GtkBox parent_instance; + GtkWidget parent_instance; + GtkWidget *center_box; GtkButton *close_button; GtkLabel *title; GtkImage *recording; @@ -37,7 +38,7 @@ SysprofDisplay *display; }; -G_DEFINE_TYPE (SysprofTab, sysprof_tab, GTK_TYPE_BOX) +G_DEFINE_TYPE (SysprofTab, sysprof_tab, GTK_TYPE_WIDGET) enum { PROP_0, @@ -62,18 +63,19 @@ g_assert (SYSPROF_IS_TAB (self)); g_assert (GTK_IS_BUTTON (button)); - if (self->display != NULL) - gtk_widget_destroy (GTK_WIDGET (self->display)); + if (self->display) + _sysprof_display_destroy (self->display); } static void -sysprof_tab_finalize (GObject *object) +sysprof_tab_dispose (GObject *object) { SysprofTab *self = (SysprofTab *)object; + g_clear_pointer (&self->center_box, gtk_widget_unparent); g_clear_weak_pointer (&self->display); - G_OBJECT_CLASS (sysprof_tab_parent_class)->finalize (object); + G_OBJECT_CLASS (sysprof_tab_parent_class)->dispose (object); } static void @@ -122,11 +124,13 @@ GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - object_class->finalize = sysprof_tab_finalize; + object_class->dispose = sysprof_tab_dispose; object_class->get_property = sysprof_tab_get_property; object_class->set_property = sysprof_tab_set_property; gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-tab.ui"); + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); + gtk_widget_class_bind_template_child (widget_class, SysprofTab, center_box); gtk_widget_class_bind_template_child (widget_class, SysprofTab, close_button); gtk_widget_class_bind_template_child (widget_class, SysprofTab, recording); gtk_widget_class_bind_template_child (widget_class, SysprofTab, title);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-tab.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-tab.h
Changed
@@ -28,7 +28,7 @@ #define SYSPROF_TYPE_TAB (sysprof_tab_get_type()) -G_DECLARE_FINAL_TYPE (SysprofTab, sysprof_tab, SYSPROF, TAB, GtkBox) +G_DECLARE_FINAL_TYPE (SysprofTab, sysprof_tab, SYSPROF, TAB, GtkWidget) GtkWidget *sysprof_tab_new (SysprofDisplay *display);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-tab.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-tab.ui
Changed
@@ -1,60 +1,36 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.0 --> <interface> - <requires lib="gtk+" version="3.0"/> - <template class="SysprofTab" parent="GtkBox"> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="spacing">6</property> + <template class="SysprofTab" parent="GtkWidget"> + <property name="hexpand">true</property> <child> - <object class="GtkImage" id="recording"> - <property name="visible">false</property> - <property name="icon-name">media-record-symbolic</property> - <property name="pixel-size">16</property> - <property name="hexpand">true</property> - <property name="halign">end</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">0</property> - <property name="pack-type">start</property> - </packing> - </child> - <child type="center"> - <object class="GtkLabel" id="title"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkButton" id="close_button"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="receives_default">False</property> - <child> - <object class="GtkImage"> - <property name="visible">True</property> - <property name="can_focus">False</property> + <object class="GtkCenterBox" id="center_box"> + <child type="start"> + <object class="GtkImage" id="recording"> + <property name="visible">false</property> + <property name="icon-name">media-record-symbolic</property> + <property name="pixel-size">16</property> + <property name="hexpand">true</property> + <property name="halign">end</property> + </object> + </child> + <child type="center"> + <object class="GtkLabel" id="title"> + <property name="margin-start">6</property> + <property name="margin-end">6</property> + </object> + </child> + <child type="end"> + <object class="GtkButton" id="close_button"> + <property name="receives_default">False</property> <property name="icon_name">window-close-symbolic</property> + <style> + <class name="flat"/> + <class name="small-button"/> + <class name="image-button"/> + </style> </object> </child> - <style> - <class name="flat"/> - <class name="small-button"/> - </style> </object> - <packing> - <property name="pack-type">end</property> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> </child> </template> </interface>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-theme-manager.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-theme-manager.c
Changed
@@ -58,8 +58,8 @@ if (theme_resource->provider != NULL) { - gtk_style_context_remove_provider_for_screen (gdk_screen_get_default (), - GTK_STYLE_PROVIDER (theme_resource->provider)); + gtk_style_context_remove_provider_for_display (gdk_display_get_default (), + GTK_STYLE_PROVIDER (theme_resource->provider)); g_clear_object (&theme_resource->provider); } @@ -121,17 +121,17 @@ { theme_resource->provider = gtk_css_provider_new (); gtk_css_provider_load_from_resource (theme_resource->provider, theme_resource->resource); - gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), - GTK_STYLE_PROVIDER (theme_resource->provider), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION - 1); + gtk_style_context_add_provider_for_display (gdk_display_get_default (), + GTK_STYLE_PROVIDER (theme_resource->provider), + GTK_STYLE_PROVIDER_PRIORITY_THEME+1); } } else { if (theme_resource->provider != NULL) { - gtk_style_context_remove_provider_for_screen (gdk_screen_get_default (), - GTK_STYLE_PROVIDER (theme_resource->provider)); + gtk_style_context_remove_provider_for_display (gdk_display_get_default (), + GTK_STYLE_PROVIDER (theme_resource->provider)); g_clear_object (&theme_resource->provider); } } @@ -146,10 +146,10 @@ g_assert (SYSPROF_IS_THEME_MANAGER (self)); if (self->reload_source == 0) - self->reload_source = gdk_threads_add_idle_full (G_PRIORITY_LOW, - sysprof_theme_manager_do_reload, - self, - NULL); + self->reload_source = g_idle_add_full (G_PRIORITY_LOW, + sysprof_theme_manager_do_reload, + self, + NULL); } static void @@ -181,7 +181,8 @@ { self->theme_resources = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, theme_resource_free); - gtk_icon_theme_add_resource_path (gtk_icon_theme_get_default (), "/org/gnome/sysprof/icons"); + gtk_icon_theme_add_resource_path (gtk_icon_theme_get_for_display (gdk_display_get_default ()), + "/org/gnome/sysprof/icons"); } /**
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-time-label.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-time-label.c
Changed
@@ -26,17 +26,37 @@ struct _SysprofTimeLabel { - GtkBox parent; - - GtkLabel *minutes; - GtkLabel *seconds; + GtkWidget parent_instance; + GtkCenterBox *box; + GtkLabel *minutes; + GtkLabel *seconds; }; -G_DEFINE_TYPE (SysprofTimeLabel, sysprof_time_label, GTK_TYPE_BOX) +G_DEFINE_TYPE (SysprofTimeLabel, sysprof_time_label, GTK_TYPE_WIDGET) + +static void +sysprof_time_label_dispose (GObject *object) +{ + SysprofTimeLabel *self = (SysprofTimeLabel *)object; + + if (self->box) + { + gtk_widget_unparent (GTK_WIDGET (self->box)); + self->box = NULL; + } + + G_OBJECT_CLASS (sysprof_time_label_parent_class)->dispose (object); +} static void sysprof_time_label_class_init (SysprofTimeLabelClass *klass) { + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->dispose = sysprof_time_label_dispose; + + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); } static void @@ -48,36 +68,32 @@ pango_attr_list_insert (attrs, pango_attr_scale_new (4)); pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD)); - gtk_box_set_spacing (GTK_BOX (self), 3); + self->box = GTK_CENTER_BOX (gtk_center_box_new ()); + gtk_widget_set_parent (GTK_WIDGET (self->box), GTK_WIDGET (self)); self->minutes = g_object_new (GTK_TYPE_LABEL, "attributes", attrs, - "visible", TRUE, "xalign", 1.0f, + "hexpand", TRUE, NULL); - gtk_container_add_with_properties (GTK_CONTAINER (self), GTK_WIDGET (self->minutes), - "pack-type", GTK_PACK_START, - "expand", TRUE, - "fill", TRUE, - NULL); + gtk_center_box_set_start_widget (self->box, GTK_WIDGET (self->minutes)); sep = g_object_new (GTK_TYPE_LABEL, + "margin-start", 3, + "margin-end", 3, "attributes", attrs, "visible", TRUE, "label", ":", NULL); - gtk_box_set_center_widget (GTK_BOX (self), sep); + gtk_center_box_set_center_widget (self->box, sep); self->seconds = g_object_new (GTK_TYPE_LABEL, "attributes", attrs, "visible", TRUE, "xalign", 0.0f, + "hexpand", TRUE, NULL); - gtk_container_add_with_properties (GTK_CONTAINER (self), GTK_WIDGET (self->seconds), - "pack-type", GTK_PACK_END, - "expand", TRUE, - "fill", TRUE, - NULL); + gtk_center_box_set_end_widget (self->box, GTK_WIDGET (self->seconds)); } void
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-time-label.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-time-label.h
Changed
@@ -26,7 +26,7 @@ #define SYSPROF_TYPE_TIME_LABEL (sysprof_time_label_get_type()) -G_DECLARE_FINAL_TYPE (SysprofTimeLabel, sysprof_time_label, SYSPROF, TIME_LABEL, GtkBox) +G_DECLARE_FINAL_TYPE (SysprofTimeLabel, sysprof_time_label, SYSPROF, TIME_LABEL, GtkWidget) void sysprof_time_label_set_duration (SysprofTimeLabel *self, guint duration);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-time-visualizer.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-time-visualizer.c
Changed
@@ -114,35 +114,39 @@ return ret; } -static gboolean -sysprof_time_visualizer_draw (GtkWidget *widget, - cairo_t *cr) +static void +sysprof_time_visualizer_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { SysprofTimeVisualizer *self = (SysprofTimeVisualizer *)widget; SysprofTimeVisualizerPrivate *priv = sysprof_time_visualizer_get_instance_private (self); GtkStyleContext *style_context; - GtkStateFlags flags; + cairo_t *cr; GtkAllocation alloc; - GdkRectangle clip; GdkRGBA foreground; - gboolean ret; g_assert (SYSPROF_IS_TIME_VISUALIZER (widget)); - g_assert (cr != NULL); + g_assert (snapshot != NULL); gtk_widget_get_allocation (widget, &alloc); - ret = GTK_WIDGET_CLASS (sysprof_time_visualizer_parent_class)->draw (widget, cr); + GTK_WIDGET_CLASS (sysprof_time_visualizer_parent_class)->snapshot (widget, snapshot); if (priv->cache == NULL) - return ret; + return; +#if 0 if (!gdk_cairo_get_clip_rectangle (cr, &clip)) return ret; +#else + alloc.x = 0; + alloc.y = 0; +#endif style_context = gtk_widget_get_style_context (widget); - flags = gtk_widget_get_state_flags (widget); - gtk_style_context_get_color (style_context, flags, &foreground); + gtk_style_context_get_color (style_context, &foreground); + + cr = gtk_snapshot_append_cairo (snapshot, &GRAPHENE_RECT_INIT (0, 0, alloc.width, alloc.height)); gdk_cairo_set_source_rgba (cr, &foreground); @@ -187,7 +191,7 @@ } } - return ret; + cairo_destroy (cr); } static void @@ -243,10 +247,10 @@ if (priv->queued_load == 0) priv->queued_load = - gdk_threads_add_idle_full (G_PRIORITY_LOW, - sysprof_time_visualizer_do_reload, - self, - NULL); + g_idle_add_full (G_PRIORITY_LOW, + sysprof_time_visualizer_do_reload, + self, + NULL); } static void @@ -283,11 +287,7 @@ g_clear_pointer (&priv->cache, point_cache_unref); g_clear_pointer (&priv->reader, sysprof_capture_reader_unref); - if (priv->queued_load != 0) - { - g_source_remove (priv->queued_load); - priv->queued_load = 0; - } + g_clear_handle_id (&priv->queued_load, g_source_remove); G_OBJECT_CLASS (sysprof_time_visualizer_parent_class)->finalize (object); } @@ -301,7 +301,7 @@ object_class->finalize = sysprof_time_visualizer_finalize; - widget_class->draw = sysprof_time_visualizer_draw; + widget_class->snapshot = sysprof_time_visualizer_snapshot; visualizer_class->set_reader = sysprof_time_visualizer_set_reader; }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-ui.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-ui.h
Changed
@@ -20,7 +20,7 @@ #pragma once -#include <dazzle.h> +#include <gtk/gtk.h> #include <sysprof.h> G_BEGIN_DECLS
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-visualizer-group-header.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-visualizer-group-header.c
Changed
@@ -38,17 +38,28 @@ G_DEFINE_TYPE (SysprofVisualizerGroupHeader, sysprof_visualizer_group_header, GTK_TYPE_LIST_BOX_ROW) static void -sysprof_visualizer_group_header_finalize (GObject *object) +sysprof_visualizer_group_header_dispose (GObject *object) { - G_OBJECT_CLASS (sysprof_visualizer_group_header_parent_class)->finalize (object); + SysprofVisualizerGroupHeader *self = (SysprofVisualizerGroupHeader *)object; + + if (self->box) + { + gtk_widget_unparent (GTK_WIDGET (self->box)); + self->box = NULL; + } + + G_OBJECT_CLASS (sysprof_visualizer_group_header_parent_class)->dispose (object); } static void sysprof_visualizer_group_header_class_init (SysprofVisualizerGroupHeaderClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - object_class->finalize = sysprof_visualizer_group_header_finalize; + object_class->dispose = sysprof_visualizer_group_header_dispose; + + gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); } static void @@ -58,7 +69,7 @@ "orientation", GTK_ORIENTATION_VERTICAL, "visible", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->box)); + gtk_widget_set_parent (GTK_WIDGET (self->box), GTK_WIDGET (self)); } void @@ -68,8 +79,9 @@ GMenuModel *menu, GtkWidget *widget) { - GtkBox *box; GtkWidget *group; + GtkWidget *sibling; + GtkBox *box; g_return_if_fail (SYSPROF_IS_VISUALIZER_GROUP_HEADER (self)); g_return_if_fail (SYSPROF_IS_VISUALIZER (widget)); @@ -81,9 +93,11 @@ "visible", TRUE, NULL); g_object_bind_property (widget, "visible", box, "visible", G_BINDING_SYNC_CREATE); - gtk_container_add_with_properties (GTK_CONTAINER (self->box), GTK_WIDGET (box), - "position", position, - NULL); + + sibling = gtk_widget_get_first_child (GTK_WIDGET (self->box)); + for (; position > 1 && sibling; position--) + sibling = gtk_widget_get_next_sibling (sibling); + gtk_box_insert_child_after (self->box, GTK_WIDGET (box), sibling); if (title != NULL) { @@ -95,13 +109,16 @@ 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, "xalign", 0.0f, NULL); - gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (label)); + gtk_box_append (box, GTK_WIDGET (label)); pango_attr_list_unref (attrs); gtk_size_group_add_widget (size_group, widget); @@ -120,8 +137,8 @@ "pixel-size", 16, "visible", TRUE, NULL); - dzl_gtk_widget_add_style_class (GTK_WIDGET (image), "dim-label"); - gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (image)); + gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (image)), "dim-label"); + gtk_box_append (box, GTK_WIDGET (image)); } if (menu != NULL) @@ -134,12 +151,11 @@ "icon-name", "view-more-symbolic", "visible", TRUE, NULL), - "margin-right", 6, + "margin-end", 6, "direction", GTK_ARROW_RIGHT, "halign", GTK_ALIGN_CENTER, "menu-model", menu, "tooltip-text", _("Display supplemental graphs"), - "use-popover", FALSE, "valign", GTK_ALIGN_CENTER, "visible", TRUE, NULL); @@ -148,7 +164,7 @@ gtk_style_context_add_class (style_context, "small-button"); gtk_style_context_add_class (style_context, "flat"); - gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (button)); + gtk_box_append (box, GTK_WIDGET (button)); } }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-visualizer-group.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-visualizer-group.c
Changed
@@ -22,7 +22,6 @@ #include "config.h" -#include <dazzle.h> #include <glib/gi18n.h> #include "sysprof-visualizer.h" @@ -159,21 +158,6 @@ } static void -sysprof_visualizer_group_add (GtkContainer *container, - GtkWidget *child) -{ - SysprofVisualizerGroup *self = (SysprofVisualizerGroup *)container; - - g_assert (SYSPROF_IS_VISUALIZER_GROUP (self)); - g_assert (GTK_IS_WIDGET (child)); - - if (SYSPROF_IS_VISUALIZER (child)) - sysprof_visualizer_group_insert (self, SYSPROF_VISUALIZER (child), -1, FALSE); - else - GTK_CONTAINER_CLASS (sysprof_visualizer_group_parent_class)->add (container, child); -} - -static void sysprof_visualizer_group_finalize (GObject *object) { SysprofVisualizerGroup *self = (SysprofVisualizerGroup *)object; @@ -186,7 +170,7 @@ g_clear_object (&priv->rows_menu); g_clear_object (&priv->actions); - dzl_clear_weak_pointer (&priv->header); + g_clear_weak_pointer (&priv->header); G_OBJECT_CLASS (sysprof_visualizer_group_parent_class)->finalize (object); } @@ -258,14 +242,11 @@ { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass); object_class->finalize = sysprof_visualizer_group_finalize; object_class->get_property = sysprof_visualizer_group_get_property; object_class->set_property = sysprof_visualizer_group_set_property; - container_class->add = sysprof_visualizer_group_add; - properties PROP_HAS_PAGE = g_param_spec_boolean ("has-page", "Has Page", @@ -331,7 +312,7 @@ "orientation", GTK_ORIENTATION_VERTICAL, "visible", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (priv->visualizers)); + gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (self), GTK_WIDGET (priv->visualizers)); } void @@ -343,11 +324,10 @@ g_return_if_fail (SYSPROF_IS_VISUALIZER_GROUP (self)); g_return_if_fail (!header || SYSPROF_IS_VISUALIZER_GROUP_HEADER (header)); - if (dzl_set_weak_pointer (&priv->header, header)) + if (g_set_weak_pointer (&priv->header, header)) { if (header != NULL) { - GList *children; guint position = 0; gtk_widget_insert_action_group (GTK_WIDGET (header), @@ -355,11 +335,11 @@ G_ACTION_GROUP (priv->actions)); gtk_size_group_add_widget (priv->size_group, GTK_WIDGET (header)); - children = gtk_container_get_children (GTK_CONTAINER (priv->visualizers)); - - for (const GList *iter = children; iter; iter = iter->next) + for (GtkWidget *child = gtk_widget_get_first_child (GTK_WIDGET (priv->visualizers)); + child; + child = gtk_widget_get_next_sibling (child)) { - SysprofVisualizer *vis = iter->data; + SysprofVisualizer *vis = SYSPROF_VISUALIZER (child); const gchar *title; GMenuModel *menu = NULL; @@ -381,19 +361,10 @@ position++; } - - g_list_free (children); } } } -static void -sysprof_visualizer_group_set_reader_cb (SysprofVisualizer *visualizer, - SysprofCaptureReader *reader) -{ - sysprof_visualizer_set_reader (visualizer, reader); -} - void _sysprof_visualizer_group_set_reader (SysprofVisualizerGroup *self, SysprofCaptureReader *reader) @@ -403,9 +374,10 @@ g_return_if_fail (SYSPROF_IS_VISUALIZER_GROUP (self)); g_return_if_fail (reader != NULL); - gtk_container_foreach (GTK_CONTAINER (priv->visualizers), - (GtkCallback) sysprof_visualizer_group_set_reader_cb, - reader); + for (GtkWidget *child = gtk_widget_get_first_child (GTK_WIDGET (priv->visualizers)); + child; + child = gtk_widget_get_next_sibling (child)) + sysprof_visualizer_set_reader (SYSPROF_VISUALIZER (child), reader); } void @@ -415,13 +387,18 @@ gboolean can_toggle) { SysprofVisualizerGroupPrivate *priv = sysprof_visualizer_group_get_instance_private (self); + GtkWidget *sibling = NULL; g_return_if_fail (SYSPROF_IS_VISUALIZER_GROUP (self)); g_return_if_fail (SYSPROF_IS_VISUALIZER (visualizer)); - gtk_container_add_with_properties (GTK_CONTAINER (priv->visualizers), GTK_WIDGET (visualizer), - "position", position, - NULL); + sibling = gtk_widget_get_first_child (GTK_WIDGET (priv->visualizers)); + while (position > 1 && sibling) + { + sibling = gtk_widget_get_next_sibling (sibling); + position--; + } + gtk_box_insert_child_after (priv->visualizers, GTK_WIDGET (visualizer), sibling); if (can_toggle) {
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-visualizer-ticks.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-visualizer-ticks.c
Changed
@@ -135,10 +135,11 @@ static gboolean draw_ticks (SysprofVisualizerTicks *self, - cairo_t *cr, - GtkAllocation *area, - gint ticks, - gboolean label_mode) + GtkSnapshot *snapshot, + GtkAllocation *area, + gint ticks, + gboolean label_mode, + const GdkRGBA *color) { GtkAllocation alloc; gint64 begin_time, end_time; @@ -146,7 +147,7 @@ gint count = 0; g_assert (SYSPROF_IS_VISUALIZER_TICKS (self)); - g_assert (cr != NULL); + g_assert (snapshot != NULL); g_assert (area != NULL); g_assert (ticks >= 0); g_assert (ticks < N_TICKS); @@ -195,12 +196,16 @@ if (x < (last_x2 + MIN_TICK_DISTANCE)) continue; - cairo_move_to (cr, (gint)x + 2.5 - (gint)half, 2); update_label_text (layout, t - begin_time, want_msec); pango_layout_get_pixel_size (layout, &w, &h); if (x + w <= alloc.width) - pango_cairo_show_layout (cr, layout); + { + gtk_snapshot_save (snapshot); + gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT ((int)x + 2.5 - (int)half, 2)); + gtk_snapshot_append_layout (snapshot, layout, color); + gtk_snapshot_restore (snapshot); + } last_x2 = x + w; } @@ -212,48 +217,44 @@ for (gint64 t = begin_time; t <= end_time; t += tick_sizingticks.span) { gdouble x = sysprof_visualizer_get_x_for_time (SYSPROF_VISUALIZER (self), t); - cairo_move_to (cr, (gint)x - .5 - (gint)half, alloc.height); - cairo_line_to (cr, (gint)x - .5 - (gint)half, alloc.height - tick_sizingticks.height); + + gtk_snapshot_append_color (snapshot, color, + &GRAPHENE_RECT_INIT ((int)x - .5 - (int)half, + alloc.height, + (int)x - .5 - (int)half + tick_sizingticks.width, + alloc.height - tick_sizingticks.height)); count++; } - - cairo_set_line_width (cr, tick_sizingticks.width); - cairo_stroke (cr); } return count > 2; } -static gboolean -sysprof_visualizer_ticks_draw (GtkWidget *widget, - cairo_t *cr) +static void +sysprof_visualizer_ticks_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { SysprofVisualizerTicks *self = SYSPROF_VISUALIZER_TICKS (widget); GtkStyleContext *style; GtkAllocation alloc; - GtkStateFlags state; gint64 timespan; GdkRGBA color; g_assert (SYSPROF_IS_VISUALIZER_TICKS (self)); - g_assert (cr != NULL); + g_assert (snapshot != NULL); timespan = sysprof_visualizer_get_duration (SYSPROF_VISUALIZER (self)); if (timespan == 0) - return GDK_EVENT_PROPAGATE; - - style = gtk_widget_get_style_context (widget); + return; gtk_widget_get_allocation (GTK_WIDGET (self), &alloc); alloc.x = 0; alloc.y = 0; - gtk_render_background (style, cr, 0, 0, alloc.width, alloc.height); - - state = gtk_widget_get_state_flags (widget); - gtk_style_context_get_color (style, state, &color); + style = gtk_widget_get_style_context (widget); + gtk_style_context_get_color (style, &color); - gdk_cairo_set_source_rgba (cr, &color); + gtk_snapshot_render_background (snapshot, style, 0, 0, alloc.width, alloc.height); /* * We need to discover up to what level we will draw tick marks. @@ -272,27 +273,32 @@ for (guint j = i; j > 0; j--) { - if (draw_ticks (self, cr, &alloc, j - 1, FALSE)) + if (draw_ticks (self, snapshot, &alloc, j - 1, FALSE, &color)) largest_match = j - 1; } if (largest_match != -1) - draw_ticks (self, cr, &alloc, largest_match, TRUE); + draw_ticks (self, snapshot, &alloc, largest_match, TRUE, &color); break; } - - return GDK_EVENT_PROPAGATE; } static void -sysprof_visualizer_ticks_get_preferred_height (GtkWidget *widget, - gint *min_height, - gint *nat_height) +sysprof_visualizer_ticks_measure (GtkWidget *widget, + GtkOrientation orientation, + int for_size, + int *minimum, + int *natural, + int *minimum_baseline, + int *natural_baseline) { g_assert (SYSPROF_IS_VISUALIZER_TICKS (widget)); - *min_height = *nat_height = tick_sizing0.height + LABEL_HEIGHT_PX; + if (orientation == GTK_ORIENTATION_VERTICAL) + *minimum = *natural = tick_sizing0.height + LABEL_HEIGHT_PX; + else + *minimum = *natural = 0; } static void @@ -300,8 +306,8 @@ { GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - widget_class->draw = sysprof_visualizer_ticks_draw; - widget_class->get_preferred_height = sysprof_visualizer_ticks_get_preferred_height; + widget_class->snapshot = sysprof_visualizer_ticks_snapshot; + widget_class->measure = sysprof_visualizer_ticks_measure; gtk_widget_class_set_css_name (widget_class, "SysprofVisualizerTicks"); }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-visualizer.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-visualizer.c
Changed
@@ -31,14 +31,9 @@ gint64 begin_time; gint64 end_time; gint64 duration; - - /* A cached allocation that has the borders subtracted so that - * we place the content within the expected area. - */ - GtkAllocation cache_alloc; } SysprofVisualizerPrivate; -G_DEFINE_TYPE_WITH_PRIVATE (SysprofVisualizer, sysprof_visualizer, DZL_TYPE_BIN) +G_DEFINE_TYPE_WITH_PRIVATE (SysprofVisualizer, sysprof_visualizer, GTK_TYPE_WIDGET) enum { PROP_0, @@ -50,53 +45,6 @@ static GParamSpec *properties N_PROPS; -static inline void -subtract_border (GtkAllocation *alloc, - GtkBorder *border) -{ -#if 0 - g_print ("Border; %d %d %d %d\n", border->top, border->left, border->bottom, border->right); -#endif - - alloc->x += border->left; - alloc->y += border->top; - alloc->width -= border->left + border->right; - alloc->height -= border->top + border->bottom; -} - -static void -adjust_alloc_for_borders (SysprofVisualizer *self, - GtkAllocation *alloc) -{ - GtkStyleContext *style_context; - GtkBorder border; - GtkStateFlags state; - - g_assert (SYSPROF_IS_VISUALIZER (self)); - g_assert (alloc != NULL); - - state = gtk_widget_get_state_flags (GTK_WIDGET (self)); - style_context = gtk_widget_get_style_context (GTK_WIDGET (self)); - gtk_style_context_get_border (style_context, state, &border); - - subtract_border (alloc, &border); -} - -static void -sysprof_visualizer_size_allocate (GtkWidget *widget, - GtkAllocation *alloc) -{ - SysprofVisualizer *self = (SysprofVisualizer *)widget; - SysprofVisualizerPrivate *priv = sysprof_visualizer_get_instance_private (self); - - g_assert (SYSPROF_IS_VISUALIZER (self)); - - GTK_WIDGET_CLASS (sysprof_visualizer_parent_class)->size_allocate (widget, alloc); - - priv->cache_alloc = *alloc; - adjust_alloc_for_borders (self, &priv->cache_alloc); -} - static void sysprof_visualizer_finalize (GObject *object) { @@ -175,8 +123,6 @@ object_class->get_property = sysprof_visualizer_get_property; object_class->set_property = sysprof_visualizer_set_property; - widget_class->size_allocate = sysprof_visualizer_size_allocate; - properties PROP_BEGIN_TIME = g_param_spec_int64 ("begin-time", "Begin Time", @@ -296,20 +242,21 @@ SysprofVisualizerAbsolutePoint *out_points, guint n_out_points) { - SysprofVisualizerPrivate *priv = sysprof_visualizer_get_instance_private (self); - const GtkAllocation *a; + int width; + int height; g_return_if_fail (SYSPROF_IS_VISUALIZER (self)); g_return_if_fail (in_points != NULL); g_return_if_fail (out_points != NULL); g_return_if_fail (n_in_points == n_out_points); - a = &priv->cache_alloc; + width = gtk_widget_get_width (GTK_WIDGET (self)); + height = gtk_widget_get_height (GTK_WIDGET (self)); for (guint i = 0; i < n_in_points; i++) { - out_pointsi.x = (in_pointsi.x * a->width); - out_pointsi.y = a->height - (ABS (in_pointsi.y) * a->height); + out_pointsi.x = (in_pointsi.x * width); + out_pointsi.y = height - (ABS (in_pointsi.y) * height); } } @@ -319,7 +266,7 @@ { SysprofVisualizerPrivate *priv = sysprof_visualizer_get_instance_private (self); - return ((time - priv->begin_time) / (gdouble)priv->duration) * priv->cache_alloc.width; + return ((time - priv->begin_time) / (gdouble)priv->duration) * gtk_widget_get_width (GTK_WIDGET (self)); } void
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-visualizer.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-visualizer.h
Changed
@@ -24,7 +24,7 @@ # error "Only <sysprof-ui.h> can be included directly." #endif -#include <dazzle.h> +#include <gtk/gtk.h> #include <sysprof.h> G_BEGIN_DECLS @@ -44,11 +44,11 @@ #define SYSPROF_TYPE_VISUALIZER (sysprof_visualizer_get_type()) SYSPROF_AVAILABLE_IN_ALL -G_DECLARE_DERIVABLE_TYPE (SysprofVisualizer, sysprof_visualizer, SYSPROF, VISUALIZER, DzlBin) +G_DECLARE_DERIVABLE_TYPE (SysprofVisualizer, sysprof_visualizer, SYSPROF, VISUALIZER, GtkWidget) struct _SysprofVisualizerClass { - DzlBinClass parent_class; + GtkWidgetClass parent_class; void (*set_reader) (SysprofVisualizer *self, SysprofCaptureReader *reader);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-visualizers-frame.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-visualizers-frame.c
Changed
@@ -30,7 +30,7 @@ struct _SysprofVisualizersFrame { - GtkBin parent_instance; + GtkWidget parent_instance; /* Drag selection tracking */ SysprofSelection *selection; @@ -65,13 +65,14 @@ { GtkListBox *list; GtkStyleContext *style_context; - cairo_t *cr; - GtkAllocation alloc; + GtkSnapshot *snapshot; + int width; + int height; gint64 begin_time; gint64 duration; } SelectionDraw; -G_DEFINE_TYPE (SysprofVisualizersFrame, sysprof_visualizers_frame, GTK_TYPE_BIN) +G_DEFINE_TYPE (SysprofVisualizersFrame, sysprof_visualizers_frame, GTK_TYPE_WIDGET) enum { PROP_0, @@ -115,16 +116,16 @@ g_assert (SYSPROF_IS_SELECTION (selection)); g_assert (draw != NULL); - g_assert (draw->cr != NULL); + g_assert (draw->snapshot != NULL); g_assert (GTK_IS_LIST_BOX (draw->list)); x = (range_begin - draw->begin_time) / (gdouble)draw->duration; x2 = (range_end - draw->begin_time) / (gdouble)draw->duration; - area.x = x * draw->alloc.width; - area.width = (x2 * draw->alloc.width) - area.x; + area.x = x * draw->width; + area.width = (x2 * draw->width) - area.x; area.y = 0; - area.height = draw->alloc.height; + area.height = draw->height; if (area.width < 0) { @@ -132,104 +133,106 @@ area.x -= area.width; } - gtk_render_background (draw->style_context, draw->cr, area.x + 2, area.y + 2, area.width - 4, area.height - 4); + gtk_snapshot_render_background (draw->snapshot, draw->style_context, area.x + 2, area.y + 2, area.width - 4, area.height - 4); } -static gboolean -visualizers_draw_after_cb (SysprofVisualizersFrame *self, - cairo_t *cr, - GtkListBox *list) +static void +sysprof_visualizers_frame_snapshot (GtkWidget *widget, + GtkSnapshot *snapshot) { + SysprofVisualizersFrame *self = (SysprofVisualizersFrame *)widget; SelectionDraw draw; + GtkAllocation alloc; g_assert (SYSPROF_IS_VISUALIZERS_FRAME (self)); - g_assert (GTK_IS_LIST_BOX (list)); + g_assert (GTK_IS_SNAPSHOT (snapshot)); - draw.style_context = gtk_widget_get_style_context (GTK_WIDGET (list)); - draw.list = list; - draw.cr = cr; - draw.begin_time = self->begin_time; - draw.duration = sysprof_visualizer_get_duration (SYSPROF_VISUALIZER (self->ticks)); + GTK_WIDGET_CLASS (sysprof_visualizers_frame_parent_class)->snapshot (widget, snapshot); + draw.duration = sysprof_visualizer_get_duration (SYSPROF_VISUALIZER (self->ticks)); if (draw.duration == 0) - return GDK_EVENT_PROPAGATE; + return; - gtk_widget_get_allocation (GTK_WIDGET (list), &draw.alloc); + draw.style_context = gtk_widget_get_style_context (GTK_WIDGET (self->visualizers)); + draw.list = self->visualizers; + draw.snapshot = snapshot; + draw.begin_time = self->begin_time; + + gtk_widget_get_allocation (GTK_WIDGET (self->visualizers), &alloc); + draw.width = alloc.width; + draw.height = alloc.height; if (sysprof_selection_get_has_selection (self->selection) || self->button_pressed) { + double x, y; + + gtk_snapshot_save (snapshot); + gtk_widget_translate_coordinates (GTK_WIDGET (self->visualizers), + GTK_WIDGET (self), + 0, 0, &x, &y); + gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (x, y)); + gtk_style_context_add_class (draw.style_context, "selection"); sysprof_selection_foreach (self->selection, draw_selection_cb, &draw); if (self->button_pressed) draw_selection_cb (self->selection, self->drag_begin_at, self->drag_selection_at, &draw); gtk_style_context_remove_class (draw.style_context, "selection"); - } - return GDK_EVENT_PROPAGATE; + gtk_snapshot_restore (snapshot); + } } static void -visualizers_realize_after_cb (SysprofVisualizersFrame *self, - GtkListBox *list) +visualizers_button_press_event_cb (SysprofVisualizersFrame *self, + int n_presses, + double x, + double y, + GtkGestureClick *gesture) { - GdkDisplay *display; - GdkWindow *window; - GdkCursor *cursor; + GdkModifierType state; + guint button; g_assert (SYSPROF_IS_VISUALIZERS_FRAME (self)); - g_assert (GTK_IS_LIST_BOX (list)); - - window = gtk_widget_get_window (GTK_WIDGET (list)); - display = gdk_window_get_display (window); - cursor = gdk_cursor_new_from_name (display, "text"); - gdk_window_set_cursor (window, cursor); - g_clear_object (&cursor); -} + g_assert (GTK_IS_GESTURE_CLICK (gesture)); -static gboolean -visualizers_button_press_event_cb (SysprofVisualizersFrame *self, - GdkEventButton *ev, - GtkListBox *visualizers) -{ - g_assert (SYSPROF_IS_VISUALIZERS_FRAME (self)); - g_assert (ev != NULL); - g_assert (GTK_IS_LIST_BOX (visualizers)); + button = gtk_gesture_single_get_button (GTK_GESTURE_SINGLE (gesture)); - if (ev->button != GDK_BUTTON_PRIMARY) + if (button != GDK_BUTTON_PRIMARY) { if (sysprof_selection_get_has_selection (self->selection)) - { - sysprof_selection_unselect_all (self->selection); - return GDK_EVENT_STOP; - } - - return GDK_EVENT_PROPAGATE; + sysprof_selection_unselect_all (self->selection); + return; } - if ((ev->state & GDK_SHIFT_MASK) == 0) + state = gtk_event_controller_get_current_event_state (GTK_EVENT_CONTROLLER (gesture)); + + if ((state & GDK_SHIFT_MASK) == 0) sysprof_selection_unselect_all (self->selection); self->button_pressed = TRUE; - self->drag_begin_at = get_time_from_x (self, ev->x); + self->drag_begin_at = get_time_from_x (self, x); self->drag_selection_at = self->drag_begin_at; - gtk_widget_queue_draw (GTK_WIDGET (visualizers)); - - return GDK_EVENT_PROPAGATE; + gtk_widget_queue_draw (GTK_WIDGET (self)); } -static gboolean +static void visualizers_button_release_event_cb (SysprofVisualizersFrame *self, - GdkEventButton *ev, - GtkListBox *list) + int n_release, + double x, + double y, + GtkGestureClick *gesture) { + guint button; + g_assert (SYSPROF_IS_VISUALIZERS_FRAME (self)); - g_assert (ev != NULL); - g_assert (GTK_IS_LIST_BOX (list)); + g_assert (GTK_IS_GESTURE_CLICK (gesture));
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-visualizers-frame.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-visualizers-frame.h
Changed
@@ -30,8 +30,10 @@ #define SYSPROF_TYPE_VISUALIZERS_FRAME (sysprof_visualizers_frame_get_type()) -G_DECLARE_FINAL_TYPE (SysprofVisualizersFrame, sysprof_visualizers_frame, SYSPROF, VISUALIZERS_FRAME, GtkBin) +G_DECLARE_FINAL_TYPE (SysprofVisualizersFrame, sysprof_visualizers_frame, SYSPROF, VISUALIZERS_FRAME, GtkWidget) +void sysprof_visualizers_frame_add_group (SysprofVisualizersFrame *self, + SysprofVisualizerGroup *group); SysprofSelection *sysprof_visualizers_frame_get_selection (SysprofVisualizersFrame *self); SysprofVisualizerGroup *sysprof_visualizers_frame_get_selected_group (SysprofVisualizersFrame *self); SysprofZoomManager *sysprof_visualizers_frame_get_zoom_manager (SysprofVisualizersFrame *self);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof-ui/sysprof-visualizers-frame.ui -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof-ui/sysprof-visualizers-frame.ui
Changed
@@ -1,44 +1,31 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.0 --> <interface> - <requires lib="gtk+" version="3.22"/> - <template class="SysprofVisualizersFrame" parent="GtkBin"> - <property name="can_focus">False</property> + <template class="SysprofVisualizersFrame" parent="GtkWidget"> <child> <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> <child> <object class="GtkBox" id="box1"> <property name="width_request">125</property> - <property name="visible">True</property> - <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> - <object class="GtkBox"> + <object class="GtkCenterBox"> <property name="orientation">horizontal</property> <property name="visible">true</property> <property name="margin-top">3</property> <property name="margin-bottom">3</property> <property name="margin-start">7</property> <property name="margin-end">7</property> + <property name="hexpand">false</property> <style> <class name="left-column"/> </style> <child type="center"> <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_start">6</property> - <property name="margin_end">6</property> - <property name="margin_top">3</property> - <property name="margin_bottom">3</property> <property name="label" translatable="yes">Instruments</property> + <property name="hexpand">true</property> <style> <class name="dim-label"/> </style> @@ -47,12 +34,11 @@ </attributes> </object> </child> - <child> + <child type="end"> <object class="GtkButton"> <property name="action-name">display.page</property> <property name="action-target">'details'</property> <property name="tooltip-text" translatable="yes">Select for more details</property> - <property name="visible">true</property> <style> <class name="image-button"/> <class name="small-button"/> @@ -66,339 +52,170 @@ </object> </child> </object> - <packing> - <property name="pack-type">end</property> - </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> </child> <child> <object class="GtkSeparator"> - <property name="visible">True</property> - <property name="can_focus">False</property> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> </child> <child> <object class="GtkSeparator"> - <property name="visible">True</property> - <property name="can_focus">False</property> <property name="orientation">vertical</property> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> </child> <child> <object class="GtkBox" id="ticks_box"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="vexpand">False</property> + <property name="vexpand">false</property> <property name="orientation">vertical</property> <child> <object class="GtkScrolledWindow" id="ticks_scroller"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="hscrollbar_policy">external</property> - <property name="vscrollbar_policy">never</property> + <property name="hexpand">true</property> + <property name="vexpand">true</property> + <property name="hscrollbar-policy">external</property> + <property name="vscrollbar-policy">never</property> <child> <object class="GtkViewport" id="ticks_viewport"> - <property name="visible">True</property> - <property name="can_focus">False</property> <property name="halign">start</property> - <property name="shadow_type">none</property> <style> <class name="visualizers"/> </style> <child> <object class="SysprofVisualizerTicks" id="ticks"> - <property name="visible">True</property> - <property name="can_focus">False</property> </object> </child> </object> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> </child> <child> <object class="GtkSeparator"> - <property name="visible">True</property> - <property name="can_focus">False</property> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> </child> <child> <object class="GtkScrolledWindow" id="vscroller"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="vexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="propagate_natural_height">True</property> + <property name="vexpand">true</property> + <property name="hscrollbar-policy">never</property> + <property name="propagate-natural-height">true</property> <child> <object class="GtkViewport"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="shadow_type">none</property> <child> <object class="GtkBox"> <property name="orientation">horizontal</property> - <property name="visible">True</property> - <property name="can_focus">False</property> <child> <object class="GtkListBox" id="groups"> <property name="width_request">125</property> - <property name="visible">True</property>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof/meson.build
Changed
@@ -1,5 +1,3 @@ -if get_option('libsysprof') - libsysprof_c_args = '-DSYSPROF_COMPILATION' libsysprof_public_sources = @@ -168,6 +166,7 @@ include_directories: include_directories('.'), libsysprof_capture_include_dirs, ) +if get_option('libsysprof') libsysprof = shared_library('sysprof-@0@'.format(libsysprof_api_version), dependencies: libsysprof_deps + libsysprof_static_dep, install: true, @@ -193,7 +192,6 @@ ) install_headers(libsysprof_public_headers, subdir: sysprof_header_subdir) +endif subdir('preload') - -endif
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof/preload/backtrace-helper.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof/preload/backtrace-helper.h
Changed
@@ -39,10 +39,10 @@ #endif } -static gint -backtrace_func (SysprofCaptureAddress *addrs, - guint n_addrs, - gpointer user_data) +static int +backtrace_func (SysprofCaptureAddress *addrs, + guint n_addrs, + G_GNUC_UNUSED gpointer user_data) { #if defined(ENABLE_LIBUNWIND) # if GLIB_SIZEOF_VOID_P == 8 @@ -53,9 +53,9 @@ */ return unw_backtrace ((void **)addrs - 2, n_addrs) - 2; # else - static const gint skip = 2; + static const int skip = 2; void **stack = alloca (n_addrs * sizeof (gpointer)); - gint n = unw_backtrace (stack, n_addrs); + int n = unw_backtrace (stack, n_addrs); for (guint i = skip; i < n; i++) addrsi-skip = GPOINTER_TO_SIZE (stacki); return MAX (0, n - skip); @@ -65,9 +65,9 @@ /* See note on unw_backtrace() */ return backtrace ((void **)addrs - 2, n_addrs) - 2; # else /* GLIB_SIZEOF_VOID_P != 8 */ - static const gint skip = 2; + static const int skip = 2; void **stack = alloca (n_addrs * sizeof (gpointer)); - gint n = backtrace (stack, n_addrs); + int n = backtrace (stack, n_addrs); for (guint i = skip; i < n; i++) addrsi-skip = GPOINTER_TO_SIZE (stacki); return MAX (0, n - skip);
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof/preload/sysprof-tracer.c
Added
@@ -0,0 +1,72 @@ +/* sysprof-tracer.c + * + * Copyright 2022 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 + */ + +#include "config.h" + +#include <glib.h> +#include <sysprof-capture.h> +#include <unistd.h> + +#include "backtrace-helper.h" + +#include "gconstructor.h" + +#if defined (G_HAS_CONSTRUCTORS) +# ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA +# pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(collector_init_ctor) +# endif +G_DEFINE_CONSTRUCTOR(collector_init_ctor) +#else +# error Your platform/compiler is missing constructor support +#endif + +#ifndef __APPLE__ +# define profile_func_enter __cyg_profile_func_enter +# define profile_func_exit __cyg_profile_func_exit +#endif + +static void +collector_init_ctor (void) +{ + backtrace_init (); + sysprof_collector_init (); +} + +/* TODO: + * + * This is just an example. + * + * What we would really want to do is to have a new frame type for enter/exit + * tracing so that we can only push/pop the new address to the sample. Then + * when decoding it can recreate stack traces if necessary. + */ + +void +profile_func_enter (void *func, + void *call_site) +{ + sysprof_collector_sample (backtrace_func, NULL); +} + +void +profile_func_exit (void *func, + void *call_site) +{ +}
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof/sysprof-elf-symbol-resolver.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof/sysprof-elf-symbol-resolver.c
Changed
@@ -554,8 +554,10 @@ if (!(pi = g_hash_table_lookup (self->processes, GINT_TO_POINTER (pid)))) return FALSE; - map = sysprof_map_lookaside_lookup (pi->lookaside, address); - if G_UNLIKELY (map == NULL) + if (pi->lookaside == NULL) + return FALSE; + + if (!(map = sysprof_map_lookaside_lookup (pi->lookaside, address))) return FALSE; address -= map->start;
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof/sysprof-governor-source.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof/sysprof-governor-source.c
Changed
@@ -283,21 +283,14 @@ if (!sysprof_helpers_set_paranoid_finish (helpers, result, &old_governor, &error)) g_debug ("Failed to change event_perf_paranoid: %s", error->message); - if (!self->disable_governor) + if (!self->disable_governor || self->old_governor == NULL) sysprof_source_emit_finished (SYSPROF_SOURCE (self)); else - { - sysprof_helpers_set_governor_async (helpers, - self->old_governor, - NULL, - enable_governor_cb, - self); - - /* Can't use g_steal_pointer above, as that might set self = NULL before - * self->old_governor is evaluated → crash - */ - self = NULL; - } + sysprof_helpers_set_governor_async (helpers, + self->old_governor, + NULL, + enable_governor_cb, + g_object_ref (self)); } static void
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof/sysprof-local-profiler.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof/sysprof-local-profiler.c
Changed
@@ -91,6 +91,9 @@ /* If we should inherit the environment when spawning */ guint spawn_inherit_environ : 1; + /* If we should inherit stdin from our process */ + guint inherit_stdin : 1; + /* * If we should profile the entire system. Setting this results in pids * being ignored. This is primarily useful for UI to toggle on/off the @@ -114,6 +117,7 @@ enum { PROP_0, + PROP_INHERIT_STDIN, N_PROPS, PROP_ELAPSED, @@ -127,6 +131,15 @@ PROP_WHOLE_SYSTEM, }; +enum { + SUBPROCESS_SPAWNED, + SUBPROCESS_FINISHED, + N_SINGALS, +}; + +static GParamSpec *properties N_PROPS; +static guint signals N_SINGALS; + static inline gint _g_ptr_array_find (GPtrArray *ar, gpointer item) @@ -318,6 +331,10 @@ switch (prop_id) { + case PROP_INHERIT_STDIN: + g_value_set_boolean (value, priv->inherit_stdin); + break; + case PROP_ELAPSED: g_value_set_double (value, priv->timer ? g_timer_elapsed (priv->timer, NULL) : 0.0); break; @@ -370,6 +387,10 @@ switch (prop_id) { + case PROP_INHERIT_STDIN: + sysprof_local_profiler_set_inherit_stdin (self, g_value_get_boolean (value)); + break; + case PROP_WHOLE_SYSTEM: priv->whole_system = g_value_get_boolean (value); break; @@ -412,6 +433,44 @@ object_class->get_property = sysprof_local_profiler_get_property; object_class->set_property = sysprof_local_profiler_set_property; + /** + * SysprofLocalProfiler::subprocess-spawned: + * @self: a #SysprofLocalProfiler + * @subprocess: a #GSubprocess + * + * This signal is emitted when #SysprofLocalProfiler spawns a process. + * + * Since: 3.46 + */ + signals SUBPROCESS_SPAWNED = + g_signal_new ("subprocess-spawned", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + NULL, + G_TYPE_NONE, 1, G_TYPE_SUBPROCESS); + + /** + * SysprofLocalProfiler::subprocess-finished: + * @self: a #SysprofLocalProfiler + * @subprocess: a #GSubprocess + * + * This signal is emitted when #SysprofLocalProfiler has determined that + * the subprocess either exited or was terminated by a signal. Use + * g_subprocess_get_if_exited() to determine if exited with exit code. + * + * Since: 3.46 + */ + signals SUBPROCESS_FINISHED = + g_signal_new ("subprocess-finished", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + NULL, + G_TYPE_NONE, 1, G_TYPE_SUBPROCESS); + g_object_class_override_property (object_class, PROP_ELAPSED, "elapsed"); g_object_class_override_property (object_class, PROP_IS_MUTABLE, "is-mutable"); g_object_class_override_property (object_class, PROP_IS_RUNNING, "is-running"); @@ -422,6 +481,24 @@ g_object_class_override_property (object_class, PROP_SPAWN_INHERIT_ENVIRON, "spawn-inherit-environ"); g_object_class_override_property (object_class, PROP_WHOLE_SYSTEM, "whole-system"); + /** + * SysprofLocalProfiler:inherit-stdin: + * + * Sets the profiler to inherit stdin from the calling process when spawning + * the subprocess. This has no effect if the #SysprofLocalProfiler is not + * responsible for spawning the process. + * + * Since: 3.46 + */ + properties PROP_INHERIT_STDIN = + g_param_spec_boolean ("inherit-stdin", + "Inherit Stdin", + "If stdin of the calling process should be inherited by the spawned process", + FALSE, + (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_properties (object_class, N_PROPS, properties); + g_type_ensure (SYSPROF_TYPE_GJS_SOURCE); #ifdef __linux__ g_type_ensure (SYSPROF_TYPE_HOSTINFO_SOURCE); @@ -531,6 +608,8 @@ if (!g_subprocess_wait_finish (subprocess, result, &error)) g_warning ("Wait on subprocess failed: %s", error->message); + g_signal_emit (self, signalsSUBPROCESS_FINISHED, 0, subprocess); + sysprof_local_profiler_stop (SYSPROF_PROFILER (self)); } @@ -561,8 +640,12 @@ g_autoptr(GPtrArray) env = g_ptr_array_new_with_free_func (g_free); g_autoptr(SysprofSpawnable) spawnable = sysprof_spawnable_new (); g_autoptr(GSubprocess) subprocess = NULL; + GSubprocessFlags flags = 0; GPid pid; + if (priv->inherit_stdin) + flags |= G_SUBPROCESS_FLAGS_STDIN_INHERIT; + if (priv->spawn_inherit_environ) { gchar **environ_ = g_get_environ (); @@ -611,12 +694,16 @@ else { const gchar *ident = g_subprocess_get_identifier (subprocess); + pid = atoi (ident); g_array_append_val (priv->pids, pid); + g_subprocess_wait_async (subprocess, NULL, sysprof_local_profiler_wait_cb, g_object_ref (self)); + + g_signal_emit (self, signalsSUBPROCESS_SPAWNED, 0, subprocess); } } @@ -1090,3 +1177,40 @@ return SYSPROF_PROFILER (g_steal_pointer (&self)); } + +/** + * sysprof_local_profiler_get_inherit_stdin: + * + * Since: 3.46 + */ +gboolean +sysprof_local_profiler_get_inherit_stdin (SysprofLocalProfiler *self) +{ + SysprofLocalProfilerPrivate *priv = sysprof_local_profiler_get_instance_private (self); + + g_return_val_if_fail (SYSPROF_IS_LOCAL_PROFILER (self), FALSE); + + return priv->inherit_stdin; +} + +/** + * sysprof_local_profiler_set_inherit_stdin: + * + * Since: 3.46 + */ +void +sysprof_local_profiler_set_inherit_stdin (SysprofLocalProfiler *self, + gboolean inherit_stdin) +{ + SysprofLocalProfilerPrivate *priv = sysprof_local_profiler_get_instance_private (self); + + g_return_if_fail (SYSPROF_IS_LOCAL_PROFILER (self)); + + inherit_stdin = !!inherit_stdin; +
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof/sysprof-local-profiler.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof/sysprof-local-profiler.h
Changed
@@ -41,8 +41,11 @@ }; SYSPROF_AVAILABLE_IN_ALL -SysprofProfiler *sysprof_local_profiler_new (void); +SysprofProfiler *sysprof_local_profiler_new (void); SYSPROF_AVAILABLE_IN_ALL -SysprofProfiler *sysprof_local_profiler_new_replay (SysprofCaptureReader *reader); +SysprofProfiler *sysprof_local_profiler_new_replay (SysprofCaptureReader *reader); +SYSPROF_AVAILABLE_IN_3_46 +void sysprof_local_profiler_set_inherit_stdin (SysprofLocalProfiler *self, + gboolean inherit_stdin); G_END_DECLS
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof/sysprof-spawnable.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof/sysprof-spawnable.c
Changed
@@ -34,12 +34,13 @@ struct _SysprofSpawnable { - GObject parent_instance; - GArray *fds; - GPtrArray *argv; - gchar **environ; - gchar *cwd; - gint next_fd; + GObject parent_instance; + GArray *fds; + GPtrArray *argv; + char **environ; + char *cwd; + gint next_fd; + GSubprocessFlags flags; }; G_DEFINE_TYPE (SysprofSpawnable, sysprof_spawnable, G_TYPE_OBJECT) @@ -57,6 +58,41 @@ return g_object_new (SYSPROF_TYPE_SPAWNABLE, NULL); } +/** + * sysprof_spawnable_get_flags: + * @self: a #SysprofSpawnable + * + * Gets the subprocess flags for spawning. + * + * Returns: the #GSubprocessFlags bitwise-or'd + * + * Since: 3.46 + */ +GSubprocessFlags +sysprof_spawnable_get_flags (SysprofSpawnable *self) +{ + g_return_val_if_fail (SYSPROF_IS_SPAWNABLE (self), 0); + + return self->flags; +} + +/** + * sysprof_spawnable_set_flags: + * @self: a #SysprofSpawnable + * + * Set the flags to use when spawning the process. + * + * Since: 3.46 + */ +void +sysprof_spawnable_set_flags (SysprofSpawnable *self, + GSubprocessFlags flags) +{ + g_return_if_fail (SYSPROF_IS_SPAWNABLE (self)); + + self->flags = flags; +} + static void fd_mapping_clear (gpointer data) { @@ -268,7 +304,7 @@ g_return_val_if_fail (SYSPROF_IS_SPAWNABLE (self), NULL); - launcher = g_subprocess_launcher_new (0); + launcher = g_subprocess_launcher_new (self->flags); g_subprocess_launcher_set_environ (launcher, self->environ);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/libsysprof/sysprof-spawnable.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/libsysprof/sysprof-spawnable.h
Changed
@@ -77,5 +77,10 @@ SYSPROF_AVAILABLE_IN_ALL GSubprocess *sysprof_spawnable_spawn (SysprofSpawnable *self, GError **error); +SYSPROF_AVAILABLE_IN_3_46 +GSubprocessFlags sysprof_spawnable_get_flags (SysprofSpawnable *self); +SYSPROF_AVAILABLE_IN_3_46 +void sysprof_spawnable_set_flags (SysprofSpawnable *self, + GSubprocessFlags flags); G_END_DECLS
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/meson.build
Changed
@@ -1,4 +1,5 @@ sysprof_header_subdir = 'sysprof-@0@'.format(libsysprof_api_version) +sysprof_ui_header_subdir = 'sysprof-ui-@0@'.format(libsysprof_ui_api_version) sysprof_version_conf = configuration_data() sysprof_version = meson.project_version().split('.') @@ -7,7 +8,7 @@ sysprof_version_conf.set('MICRO_VERSION', sysprof_version2) sysprof_version_conf.set('VERSION', meson.project_version()) -if get_option('with_sysprofd') == 'bundled' or get_option('libsysprof') +if needs_service_access ipc_profiler_src = gnome.gdbus_codegen('ipc-profiler', sources: 'org.gnome.Sysprof3.Profiler.xml', interface_prefix: 'org.gnome.Sysprof3.', @@ -26,34 +27,46 @@ namespace: 'IpcLegacy', ) - install_data('org.gnome.Sysprof3.Service.xml', - 'org.gnome.Sysprof2.xml', - install_dir: join_paths(datadir, 'dbus-1/interfaces'), + ipc_agent_src = gnome.gdbus_codegen('ipc-agent', + sources: 'org.gnome.Sysprof.Agent.xml', + interface_prefix: 'org.gnome.Sysprof.', + namespace: 'Ipc', ) endif -org_gnome_Sysprof3_Profiler_xml = files('org.gnome.Sysprof3.Profiler.xml') - -if get_option('libsysprof') - install_data(org_gnome_Sysprof3_Profiler_xml, +if install_service_files + install_data( + 'org.gnome.Sysprof2.xml', + 'org.gnome.Sysprof3.Profiler.xml', + 'org.gnome.Sysprof3.Service.xml', + 'org.gnome.Sysprof.Agent.xml' + , install_dir: join_paths(datadir, 'dbus-1/interfaces'), ) endif ipc_include_dirs = include_directories('.') -stackstash_sources = files( - 'stackstash.c', -) +stackstash_sources = files('stackstash.c') -helpers_sources = files( - 'helpers.c', -) +helpers_sources = files('helpers.c') subdir('libsysprof-capture') -subdir('sysprofd') -subdir('libsysprof') -subdir('libsysprof-ui') -subdir('sysprof') -subdir('tools') -subdir('tests') +if get_option('sysprofd') == 'bundled' + subdir('sysprofd') +endif +if get_option('libsysprof') or get_option('agent') + subdir('libsysprof') +endif +if get_option('gtk') and get_option('libsysprof') + subdir('libsysprof-ui') +endif +if get_option('gtk') and get_option('libsysprof') + subdir('sysprof') +endif +if get_option('tools') + subdir('tools') +endif +if get_option('tests') + subdir('tests') +endif
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/org.gnome.Sysprof.Agent.xml
Added
@@ -0,0 +1,36 @@ +<!DOCTYPE node PUBLIC + "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" > +<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd"> + <!-- + Copyright 2022 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 + --> + <interface name="org.gnome.Sysprof.Agent"> + <method name="ForceExit"/> + <method name="SendSignal"> + <arg name="signum" direction="in" type="i"> + <doc:doc><doc:summary>The signal number to deliver.</doc:summary></doc:doc> + </arg> + </method> + <signal name="Log"> + <arg name="message" direction="in" type="s"> + <doc:doc><doc:summary>The log message to be displayed.</doc:summary></doc:doc> + </arg> + </signal> + </interface> +</node>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/stackstash.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/stackstash.c
Changed
@@ -270,10 +270,16 @@ StackFunction func, gpointer data) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdangling-pointer" + StackLink link; if (trace) + { + g_assert (trace->prev == NULL); trace->prev = &link; + } link.next = trace; link.prev = NULL; @@ -291,7 +297,12 @@ } if (trace) + { + g_assert (trace->prev == &link); trace->prev = NULL; + } + +#pragma GCC diagnostic pop } void
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/sysprof/meson.build
Changed
@@ -1,10 +1,7 @@ -if get_option('enable_gtk') and get_option('libsysprof') - sysprof_sources = 'sysprof.c', 'sysprof-application.c', 'sysprof-window.c', - 'sysprof-window-settings.c', sysprof_resources = gnome.compile_resources('sysprof-resources', 'sysprof.gresource.xml', @@ -18,13 +15,11 @@ libsysprof_dep, libsysprof_ui_dep, dependency('pangoft2', required: false), + dependency('libadwaita-1', version: '>= 1.2.alpha'), sysprof = executable('sysprof', sysprof_resources + sysprof_sources, dependencies: sysprof_deps, - gui_app: true, install_dir: get_option('bindir'), install: true, ) - -endif
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/sysprof-application.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/sysprof/sysprof-application.c
Changed
@@ -27,10 +27,10 @@ struct _SysprofApplication { - DzlApplication parent_instance; + AdwApplication parent_instance; }; -G_DEFINE_TYPE (SysprofApplication, sysprof_application, DZL_TYPE_APPLICATION) +G_DEFINE_TYPE (SysprofApplication, sysprof_application, ADW_TYPE_APPLICATION) struct { const gchar *action_name; @@ -110,9 +110,6 @@ sysprof_application_startup (GApplication *application) { g_autoptr(GtkCssProvider) provider = NULL; -#ifdef DEVELOPMENT_BUILD - g_autoptr(GtkCssProvider) adwaita = NULL; -#endif g_assert (SYSPROF_IS_APPLICATION (application)); @@ -120,17 +117,9 @@ provider = gtk_css_provider_new (); gtk_css_provider_load_from_resource (provider, "/org/gnome/sysprof/theme/shared.css"); - gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), - GTK_STYLE_PROVIDER (provider), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - -#ifdef DEVELOPMENT_BUILD - adwaita = gtk_css_provider_new (); - gtk_css_provider_load_from_resource (adwaita, "/org/gnome/sysprof/theme/Adwaita-shared.css"); - gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), - GTK_STYLE_PROVIDER (adwaita), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); -#endif + gtk_style_context_add_provider_for_display (gdk_display_get_default (), + GTK_STYLE_PROVIDER (provider), + GTK_STYLE_PROVIDER_PRIORITY_THEME+1); for (guint i = 0; default_accelsi.action_name; i++) gtk_application_set_accels_for_action (GTK_APPLICATION (application), @@ -139,13 +128,30 @@ } static void +sysprof_application_window_added (GtkApplication *application, + GtkWindow *window) +{ + g_assert (SYSPROF_IS_APPLICATION (application)); + g_assert (GTK_IS_WINDOW (window)); + +#ifdef DEVELOPMENT_BUILD + gtk_widget_add_css_class (GTK_WIDGET (window), "devel"); +#endif + + GTK_APPLICATION_CLASS (sysprof_application_parent_class)->window_added (application, window); +} + +static void sysprof_application_class_init (SysprofApplicationClass *klass) { GApplicationClass *app_class = G_APPLICATION_CLASS (klass); + GtkApplicationClass *gtk_app_class = GTK_APPLICATION_CLASS (klass); app_class->open = sysprof_application_open; app_class->startup = sysprof_application_startup; app_class->activate = sysprof_application_activate; + + gtk_app_class->window_added = sysprof_application_window_added; } static void @@ -169,7 +175,6 @@ { GtkApplication *app = user_data; GtkWindow *best_toplevel = NULL; - GtkWindow *dialog; GList *windows; g_assert (G_IS_APPLICATION (app)); @@ -187,30 +192,20 @@ } } - dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG, - "application", app, - "authors", sysprof_authors, - "artists", sysprof_artists, - "comments", _("A system profiler"), + adw_show_about_window(best_toplevel, + "application-name", _("Sysprof"), + "application-icon", APP_ID_S, + "version", "GNOME " SYMBOLIC_VERSION " (" PACKAGE_VERSION ")", "copyright", "Copyright 2004-2009 Søren Sandmann Pedersen\n" "Copyright 2016-2021 Christian Hergert", - "transient-for", best_toplevel, - "modal", TRUE, - "translator-credits", _("translator-credits"), + "issue-url", "https://gitlab.gnome.org/GNOME/sysprof/-/issues/new", "license-type", GTK_LICENSE_GPL_3_0, - "logo-icon-name", "org.gnome.Sysprof", - "program-name", _("Sysprof"), - "version", "GNOME " SYMBOLIC_VERSION " (" PACKAGE_VERSION ")", + "developers", sysprof_authors, + "artists", sysprof_artists, + "comments", _("A system profiler"), + "translator-credits", _("translator-credits"), "website", "https://wiki.gnome.org/Apps/Sysprof", - "website-label", _("Learn more about Sysprof"), NULL); - - g_signal_connect (dialog, - "response", - G_CALLBACK (gtk_widget_destroy), - NULL); - - gtk_window_present (dialog); } static void @@ -226,10 +221,7 @@ window = gtk_application_get_active_window (GTK_APPLICATION (self)); - gtk_show_uri_on_window (window, - "help:sysprof", - gtk_get_current_event_time (), - NULL); + gtk_show_uri (window, "help:sysprof", GDK_CURRENT_TIME); } static void @@ -337,7 +329,7 @@ sysprof_application_new (void) { return g_object_new (SYSPROF_TYPE_APPLICATION, - "application-id", "org.gnome.Sysprof3", + "application-id", APP_ID_S, "resource-base-path", "/org/gnome/sysprof", "flags", G_APPLICATION_HANDLES_OPEN, NULL);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/sysprof-application.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/sysprof/sysprof-application.h
Changed
@@ -18,13 +18,13 @@ #pragma once -#include <dazzle.h> +#include <adwaita.h> G_BEGIN_DECLS #define SYSPROF_TYPE_APPLICATION (sysprof_application_get_type()) -G_DECLARE_FINAL_TYPE (SysprofApplication, sysprof_application, SYSPROF, APPLICATION, DzlApplication) +G_DECLARE_FINAL_TYPE (SysprofApplication, sysprof_application, SYSPROF, APPLICATION, AdwApplication) SysprofApplication *sysprof_application_new (void);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/sysprof-window.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/sysprof/sysprof-window.c
Changed
@@ -29,16 +29,16 @@ struct _SysprofWindow { - DzlApplicationWindow parent_instance; + AdwApplicationWindow parent_instance; - DzlBindingGroup *bindings; + GBindingGroup *bindings; SysprofNotebook *notebook; GtkButton *open_button; GtkMenuButton *menu_button; }; -G_DEFINE_TYPE (SysprofWindow, sysprof_window, DZL_TYPE_APPLICATION_WINDOW) +G_DEFINE_TYPE (SysprofWindow, sysprof_window, ADW_TYPE_APPLICATION_WINDOW) /** * sysprof_window_new: @@ -63,9 +63,9 @@ g_assert (SYSPROF_IS_WINDOW (self)); g_assert (SYSPROF_IS_NOTEBOOK (notebook)); - dzl_gtk_widget_action_set (GTK_WIDGET (self), "win", "replay-capture", - "enabled", sysprof_notebook_get_can_replay (notebook), - NULL); + gtk_widget_action_set_enabled (GTK_WIDGET (self), + "win.replay-capture", + sysprof_notebook_get_can_replay (notebook)); } static void @@ -76,17 +76,17 @@ g_assert (SYSPROF_IS_WINDOW (self)); g_assert (SYSPROF_IS_NOTEBOOK (notebook)); - dzl_gtk_widget_action_set (GTK_WIDGET (self), "win", "save-capture", - "enabled", sysprof_notebook_get_can_save (notebook), - NULL); + gtk_widget_action_set_enabled (GTK_WIDGET (self), + "win.save-capture", + sysprof_notebook_get_can_save (notebook)); } static void -new_tab_cb (GSimpleAction *action, - GVariant *param, - gpointer user_data) +new_tab_cb (GtkWidget *widget, + const char *action_name, + GVariant *param) { - SysprofWindow *self = user_data; + SysprofWindow *self = (SysprofWindow *)widget; g_return_if_fail (SYSPROF_IS_WINDOW (self)); @@ -94,40 +94,37 @@ } static void -switch_tab_cb (GSimpleAction *action, - GVariant *param, - gpointer user_data) +switch_tab_cb (GtkWidget *widget, + const char *action_name, + GVariant *param) { - SysprofWindow *self = user_data; - gint page; + SysprofWindow *self = (SysprofWindow *)widget; + int page; g_return_if_fail (SYSPROF_IS_WINDOW (self)); g_return_if_fail (g_variant_is_of_type (param, G_VARIANT_TYPE_INT32)); page = g_variant_get_int32 (param); - gtk_notebook_set_current_page (GTK_NOTEBOOK (self->notebook), page - 1); + sysprof_notebook_set_current_page (self->notebook, page - 1); } static void -close_tab_cb (GSimpleAction *action, - GVariant *param, - gpointer user_data) +close_tab_cb (GtkWidget *widget, + const char *action_name, + GVariant *param) { - SysprofWindow *self = user_data; - GtkNotebook *notebook; + SysprofWindow *self = (SysprofWindow *)widget; g_return_if_fail (SYSPROF_IS_WINDOW (self)); - notebook = GTK_NOTEBOOK (self->notebook); - - if (gtk_notebook_get_n_pages (notebook) == 1) + if (sysprof_notebook_get_n_pages (self->notebook) == 1) { - GtkWidget *child = gtk_notebook_get_nth_page (notebook, 0); + SysprofDisplay *child = sysprof_notebook_get_nth_page (self->notebook, 0); if (SYSPROF_IS_DISPLAY (child) && sysprof_display_is_empty (SYSPROF_DISPLAY (child))) { - gtk_widget_destroy (GTK_WIDGET (self)); + gtk_window_destroy (GTK_WINDOW (self)); return; } } @@ -136,34 +133,37 @@ } static void -replay_capture_cb (GSimpleAction *action, - GVariant *param, - gpointer user_data) +replay_capture_cb (GtkWidget *widget, + const char *action_name, + GVariant *param) { - SysprofWindow *self = user_data; + SysprofWindow *self = (SysprofWindow *)widget; + g_return_if_fail (SYSPROF_IS_WINDOW (self)); + sysprof_notebook_replay (self->notebook); } static void -save_capture_cb (GSimpleAction *action, - GVariant *param, - gpointer user_data) +save_capture_cb (GtkWidget *widget, + const char *action_name, + GVariant *param) { - SysprofWindow *self = user_data; + SysprofWindow *self = (SysprofWindow *)widget; + g_return_if_fail (SYSPROF_IS_WINDOW (self)); + sysprof_notebook_save (self->notebook); } static void -stop_recording_cb (GSimpleAction *action, - GVariant *param, - gpointer user_data) +stop_recording_cb (GtkWidget *widget, + const char *action_name, + GVariant *param) { - SysprofWindow *self = user_data; + SysprofWindow *self = (SysprofWindow *)widget; SysprofDisplay *current; - g_assert (G_IS_SIMPLE_ACTION (action)); g_assert (SYSPROF_IS_WINDOW (self)); if ((current = sysprof_notebook_get_current (self->notebook))) @@ -175,7 +175,7 @@ { SysprofWindow *self = (SysprofWindow *)object; - dzl_binding_group_set_source (self->bindings, NULL); + g_binding_group_set_source (self->bindings, NULL); g_clear_object (&self->bindings); G_OBJECT_CLASS (sysprof_window_parent_class)->finalize (object); @@ -194,6 +194,15 @@ gtk_widget_class_bind_template_child (widget_class, SysprofWindow, open_button); gtk_widget_class_bind_template_child (widget_class, SysprofWindow, notebook); + gtk_widget_class_install_action (widget_class, "win.close-tab", NULL, close_tab_cb); + gtk_widget_class_install_action (widget_class, "win.new-tab", NULL, new_tab_cb); + gtk_widget_class_install_action (widget_class, "win.switch-tab", "i", switch_tab_cb); + gtk_widget_class_install_action (widget_class, "win.replay-capture", NULL, replay_capture_cb); + gtk_widget_class_install_action (widget_class, "win.save-capture", NULL, save_capture_cb); + gtk_widget_class_install_action (widget_class, "win.stop-recording", NULL, stop_recording_cb); + + gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Escape, 0, "win.stop-recording", NULL); + g_type_ensure (SYSPROF_TYPE_NOTEBOOK); g_type_ensure (SYSPROF_TYPE_DISPLAY); } @@ -201,22 +210,12 @@ static void sysprof_window_init (SysprofWindow *self) { - DzlShortcutController *controller; - static GActionEntry actions = { - { "close-tab", close_tab_cb }, - { "new-tab", new_tab_cb }, - { "switch-tab", switch_tab_cb, "i" }, - { "replay-capture", replay_capture_cb }, - { "save-capture", save_capture_cb }, - { "stop-recording", stop_recording_cb },
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/sysprof-window.h -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/sysprof/sysprof-window.h
Changed
@@ -20,7 +20,7 @@ #pragma once -#include <dazzle.h> +#include <adwaita.h> #include "sysprof-application.h" @@ -28,7 +28,7 @@ #define SYSPROF_TYPE_WINDOW (sysprof_window_get_type()) -G_DECLARE_FINAL_TYPE (SysprofWindow, sysprof_window, SYSPROF, WINDOW, DzlApplicationWindow) +G_DECLARE_FINAL_TYPE (SysprofWindow, sysprof_window, SYSPROF, WINDOW, AdwApplicationWindow) GtkWidget *sysprof_window_new (SysprofApplication *application); void sysprof_window_new_tab (SysprofWindow *self);
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/sysprof/sysprof-window.ui
Added
@@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<interface> + <template class="SysprofWindow" parent="AdwApplicationWindow"> + <style> + <class name="org-gnome-Sysprof"/> + </style> + <property name="default-height">750</property> + <property name="default-width">700</property> + <property name="icon-name">org.gnome.Sysprof-symbolic</property> + <property name="title" translatable="yes">Sysprof</property> + <child> + <object class="GtkBox"> + <property name="orientation">vertical</property> + <child> + <object class="GtkHeaderBar"> + <property name="show-title-buttons">true</property> + <property name="visible">true</property> + <child type="end"> + <object class="GtkMenuButton" id="menu_button"> + <property name="visible">true</property> + <child> + <object class="GtkImage"> + <property name="icon-name">open-menu-symbolic</property> + <property name="visible">true</property> + </object> + </child> + <style> + <class name="image-button"/> + </style> + </object> + </child> + <child type="start"> + <object class="GtkButton" id="open_button"> + <property name="label" translatable="yes">_Open</property> + <property name="action-name">app.open-capture</property> + <property name="use-underline">true</property> + <property name="tooltip-text" translatable="yes">Open Recording… (Ctrl+O)</property> + <property name="visible">true</property> + </object> + </child> + <child type="end"> + <object class="GtkLabel" id="stat_label"> + <property name="margin-end">12</property> + <property name="xalign">1</property> + <style> + <class name="dim-label"/> + </style> + </object> + </child> + </object> + </child> + <child> + <object class="SysprofNotebook" id="notebook"> + <property name="vexpand">true</property> + <child> + <object class="SysprofDisplay"> + <property name="visible">true</property> + </object> + </child> + </object> + </child> + </object> + </child> + </template> +</interface>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/sysprof.gresource.xml -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/sysprof/sysprof.gresource.xml
Changed
@@ -7,9 +7,9 @@ <!-- Theme overrides --> <file compressed="true">theme/shared.css</file> - <file compressed="true">theme/Adwaita-shared.css</file> + </gresource> - <!-- UI Files --> - <file preprocess="xml-stripblanks">ui/sysprof-window.ui</file> + <gresource prefix="/org/gnome/sysprof/ui"> + <file preprocess="xml-stripblanks">sysprof-window.ui</file> </gresource> </gresources>
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprof/theme/shared.css -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/sysprof/theme/shared.css
Changed
@@ -1,16 +1,3 @@ -popover list row { - padding: 6px 10px 6px 10px; - border-bottom: 1px solid alpha(@borders, 0.2); -} - -popover list row:last-child { - border-bottom: none; -} - -popover scrolledwindow { - border-top: 1px solid alpha(@borders, 0.75); -} - visualizers list { background: @theme_bg_color; }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/sysprofd/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/sysprofd/meson.build
Changed
@@ -1,5 +1,3 @@ -if get_option('with_sysprofd') == 'bundled' - sysprofd_sources = '../libsysprof/sysprof-kallsyms.c', 'sysprofd.c', @@ -36,7 +34,7 @@ systemdunitdir = get_option('systemdunitdir') if systemdunitdir == '' - systemdunitdir = dependency('systemd').get_pkgconfig_variable('systemdsystemunitdir') + systemdunitdir = dependency('systemd').get_variable(pkgconfig: 'systemdsystemunitdir') endif # @@ -96,5 +94,3 @@ configuration: sysprofdconf, install_dir: systemdunitdir, ) - -endif
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/tests/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/tests/meson.build
Changed
@@ -1,5 +1,3 @@ -if get_option('enable_tests') - test_env = 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), @@ -39,118 +37,112 @@ dependencies: test_capture_deps, ) - test('test-capture', test_capture, env: test_env) test('test-capture-cursor', test_capture_cursor, env: test_env) test('test-mapped-ring-buffer', test_mapped_ring_buffer, env: test_env) if get_option('libsysprof') + test_deps = + libsysprof_static_dep, + -test_deps = - libsysprof_static_dep, - - -test_addr_map = executable('test-addr-map', 'test-addr-map.c', - c_args: test_cflags, - dependencies: test_deps, -) - -test_addr_decode = executable('test-addr-decode', 'test-addr-decode.c', - c_args: test_cflags, - dependencies: test_deps, -) - -test_mountinfo = executable('test-mountinfo', 'test-mountinfo.c', - c_args: test_cflags, - dependencies: test_deps, -) - -test_flatpak = executable('test-flatpak', 'test-flatpak.c', - c_args: test_cflags, - dependencies: test_deps, -) - -test_resolvers = executable('test-resolvers', 'test-resolvers.c', - c_args: test_cflags, - dependencies: test_deps, -) - -allocs_by_size = executable('allocs-by-size', 'allocs-by-size.c', - c_args: test_cflags, - dependencies: test_deps, -) - -allocs_within_mark = executable('allocs-within-mark', 'allocs-within-mark.c', - c_args: test_cflags, - dependencies: test_deps, -) - -cross_thread_frees = executable('cross-thread-frees', 'cross-thread-frees.c', - c_args: test_cflags, - dependencies: test_deps, -) + test_addr_map = executable('test-addr-map', 'test-addr-map.c', + c_args: test_cflags, + dependencies: test_deps, + ) -memory_stack_stash = executable('memory-stack-stash', 'memory-stack-stash.c', - c_args: test_cflags, - dependencies: test_deps, -) + test_addr_decode = executable('test-addr-decode', 'test-addr-decode.c', + c_args: test_cflags, + dependencies: test_deps, + ) -read_build_id = executable('read-build-id', 'read-build-id.c', - c_args: test_cflags, - dependencies: test_deps, -) + test_mountinfo = executable('test-mountinfo', 'test-mountinfo.c', + c_args: test_cflags, + dependencies: test_deps, + ) -show_page_usage = executable('show-page-usage', 'show-page-usage.c', - c_args: test_cflags, - dependencies: test_deps + dependency('cairo'), -) + test_flatpak = executable('test-flatpak', 'test-flatpak.c', + c_args: test_cflags, + dependencies: test_deps, + ) -list_pid_maps = executable('list-all-maps', 'list-all-maps.c', - c_args: test_cflags, - dependencies: libsysprof_static_dep, - include_directories: include_directories('..'), -) + test_resolvers = executable('test-resolvers', 'test-resolvers.c', + c_args: test_cflags, + dependencies: test_deps, + ) -list_maps = executable('list-maps', 'list-maps.c', - c_args: test_cflags, - dependencies: libsysprof_static_dep, - include_directories: include_directories('..'), -) + allocs_by_size = executable('allocs-by-size', 'allocs-by-size.c', + c_args: test_cflags, + dependencies: test_deps, + ) -if get_option('enable_gtk') + allocs_within_mark = executable('allocs-within-mark', 'allocs-within-mark.c', + c_args: test_cflags, + dependencies: test_deps, + ) - test_ui_deps = - libsysprof_dep, - libsysprof_ui_dep, - dependency('gtk+-3.0', version: gtk_req_version), - dependency('libdazzle-1.0', version: dazzle_req_version, fallback: 'libdazzle', 'libdazzle_dep'), - dependency('pangoft2', required: false), - + cross_thread_frees = executable('cross-thread-frees', 'cross-thread-frees.c', + c_args: test_cflags, + dependencies: test_deps, + ) - test_model_filter = executable('test-model-filter', 'test-model-filter.c', + memory_stack_stash = executable('memory-stack-stash', 'memory-stack-stash.c', c_args: test_cflags, - dependencies: test_ui_deps, + dependencies: test_deps, ) - test_process_model = executable('test-process-model', 'test-process-model.c', + read_build_id = executable('read-build-id', 'read-build-id.c', c_args: test_cflags, - dependencies: test_ui_deps, + dependencies: test_deps, ) - test_zoom = executable('test-zoom', - 'test-zoom.c', '../libsysprof-ui/sysprof-zoom-manager.c', + show_page_usage = executable('show-page-usage', 'show-page-usage.c', c_args: test_cflags, - dependencies: test_ui_deps, + dependencies: test_deps + dependency('cairo'), ) - test_capture_view = executable('test-capture-view', 'test-capture-view.c', + list_pid_maps = executable('list-all-maps', 'list-all-maps.c', c_args: test_cflags, - dependencies: test_ui_deps, + dependencies: libsysprof_static_dep, + include_directories: include_directories('..'), ) - test('test-model-filter', test_model_filter, env: test_env) - test('test-zoom', test_zoom, env: test_env) + list_maps = executable('list-maps', 'list-maps.c', + c_args: test_cflags, + dependencies: libsysprof_static_dep, + include_directories: include_directories('..'), + ) -endif -endif + if get_option('gtk') + test_ui_deps = + libsysprof_dep, + libsysprof_ui_dep, + dependency('gtk4', version: gtk_req_version), + dependency('pangoft2', required: false), + + + test_model_filter = executable('test-model-filter', 'test-model-filter.c', + c_args: test_cflags, + dependencies: test_ui_deps, + ) + + test_process_model = executable('test-process-model', 'test-process-model.c', + c_args: test_cflags, + dependencies: test_ui_deps, + ) + + test_zoom = executable('test-zoom', + 'test-zoom.c', '../libsysprof-ui/sysprof-zoom-manager.c', + c_args: test_cflags, + dependencies: test_ui_deps, + ) + + test_capture_view = executable('test-capture-view', 'test-capture-view.c', + c_args: test_cflags, + dependencies: test_ui_deps,
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/tests/test-capture-view.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/tests/test-capture-view.c
Changed
@@ -28,8 +28,9 @@ SysprofDisplay *view; SysprofCaptureReader *reader; g_autoptr(GError) error = NULL; + GMainLoop *main_loop; - gtk_init (&argc, &argv); + gtk_init (); if (argc != 2) { @@ -43,6 +44,8 @@ return 1; } + main_loop = g_main_loop_new (NULL, FALSE); + window = g_object_new (GTK_TYPE_WINDOW, "title", "SysprofDisplay", "default-width", 800, @@ -51,13 +54,13 @@ view = g_object_new (SYSPROF_TYPE_DISPLAY, "visible", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (view)); + gtk_window_set_child (GTK_WINDOW (window), GTK_WIDGET (view)); sysprof_display_load_async (view, reader, NULL, NULL, NULL); - g_signal_connect (window, "delete-event", gtk_main_quit, NULL); + g_signal_connect_swapped (window, "close-request", G_CALLBACK (g_main_loop_quit), main_loop); gtk_window_present (GTK_WINDOW (window)); - gtk_main (); + g_main_loop_run (main_loop); return 0; }
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/tests/test-process-model.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/tests/test-process-model.c
Changed
@@ -18,11 +18,11 @@ const gchar *needle = user_data; const gchar *command = sysprof_process_model_item_get_command_line (SYSPROF_PROCESS_MODEL_ITEM (object)); - return !!strstr (command, needle); + return needle == NULL || needle0 == 0 || strstr (command, needle) != NULL; } static void -on_entry_changed (GtkEntry *entry, +on_entry_changed (GtkEntry *entry, SysprofModelFilter *filter) { const gchar *text; @@ -30,10 +30,10 @@ g_assert (GTK_IS_ENTRY (entry)); g_assert (SYSPROF_IS_MODEL_FILTER (filter)); - text = gtk_entry_get_text (entry); + text = gtk_editable_get_text (GTK_EDITABLE (entry)); sysprof_model_filter_set_filter_func (filter, filter_cb, g_strdup (text), g_free); - //gtk_list_box_bind_model (GTK_LIST_BOX (list), G_LIST_MODEL (filter), create_row, NULL, NULL); + gtk_list_box_bind_model (GTK_LIST_BOX (list), G_LIST_MODEL (filter), create_row, NULL, NULL); } gint @@ -46,8 +46,11 @@ GtkWidget *box; GtkWidget *scroller; GtkWidget *entry; + GMainLoop *main_loop; + + gtk_init (); - gtk_init (&argc, &argv); + main_loop = g_main_loop_new (NULL, FALSE); window = g_object_new (GTK_TYPE_WINDOW, "title", "Sysprof Process List", @@ -59,23 +62,24 @@ "orientation", GTK_ORIENTATION_VERTICAL, "visible", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (window), box); + gtk_window_set_child (GTK_WINDOW (window), box); entry = g_object_new (GTK_TYPE_ENTRY, "visible", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (box), entry); + gtk_box_append (GTK_BOX (box), entry); scroller = g_object_new (GTK_TYPE_SCROLLED_WINDOW, "visible", TRUE, - "expand", TRUE, + "vexpand", TRUE, + "hexpand", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (box), scroller); + gtk_box_append (GTK_BOX (box), scroller); list = g_object_new (GTK_TYPE_LIST_BOX, "visible", TRUE, NULL); - gtk_container_add (GTK_CONTAINER (scroller), list); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scroller), list); model = sysprof_process_model_new (); sysprof_process_model_set_no_proxy (model, TRUE); @@ -87,9 +91,9 @@ G_CALLBACK (on_entry_changed), filter); + g_signal_connect_swapped (window, "close-request", G_CALLBACK (g_main_loop_quit), main_loop); gtk_window_present (GTK_WINDOW (window)); - g_signal_connect (window, "delete-event", gtk_main_quit, NULL); - gtk_main (); + g_main_loop_run (main_loop); g_object_unref (model);
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/tools/meson.build -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/tools/meson.build
Changed
@@ -1,5 +1,3 @@ -if get_option('enable_tools') - tools_deps = dependency('glib-2.0'), libsysprof_capture_dep, @@ -7,14 +5,12 @@ tools_cflags = '-DSYSPROF_COMPILATION ' -if get_option('libsysprof') - sysprof_cli = executable('sysprof-cli', 'sysprof-cli.c', - dependencies: tools_deps + libsysprof_dep, polkit_dep, polkit_agent_dep, - c_args: tools_cflags, - install_dir: get_option('bindir'), - install: true, - ) -endif +sysprof_cli = executable('sysprof-cli', 'sysprof-cli.c', + dependencies: libsysprof_static_dep, polkit_dep, polkit_agent_dep, + c_args: tools_cflags, + install_dir: get_option('bindir'), + install: true, +) sysprof_cat = executable('sysprof-cat', 'sysprof-cat.c', dependencies: tools_deps, @@ -28,7 +24,7 @@ install: false, ) -if get_option('with_sysprofd') == 'bundled' or get_option('libsysprof') +if get_option('sysprofd') == 'bundled' or get_option('libsysprof') sysprof_profiler_ctl = executable('sysprof-profiler-ctl', 'sysprof-profiler-ctl.c', ipc_profiler_src , dependencies: tools_deps, dependency('gio-unix-2.0', version: glib_req_version) , @@ -43,4 +39,12 @@ install: false, ) +if get_option('agent') + sysprof_agent = executable('sysprof-agent', + 'sysprof-agent.c', ipc_agent_src, + dependencies: libsysprof_static_dep, + c_args: tools_cflags, + install_dir: get_option('bindir'), + install: true, + ) endif
View file
_service:tar_scm:sysprof-3.46.0.tar.xz/src/tools/sysprof-agent.c
Added
@@ -0,0 +1,678 @@ +/* sysprof-agent.c + * + * Copyright 2022 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 + */ + +#include "config.h" + +#include <errno.h> +#include <stdlib.h> +#include <unistd.h> + +#include <glib-unix.h> +#include <gio/gunixinputstream.h> +#include <gio/gunixoutputstream.h> + +#include <sysprof.h> + +#include "ipc-agent.h" + +#define BUFFER_SIZE (4096L*16L) /* 64KB */ + +static gboolean forward_fd_func (const char *option_name, + const char *option_value, + gpointer data, + GError **error); + +static GMainLoop *main_loop; +static GSubprocess *subprocess; +static char *subprocess_ident; +static gboolean subprocess_finished; +static IpcAgent *service; +static int exit_code = EXIT_SUCCESS; +static int read_fd = -1; +static int write_fd = -1; +static int pty_fd = -1; +static char *directory; +static char *capture_filename; +static GArray *forward_fds; +static char **env; +static gboolean clear_env; +static gboolean aid_battery; +static gboolean aid_compositor; +static gboolean aid_cpu; +static gboolean aid_disk; +static gboolean aid_energy; +static gboolean aid_gjs; +static gboolean aid_memory; +static gboolean aid_memprof; +static gboolean aid_net; +static gboolean aid_perf; +static gboolean aid_tracefd; +static gboolean no_throttle; +static gboolean decode; +static const GOptionEntry options = { + { "read-fd", 0, 0, G_OPTION_ARG_INT, &read_fd, "The read side of the FD to use for D-Bus" }, + { "write-fd", 0, 0, G_OPTION_ARG_INT, &write_fd, "The write side of the FD to use for D-Bus" }, + { "forward-fd", 0, 0, G_OPTION_ARG_CALLBACK, forward_fd_func, "The FD to forward to the subprocess" }, + { "directory", 0, 0, G_OPTION_ARG_FILENAME, &directory, "The directory to run spawn the subprocess from", "PATH" }, + { "capture", 0, 0, G_OPTION_ARG_FILENAME, &capture_filename, "The filename to save the sysprof capture to", "PATH" }, + { "clear-env", 0, 0, G_OPTION_ARG_NONE, &clear_env, "Clear environment instead of inheriting" }, + { "decode", 0, 0, G_OPTION_ARG_NONE, &decode, "Decode symbols at the end of the recording" }, + { "env", 0, 0, G_OPTION_ARG_STRING_ARRAY, &env, "Add an environment variable to the spawned process", "KEY=VALUE" }, + { "cpu", 0, 0, G_OPTION_ARG_NONE, &aid_cpu, "Track CPU usage and frequency" }, + { "gjs", 0, 0, G_OPTION_ARG_NONE, &aid_gjs, "Record stack traces within GJS" }, + { "perf", 0, 0, G_OPTION_ARG_NONE, &aid_perf, "Record stack traces with perf" }, + { "memory", 0, 0, G_OPTION_ARG_NONE, &aid_memory, "Record basic system memory usage" }, + { "memprof", 0, 0, G_OPTION_ARG_NONE, &aid_memprof, "Record stack traces during memory allocations" }, + { "disk", 0, 0, G_OPTION_ARG_NONE, &aid_disk, "Record disk usage information" }, + { "net", 0, 0, G_OPTION_ARG_NONE, &aid_net, "Record network usage information" }, + { "energy", 0, 0, G_OPTION_ARG_NONE, &aid_energy, "Record energy usage using RAPL" }, + { "battery", 0, 0, G_OPTION_ARG_NONE, &aid_battery, "Record battery charge and discharge rates" }, + { "compositor", 0, 0, G_OPTION_ARG_NONE, &aid_compositor, "Record GNOME Shell compositor information" }, + { "no-throttle", 0, 0, G_OPTION_ARG_NONE, &no_throttle, "Disable CPU throttling" }, + { "tracefd", 0, 0, G_OPTION_ARG_NONE, &aid_tracefd, "Provide TRACEFD to subprocess" }, + { NULL } +}; + +G_GNUC_PRINTF (1, 2) +static void +message (const char *format, + ...) +{ + g_autofree char *formatted = NULL; + va_list args; + + if (service == NULL) + return; + + va_start (args, format); + formatted = g_strdup_vprintf (format, args); + va_end (args); + + ipc_agent_emit_log (service, formatted); +} + +#define GBP_TYPE_SPAWN_SOURCE (gbp_spawn_source_get_type()) +G_DECLARE_FINAL_TYPE (GbpSpawnSource, gbp_spawn_source, GBP, SPAWN_SOURCE, GObject) + +struct _GbpSpawnSource +{ + GObject parent_instance; +}; + +static void +gbp_spawn_source_modify_spawn (SysprofSource *source, + SysprofSpawnable *spawnable) +{ + g_assert (GBP_IS_SPAWN_SOURCE (source)); + g_assert (SYSPROF_IS_SPAWNABLE (spawnable)); + + if (forward_fds == NULL) + return; + + for (guint i = 0; i < forward_fds->len; i++) + { + int fd = g_array_index (forward_fds, int, i); + sysprof_spawnable_take_fd (spawnable, dup (fd), fd); + } + + if (pty_fd != -1) + { + sysprof_spawnable_take_fd (spawnable, dup (pty_fd), STDIN_FILENO); + sysprof_spawnable_take_fd (spawnable, dup (pty_fd), STDOUT_FILENO); + sysprof_spawnable_take_fd (spawnable, dup (pty_fd), STDERR_FILENO); + } +} + +static void +gbp_spawn_source_start (SysprofSource *source) +{ + sysprof_source_emit_ready (source); +} + +static void +gbp_spawn_source_stop (SysprofSource *source) +{ + sysprof_source_emit_finished (source); +} + +static void +spawn_source_init (SysprofSourceInterface *iface) +{ + iface->modify_spawn = gbp_spawn_source_modify_spawn; + iface->start = gbp_spawn_source_start; + iface->stop = gbp_spawn_source_stop; +} + +G_DEFINE_FINAL_TYPE_WITH_CODE (GbpSpawnSource, gbp_spawn_source, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (SYSPROF_TYPE_SOURCE, spawn_source_init)) + +static void +gbp_spawn_source_class_init (GbpSpawnSourceClass *klass) +{ +} + +static void +gbp_spawn_source_init (GbpSpawnSource *self) +{ +} + +#define IPC_TYPE_AGENT_IMPL (ipc_agent_impl_get_type()) +G_DECLARE_FINAL_TYPE (IpcAgentImpl, ipc_agent_impl, IPC, SYPSROF_IMPL, IpcAgentSkeleton) + +struct _IpcAgentImpl +{ + IpcAgentSkeleton parent_instance; +}; + +static gboolean +handle_force_exit (IpcAgent *sysprof, + GDBusMethodInvocation *invocation) +{ + if (subprocess && !subprocess_finished) + g_subprocess_force_exit (subprocess); + + ipc_agent_complete_force_exit (sysprof, invocation); + + return TRUE; +} + +static gboolean +handle_send_signal (IpcAgent *sysprof, + GDBusMethodInvocation *invocation, + int signum)
View file
_service:tar_scm:sysprof-3.44.0.tar.xz/src/tools/sysprof-cli.c -> _service:tar_scm:sysprof-3.46.0.tar.xz/src/tools/sysprof-cli.c
Changed
@@ -22,13 +22,14 @@ #include <fcntl.h> #include <locale.h> -#include <glib-unix.h> -#include <glib/gi18n.h> -#include <glib/gstdio.h> #include <signal.h> #include <stdlib.h> #include <sys/types.h> -#include <signal.h> + +#include <glib-unix.h> +#include <glib/gi18n.h> +#include <glib/gstdio.h> + #include <sysprof.h> #if HAVE_POLKIT && HAVE_POLKIT_AGENT @@ -349,6 +350,8 @@ profiler = sysprof_local_profiler_new (); + sysprof_local_profiler_set_inherit_stdin (SYSPROF_LOCAL_PROFILER (profiler), TRUE); + g_signal_connect (profiler, "failed", G_CALLBACK (profiler_failed),
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2