[gnome-software] Do not show QT versions of applications where a GTK version is available
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not show QT versions of applications where a GTK version is available
- Date: Thu, 28 Aug 2014 15:00:26 +0000 (UTC)
commit d0bd3fff29dd79dfd0b93bbc09a4818f234687d3
Author: Richard Hughes <richard hughsie com>
Date: Thu Aug 28 15:57:35 2014 +0100
Do not show QT versions of applications where a GTK version is available
This only affects searching and GNOME users can still see the QT version in
'Installed' and 'Updates' if it is installed manually.
Apper (KDE) probably wants to do the same thing, but the other way around.
Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=735183
src/gs-plugin-loader.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 08eca51..76869e6 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -656,6 +656,22 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
}
/**
+ * gs_plugin_loader_filter_qt_for_gtk:
+ **/
+static gboolean
+gs_plugin_loader_filter_qt_for_gtk (GsApp *app, gpointer user_data)
+{
+ /* hide the QT versions in preference to the GTK ones */
+ if (g_strcmp0 (gs_app_get_id (app), "transmission-qt.desktop") == 0 ||
+ g_strcmp0 (gs_app_get_id (app), "hotot-qt.desktop") == 0) {
+ g_debug ("removing QT version of %s",
+ gs_plugin_loader_get_app_str (app));
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/**
* gs_plugin_loader_app_is_non_system:
**/
static gboolean
@@ -1596,6 +1612,7 @@ gs_plugin_loader_search_thread_cb (GTask *task,
/* filter package list */
gs_plugin_list_filter_duplicates (&state->list);
gs_plugin_list_filter (&state->list, gs_plugin_loader_app_is_valid, NULL);
+ gs_plugin_list_filter (&state->list, gs_plugin_loader_filter_qt_for_gtk, NULL);
gs_plugin_list_filter (&state->list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
if (g_settings_get_boolean (plugin_loader->priv->settings, "require-appdata")) {
gs_plugin_list_filter (&state->list,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]