From 420412ebed69f5baf3089442625bd6a7d4cadcd8 Mon Sep 17 00:00:00 2001 From: varun-r-mallya Date: Sun, 6 Apr 2025 14:32:55 +0530 Subject: [PATCH 1/2] sysprof-greeter: replace GtkSwitch with AdwSwitchRow for improved a11y compliance --- .gitignore | 1 + src/sysprof/sysprof-greeter.c | 20 +++--- src/sysprof/sysprof-greeter.ui | 109 ++++++++------------------------- 3 files changed, 38 insertions(+), 92 deletions(-) diff --git a/.gitignore b/.gitignore index ed98732c..3bb86b27 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.swp *~ build +.vscode/ \ No newline at end of file diff --git a/src/sysprof/sysprof-greeter.c b/src/sysprof/sysprof-greeter.c index dc48c2d1..f08ffbf6 100644 --- a/src/sysprof/sysprof-greeter.c +++ b/src/sysprof/sysprof-greeter.c @@ -50,16 +50,16 @@ struct _SysprofGreeter AdwPreferencesPage *record_page; GtkListBox *app_environment; GtkListBox *debug_directories; - GtkSwitch *sample_native_stacks; - GtkSwitch *sample_javascript_stacks; - GtkSwitch *record_disk_usage; - GtkSwitch *record_network_usage; - GtkSwitch *record_compositor; - GtkSwitch *record_system_logs; - GtkSwitch *record_session_bus; - GtkSwitch *record_system_bus; - GtkSwitch *bundle_symbols; - GtkSwitch *debuginfod; + AdwSwitchRow *sample_native_stacks; + AdwSwitchRow *sample_javascript_stacks; + AdwSwitchRow *record_disk_usage; + AdwSwitchRow *record_network_usage; + AdwSwitchRow *record_compositor; + AdwSwitchRow *record_system_logs; + AdwSwitchRow *record_session_bus; + AdwSwitchRow *record_system_bus; + AdwSwitchRow *bundle_symbols; + AdwSwitchRow *debuginfod; GtkButton *record_to_memory; AdwComboRow *power_combo; AdwComboRow *sample_user_stack_size; diff --git a/src/sysprof/sysprof-greeter.ui b/src/sysprof/sysprof-greeter.ui index 5af1dcc5..7b2f6a21 100644 --- a/src/sysprof/sysprof-greeter.ui +++ b/src/sysprof/sysprof-greeter.ui @@ -94,16 +94,11 @@ Sampling - + sample_native_stacks Sample Native Stacks Record native stack traces using a sampling profiler - - - center - - - + @@ -146,16 +141,11 @@ - + sample_javascript_stacks Sample JavaScript Stacks Record JavaScript stack traces using a sampling profiler - - - center - - - + @@ -174,16 +164,11 @@ - + include_scheduler_details Record Scheduler Details Track when processes are scheduled per CPU - - - center - - - + @@ -192,16 +177,11 @@ Tracing - + trace_malloc Trace Memory Allocations - Record a stack trace when <tt>malloc</tt> or similar functions are used - - - center - - - + Record a stack trace when malloc or similar functions are used + @@ -259,16 +239,11 @@ Environment - + clear_environment Clear Environment Clear the environment before launching application - - - center - - - + @@ -319,55 +294,35 @@ Counters - + record_cpu_usage CPU Usage Record coarse-grained counters about CPU usage and frequency - - - center - - - + - - record_memory_counters - Memory Usage - Record coarse-grained counters about system memory usage - - - center - - - - + + record_memory_counters + Memory Usage + Record coarse-grained counters about system memory usage + + - + record_disk_usage Disk Usage Record coarse-grained counters about storage throughput - - - - center - - + - + record_network_usage Network Usage Record coarse-grained counters about network traffic - - - - center - - + @@ -375,29 +330,19 @@ - + record_energy_usage Energy Usage Record coarse-grained counters about energy usage in Watts - - - - center - - + - + record_battery_charge Battery Charge Record coarse-grained counters about battery charge or discharge rates - - - - center - - + From a4b985f4c9a4ad99c794a6d9a25233bc9e759228 Mon Sep 17 00:00:00 2001 From: varun-r-mallya Date: Sun, 6 Apr 2025 14:53:39 +0530 Subject: [PATCH 2/2] sysprof-greeter: remove unnecessary activatable-widget properties from AdwSwitchRow elements --- .gitignore | 1 - src/sysprof/sysprof-greeter.ui | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/.gitignore b/.gitignore index 3bb86b27..ed98732c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ *.swp *~ build -.vscode/ \ No newline at end of file diff --git a/src/sysprof/sysprof-greeter.ui b/src/sysprof/sysprof-greeter.ui index 7b2f6a21..182c4a6a 100644 --- a/src/sysprof/sysprof-greeter.ui +++ b/src/sysprof/sysprof-greeter.ui @@ -95,7 +95,6 @@ Sampling - sample_native_stacks Sample Native Stacks Record native stack traces using a sampling profiler @@ -142,7 +141,6 @@ - sample_javascript_stacks Sample JavaScript Stacks Record JavaScript stack traces using a sampling profiler @@ -165,7 +163,6 @@ - include_scheduler_details Record Scheduler Details Track when processes are scheduled per CPU @@ -178,7 +175,6 @@ Tracing - trace_malloc Trace Memory Allocations Record a stack trace when malloc or similar functions are used @@ -240,7 +236,6 @@ Environment - clear_environment Clear Environment Clear the environment before launching application @@ -295,7 +290,6 @@ Counters - record_cpu_usage CPU Usage Record coarse-grained counters about CPU usage and frequency @@ -303,7 +297,6 @@ - record_memory_counters Memory Usage Record coarse-grained counters about system memory usage @@ -311,7 +304,6 @@ - record_disk_usage Disk Usage Record coarse-grained counters about storage throughput @@ -319,7 +311,6 @@ - record_network_usage Network Usage Record coarse-grained counters about network traffic @@ -331,7 +322,6 @@ - record_energy_usage Energy Usage Record coarse-grained counters about energy usage in Watts @@ -339,7 +329,6 @@ - record_battery_charge Battery Charge Record coarse-grained counters about battery charge or discharge rates