[gnome-builder] glade: treat .ui files as gtk-builder files
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] glade: treat .ui files as gtk-builder files
- Date: Tue, 23 Oct 2018 20:15:36 +0000 (UTC)
commit dc7659a12d32caa3fae1c101a99ba4a4b60fd50e
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 23 13:09:43 2018 -0700
glade: treat .ui files as gtk-builder files
I wanted to avoid this originally, since .ui files can also be used with
other systems such as Qt, but we are a GNOME focused IDE and there is very
little we could ever do to support Qt, so just mark the .ui glob as being
a gtk-builder file.
src/plugins/glade/gbp-glade-workbench-addin.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/glade/gbp-glade-workbench-addin.c b/src/plugins/glade/gbp-glade-workbench-addin.c
index cdaef357f..61ad4a418 100644
--- a/src/plugins/glade/gbp-glade-workbench-addin.c
+++ b/src/plugins/glade/gbp-glade-workbench-addin.c
@@ -49,11 +49,16 @@ gbp_glade_workbench_addin_can_open (IdeWorkbenchAddin *addin,
const gchar *content_type,
gint *priority)
{
+ const gchar *path;
+
g_assert (GBP_IS_GLADE_WORKBENCH_ADDIN (addin));
g_assert (priority != NULL);
+ path = ide_uri_get_path (uri);
+
if (g_strcmp0 (content_type, "application/x-gtk-builder") == 0 ||
- g_strcmp0 (content_type, "application/x-designer") == 0)
+ g_strcmp0 (content_type, "application/x-designer") == 0 ||
+ (path && g_str_has_suffix (path, ".ui")))
{
*priority = -100;
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]