[gnome-builder/wip/gtk4-port] plugins/buildui: add label for tests
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/buildui: add label for tests
- Date: Sat, 25 Jun 2022 04:53:01 +0000 (UTC)
commit 866ec3028eca8efbfefd704e5b8959955e2a92a9
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 24 21:48:54 2022 -0700
plugins/buildui: add label for tests
Makes it easier to tell the difference between running tests and running
executables found in the run commands.
src/plugins/buildui/gbp-buildui-runnables-dialog.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/src/plugins/buildui/gbp-buildui-runnables-dialog.c
b/src/plugins/buildui/gbp-buildui-runnables-dialog.c
index b33be4181..87dab08e9 100644
--- a/src/plugins/buildui/gbp-buildui-runnables-dialog.c
+++ b/src/plugins/buildui/gbp-buildui-runnables-dialog.c
@@ -63,6 +63,7 @@ create_run_command_row (gpointer item,
AdwActionRow *row;
const char *id;
GtkWidget *check;
+ GtkWidget *label = NULL;
g_assert (IDE_IS_RUN_COMMAND (run_command));
@@ -106,6 +107,14 @@ create_run_command_row (gpointer item,
g_string_append (subtitle, "</tt>");
}
+ if (ide_run_command_get_kind (run_command) == IDE_RUN_COMMAND_KIND_TEST)
+ label = g_object_new (GTK_TYPE_LABEL,
+ "css-name", "button",
+ "css-classes", IDE_STRV_INIT ("pill", "small"),
+ "label", _("Test"),
+ "valign", GTK_ALIGN_CENTER,
+ NULL);
+
check = g_object_new (GTK_TYPE_CHECK_BUTTON,
"action-name", "run-manager.default-run-command",
"css-classes", IDE_STRV_INIT ("checkimage"),
@@ -118,6 +127,10 @@ create_run_command_row (gpointer item,
"subtitle", subtitle ? subtitle->str : NULL,
"activatable-widget", check,
NULL);
+
+ if (label != NULL)
+ adw_action_row_add_suffix (row, label);
+
adw_action_row_add_suffix (row, check);
return GTK_WIDGET (row);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]