[gnome-software/wip/rancell/apt: 226/226] Merge remote-tracking branch 'origin/gnome-3-20' into wip/rancell/apt
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/apt: 226/226] Merge remote-tracking branch 'origin/gnome-3-20' into wip/rancell/apt
- Date: Fri, 3 Feb 2017 02:15:55 +0000 (UTC)
commit f8e36e8afdf204671907a3192245733337ac5fd6
Merge: a0982bb a467e59
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Feb 3 15:14:47 2017 +1300
Merge remote-tracking branch 'origin/gnome-3-20' into wip/rancell/apt
RELEASE | 6 +-
configure.ac | 24 +-
contrib/gnome-software.spec.in | 2 +
data/Makefile.am | 7 +-
data/appdata/org.gnome.Software.appdata.xml.in | 69 +
data/org.gnome.software.gschema.xml | 2 +-
data/upgrade-bg.png | Bin 0 -> 308691 bytes
doc/kudos.md | 42 +-
doc/update-fedora-tagger.sh | 1 -
po/LINGUAS | 3 +
po/POTFILES.in | 15 +-
po/ar.po | 48 +
po/ca.po | 48 +
po/cs.po | 48 +
po/de.po | 48 +
po/el.po | 434 ++-
po/en_GB.po | 48 +
po/eo.po | 48 +
po/es.po | 49 +
po/fi.po | 384 ++-
po/fr.po | 48 +
po/fur.po | 2886 ++++++++++++++
po/gd.po | 1730 ++++++---
po/gl.po | 48 +
po/he.po | 48 +
po/hr.po | 2972 ++++++++++++++
po/hu.po | 49 +
po/ja.po | 664 ++--
po/lt.po | 48 +
po/lv.po | 402 +-
po/nb.po | 457 ++--
po/oc.po | 4094 +++++++++++++-------
po/pa.po | 48 +
po/pl.po | 462 ++-
po/pt.po | 1696 +++++----
po/pt_BR.po | 103 +-
po/ru.po | 130 +-
po/sk.po | 48 +
po/sl.po | 1651 +++++---
po/sr.po | 64 +-
po/sr latin po | 48 +
po/sv.po | 48 +
po/tg.po | 2743 +++++++++++++
po/th.po | 1184 ++++---
po/tr.po | 459 ++-
po/zh_CN.po | 1933 +++++++---
po/zh_TW.po | 103 +-
src/Makefile.am | 35 +-
src/gnome-software-service.desktop.in | 2 +-
src/gnome-software.gresource.xml | 19 +-
src/gs-app-folder-dialog.c | 34 +-
...pp-folder-dialog.ui => gs-app-folder-dialog.ui} | 0
src/gs-app-row.c | 18 +-
src/gs-app-tile.c | 2 +-
src/{app-tile.ui => gs-app-tile.ui} | 0
src/gs-app.c | 417 ++-
src/gs-app.h | 25 +-
src/gs-application.c | 20 +-
src/gs-auth-dialog.c | 354 ++
src/gs-auth-dialog.h | 45 +
src/gs-auth-dialog.ui | 359 ++
src/gs-auth.c | 697 ++++
src/gs-auth.h | 134 +
src/gs-category-tile.c | 2 +-
src/{category-tile.ui => gs-category-tile.ui} | 0
src/gs-category.c | 3 +
src/gs-cmd.c | 30 +-
src/gs-dbus-helper.c | 3 +-
src/gs-feature-tile.c | 2 +-
src/{feature-tile.ui => gs-feature-tile.ui} | 0
src/{menus.ui => gs-menus.ui} | 0
src/gs-page.c | 133 +-
src/gs-plugin-loader-sync.c | 1 -
src/gs-plugin-loader.c | 714 +++--
src/gs-plugin-loader.h | 20 +-
src/gs-plugin.c | 168 +-
src/gs-plugin.h | 91 +-
src/gs-popular-tile.c | 2 +-
src/{popular-tile.ui => gs-popular-tile.ui} | 0
src/gs-review-dialog.ui | 4 +-
src/gs-review-row.c | 10 +-
src/gs-review-row.ui | 103 +-
src/gs-screenshot-image.c | 12 +-
...{screenshot-image.ui => gs-screenshot-image.ui} | 0
src/gs-self-test.c | 863 ++---
src/gs-shell-details.c | 145 +-
src/gs-shell-details.ui | 8 +-
src/gs-shell-extras.c | 1 -
src/gs-shell-installed.c | 47 +-
src/gs-shell-moderate.c | 2 +-
src/gs-shell-overview.c | 8 +-
src/gs-shell-search.c | 2 +-
src/gs-shell-updates.c | 489 ++-
src/gs-shell-updates.ui | 48 +-
src/gs-shell.c | 35 +-
src/gs-star-widget.c | 10 +-
src/gs-update-dialog.c | 29 +-
src/gs-update-monitor.c | 136 +-
src/gs-upgrade-banner.c | 112 +-
src/gs-upgrade-banner.h | 7 +-
src/gs-upgrade-banner.ui | 127 +-
src/gs-utils.c | 331 ++-
src/gs-utils.h | 16 +
src/gtk-style-hc.css | 2 +-
src/gtk-style.css | 45 +-
src/plugins/Makefile.am | 61 +-
src/plugins/gs-appstream.c | 167 +-
src/{ => plugins}/gs-markdown.c | 0
src/{ => plugins}/gs-markdown.h | 0
src/plugins/gs-plugin-appstream.c | 128 +-
src/plugins/gs-plugin-dummy.c | 471 ++-
src/plugins/gs-plugin-epiphany.c | 69 +-
src/plugins/gs-plugin-fedora-distro-upgrades.c | 236 +-
src/plugins/gs-plugin-fedora-tagger-usage.c | 8 +-
src/plugins/gs-plugin-fwupd.c | 102 +-
src/plugins/gs-plugin-hardcoded-blacklist.c | 37 +-
src/plugins/gs-plugin-hardcoded-featured.c | 1 +
src/plugins/gs-plugin-icons.c | 63 +-
src/plugins/gs-plugin-limba.c | 70 +-
src/plugins/gs-plugin-menu-spec-refine.c | 50 +-
src/plugins/gs-plugin-moduleset.c | 8 +-
...s-plugin-xdg-app-reviews.c => gs-plugin-odrs.c} | 491 ++--
src/plugins/gs-plugin-packagekit-history.c | 19 +-
src/plugins/gs-plugin-packagekit-offline.c | 2 +-
src/plugins/gs-plugin-packagekit-origin.c | 57 +-
src/plugins/gs-plugin-packagekit-proxy.c | 53 +-
src/plugins/gs-plugin-packagekit-refine.c | 117 +-
src/plugins/gs-plugin-packagekit-refresh.c | 146 +-
src/plugins/gs-plugin-packagekit-upgrade.c | 141 +
src/plugins/gs-plugin-packagekit.c | 150 +-
src/plugins/gs-plugin-provenance.c | 110 +-
src/plugins/gs-plugin-self-test.c | 68 -
src/plugins/gs-plugin-systemd-updates.c | 64 +-
src/plugins/gs-plugin-ubuntu-reviews.c | 122 +-
src/plugins/gs-plugin-xdg-app.c | 250 +-
src/plugins/gs-self-test.c | 185 +-
src/plugins/menu-spec-common.c | 354 +-
src/plugins/menu-spec-common.h | 1 +
src/plugins/packagekit-common.c | 110 +-
src/plugins/packagekit-common.h | 3 +
140 files changed, 26080 insertions(+), 9248 deletions(-)
---
diff --cc src/plugins/Makefile.am
index 2675d38,1024bbd..bc13269
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@@ -131,32 -125,15 +130,34 @@@ libgs_plugin_xdg_app_la_SOURCES =
libgs_plugin_xdg_app_la_LIBADD = $(GS_PLUGIN_LIBS) $(XDG_APP_LIBS)
libgs_plugin_xdg_app_la_LDFLAGS = -module -avoid-version
libgs_plugin_xdg_app_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
+ endif
- libgs_plugin_xdg_app_reviews_la_SOURCES = gs-plugin-xdg-app-reviews.c
- libgs_plugin_xdg_app_reviews_la_LIBADD = $(GS_PLUGIN_LIBS) $(JSON_GLIB_LIBS)
- libgs_plugin_xdg_app_reviews_la_LDFLAGS = -module -avoid-version
- libgs_plugin_xdg_app_reviews_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
+ if HAVE_ODRS
+ libgs_plugin_odrs_la_SOURCES = gs-plugin-odrs.c
+ libgs_plugin_odrs_la_LIBADD = $(GS_PLUGIN_LIBS) $(JSON_GLIB_LIBS)
+ libgs_plugin_odrs_la_LDFLAGS = -module -avoid-version
+ libgs_plugin_odrs_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
endif
+if HAVE_APT
+ubuntu-unity-launcher-proxy.c ubuntu-unity-launcher-proxy.h: com.canonical.Unity.Launcher.xml Makefile
+ $(AM_V_GEN) gdbus-codegen --interface-prefix com.canonical.Unity.Launcher \
+ --generate-c-code ubuntu-unity-launcher-proxy \
+ --c-namespace UbuntuUnity \
+ --annotate 'com.canonical.Unity.Launcher' \
+ org.gtk.GDBus.C.Name \
+ Launcher \
+ $<
+
+libgs_plugin_apt_la_SOURCES = \
+ ubuntu-unity-launcher-proxy.c \
+ ubuntu-unity-launcher-proxy.h \
+ gs-plugin-apt.cc
+libgs_plugin_apt_la_LIBADD = $(GS_PLUGIN_LIBS) -lapt-pkg
+libgs_plugin_apt_la_LDFLAGS = -module -avoid-version
+libgs_plugin_apt_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
+endif
+
libgs_plugin_moduleset_la_SOURCES = \
gs-moduleset.c \
gs-moduleset.h \
diff --cc src/plugins/gs-plugin-appstream.c
index f3b94ec,6dd5413..40f0a49
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@@ -152,88 -147,11 +148,86 @@@ gs_plugin_appstream_get_origins_hash (G
return origins;
}
+#define APP_INFO_PATH "/var/lib/app-info"
+#define REFRESH_TIMEOUT 1000
+
+static gboolean
+needs_refresh (GsPlugin *plugin)
+{
+ g_autoptr(GDir) dir = g_dir_open (APP_INFO_PATH, 0, NULL);
+
+ return dir == NULL || g_dir_read_name (dir) == NULL;
+}
+
+static gboolean gs_plugin_appstream_startup (GsPlugin *plugin,
+ GError **error);
+
+static void
+refreshed_cb (GObject *source_object,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ GsPlugin *plugin = user_data;
+ GsPluginLoader *loader = GS_PLUGIN_LOADER (source_object);
+
+ if (gs_plugin_loader_refresh_finish (loader, res, NULL)) {
+ plugin->priv->done_init = FALSE;
+ gs_plugin_appstream_startup (plugin, NULL);
+ gs_plugin_updates_changed (plugin);
+ }
+}
+
+static void
+start_refresh (GsPlugin *plugin)
+{
+ GApplication *application;
+ GsPluginLoader *loader;
+
+ application = g_application_get_default ();
+
+ g_action_group_activate_action (G_ACTION_GROUP (application), "set-mode", g_variant_new_string
("updates"));
+
+ loader = gs_application_get_plugin_loader (GS_APPLICATION (application));
+
+ gs_plugin_loader_refresh_async (loader,
+ 0,
+ GS_PLUGIN_REFRESH_FLAGS_UPDATES,
+ NULL,
+ refreshed_cb,
+ plugin);
+}
+
+static gboolean
+ask_refresh (gpointer user_data)
+{
+ GApplication *application;
+ GtkWindow *parent;
+ GtkWidget *dialog;
+
+ application = g_application_get_default ();
+
+ parent = gtk_application_get_active_window (GTK_APPLICATION (application));
+
+ dialog = gtk_message_dialog_new (parent,
+ GTK_DIALOG_MODAL |
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO,
+ _("An update is needed to show all installable apps. Download
now?"));
+
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES)
+ start_refresh (user_data);
+
+ gtk_widget_destroy (dialog);
+
+ return G_SOURCE_REMOVE;
+}
+
/**
- * gs_plugin_appstream_startup:
- *
- * This must be called with plugin->priv->store_mutex held.
+ * gs_plugin_setup:
*/
- static gboolean
- gs_plugin_appstream_startup (GsPlugin *plugin, GError **error)
+ gboolean
+ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
{
AsApp *app;
GPtrArray *items;
@@@ -242,17 -161,7 +237,10 @@@
guint *perc;
guint i;
g_autoptr(GHashTable) origins = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* already done */
- if (plugin->priv->done_init)
- return TRUE;
-
- ptask = as_profile_start_literal (plugin->profile, "appstream::startup");
+ if (needs_refresh (plugin))
+ gdk_threads_add_timeout (REFRESH_TIMEOUT, ask_refresh, plugin);
+
/* Parse the XML */
if (g_getenv ("GNOME_SOFTWARE_PREFER_LOCAL") != NULL) {
as_store_set_add_flags (plugin->priv->store,
diff --cc src/plugins/gs-plugin-ubuntu-reviews.c
index 3af8c8c,1d17d53..0c7c7d4
--- a/src/plugins/gs-plugin-ubuntu-reviews.c
+++ b/src/plugins/gs-plugin-ubuntu-reviews.c
@@@ -652,27 -721,21 +721,20 @@@ refine_reviews (GsPlugin *plugin, GsAp
}
gboolean
- gs_plugin_refine (GsPlugin *plugin,
- GList **list,
- GsPluginRefineFlags flags,
- GCancellable *cancellable,
- GError **error)
+ gs_plugin_refine_app (GsPlugin *plugin,
+ GsApp *app,
+ GsPluginRefineFlags flags,
+ GCancellable *cancellable,
+ GError **error)
{
- GList *l;
- gboolean ret = TRUE;
-
- for (l = *list; l != NULL; l = l->next) {
- GsApp *app = GS_APP (l->data);
-
- if ((flags & (GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS)) != 0) {
- if (!refine_rating (plugin, app, error))
- return FALSE;
- }
- if ((flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEWS) != 0) {
- if (!refine_reviews (plugin, app, error))
- return FALSE;
- }
+ if ((flags & (GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING | GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS))
!= 0) {
+ if (!refine_rating (plugin, app, error))
+ return FALSE;
+ }
+ if ((flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEWS) != 0) {
+ if (!refine_reviews (plugin, app, error))
+ return FALSE;
}
- return ret;
+ return TRUE;
}
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]