[gnome-builder] greeter: add clone-repo action
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] greeter: add clone-repo action
- Date: Tue, 5 Mar 2019 20:34:28 +0000 (UTC)
commit d5ee1ad4b0be1c33f1f89752fd1248e834e4da02
Author: Christian Hergert <chergert redhat com>
Date: Tue Mar 5 12:11:04 2019 -0800
greeter: add clone-repo action
This can be used to activate the action from gapplication launch
src/plugins/greeter/gbp-greeter-application-addin.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/src/plugins/greeter/gbp-greeter-application-addin.c
b/src/plugins/greeter/gbp-greeter-application-addin.c
index 12e20f8d5..4758f5d6c 100644
--- a/src/plugins/greeter/gbp-greeter-application-addin.c
+++ b/src/plugins/greeter/gbp-greeter-application-addin.c
@@ -75,6 +75,20 @@ new_window (GSimpleAction *action,
present_greeter_with_surface (NULL, NULL, self);
}
+static void
+clone_repo_cb (GSimpleAction *action,
+ GVariant *param,
+ gpointer user_data)
+{
+ g_autoptr(GVariant) clone_param = NULL;
+
+ g_assert (G_IS_SIMPLE_ACTION (action));
+ g_assert (GBP_IS_GREETER_APPLICATION_ADDIN (user_data));
+
+ clone_param = g_variant_take_ref (g_variant_new_string ("clone"));
+ present_greeter_with_surface (NULL, clone_param, user_data);
+}
+
static void
open_project (GSimpleAction *action,
GVariant *param,
@@ -103,6 +117,7 @@ open_project (GSimpleAction *action,
static const GActionEntry actions[] = {
{ "present-greeter-with-surface", present_greeter_with_surface, "s" },
{ "open-project", open_project },
+ { "clone-repo", clone_repo_cb },
{ "new-window", new_window },
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]