diff options
author | Benjamin Otte <otte@redhat.com> | 2023-05-12 17:16:22 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2023-05-16 18:53:53 +0200 |
commit | bac41ce644e41ce9e520fa5e1433f1bdf925db75 (patch) | |
tree | 840d9a3613604d4f9068c2e1daebc7105c746d45 | |
parent | 2b0ad09423ce8b3e5885a8a396e37949f66e702d (diff) | |
download | gtk+-bac41ce644e41ce9e520fa5e1433f1bdf925db75.tar.gz |
node-editor: Print default renderer in title
If there is a value passed to GSK_RENDERER, display it in the window
title.
This is mostly so that when I show off screenshots, people know what
renderer I'm using.
-rw-r--r-- | demos/node-editor/node-editor-window.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/demos/node-editor/node-editor-window.c b/demos/node-editor/node-editor-window.c index 2872d83320..9cbc458f9a 100644 --- a/demos/node-editor/node-editor-window.c +++ b/demos/node-editor/node-editor-window.c @@ -1701,6 +1701,13 @@ node_editor_window_init (NodeEditorWindow *self) " }\n" " transform: translate(0, 140);\n" "}", -1); + + if (g_getenv ("GSK_RENDERER")) + { + char *new_title = g_strdup_printf ("GTK Node Editor - %s", g_getenv ("GSK_RENDERER")); + gtk_window_set_title (GTK_WINDOW (self), new_title); + g_free (new_title); + } } NodeEditorWindow * |