[gnome-software] Don't show folders' names in the installed page if folders are not enabled
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Don't show folders' names in the installed page if folders are not enabled
- Date: Mon, 4 Jul 2016 12:51:07 +0000 (UTC)
commit 887ca3d3739c47fd387fc658ba7f7f3e21e8a80c
Author: Joaquim Rocha <jrocha endlessm com>
Date: Mon Jul 4 13:42:24 2016 +0100
Don't show folders' names in the installed page if folders are not enabled
src/gs-app-row.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index cbe0c01..cca5c5d 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -122,6 +122,7 @@ gs_app_row_refresh (GsAppRow *app_row)
GString *str = NULL;
gboolean missing_search_result;
gboolean show_nonfree = FALSE;
+ gboolean use_folders = FALSE;
if (priv->app == NULL)
return;
@@ -227,7 +228,10 @@ gs_app_row_refresh (GsAppRow *app_row)
gs_app_get_version_ui (priv->app));
}
- if (priv->show_update || priv->show_codec) {
+ use_folders = gs_utils_is_current_desktop ("GNOME") &&
+ g_settings_get_boolean (priv->settings, "show-folder-management");
+
+ if (!use_folders || priv->show_update || priv->show_codec) {
gtk_widget_hide (priv->folder_label);
} else {
g_autoptr(GsFolders) folders = NULL;
@@ -399,7 +403,8 @@ settings_changed_cb (GsAppRow *self,
const gchar *key,
gpointer data)
{
- if (g_strcmp0 (key, "show-nonfree-ui") == 0) {
+ if (g_strcmp0 (key, "show-nonfree-ui") == 0 ||
+ g_strcmp0 (key, "show-folder-management") == 0) {
gs_app_row_refresh (self);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]