diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2020-06-18 18:58:29 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2020-06-18 19:09:17 -0300 |
commit | ecc38977d711f06c716cf7d2a96818bb55a31edd (patch) | |
tree | 6c1a91c7d8a9c283344eaf7eb87b053508162fd0 | |
parent | 14e7fbf074c572072de4ff3e754f9a9582f33a15 (diff) | |
download | glade-ecc38977d711f06c716cf7d2a96818bb55a31edd.tar.gz |
GladeProject: show message on invalid GtkBuilder file
Show user an error dialog if he tries to open an old
libglade file.
https://gitlab.gnome.org/GNOME/glade/-/issues/389
-rw-r--r-- | gladeui/glade-project.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c index 132b6deb..9f474c2d 100644 --- a/gladeui/glade-project.c +++ b/gladeui/glade-project.c @@ -2127,8 +2127,14 @@ glade_project_load_internal (GladeProject *project) if (!glade_xml_node_verify_silent (root, GLADE_XML_TAG_PROJECT)) { - g_warning ("Couldnt recognize GtkBuilder xml, skipping %s", - load_path ? load_path : priv->path); + if (glade_xml_node_verify_silent (root, "glade-interface")) + glade_util_ui_message (glade_app_get_window (), GLADE_UI_ERROR, NULL, + "This version of Glade does not support old libglade files.\n" + "Please use Glade 3.8 for GTK 2 files."); + else + glade_util_ui_message (glade_app_get_window (), GLADE_UI_ERROR, NULL, + "Couldn't recognize GtkBuilder xml.\nskipping %s", + load_path ? load_path : priv->path); glade_xml_context_free (context); g_free (load_path); priv->loading = FALSE; |