[gnome-builder] glade: ignore menus.ui when opening files



commit 442e4681a03f681dff3fc193ef4ccddbee2425c5
Author: Christian Hergert <chergert redhat com>
Date:   Mon May 6 09:06:30 2019 -0700

    glade: ignore menus.ui when opening files

 src/plugins/glade/gbp-glade-workbench-addin.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/plugins/glade/gbp-glade-workbench-addin.c b/src/plugins/glade/gbp-glade-workbench-addin.c
index 7cc795dee..eac7b4bd9 100644
--- a/src/plugins/glade/gbp-glade-workbench-addin.c
+++ b/src/plugins/glade/gbp-glade-workbench-addin.c
@@ -89,6 +89,10 @@ gbp_glade_workbench_addin_can_open (IdeWorkbenchAddin *addin,
 
   path = g_file_peek_path (file);
 
+  /* Ignore menus.ui, because they don't really work in the designer */
+  if (path && g_str_has_suffix (path, "/menus.ui"))
+    return FALSE;
+
   if (g_strcmp0 (content_type, "application/x-gtk-builder") == 0 ||
       g_strcmp0 (content_type, "application/x-designer") == 0 ||
       (path && g_str_has_suffix (path, ".ui")))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]