libunity-webapps-2.5.0~+16.04.20160201/0000755000015600001650000000000012653651662017562 5ustar pbuserpbgroup00000000000000libunity-webapps-2.5.0~+16.04.20160201/docs/0000755000015600001650000000000012653651661020511 5ustar pbuserpbgroup00000000000000libunity-webapps-2.5.0~+16.04.20160201/docs/api/0000755000015600001650000000000012653651661021262 5ustar pbuserpbgroup00000000000000libunity-webapps-2.5.0~+16.04.20160201/docs/api/unity-web-api.html0000644000015600001650000000167612653650751024653 0ustar pbuserpbgroup00000000000000 Unity Web API Documentation
v0.8
Introduction

An imports object is defined globally in every Seed context. This provides access to GObject Introspection namespaces, C extension modules, and other JavaScript files, as explained in the next three sections.

libunity-webapps-2.5.0~+16.04.20160201/docs/api/style.css0000644000015600001650000000336512653650751023142 0ustar pbuserpbgroup00000000000000body { font-size: 10pt; font-family: "Ubuntu"; text-align: justify; background-image: url("http://unity.ubuntu.com/wp-content/themes/unity-wordpress-theme/images/bg_dot.png"); } #header { margin:15px; margin-top:15px; font-size: 18pt; width: 100%; } #fullheader { background-image: url("http://unity.ubuntu.com/wp-content/themes/unity-wordpress-theme/images/header-bg.png"); color:white; width:100%; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 2px 2px 0 #C2C2C2; box-shadow: 0 2px 2px 0 #C2C2C2; height:66px; margin-bottom:2px; width:960px; align:center; margin-left:auto; margin-right:auto; } #headerText { position:relative; top:5px; } #maincontent { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 2px 2px 0 #C2C2C2; box-shadow: 0 2px 2px 0 #C2C2C2; margin-bottom:15px; background:white; width:960px; margin-left:auto; margin-right:auto; overflow:clip; } #subheader { margin:15px; font-size: 12pt; width: 100%; } div.section { font-size: 16pt; width:954px; border-bottom: 1px solid #ccc; margin-bottom: 10px; margin-top:4px; margin-left:6px; } div.subsection { font-size: 12pt; width: 952px; border-bottom: 1px solid #ccc; margin-bottom: 8px; margin-left: 10px; } p { margin-left: 10px; margin-right:10px; text-indent: 0em; } pre { margin-left: 30px; padding: 7px; border: 1px solid #ccc; background-color: #EFEFEF; } div.filename { margin-left: 25px; font-weight: bold; width: 70%; border-bottom: 1px solid #ccc; } code { font-weight: bold; } namespace { color:#ef2929; } type { color:#73d216; } member { color:#729fcf; } a,a:link,a:visited { color: rgb(221, 72, 20); } libunity-webapps-2.5.0~+16.04.20160201/docs/api/sh.js0000644000015600001650000001227112653650751022234 0ustar pbuserpbgroup00000000000000/* Copyright (C) 2007, 2008 gnombat@users.sourceforge.net */ /* License: http://shjs.sourceforge.net/doc/gplv3.html */ if(!this.sh_languages){this.sh_languages={}}var sh_requests={};function sh_isEmailAddress(a){if(/^mailto:/.test(a)){return false}return a.indexOf("@")!==-1}function sh_setHref(b,c,d){var a=d.substring(b[c-2].pos,b[c-1].pos);if(a.length>=2&&a.charAt(0)==="<"&&a.charAt(a.length-1)===">"){a=a.substr(1,a.length-2)}if(sh_isEmailAddress(a)){a="mailto:"+a}b[c-2].node.href=a}function sh_konquerorExec(b){var a=[""];a.index=b.length;a.input=b;return a}function sh_highlightString(B,o){if(/Konqueror/.test(navigator.userAgent)){if(!o.konquered){for(var F=0;FI){x(g.substring(I,E.index),null)}var e=O[u];var J=e[1];var b;if(J instanceof Array){for(var L=0;L0){var e=b.split(" ");for(var c=0;c0){a.push(e[c])}}}return a}function sh_addClass(c,a){var d=sh_getClasses(c);for(var b=0;b element with class="'+h+'", but no such language exists'}}break}}}};libunity-webapps-2.5.0~+16.04.20160201/docs/api/sh_js.js0000644000015600001650000001300612653650751022725 0ustar pbuserpbgroup00000000000000if (! this.sh_languages) { this.sh_languages = {}; } sh_languages['javascript'] = [ [ [ /\/\/\//g, 'sh_comment', 1 ], [ /\/\//g, 'sh_comment', 7 ], [ /\/\*\*/g, 'sh_comment', 8 ], [ /\/\*/g, 'sh_comment', 9 ], [ /\b(?:abstract|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|final|finally|for|function|goto|if|implements|in|instanceof|interface|native|new|null|private|protected|prototype|public|return|static|super|switch|synchronized|throw|throws|this|transient|true|try|typeof|var|volatile|while|with|Unity)\b/g, 'sh_keyword', -1 ], [ /(\+\+|--|\)|\])(\s*)(\/=?(?![*\/]))/g, ['sh_symbol', 'sh_normal', 'sh_symbol'], -1 ], [ /(0x[A-Fa-f0-9]+|(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?)(\s*)(\/(?![*\/]))/g, ['sh_number', 'sh_normal', 'sh_symbol'], -1 ], [ /([A-Za-z$_][A-Za-z0-9$_]*\s*)(\/=?(?![*\/]))/g, ['sh_normal', 'sh_symbol'], -1 ], [ /\/(?:\\.|[^*\\\/])(?:\\.|[^\\\/])*\/[gim]*/g, 'sh_regexp', -1 ], [ /\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g, 'sh_number', -1 ], [ /"/g, 'sh_string', 10 ], [ /'/g, 'sh_string', 11 ], [ /~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g, 'sh_symbol', -1 ], [ /\{|\}/g, 'sh_cbracket', -1 ], [ /\b(?:Math|Infinity|NaN|undefined|arguments|Seed|signal|argv|argc|Gtk|GObject|GLib|WebKit)\b/g, 'sh_predef_var', -1 ], [ /\b(?:printf|sprintf|connect|Array|Boolean|Date|Error|EvalError|Function|Number|Object|RangeError|ReferenceError|RegExp|String|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt)\b/g, 'sh_predef_func', -1 ], [ /(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g, 'sh_function', -1 ] ], [ [ /$/g, null, -2 ], [ /(?:?)|(?:?)/g, 'sh_url', -1 ], [ /<\?xml/g, 'sh_preproc', 2, 1 ], [ //g, 'sh_keyword', -1 ], [ /<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g, 'sh_keyword', 6, 1 ], [ /&(?:[A-Za-z0-9]+);/g, 'sh_preproc', -1 ], [ /<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g, 'sh_keyword', -1 ], [ /<(?:\/)?[A-Za-z][A-Za-z0-9]*/g, 'sh_keyword', 6, 1 ], [ /@[A-Za-z]+/g, 'sh_type', -1 ], [ /(?:TODO|FIXME|BUG)(?:[:]?)/g, 'sh_todo', -1 ] ], [ [ /\?>/g, 'sh_preproc', -2 ], [ /([^=" \t>]+)([ \t]*)(=?)/g, ['sh_type', 'sh_normal', 'sh_symbol'], -1 ], [ /"/g, 'sh_string', 3 ] ], [ [ /\\(?:\\|")/g, null, -1 ], [ /"/g, 'sh_string', -2 ] ], [ [ />/g, 'sh_preproc', -2 ], [ /([^=" \t>]+)([ \t]*)(=?)/g, ['sh_type', 'sh_normal', 'sh_symbol'], -1 ], [ /"/g, 'sh_string', 3 ] ], [ [ /-->/g, 'sh_comment', -2 ], [ //g, 'sh_comment', -2 ], [ / False False True False vertical True False True False 96 Interest False True 0 True False 75 gtk-close 5 False True 1 True True 0 True False True False True False Owner: 0:0213 True True 0 True False True False 0 View is Active: No True True 1 False True 1 True False 7 True False Location http://www.facebook.com center end 50 False True 2 True False True False 5 100 100 True False 100 start-here True True 0 True False vertical True False 0.50999999046325684 1 0.69999998807907104 0.10999999940395355 4 Request Preview False True True True False True True 0 True False 0.75999999046325684 0.10999999940395355 Request Raise False True True True False True True 1 True True 1 False True 3 libunity-webapps-2.5.0~+16.04.20160201/tools/unity-webapps-desktop-file.c0000644000015600001650000000312412653650751026257 0ustar pbuserpbgroup00000000000000#include #include #include #include #include "unity-webapps-application-info.h" #include "unity-webapps-application-manifest.h" static gboolean write_desktop_file (UnityWebappsApplicationManifest *manifest) { UnityWebappsApplicationInfo *info; const gchar *name, *domain; gchar *desktop_name; GError *error; name = unity_webapps_application_manifest_get_name (manifest); domain = unity_webapps_application_manifest_get_domain (manifest); if (!domain) return FALSE; info = unity_webapps_application_info_new (name, domain, "", NULL); // It's a waste of time to free this. desktop_name = unity_webapps_application_info_get_desktop_file_name (info); error = NULL; unity_webapps_application_info_write_desktop_file_to_path (info, desktop_name, &error); if (error != NULL) { // No reason to free g_warning ("Error writing desktop file: %s \n", error->message); return FALSE; } return TRUE; } gint main (gint argc, gchar **argv) { UnityWebappsApplicationManifest *manifest; gboolean wrote; g_type_init (); if (argc != 2) { g_printf("Usage: unity-webapps-desktop-file <>\n"); return 1; } manifest = unity_webapps_application_manifest_new_from_file (argv[1]); if (manifest == FALSE) { g_printf("Failed to load and parse manifest file \n"); return 1; } wrote = write_desktop_file (manifest); if (wrote == FALSE) { g_printf("Failed to write desktop file \n"); return 1; } return 0; } libunity-webapps-2.5.0~+16.04.20160201/tools/unity-webapps-installer.c0000644000015600001650000000757312653650751025702 0ustar pbuserpbgroup00000000000000/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * unity-webapps-tool.c * Copyright (C) Canonical LTD 2011 * * Author: Robert Carr * unity-webapps is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * unity-webapps is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see ." */ #include #include #include #include #include "unity-webapps-application-info.h" #include "unity-webapps-permissions.h" static gchar *name = NULL; static gchar *domain = NULL; static gchar *icon_uri = NULL; static gchar *homepage = NULL; static gboolean force = FALSE; static GOptionEntry option_entries[] = { { "name", 'n', 0, G_OPTION_ARG_STRING, &name, "Application name", NULL}, { "domain", 'd', 0, G_OPTION_ARG_STRING, &domain, "Application domain", NULL}, { "icon-uri", 'i', 0, G_OPTION_ARG_STRING, &icon_uri, "Application main icon URI", NULL}, { "homepage", 'h', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_STRING, &homepage, "Application homepage", NULL}, { "force", 'f', 0, G_OPTION_ARG_NONE, &force, "Force install even if Domain has been blacklisted", NULL}, { NULL, } }; static void unity_webapps_installer_parse_args (gint *argc, gchar ***argv) { GOptionContext *context; GError *error; context = g_option_context_new (" - Install Unity Webapps"); // TODO: Localization g_option_context_add_main_entries (context, option_entries, NULL); error = NULL; if (!g_option_context_parse (context, argc, argv, &error)) { g_printf("Failed to parse arguments: %s \n", error->message); g_error_free (error); exit(1); } return; } static void unity_webapps_installer_install_application () { UnityWebappsApplicationInfo *info; gchar *saved_icon, *desktop_file_path; GError *error; info = unity_webapps_application_info_new (name, domain, icon_uri, NULL); printf("Installing application: %s at %s\n", name, domain); saved_icon = unity_webapps_application_info_save_icon_file (info); if (saved_icon == NULL) { g_error ("Failed to save icon file!"); exit(1); } printf(" * Wrote icon file: %s", saved_icon); error = NULL; unity_webapps_application_info_ensure_desktop_file (info, &error); if (error != NULL) { g_error ("Failed to write desktop file: %s \n", error->message); g_error_free (error); exit (1); } desktop_file_path = unity_webapps_application_info_get_desktop_file_path (info); printf(" * Wrote desktop file: %s\n", desktop_file_path); if (homepage != NULL) { homepage = domain; } unity_webapps_application_info_set_homepage (info, homepage); return; } static void unity_webapps_installer_authorize_application () { gboolean dontask; dontask = unity_webapps_permissions_get_domain_dontask (domain); if (dontask == TRUE) { printf("Trying to install application at domain %s, which has been blacklisted due to user action.\n", domain); if (force == TRUE) { printf("Forcing install anyway\n"); } else { exit(1); } } unity_webapps_permissions_allow_domain (domain); return; } gint main (gint argc, gchar **argv) { g_type_init (); unity_webapps_installer_parse_args (&argc, &argv); unity_webapps_installer_authorize_application (); unity_webapps_installer_install_application (); return 0; } libunity-webapps-2.5.0~+16.04.20160201/tools/webapps-spreader.c0000644000015600001650000001562612653650751024342 0ustar pbuserpbgroup00000000000000/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * webapps-spreader.c * Copyright (C) Canonical LTD 2011 * * Author: Robert Carr * unity-webapps is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * unity-webapps is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see ."; */ #include #include #include #include #include #include "unity-webapps-service.h" #include "unity-webapps-context.h" static UnityWebappsService *service = NULL; static GMainLoop *mainloop = NULL; static gchar *context_name = NULL; static GOptionEntry option_entries[] = { { "context-name", 'n',0,G_OPTION_ARG_STRING, &context_name, "Context DBus Name", NULL }, }; static gboolean parse_data_uri (const gchar *data_uri, gchar **mimetype, gchar **data) { gchar **split; int result; g_assert (g_str_has_prefix (data_uri, "data:") == TRUE); split = g_strsplit (data_uri+5, ";base64,", 2); result = g_strv_length (split); if (result != 2) { g_warning ("Failed to parse data uri: \n %s \n", data_uri); *mimetype = NULL; *data = NULL; g_strfreev (split); return FALSE; } *mimetype = split[0]; *data = split[1]; g_free (split); if (g_str_has_prefix (*mimetype, "image/") == FALSE) { g_warning ("Data URI does not have an image mimetype"); g_free (mimetype); g_free (data); *mimetype = NULL; *data = NULL; return FALSE; } return TRUE; } static GdkPixbuf * preview_image_from_data_uri (const gchar *data_uri) { GdkPixbufLoader *loader; GdkPixbuf *pixbuf; gchar *mimetype, *data; guchar *decoded; gsize decoded_length; gboolean parsed, wrote; GError *error; mimetype = NULL; data = NULL; pixbuf = NULL; loader = NULL; parsed = parse_data_uri (data_uri, &mimetype, &data); if (parsed == FALSE) { g_warning ("Failed to parse data uri"); return NULL; } decoded = g_base64_decode (data, &decoded_length); g_assert (decoded != NULL); loader = gdk_pixbuf_loader_new (); error = NULL; wrote = gdk_pixbuf_loader_write (loader, decoded, decoded_length, &error); if (wrote == FALSE) { if (error == NULL) { goto out; } g_warning ("Failed to write data to GdkPixbuf: %s", error->message); g_error_free (error); goto out; } error = NULL; if (error != NULL) { g_warning("Failed to close pixbuf loader: %s", error->message); g_error_free (error); goto out; } pixbuf = GDK_PIXBUF (g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader))); gdk_pixbuf_loader_close (loader, NULL); out: if (loader != NULL) { g_object_unref (G_OBJECT (loader)); } g_free (mimetype); g_free (data); g_free (decoded); return pixbuf; } static gchar * get_preview_title (UnityWebappsContext *context, gint interest_id) { const gchar *app_name; gchar *view_location, *title; app_name = unity_webapps_context_get_name (context); view_location = unity_webapps_context_get_view_location (context, interest_id); title = g_strdup_printf("%s - (%s)", app_name, view_location); g_free (view_location); return title; } static void create_preview_window (UnityWebappsContext *context, gint interest_id, GdkPixbuf *preview_pixbuf, gint width, gint height) { GtkWidget *window, *image; GdkWindow *gdkwin; gchar *title; guint32 xid; window = gtk_window_new (GTK_WINDOW_POPUP); gtk_window_set_default_size (GTK_WINDOW (window), width, height); gtk_window_set_accept_focus (GTK_WINDOW (window), FALSE); gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), TRUE); gtk_window_set_skip_pager_hint (GTK_WINDOW (window), TRUE); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_UTILITY); gtk_window_move (GTK_WINDOW (window), -10000, -10000); image = gtk_image_new_from_pixbuf (preview_pixbuf); gtk_container_add (GTK_CONTAINER (window), image); title = get_preview_title (context, interest_id); gtk_window_set_title (GTK_WINDOW (window), title); gtk_widget_show_all (GTK_WIDGET (window)); gdkwin = gtk_widget_get_window (GTK_WIDGET (window)); xid = gdk_x11_window_get_xid (gdkwin); printf("%d - %u\n", interest_id, xid); g_free (title); } static void preview_ready (UnityWebappsContext *context, gint interest_id, const gchar *preview_data, gpointer user_data) { GdkPixbuf *preview_pixbuf; gint width, height; preview_pixbuf = preview_image_from_data_uri (preview_data); if (preview_pixbuf == NULL) { return; } width = gdk_pixbuf_get_width (preview_pixbuf); height = gdk_pixbuf_get_height (preview_pixbuf); create_preview_window (context, interest_id, preview_pixbuf, width, height); g_object_unref (G_OBJECT (preview_pixbuf)); } static gboolean spreader_request_previews (UnityWebappsContext *context) { GVariant *interests, *interest_variant; GVariantIter *variant_iter; interests = unity_webapps_context_list_interests (context); if (interests == NULL) { return FALSE; } variant_iter = g_variant_iter_new (interests); while ((interest_variant = g_variant_iter_next_value (variant_iter))) { gint interest_id; interest_id = g_variant_get_int32 (interest_variant); unity_webapps_context_request_preview (context, interest_id, preview_ready, GINT_TO_POINTER (interest_id)); } g_variant_iter_free (variant_iter); g_variant_unref (interests); return TRUE; } gint main (gint argc, gchar **argv) { GOptionContext *option_context; UnityWebappsContext *context; GError *error; gboolean req; gtk_init (&argc, &argv); service = unity_webapps_service_new (); option_context = g_option_context_new ("- Create Preview Windows for Unity Webapps"); // TODO: GETTEXT g_option_context_add_main_entries (option_context, option_entries, NULL); error = NULL; if (!g_option_context_parse (option_context, &argc, &argv, &error)) { g_error("Failed to parse arguments: %s", error->message); exit(1); } context = unity_webapps_context_new_for_context_name (service, context_name); req = spreader_request_previews (context); if (req == FALSE) { exit(1); } mainloop = g_main_loop_new (NULL, FALSE); g_main_loop_run (mainloop); exit (0); } libunity-webapps-2.5.0~+16.04.20160201/tools/action-invoker.c0000644000015600001650000001042312653650751024014 0ustar pbuserpbgroup00000000000000/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * unity-webapps-action-invoker.c * Copyright (C) Canonical LTD 2011 * * Author: Robert Carr * unity-webapps is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * unity-webapps is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see ."; */ #include #include "unity-webapps-service.h" #include "unity-webapps-context.h" #include #include #include #include static UnityWebappsService *service = NULL; static gchar *name = NULL; static gchar *domain = NULL; const gchar *action = NULL; static GOptionEntry option_entries[] = { { "name", 'n',0,G_OPTION_ARG_STRING, &name, "Application name", NULL }, { "domain", 'd',0, G_OPTION_ARG_STRING, &domain, "Application domain", NULL}, { "action", 'a', 0, G_OPTION_ARG_STRING, &action, "Action path", NULL} }; static gchar ** split_action_path (const gchar *action_path) { gchar **components; if (action_path[0] != '/') { return NULL; } components = g_strsplit (action_path+1, "/", -1); if (g_strv_length (components) > 3) { g_strfreev (components); return NULL; } return components; } static DbusmenuMenuitem * menuitem_find_child_by_label (DbusmenuMenuitem *item, const gchar *label) { const GList *children; const GList *walk; children = dbusmenu_menuitem_get_children (item); for (walk = children; walk != NULL; walk = walk->next) { DbusmenuMenuitem *child; const gchar *child_label; child = (DbusmenuMenuitem *)walk->data; child_label = dbusmenu_menuitem_property_get (child, "label"); if (g_strcmp0 (child_label, label) == 0) { return child; } } return NULL; } static void invoke_action_by_path (DbusmenuMenuitem *root, const gchar *action_path) { gchar **components; DbusmenuMenuitem *item; gint i, length; components = split_action_path (action_path); length = g_strv_length (components); if (length < 0) { return; } item = root; for (i = 0; i < length; i++) { DbusmenuMenuitem *child; gchar *component; component = components[i]; child = menuitem_find_child_by_label (item, component); if (child == NULL) { g_error ("Action not found"); exit (1); } item = child; } g_message("Invoking item: %s", components[i-1]); dbusmenu_menuitem_handle_event (item, "clicked", NULL, time(NULL)); g_strfreev (components); } static void on_root_changed (DbusmenuClient *client, DbusmenuMenuitem *newitem, gpointer user_data) { invoke_action_by_path (newitem, action); } static void context_ready (UnityWebappsContext *context, gpointer user_data) { DbusmenuClient *client; const gchar *context_name; context_name = unity_webapps_context_get_context_name (context); client = dbusmenu_client_new (context_name, "/com/canonical/Unity/Webapps/Context/ApplicationActions"); g_signal_connect (client, "root-changed", G_CALLBACK (on_root_changed), NULL); } gint main (gint argc, gchar **argv) { GOptionContext *context; GError *error; g_type_init (); service = unity_webapps_service_new (); error = NULL; context = g_option_context_new ("- Activate Unity WebApps"); // TODO: GETTEXT g_option_context_add_main_entries (context, option_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) { g_printf("Failed to parse arguments: %s\n", error->message); exit(1); } unity_webapps_context_new (service, name, domain, "", NULL, context_ready, NULL); g_main_loop_run (g_main_loop_new (NULL, FALSE)); return 0; } libunity-webapps-2.5.0~+16.04.20160201/tools/context-tracker.c0000644000015600001650000000637212653650751024211 0ustar pbuserpbgroup00000000000000/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * view-activity-tracker.c * Copyright (C) Canonical LTD 2011 * * Author: Robert Carr * unity-webapps is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * unity-webapps is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see ."; */ #include #include #include #include "unity-webapps-service.h" #include "unity-webapps-context.h" static UnityWebappsService *service = NULL; static GMainLoop *mainloop = NULL; void print_context_for_name (const gchar *name) { UnityWebappsContext *context; const gchar *cname; const gchar *domain; context = unity_webapps_context_new_for_context_name (service, name); if (context == NULL) { return; } cname = unity_webapps_context_get_name (context); domain = unity_webapps_context_get_domain (context); gint interests = g_variant_n_children (unity_webapps_context_list_interests (context)); printf("Context (%s), %s (%s) interest #%d\n", name, cname, domain, interests); g_object_unref (G_OBJECT (context)); } void print_context_list () { gchar **context; gchar **context_list = unity_webapps_service_list_contexts (service); printf("===== Listing Contexts ===== \n"); for (context = context_list; context && *context; context++) { if (strlen (*context) == 0) continue; print_context_for_name (*context); } printf("================================\n"); g_strfreev (context_list); } static void on_interest_appeared (UnityWebappsContext *context, gint id, gpointer data) { printf("interest appeared\n"); print_context_list (); } static void on_interest_vanished (UnityWebappsContext *context, gint id, gpointer data) { printf("interest vanished\n"); print_context_list (); } static void on_context_appeared (UnityWebappsService *service, const gchar *name, gpointer user_data) { UnityWebappsContext *context; context = unity_webapps_context_new_for_context_name (service, name); unity_webapps_context_on_interest_appeared (context, on_interest_appeared, NULL); unity_webapps_context_on_interest_vanished (context, on_interest_vanished, NULL); printf("Context appeared \n"); print_context_list (); } static void on_context_vanished (UnityWebappsService *service, const gchar *name, gpointer user_data) { printf("Context vanished \n"); print_context_list (); } gint main (gint argc, gchar **argv) { g_type_init (); service = unity_webapps_service_new (); print_context_list (); unity_webapps_service_on_context_appeared (service, on_context_appeared, NULL); unity_webapps_service_on_context_vanished (service, on_context_vanished, NULL); mainloop = g_main_loop_new (NULL, FALSE); g_main_loop_run (mainloop); exit (0); } libunity-webapps-2.5.0~+16.04.20160201/tools/service-tracker.c0000644000015600001650000006335412653650751024170 0ustar pbuserpbgroup00000000000000/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * service-tracker.c * Copyright (C) Canonical LTD 2011 * * Author: Robert Carr * unity-webapps is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * unity-webapps is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see ."; */ #include #include #include #include #include "unity-webapps-service.h" #include "unity-webapps-context.h" static UnityWebappsService *service = NULL; static GMainLoop *mainloop = NULL; static GtkWidget *main_window = NULL; static GtkWidget *main_box = NULL; static GtkWidget *pane_alignment = NULL; static GtkWidget *tree_view = NULL; static GtkTreeStore *tree_store = NULL; static GtkWidget *current_pane = NULL; static GHashTable *contexts_by_name = NULL; typedef struct _ContextHashData { UnityWebappsContext *context; GtkTreeRowReference *row_reference; GHashTable *interests_by_id; GtkWidget *pane; GtkWidget *interests_label; } ContextHashData; typedef struct _InterestHashData { ContextHashData *context_data; GtkTreeRowReference *row_reference; gint id; GtkWidget *pane; GtkLabel *active_label; GtkLabel *location_label; GtkImage *preview_image; } InterestHashData; static gboolean parse_data_uri (const gchar *data_uri, gchar **mimetype, gchar **data) { gchar **split; int result; g_assert (g_str_has_prefix (data_uri, "data:") == TRUE); split = g_strsplit (data_uri+5, ";base64,", 2); result = g_strv_length (split); if (result != 2) { g_warning ("Failed to parse data uri: \n %s \n", data_uri); *mimetype = NULL; *data = NULL; g_strfreev (split); return FALSE; } *mimetype = split[0]; *data = split[1]; g_free (split); if (g_str_has_prefix (*mimetype, "image/") == FALSE) { g_warning ("Data URI does not have an image mimetype"); g_free (mimetype); g_free (data); *mimetype = NULL; *data = NULL; return FALSE; } return TRUE; } static GdkPixbuf * scale_preview_pixbuf (GdkPixbuf *pixbuf) { GdkPixbuf *scaled_pixbuf; gint width, height; gdouble ratio; width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_height (pixbuf); ratio = 160.0/height; scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf, width*ratio, 160, GDK_INTERP_HYPER); return scaled_pixbuf; } static GdkPixbuf * preview_image_from_data_uri (const gchar *data_uri) { GdkPixbufLoader *loader; GdkPixbuf *pixbuf, *unscaled_pixbuf; gchar *mimetype, *data; guchar *decoded; gsize decoded_length; gboolean parsed, wrote; GError *error; mimetype = NULL; data = NULL; pixbuf = NULL; loader = NULL; parsed = parse_data_uri (data_uri, &mimetype, &data); if (parsed == FALSE) { g_warning ("Failed to parse data uri"); return NULL; } decoded = g_base64_decode (data, &decoded_length); g_assert (decoded != NULL); loader = gdk_pixbuf_loader_new (); error = NULL; wrote = gdk_pixbuf_loader_write (loader, decoded, decoded_length, &error); if (wrote == FALSE) { if (error == NULL) { goto out; } g_warning ("Failed to write data to GdkPixbuf: %s", error->message); g_error_free (error); goto out; } printf("Wrote %zu bytes\n", decoded_length); error = NULL; if (error != NULL) { g_warning("Failed to close pixbuf loader: %s", error->message); g_error_free (error); goto out; } unscaled_pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); pixbuf = scale_preview_pixbuf (unscaled_pixbuf); g_object_unref (G_OBJECT (unscaled_pixbuf)); gdk_pixbuf_loader_close (loader, NULL); out: if (loader != NULL) { g_object_unref (G_OBJECT (loader)); } g_free (mimetype); g_free (data); g_free (decoded); return pixbuf; } static InterestHashData * interest_hash_data_new (ContextHashData *context_data, GtkTreeIter *iter, gint id) { InterestHashData *data; GtkTreePath *path; data = g_malloc0 (sizeof (InterestHashData)); path = gtk_tree_model_get_path (GTK_TREE_MODEL (tree_store), iter); data->row_reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (tree_store), path); data->context_data = context_data; data->id = id; gtk_tree_path_free (path); return data; } void interest_hash_data_free (InterestHashData *data) { if (data->row_reference) { gtk_tree_row_reference_free (data->row_reference); } g_object_unref (G_OBJECT (data->pane)); g_free (data); } static ContextHashData * context_hash_data_new (UnityWebappsContext *context, GtkTreeIter *iter) { GtkTreePath *path; ContextHashData *data; data = g_malloc0 (sizeof (ContextHashData)); path = gtk_tree_model_get_path (GTK_TREE_MODEL (tree_store), iter); data->context = context; data->row_reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (tree_store), path); data->interests_by_id = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)interest_hash_data_free); gtk_tree_path_free (path); return data; } static void context_hash_data_free (ContextHashData *data) { if (data->row_reference) { gtk_tree_row_reference_free (data->row_reference); } g_object_unref (G_OBJECT (data->context)); g_object_unref (G_OBJECT (data->pane)); g_hash_table_destroy (data->interests_by_id); g_free (data); } static UnityWebappsContext * get_context_proxy_for_name (const gchar *name, GtkTreeIter *iter) { UnityWebappsContext *context; ContextHashData *data; data = g_hash_table_lookup (contexts_by_name, name); if (data != NULL) { return data->context; } context = unity_webapps_context_new_for_context_name (service, name); data = context_hash_data_new (context, iter); g_hash_table_insert (contexts_by_name, g_strdup (name), data); return context; } static void builder_set_label_text (GtkBuilder *builder, const gchar *label_name, const gchar *label_text) { GtkLabel *label; label = GTK_LABEL (gtk_builder_get_object (builder, label_name)); gtk_label_set_text (label, label_text); } static GdkPixbuf * render_webapp_icon_for_name (const gchar *icon_name) { GtkIconTheme *theme; GtkIconInfo *info; GdkPixbuf *pb; if (icon_name == NULL) { return NULL; } theme = gtk_icon_theme_new (); gtk_icon_theme_set_custom_theme (theme, "unity-webapps"); info = gtk_icon_theme_lookup_icon (theme, icon_name, 64, 0); if (info == NULL) { g_object_unref (G_OBJECT (theme)); return NULL; } pb = gtk_icon_info_load_icon (info, NULL); /* TODO: FIXME: ERROR */ gtk_icon_info_free (info); g_object_unref (G_OBJECT (theme)); return pb; } static void set_context_pane_labels (UnityWebappsContext *context, GtkBuilder *builder, ContextHashData *data) { gchar *name_label, *domain_label, *interests_label, *desktop_name_label; const gchar *context_name; const gchar *context_domain; const gchar *context_desktop_name; gint num_interests; context_name = unity_webapps_context_get_name (context); context_domain = unity_webapps_context_get_domain (context); context_desktop_name = unity_webapps_context_get_desktop_name (context); num_interests = 1; // TODO: FIX ME name_label = g_strdup_printf ("Name: %s", context_name); domain_label = g_strdup_printf("Domain: %s", context_domain); desktop_name_label = g_strdup_printf("Desktop Name: %s", context_desktop_name); interests_label = g_strdup_printf("Number of Interests: %d", num_interests); builder_set_label_text (builder, "domain-label", domain_label); builder_set_label_text (builder, "name-label", name_label); builder_set_label_text (builder, "desktop-name-label", desktop_name_label); builder_set_label_text (builder, "num-interests-label", interests_label); data->interests_label = GTK_WIDGET (gtk_builder_get_object (builder, "num-interests-label")); g_free (name_label); g_free (domain_label); g_free (desktop_name_label); g_free (interests_label); } static void set_context_pane_icon (UnityWebappsContext *context, GtkBuilder *builder) { GtkImage *image; GdkPixbuf *icon_pb; gchar *icon_name; icon_name = unity_webapps_context_get_icon_name (context); icon_pb = render_webapp_icon_for_name (icon_name); if (icon_pb != NULL) { image = GTK_IMAGE (gtk_builder_get_object (builder, "icon-image")); gtk_image_set_from_pixbuf (image, icon_pb); g_object_unref (G_OBJECT (icon_pb)); } g_free (icon_name); } static void on_raise_button_clicked (GtkWidget *button, gpointer user_data) { UnityWebappsContext *context; context = (UnityWebappsContext *)user_data; unity_webapps_context_raise (context); } static void on_close_button_clicked (GtkWidget *button, gpointer user_data) { UnityWebappsContext *context; context = (UnityWebappsContext *)user_data; unity_webapps_context_close (context); } static GtkWidget * make_pane_for_context (UnityWebappsContext *context, ContextHashData *data) { GtkWidget *main_widget; GtkBuilder *builder; GError *error; builder = gtk_builder_new (); error = NULL; gtk_builder_add_from_file (builder, "context-pane.xml", &error); if (error != NULL) { g_error ("Error loading context-pane.xml: %s", error->message); g_error_free (error); return NULL; } set_context_pane_labels (context, builder, data); set_context_pane_icon (context, builder); g_signal_connect (gtk_builder_get_object (builder, "raise-button"), "clicked", G_CALLBACK (on_raise_button_clicked), context); g_signal_connect (gtk_builder_get_object (builder, "close-button"), "clicked", G_CALLBACK (on_close_button_clicked), context); main_widget = GTK_WIDGET (g_object_ref (gtk_builder_get_object (builder, "box1"))); return main_widget; } static void on_preview_ready (UnityWebappsContext *context, gint interest_id, const gchar *preview_data, gpointer user_data) { GdkPixbuf *pixbuf; InterestHashData *data; data = (InterestHashData *)user_data; pixbuf = preview_image_from_data_uri (preview_data); if (pixbuf == NULL) { return; } gtk_image_set_from_pixbuf (data->preview_image, pixbuf); g_object_unref (G_OBJECT (pixbuf)); } static void on_preview_clicked (GtkWidget *button, gpointer user_data) { InterestHashData *data; data = (InterestHashData *)user_data; unity_webapps_context_request_preview (data->context_data->context, data->id, on_preview_ready, data); } static void on_interest_raise_clicked (GtkWidget *button, gpointer user_data) { UnityWebappsContext *context; InterestHashData *data; data = (InterestHashData *)user_data; context = data->context_data->context; unity_webapps_context_raise_interest (context, data->id); } static GtkWidget * make_pane_for_interest_id (UnityWebappsContext *context, gint interest_id, InterestHashData *data) { GtkWidget *main_widget; GtkBuilder *builder; gchar *message, *owner, *location; gboolean is_active; GError *error; builder = gtk_builder_new (); error = NULL; gtk_builder_add_from_file (builder, "interest-pane.xml", &error); if (error != NULL) { g_error ("Error loading interest-pane.xml: %s", error->message); g_error_free (error); return NULL; } set_context_pane_icon (context, builder); owner = unity_webapps_context_get_interest_owner (context, interest_id); message = g_strdup_printf ("Owner: %s", owner); gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (builder, "owner-label")), message); is_active = unity_webapps_context_get_view_is_active (context, interest_id); data->active_label = GTK_LABEL (gtk_builder_get_object (builder, "view-active-label")); data->location_label = GTK_LABEL (gtk_builder_get_object (builder, "location-label")); data->preview_image = GTK_IMAGE (gtk_builder_get_object (builder, "preview-image")); location = unity_webapps_context_get_view_location (context, interest_id); if (location && (strlen(location) > 0)) { gchar *lm; lm = g_strdup_printf("Location: %s", location); gtk_label_set_text (data->location_label, lm); g_free (lm); } if (is_active) { gtk_label_set_text (data->active_label, "View is Active: Yes"); } g_signal_connect (gtk_builder_get_object (builder, "preview-button"), "clicked", G_CALLBACK (on_preview_clicked), data); g_signal_connect (gtk_builder_get_object (builder, "raise-button"), "clicked", G_CALLBACK (on_interest_raise_clicked), data); main_widget = GTK_WIDGET (g_object_ref (gtk_builder_get_object (builder, "box1"))); g_free (owner); g_free (message); return main_widget; } static gint get_interest_by_tree_path (UnityWebappsContext *context, GtkTreePath *path) { ContextHashData *data; const gchar *context_name; GHashTableIter iter; gpointer key, value; context_name = unity_webapps_context_get_context_name (context); data = g_hash_table_lookup (contexts_by_name, context_name); if (data == NULL) { return -1; } g_hash_table_iter_init (&iter, data->interests_by_id); while (g_hash_table_iter_next (&iter, &key, &value)) { InterestHashData *interest_data; GtkTreePath *s_path; interest_data = (InterestHashData *)value; s_path = gtk_tree_row_reference_get_path (interest_data->row_reference); if (gtk_tree_path_compare (path, s_path) == 0) { gtk_tree_path_free (s_path); return GPOINTER_TO_INT(key); } gtk_tree_path_free (s_path); } return -1; } static UnityWebappsContext * get_context_by_tree_path (GtkTreePath *path) { GHashTableIter iter; gpointer key, value; if (path == NULL) { return NULL; } g_hash_table_iter_init (&iter, contexts_by_name); while (g_hash_table_iter_next (&iter, &key, &value)) { ContextHashData *data; GtkTreePath *s_path; data = (ContextHashData *)value; s_path = gtk_tree_row_reference_get_path (data->row_reference); if (gtk_tree_path_compare (path, s_path) == 0) { gtk_tree_path_free (s_path); return data->context; } gtk_tree_path_free (s_path); } return NULL; } static void append_interests (UnityWebappsContext *context, ContextHashData *hash_data, GtkTreeIter *iter) { GVariant *interests; GVariant *interest_variant; GVariantIter *variant_iter; interests = unity_webapps_context_list_interests (context); if (interests == NULL) { return; } variant_iter = g_variant_iter_new (interests); while ((interest_variant = g_variant_iter_next_value (variant_iter))) { GtkWidget *interest_pane; InterestHashData *data; gchar *message; GtkTreeIter new_iter; gint interest_id; interest_id = g_variant_get_int32 (interest_variant); gtk_tree_store_insert (tree_store, &new_iter, iter, 0); message = g_strdup_printf ("Interest %d", interest_id); gtk_tree_store_set (tree_store, &new_iter, 0, message, -1); data = interest_hash_data_new (hash_data, &new_iter, interest_id); interest_pane = make_pane_for_interest_id (context, interest_id, data); data->pane = interest_pane; g_hash_table_insert (hash_data->interests_by_id, GINT_TO_POINTER (interest_id), data); g_free (message); } g_variant_iter_free (variant_iter); g_variant_unref (interests); } static void on_interests_changed (UnityWebappsContext *context, gint interest_id, gpointer user_data) { ContextHashData *hash_data = (ContextHashData *)user_data; GtkTreePath *path; gchar *label_text; GtkTreeIter context_tree_iter; GHashTableIter hash_iter; gpointer key, value; g_hash_table_iter_init (&hash_iter, hash_data->interests_by_id); while (g_hash_table_iter_next (&hash_iter, &key, &value)) { InterestHashData *interest_hash_data; GtkTreePath *path; GtkTreeIter iter; interest_hash_data = (InterestHashData *)value; path = gtk_tree_row_reference_get_path (interest_hash_data->row_reference); gtk_tree_model_get_iter (GTK_TREE_MODEL (tree_store), &iter, path); gtk_tree_store_remove (tree_store, &iter); gtk_tree_path_free (path); } g_hash_table_remove_all (hash_data->interests_by_id); path = gtk_tree_row_reference_get_path (hash_data->row_reference); gtk_tree_model_get_iter (GTK_TREE_MODEL (tree_store), &context_tree_iter, path); append_interests (context, hash_data, &context_tree_iter); label_text = g_strdup_printf ("Number of Interests: %d", g_hash_table_size (hash_data->interests_by_id)); gtk_label_set_text (GTK_LABEL (hash_data->interests_label), label_text); g_free (label_text); gtk_tree_path_free (path); } static void on_view_is_active_changed (UnityWebappsContext *context, gint interest_id, gboolean is_active, gpointer user_data) { ContextHashData *data; InterestHashData *interest_data; data = (ContextHashData *)user_data; interest_data = (InterestHashData *)g_hash_table_lookup (data->interests_by_id, GINT_TO_POINTER (interest_id)); if (interest_data == NULL) { return; } if (is_active) { gtk_label_set_text (interest_data->active_label, "View is Active: Yes"); } else { gtk_label_set_text (interest_data->active_label, "View is Active: No"); } } static void on_view_location_changed (UnityWebappsContext *context, gint interest_id, const gchar *location, gpointer user_data) { ContextHashData *data; InterestHashData *interest_data; gchar *message; data = (ContextHashData *)user_data; interest_data = (InterestHashData *)g_hash_table_lookup (data->interests_by_id, GINT_TO_POINTER (interest_id)); if (interest_data == NULL) { return; } message = g_strdup_printf ("Location: %s", location); gtk_label_set_text (interest_data->location_label, message); g_free (message); } static void append_context_by_name (const gchar *context_name) { UnityWebappsContext *context; const gchar *name; const gchar *domain; gchar *message; ContextHashData *data; GtkTreeIter iter; gtk_tree_store_append (tree_store, &iter, NULL); context = get_context_proxy_for_name (context_name, &iter); name = unity_webapps_context_get_name (context); domain = unity_webapps_context_get_domain (context); message = g_strdup_printf("Context (%s): %s at %s", context_name, name, domain); gtk_tree_store_set(tree_store, &iter, 0, message, -1); data = g_hash_table_lookup (contexts_by_name, context_name); append_interests (context, data, &iter); unity_webapps_context_on_interest_appeared (context, on_interests_changed, data); unity_webapps_context_on_interest_vanished (context, on_interests_changed, data); unity_webapps_context_on_view_is_active_changed (context, on_view_is_active_changed, data); unity_webapps_context_on_view_location_changed (context, on_view_location_changed, data); data->pane = make_pane_for_context (context, data); g_free (message); } static void remove_context_by_name (const gchar *context_name) { GtkTreePath *path; ContextHashData *data; GtkTreeIter iter; data = (gpointer)g_hash_table_lookup (contexts_by_name, context_name); if (data == NULL) { return; } path = gtk_tree_row_reference_get_path (data->row_reference); gtk_tree_model_get_iter (GTK_TREE_MODEL (tree_store), &iter, path); gtk_tree_store_remove (tree_store, &iter); if (data->pane == current_pane) { gtk_container_remove (GTK_CONTAINER (pane_alignment), data->pane); current_pane = NULL; } g_hash_table_remove (contexts_by_name, context_name); gtk_tree_path_free (path); } static void populate_model_initially () { gchar **contexts; gchar *context; gint i; contexts = unity_webapps_service_list_contexts (service); i = 0; if (contexts == NULL) { return; } for (context = contexts[i]; context != NULL; context = contexts[++i]) { if (strlen (context) == 0) { continue; } append_context_by_name (context); } } static void on_context_appeared (UnityWebappsService *service, const gchar *name, gpointer user_data) { append_context_by_name (name); } static void on_context_vanished (UnityWebappsService *service, const gchar *name, gpointer user_data) { remove_context_by_name (name); } static void create_model () { tree_store = gtk_tree_store_new (1, G_TYPE_STRING); gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), GTK_TREE_MODEL (tree_store)); populate_model_initially (); } static void setup_column () { GtkTreeViewColumn *column; GtkCellRenderer *renderer; renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Object Name", renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column); } static void set_pane_by_context (UnityWebappsContext *context) { ContextHashData *data; const gchar *context_name; context_name = unity_webapps_context_get_context_name (context); data = g_hash_table_lookup (contexts_by_name, context_name); g_assert (data != NULL); if ((data == NULL) && (current_pane != NULL)) { gtk_container_remove (GTK_CONTAINER (pane_alignment), current_pane); current_pane = NULL; return; } if (current_pane != NULL) { if (current_pane == data->pane) { return; } gtk_container_remove (GTK_CONTAINER (pane_alignment), current_pane); current_pane = NULL; } if (gtk_widget_get_parent (data->pane) != NULL) { gtk_widget_reparent (data->pane, pane_alignment); } else { gtk_container_add (GTK_CONTAINER (pane_alignment), data->pane); } gtk_widget_show_all (data->pane); current_pane = data->pane; } static void set_pane_by_interest (UnityWebappsContext *context, gint interest_id) { ContextHashData *data; InterestHashData *interest_data; const gchar *context_name; context_name = unity_webapps_context_get_context_name (context); data = g_hash_table_lookup (contexts_by_name, context_name); interest_data = g_hash_table_lookup (data->interests_by_id, GINT_TO_POINTER (interest_id)); if (interest_data == NULL) { return; } if ((data == NULL || interest_data == NULL) && (current_pane != NULL)) { gtk_container_remove (GTK_CONTAINER (pane_alignment), current_pane); current_pane = NULL; return; } if (current_pane != NULL) { if (current_pane == interest_data->pane) { return; } gtk_container_remove (GTK_CONTAINER (pane_alignment), current_pane); current_pane = NULL; } if (gtk_widget_get_parent (interest_data->pane) != NULL) { gtk_widget_reparent (interest_data->pane, pane_alignment); } else { gtk_container_add (GTK_CONTAINER (pane_alignment), interest_data->pane); } gtk_widget_show_all (interest_data->pane); current_pane = interest_data->pane; } static void on_tree_view_cursor_changed (GtkTreeView *tree_view, gpointer user_data) { GtkTreePath *path; UnityWebappsContext *context; gint depth; gtk_tree_view_get_cursor (tree_view, &path, NULL); if (path == NULL) { return; } depth = gtk_tree_path_get_depth (path); if (depth == 1) { context = get_context_by_tree_path (path); if (context == NULL) { goto out; } set_pane_by_context (context); } else if (depth == 2) { GtkTreePath *parent; gint interest; parent = gtk_tree_path_copy (path); gtk_tree_path_up (parent); context = get_context_by_tree_path (parent); interest = get_interest_by_tree_path (context, path); set_pane_by_interest (context, interest); gtk_tree_path_free (parent); } out: gtk_tree_path_free (path); } static void setup_treeview () { tree_view = gtk_tree_view_new (); g_signal_connect (tree_view, "cursor-changed", G_CALLBACK (on_tree_view_cursor_changed), NULL); setup_column(); gtk_container_add (GTK_CONTAINER (main_box), tree_view); create_model (); } static void setup_main_box () { main_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); setup_treeview(); pane_alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0); gtk_container_add (GTK_CONTAINER (main_box), pane_alignment); gtk_container_add (GTK_CONTAINER (main_window), main_box); } static void setup_main_window () { gtk_window_set_title (GTK_WINDOW (main_window), "Unity Webapps Tracker"); setup_main_box (); } gint main (gint argc, gchar **argv) { gtk_init (&argc, &argv); contexts_by_name = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) context_hash_data_free); service = unity_webapps_service_new (); unity_webapps_service_on_context_appeared (service, on_context_appeared, NULL); unity_webapps_service_on_context_vanished (service, on_context_vanished, NULL); main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); setup_main_window (); gtk_window_set_default_size (GTK_WINDOW (main_window), 450, 250); gtk_widget_show_all (main_window); // gtk_window_set_resizable (GTK_WINDOW (main_window), FALSE); mainloop = g_main_loop_new (NULL, FALSE); g_main_loop_run (mainloop); exit (0); } libunity-webapps-2.5.0~+16.04.20160201/tools/context-pane.xml0000644000015600001650000003230712653650751024054 0ustar pbuserpbgroup00000000000000 False False True False vertical True False True False 96 Context False True 0 True False 75 gtk-close 5 False True 1 True True 0 True True True False center vertical 13 True False 50 True False True False 0 Name: GMail True True 0 True False 0 Domain: mail.google.com True True 1 False True 0 True False 50 True False 0 Desktop name: GMail-mail.google.com False True 1 True False 50 True False 0 Number of Interests: center True True 2 True False 0.80000001192092896 0.15999999642372131 3 5 True False vertical Request Raise False True True True False False True 0 Request Close False True True True False False True 1 False True 3 True False Information False True False vertical True False Application Actions True True 0 True False True False True True 1 1 True False Actions 1 False False True 1 libunity-webapps-2.5.0~+16.04.20160201/COPYING0000644000015600001650000001673012653650751020622 0ustar pbuserpbgroup00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. libunity-webapps-2.5.0~+16.04.20160201/AUTHORS0000644000015600001650000000000012653650751020616 0ustar pbuserpbgroup00000000000000libunity-webapps-2.5.0~+16.04.20160201/m4/0000755000015600001650000000000012653651661020101 5ustar pbuserpbgroup00000000000000libunity-webapps-2.5.0~+16.04.20160201/m4/gcov.m40000644000015600001650000000473212653650751021306 0ustar pbuserpbgroup00000000000000# Checks for existence of coverage tools: # * gcov # * lcov # * genhtml # * gcovr # # Sets ac_cv_check_gcov to yes if tooling is present # and reports the executables to the variables LCOV, GCOVR and GENHTML. AC_DEFUN([AC_TDD_GCOV], [ AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov], [enable coverage testing with gcov]), [use_gcov=yes], [use_gcov=no]) AM_CONDITIONAL(HAVE_GCOV, test "x$use_gcov" = "xyes") # if test "x$use_gcov" = "xyes"; then # AM_CONDITIONAL(HAVE_GCOV, true) # else # AM_CONDITIONAL(HAVE_GCOV, false) # fi if test "x$use_gcov" = "xyes"; then # we need gcc: if test "$GCC" != "yes"; then AC_MSG_ERROR([GCC is required for --enable-gcov]) fi # Check if ccache is being used AC_CHECK_PROG(SHTOOL, shtool, shtool) if test "$SHTOOL"; then AS_CASE([`$SHTOOL path $CC`], [*ccache*], [gcc_ccache=yes], [gcc_ccache=no]) fi if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.]) fi lcov_version_list="1.6 1.7 1.8 1.9 1.10" AC_CHECK_PROG(LCOV, lcov, lcov) AC_CHECK_PROG(GENHTML, genhtml, genhtml) if test "$LCOV"; then AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [ glib_cv_lcov_version=invalid lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` for lcov_check_version in $lcov_version_list; do if test "$lcov_version" = "$lcov_check_version"; then glib_cv_lcov_version="$lcov_check_version (ok)" fi done ]) else lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" AC_MSG_ERROR([$lcov_msg]) fi case $glib_cv_lcov_version in ""|invalid[)] lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." AC_MSG_ERROR([$lcov_msg]) LCOV="exit 0;" ;; esac if test -z "$GENHTML"; then AC_MSG_ERROR([Could not find genhtml from the lcov package]) fi # Remove all optimization flags from CFLAGS changequote({,}) CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'` changequote([,]) # Add the special gcc flags UNITY_WEBAPPS_COVERAGE_CFLAGS="--coverage" UNITY_WEBAPPS_COVERAGE_CXXFLAGS="--coverage" UNITY_WEBAPPS_COVERAGE_LDFLAGS="-lgcov" fi ]) # AC_TDD_GCOV libunity-webapps-2.5.0~+16.04.20160201/m4/introspection.m40000644000015600001650000000661412653650751023251 0ustar pbuserpbgroup00000000000000dnl -*- mode: autoconf -*- dnl Copyright 2009 Johan Dahlin dnl dnl This file is free software; the author(s) gives unlimited dnl permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl # serial 1 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([LT_INIT],[$0])dnl setup libtool first dnl enable/disable introspection m4_if([$2], [require], [dnl enable_introspection=yes ],[dnl AC_ARG_ENABLE(introspection, AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], [Enable introspection for this build]),, [enable_introspection=auto]) ])dnl AC_MSG_CHECKING([for gobject-introspection]) dnl presence/version checking AS_CASE([$enable_introspection], [no], [dnl found_introspection="no (disabled, use --enable-introspection to enable)" ],dnl [yes],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0],, AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) ],dnl [auto],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) ],dnl [dnl AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) ])dnl AC_MSG_RESULT([$found_introspection]) INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi AC_SUBST(INTROSPECTION_SCANNER) AC_SUBST(INTROSPECTION_COMPILER) AC_SUBST(INTROSPECTION_GENERATE) AC_SUBST(INTROSPECTION_GIRDIR) AC_SUBST(INTROSPECTION_TYPELIBDIR) AC_SUBST(INTROSPECTION_CFLAGS) AC_SUBST(INTROSPECTION_LIBS) AC_SUBST(INTROSPECTION_MAKEFILE) AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") ]) dnl Usage: dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) ]) dnl Usage: dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) ]) libunity-webapps-2.5.0~+16.04.20160201/data/0000755000015600001650000000000012653651661020472 5ustar pbuserpbgroup00000000000000libunity-webapps-2.5.0~+16.04.20160201/data/com.canonical.unity.webapps.gschema.xml0000644000015600001650000000526112653650751030140 0ustar pbuserpbgroup00000000000000 Specifies if prompting for unity integration is enabled or not true This key specifies if any new websites that hasn't been integrated yet and is a target for a unity integration can prompt the user for permission to integrate. When disabled, previously integrated websites will still function as expected, while no new website will prompt for integration. A list of domains which are preauthorized to access Unity Integration. ["amazon.ca", "amazon.cn", "amazon.com", "amazon.co.uk", "amazon.de", "amazon.es", "amazon.fr", "amazon.it", "www.amazon.ca", "www.amazon.cn", "www.amazon.com", "www.amazon.co.uk", "www.amazon.de", "www.amazon.es", "www.amazon.fr", "www.amazon.it", "one.ubuntu.com"] This key indicates which web applications (by domain) are preauthorized to access Unity integration. That is to say that passing the permissions check depends on being in the union of this key, or the key allowed-domains. This is a seperate key from allowed-domains, and kept as such so that the default value may be changed during distribution upgrades. A list of domains which are allowed to access unity integration [] This key indicates which web applications (by domain) are allowed to access Unity integration features, such as Sound Menu, Messaging Indicator, etc... A list of domains which we will not ask to enable unity integration for [] This key indicates web applications which the user has blacklisted from accessing Unity integration features. Frequency (in seconds per job) with which unity-webapps-service will spawn the ubuntu-webapps-update-index job. 43200 The ubuntu-webapps-update-index job is responsible for maintaining an index of available applications by URL glob patterns. Currently this index is updated from apt-cache metadata. This key controls the rate at which unity-webapps-service will spawn the index updater. libunity-webapps-2.5.0~+16.04.20160201/data/Makefile.am0000644000015600001650000000124012653650751022522 0ustar pbuserpbgroup00000000000000servicefiledir = $(datadir)/dbus-1/services servicefile_in_files = \ com.canonical.Unity.Webapps.Service.service.in servicefile_DATA = $(servicefile_in_files:.service.in=.service) gsettings_SCHEMAS = \ com.canonical.unity.webapps.gschema.xml @GSETTINGS_RULES@ com.canonical.Unity.Webapps.Service.service: com.canonical.Unity.Webapps.Service.service.in $(AM_V_GEN)sed -e "s|[@]libexecdir[@]|$(libexecdir)|" $< > $@ # Additional step used for test that need access to a compiled schema # to be environment agnostic all: glib-compile-schemas . EXTRA_DIST = \ $(gsettings_SCHEMAS) \ $(servicefile_in_files) CLEANFILES = \ $(servicefile_DATA) gschemas.compiled libunity-webapps-2.5.0~+16.04.20160201/data/com.canonical.Unity.Webapps.Service.service.in0000644000015600001650000000014012653650751031265 0ustar pbuserpbgroup00000000000000[D-BUS Service] Name=com.canonical.Unity.Webapps.Service Exec=@libexecdir@/unity-webapps-servicelibunity-webapps-2.5.0~+16.04.20160201/configure.ac0000644000015600001650000001104712653650751022051 0ustar pbuserpbgroup00000000000000dnl Process this file with autoconf to produce a configure script. dnl Created by Anjuta application wizard. AC_INIT(unity_webapps, 2.5.1) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.11 tar-pax]) AM_SILENT_RULES([yes]) AC_PROG_CC_C99 AC_CONFIG_MACRO_DIR([m4]) dnl *************************************************************************** dnl Internationalization dnl *************************************************************************** IT_PROG_INTLTOOL([0.35.0]) GETTEXT_PACKAGE=unity_webapps AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) AM_GLIB_GNU_GETTEXT LT_INIT # Beware: remember that libunity-webapps will be pulled in at runtime in # the browser runtime env. So watch out for bad mix ups in the dependancies/runtimes # e.g. adding some dependancies on gtk3 when chromium & ff are still gtk2 based. PKG_CHECK_MODULES(UNITY_WEBAPPS, [glib-2.0 gobject-2.0 gio-2.0 gio-unix-2.0 json-glib-1.0 libsoup-2.4 packagekit-glib2 polkit-gobject-1]) GLIB_GSETTINGS PKG_CHECK_MODULES(TELEPATHY_GLIB, [telepathy-glib]) PKG_CHECK_MODULES(UNITY_WEBAPPS_DAEMON, [libnotify unity messaging-menu gtk+-3.0 sqlite3 gdk-pixbuf-2.0 libwnck-3.0]) PKG_CHECK_MODULES(UNITY_WEBAPPS_WM_PID_TRACKER, [libwnck-3.0]) PKG_CHECK_MODULES(GEOCLUE, [geoclue]) PKG_CHECK_MODULES(UNITY_WEBAPPS_SERVICE_TRACKER, [gtk+-3.0 dbusmenu-glib-0.4 dbusmenu-gtk3-0.4]) PKG_CHECK_MODULES(UNITY_WEBAPPS_TOOLS, [libwnck-3.0]) GOBJECT_INTROSPECTION_CHECK([0.6.7]) AC_PATH_PROG([GDBUS_CODEGEN], [gdbus-codegen], AC_MSG_ERROR([gdbus-codegen is required but was not found])) AC_CHECK_LIB(gthread-2.0, g_thread_init) AC_DEFINE([UNITY_WEBAPPS_CONTAINER_APP_NAME], ["webapp-container"], [Webapp container application name.]) dnl ========== Tests ========== AC_ARG_ENABLE(tests, AC_HELP_STRING([--enable-tests], [Enable tests. [default=no]]), [enable_tests="yes"], [enable_tests="no"]) if test "x$enable_tests" = "xyes"; then AC_DEFINE([ENABLE_TESTS], 1, [Enable tests.]) # Tests need debug to be enabled enable_debug="yes" fi AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"]) dnl ===== gcov coverage reporting ===== m4_include([m4/gcov.m4]) AC_TDD_GCOV AC_SUBST(UNITY_WEBAPPS_COVERAGE_CFLAGS) AC_SUBST(UNITY_WEBAPPS_COVERAGE_CXXFLAGS) AC_SUBST(UNITY_WEBAPPS_COVERAGE_LDFLAGS) dnl =============================Debug========================================= AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable verbose debugging. [default=no]]), [enable_debug="yes"],[enable_debug="no"]) if test "x$enable_debug" = "xyes"; then UNITY_WEBAPPS_DEBUG_CFLAGS="-DUNITY_WEBAPPS_ENABLE_DEBUG -g" CFLAGS="$CFLAGS -O0 -Wall" else UNITY_WEBAPPS_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS" CFLAGS="$CFLAGS -Wall" if test "x$need_debug" = "xyes"; then AC_MSG_ERROR([debug must be enabled in order to enable coverage.]) fi fi m4_ifdef([GTK_DOC_CHECK], [ GTK_DOC_CHECK([1.18],[--flavour no-tmpl]) ],[ AM_CONDITIONAL([ENABLE_GTK_DOC], false) ]) AC_SUBST(UNITY_WEBAPPS_DEBUG_CFLAGS) saved_CFLAGS=$CFLAGS saved_LIBS=$LIBS CFLAGS=$JS_CFLAGS LIBS=$JS_LIBS AC_CHECK_LIB(unity, unity_music_player_export) AC_CHECK_FUNC([unity_music_player_export], AC_DEFINE([HAVE_UNITY_MUSIC_PLAYER_EXPORT], [1], [Define if we already have unity_music_player_export]),) CFLAGS=$saved_CFLAGS LIBS=$saved_LIBS AC_OUTPUT([ Makefile src/libunity-webapps/libunity_webapps-0.2.pc src/Makefile src/libunity-webapps/Makefile src/webapps-service/Makefile src/context-daemon/Makefile src/runner/Makefile src/index-updater/Makefile src/libunity-webapps-repository/libunity-webapps-repository.pc src/libunity-webapps-repository/Makefile tests/Makefile tests/context-daemon/Makefile tests/traced/Makefile tests/traced/test-runner/Makefile tests/traced/test-runner/post-actions/Makefile tests/traced/misc/Makefile tests/traced/notification/Makefile tests/traced/indicator/Makefile tests/traced/music-player/Makefile tests/traced/launcher/Makefile tests/traced/fuzz/Makefile tests/traced/actions/Makefile tests/traced/multicontext/Makefile tests/traced/observer-api/Makefile tests/traced/common/Makefile tests/repository/Makefile tests/repository/application-manifest/Makefile tests/repository/available-application/Makefile tests/repository/local-index/Makefile tests/repository/application-repository/Makefile tests/index-updater/Makefile tests/libunity-webapps/Makefile tests/misc/Makefile data/Makefile docs/Makefile docs/dbus/Makefile docs/reference/Makefile docs/reference/libunity-webapps/Makefile tools/Makefile po/Makefile.in]) libunity-webapps-2.5.0~+16.04.20160201/NEWS0000644000015600001650000000000012653650751020245 0ustar pbuserpbgroup00000000000000libunity-webapps-2.5.0~+16.04.20160201/ChangeLog0000644000015600001650000000000212653650751021322 0ustar pbuserpbgroup00000000000000