[gnome-builder] plugins/projectui: improve fallback version control label



commit e33e47f6e00cd119ae089dbe1e4fbf017a180cf5
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 23 19:38:52 2022 -0700

    plugins/projectui: improve fallback version control label

 po/POTFILES.in                                     | 1 +
 src/plugins/projectui/gbp-projectui-tweaks-addin.c | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 61ad39ddd..b5984bfe1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -260,6 +260,7 @@ src/plugins/project-tree/gbp-rename-file-popover.c
 src/plugins/project-tree/gbp-rename-file-popover.ui
 src/plugins/project-tree/gtk/menus.ui
 src/plugins/project-tree/tweaks.ui
+src/plugins/projectui/gbp-projectui-tweaks-addin.c
 src/plugins/projectui/tweaks.ui
 src/plugins/qemu/gbp-qemu-device-provider.c
 src/plugins/quick-highlight/gbp-quick-highlight-preferences.c
diff --git a/src/plugins/projectui/gbp-projectui-tweaks-addin.c 
b/src/plugins/projectui/gbp-projectui-tweaks-addin.c
index f261e0fae..ec3329192 100644
--- a/src/plugins/projectui/gbp-projectui-tweaks-addin.c
+++ b/src/plugins/projectui/gbp-projectui-tweaks-addin.c
@@ -86,10 +86,11 @@ gbp_projectui_tweaks_addin_get_vcs (GbpProjectuiTweaksAddin *self)
   IdeVcs *vcs;
 
   if (self->context &&
-      (vcs = ide_vcs_from_context (self->context)))
+      (vcs = ide_vcs_from_context (self->context)) &&
+      !IDE_IS_DIRECTORY_VCS (vcs))
     return ide_vcs_get_display_name (vcs);
 
-  return NULL;
+  return g_strdup (_("No version control"));
 }
 
 static void


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