Commit 4c051e80 authored by Guido Gunther's avatar Guido Gunther

helpers: Make it simple to use glade with PhoshLayerShells

Temporarily replace the PhoshLayerShell by a GtkWindow known to glade.
We could extend the glade-catalog but this way doesn't require any
special setup.
Signed-off-by: Guido Gunther's avatarGuido Günther <>
parent 8115f15f
# Make UI files editable that use PhoshLayerSurface
set -eu
function cleanup()
[ -z "${TMP_DIR}" ] || rm -rf "${TMP_DIR}"
if [ -z "$1" ]; then
echo "Usage: $0 <glade-ui-file>"
exit 1
trap cleanup EXIT
TMP_DIR=$(mktemp -d)
TMP_UI_FILE="${TMP_DIR}/$(basename "${UI_FILE}")"
sed 's,parent="PhoshLayerSurface",parent="GtkWindow",' "${UI_FILE}" > "${TMP_UI_FILE}"
glade "${TMP_UI_FILE}"
sed 's,parent="GtkWindow",parent="PhoshLayerSurface",' "${TMP_UI_FILE}" > "${UI_FILE}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment