[gnome-software/wip/temp/ubuntu-xenial-rebased: 313/326] Add apt: URL support
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased: 313/326] Add apt: URL support
- Date: Fri, 29 Apr 2016 10:13:40 +0000 (UTC)
commit 16b8a4da8893c0c7cb323a3296ce7429b9682516
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 2533128..660b54b 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]