[gnome-software/wip/ubuntu-xenial] Add apt: URL support



commit cf052cb634d4f09e0cb070100756227b63ae47a1
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Apr 26 11:13:01 2016 +0200

    Add apt: URL support

 src/gs-application.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 7c469ac..098e85b 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -944,6 +944,17 @@ gs_application_open (GApplication  *application,
                                                        "details",
                                                        g_variant_new ("(ss)", path, ""));
                }
+               if (g_strcmp0 (soup_uri_get_scheme (uri), "apt") == 0) {
+                       const gchar *path = soup_uri_get_path (uri);
+
+                       /* trim any leading slashes */
+                       while (*path == '/')
+                               path++;
+
+                       g_action_group_activate_action (G_ACTION_GROUP (app),
+                                                       "details-pkg",
+                                                       g_variant_new_string (path));
+               }
        }
 }
 


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