[gnome-software] Only show the app-row folders when in the installed panel
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Only show the app-row folders when in the installed panel
- Date: Mon, 11 Jul 2016 09:37:57 +0000 (UTC)
commit 7e27dedf8dd599fbf43505d76e3851176c203807
Author: Richard Hughes <richard hughsie com>
Date: Mon Jul 11 08:32:27 2016 +0100
Only show the app-row folders when in the installed panel
src/gs-app-row.c | 16 +++++++++++++---
src/gs-app-row.h | 2 ++
src/gs-shell-installed.c | 1 +
3 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index c7debf2..fd9d041 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -51,6 +51,7 @@ typedef struct
GtkWidget *box_sandboxed;
GtkWidget *image_sandboxed;
gboolean colorful;
+ gboolean show_folders;
gboolean show_codec;
gboolean show_update;
gboolean selectable;
@@ -251,7 +252,8 @@ gs_app_row_refresh (GsAppRow *app_row)
}
/* folders */
- use_folders = gs_utils_is_current_desktop ("GNOME") &&
+ use_folders = priv->show_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) {
@@ -636,8 +638,7 @@ gs_app_row_set_size_groups (GsAppRow *app_row,
}
void
-gs_app_row_set_colorful (GsAppRow *app_row,
- gboolean colorful)
+gs_app_row_set_colorful (GsAppRow *app_row, gboolean colorful)
{
GsAppRowPrivate *priv = gs_app_row_get_instance_private (app_row);
@@ -646,6 +647,15 @@ gs_app_row_set_colorful (GsAppRow *app_row,
}
void
+gs_app_row_set_show_folders (GsAppRow *app_row, gboolean show_folders)
+{
+ GsAppRowPrivate *priv = gs_app_row_get_instance_private (app_row);
+
+ priv->show_folders = show_folders;
+ gs_app_row_refresh (app_row);
+}
+
+void
gs_app_row_set_show_codec (GsAppRow *app_row, gboolean show_codec)
{
GsAppRowPrivate *priv = gs_app_row_get_instance_private (app_row);
diff --git a/src/gs-app-row.h b/src/gs-app-row.h
index 00d3f28..5842de7 100644
--- a/src/gs-app-row.h
+++ b/src/gs-app-row.h
@@ -44,6 +44,8 @@ void gs_app_row_refresh (GsAppRow *app_row);
void gs_app_row_unreveal (GsAppRow *app_row);
void gs_app_row_set_colorful (GsAppRow *app_row,
gboolean colorful);
+void gs_app_row_set_show_folders (GsAppRow *app_row,
+ gboolean show_folders);
void gs_app_row_set_show_codec (GsAppRow *app_row,
gboolean show_codec);
void gs_app_row_set_show_update (GsAppRow *app_row,
diff --git a/src/gs-shell-installed.c b/src/gs-shell-installed.c
index 34f333b..d9d0345 100644
--- a/src/gs-shell-installed.c
+++ b/src/gs-shell-installed.c
@@ -153,6 +153,7 @@ gs_shell_installed_add_app (GsShellInstalled *self, GsApp *app)
app_row = gs_app_row_new (app);
gs_app_row_set_colorful (GS_APP_ROW (app_row), FALSE);
+ gs_app_row_set_show_folders (GS_APP_ROW (app_row), TRUE);
g_signal_connect (app_row, "button-clicked",
G_CALLBACK (gs_shell_installed_app_remove_cb), self);
g_signal_connect_object (app, "notify::state",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]