From 06321511ad7cf336539d07113f15cafb54ad364b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Jan 2021 17:01:51 -0500 Subject: [PATCH] builder-tool: Translate GtkImage:pixbuf The pixbuf property doesn't exist anymore. It is commonly set to a path in ui files, so translate it to the file property. --- gtk/tools/gtk-builder-tool-simplify.c | 3 ++- testsuite/tools/simplify-data-3to4/image.expected | 12 ++++++++++++ testsuite/tools/simplify-data-3to4/image.ui | 10 ++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 testsuite/tools/simplify-data-3to4/image.expected create mode 100644 testsuite/tools/simplify-data-3to4/image.ui diff --git a/gtk/tools/gtk-builder-tool-simplify.c b/gtk/tools/gtk-builder-tool-simplify.c index b61487c537..990377bd21 100644 --- a/gtk/tools/gtk-builder-tool-simplify.c +++ b/gtk/tools/gtk-builder-tool-simplify.c @@ -719,7 +719,8 @@ maybe_rename_property (Element *element, MyParserData *data) { "GtkWidget", "margin-right", GTK_TYPE_WIDGET, PROP_KIND_OBJECT, "margin-end", { NULL, NULL, NULL } }, { "GtkHeaderBar", "show-close-button", GTK_TYPE_HEADER_BAR, PROP_KIND_OBJECT, "show-title-buttons", { NULL, NULL, NULL } }, { "GtkHeaderBar", "custom-title", GTK_TYPE_HEADER_BAR, PROP_KIND_OBJECT, "title-widget", { NULL, NULL, NULL } }, - { "GtkStack", "homogeneous", GTK_TYPE_STACK, PROP_KIND_OBJECT, "hhomogeneous", { "vhomogeneous", NULL, NULL } } + { "GtkStack", "homogeneous", GTK_TYPE_STACK, PROP_KIND_OBJECT, "hhomogeneous", { "vhomogeneous", NULL, NULL } }, + { "GtkImage", "pixbuf", GTK_TYPE_IMAGE, PROP_KIND_OBJECT, "file", { NULL, NULL, NULL } }, }; int i, k, l; PropKind kind; diff --git a/testsuite/tools/simplify-data-3to4/image.expected b/testsuite/tools/simplify-data-3to4/image.expected new file mode 100644 index 0000000000..ccb3491832 --- /dev/null +++ b/testsuite/tools/simplify-data-3to4/image.expected @@ -0,0 +1,12 @@ + + + + + + + 0 + test.svg + + + + diff --git a/testsuite/tools/simplify-data-3to4/image.ui b/testsuite/tools/simplify-data-3to4/image.ui new file mode 100644 index 0000000000..0aebe4e862 --- /dev/null +++ b/testsuite/tools/simplify-data-3to4/image.ui @@ -0,0 +1,10 @@ + + + + + + test.svg + + + +