projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
830d28d
)
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
Matthias Clasen
<mclasen@redhat.com>
Mon, 5 Jun 2023 11:52:43 +0000
(07:52 -0400)
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 9eb5fcfac60833ea4a92ecceccc15f21670947d1..4be1adadd25de6ba780ee1bfd3688afb17cc4968 100644
(file)
--- a/
demos/node-editor/node-editor-window.c
+++ b/
demos/node-editor/node-editor-window.c
@@
-1309,6
+1309,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 *