[gnome-software] Show the menu category in the application details panel



commit a47ad1d315b1a710b341569991600392ed5d1f5b
Author: Richard Hughes <richard hughsie com>
Date:   Thu Oct 10 09:40:00 2013 +0100

    Show the menu category in the application details panel

 src/gs-shell-details.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 9fc92c4..62a9964 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -402,11 +402,17 @@ gs_shell_details_refresh_all (GsShellDetails *shell_details)
                g_free (size);
        }
 
-       /* FIXME: This isn't ready yet */
-       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "application_details_details_title"));
-       gtk_widget_set_visible (widget, FALSE);
-       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "grid_details_details"));
-       gtk_widget_set_visible (widget, FALSE);
+       /* set the category */
+       tmp = gs_app_get_menu_path (priv->app);
+       widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
+                                                    "label_details_category_value"));
+       if (tmp == NULL || tmp[0] == '\0') {
+               /* TRANSLATORS: this is the application isn't in any
+                * defined menu category */
+               gtk_label_set_label (GTK_LABEL (widget), _("None"));
+       } else {
+               gtk_label_set_label (GTK_LABEL (widget), tmp);
+       }
 
        /* make history button insensitive if there is none */
        history = gs_app_get_history (priv->app);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]