[gnome-builder] plugins/vcsui: add variants for snippet variable names
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins/vcsui: add variants for snippet variable names
- Date: Fri, 22 Jul 2022 22:05:47 +0000 (UTC)
commit b899f288c1dc00261e503e7a43bd309359fc492b
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 22 15:05:40 2022 -0700
plugins/vcsui: add variants for snippet variable names
These are used in other places where we might want them to show up.
src/plugins/vcsui/gbp-vcsui-editor-page-addin.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/vcsui/gbp-vcsui-editor-page-addin.c b/src/plugins/vcsui/gbp-vcsui-editor-page-addin.c
index 03dcf50e6..cd8dd1e71 100644
--- a/src/plugins/vcsui/gbp-vcsui-editor-page-addin.c
+++ b/src/plugins/vcsui/gbp-vcsui-editor-page-addin.c
@@ -66,6 +66,7 @@ on_push_snippet_cb (GbpVcsuiEditorPageAddin *self,
if (!ide_str_empty0 (g_value_get_string (&value)))
{
+ gtk_source_snippet_context_set_variable (context, "NAME", g_value_get_string (&value));
gtk_source_snippet_context_set_variable (context, "author", g_value_get_string (&value));
gtk_source_snippet_context_set_variable (context, "fullname", g_value_get_string (&value));
gtk_source_snippet_context_set_variable (context, "username", g_value_get_string (&value));
@@ -76,7 +77,10 @@ on_push_snippet_cb (GbpVcsuiEditorPageAddin *self,
ide_vcs_config_get_config (vcs_config, IDE_VCS_CONFIG_EMAIL, &value);
if (!ide_str_empty0 (g_value_get_string (&value)))
- gtk_source_snippet_context_set_variable (context, "email", g_value_get_string (&value));
+ {
+ gtk_source_snippet_context_set_variable (context, "email", g_value_get_string (&value));
+ gtk_source_snippet_context_set_variable (context, "EMAIL", g_value_get_string (&value));
+ }
g_value_unset (&value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]