[glade] GladeProject: show message on invalid GtkBuilder file
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] GladeProject: show message on invalid GtkBuilder file
- Date: Thu, 18 Jun 2020 22:09:55 +0000 (UTC)
commit cabb5bebe3159e81a2e7e4237aaf90700023aa3d
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Thu Jun 18 18:58:29 2020 -0300
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
gladeui/glade-project.c | 10 ++++++++--
1 file 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]