projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b0ad09
)
node-editor: Print default renderer in title
author
Benjamin Otte
<otte@redhat.com>
Fri, 12 May 2023 15:16:22 +0000
(17:16 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Tue, 16 May 2023 16:53:53 +0000
(18:53 +0200)
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.
demos/node-editor/node-editor-window.c
patch
|
blob
|
history
diff --git
a/demos/node-editor/node-editor-window.c
b/demos/node-editor/node-editor-window.c
index 2872d83320af8a3c8857fc68cbf24c9ffadc13ed..9cbc458f9a1ac49263da4aee17247c7d64ee989a 100644
(file)
--- 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 *