[gnome-software/wip/folders: 2/5] Show folder in installed list
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/folders: 2/5] Show folder in installed list
- Date: Mon, 4 Nov 2013 03:48:41 +0000 (UTC)
commit 1797713dacd9ce61e8d577b9167ce8216cb179e4
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Nov 3 01:03:50 2013 -0400
Show folder in installed list
src/app-widget.ui | 15 +++++++++++++++
src/gs-app-widget.c | 6 ++++++
src/gtk-style.css | 7 +++++++
3 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/app-widget.ui b/src/app-widget.ui
index c7ee9d8..1bdeb70 100644
--- a/src/app-widget.ui
+++ b/src/app-widget.ui
@@ -53,6 +53,21 @@
<property name="fill">False</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="folder_label">
+ <property name="visible">True</property>
+ <property name="xalign">0.0</property>
+ <property name="yalign">0.5</property>
+ <property name="halign">start</property>
+ <style>
+ <class name="folder-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/gs-app-widget.c b/src/gs-app-widget.c
index e39c8c4..10ad7cc 100644
--- a/src/gs-app-widget.c
+++ b/src/gs-app-widget.c
@@ -35,6 +35,7 @@ struct _GsAppWidgetPrivate
GtkWidget *name_box;
GtkWidget *name_label;
GtkWidget *version_label;
+ GtkWidget *folder_label;
GtkWidget *description_label;
GtkWidget *button_box;
GtkWidget *button;
@@ -108,6 +109,10 @@ gs_app_widget_refresh (GsAppWidget *app_widget)
gtk_label_set_label (GTK_LABEL (priv->version_label),
gs_app_get_version_ui (priv->app));
}
+ gtk_label_set_label (GTK_LABEL (priv->folder_label),
+ gs_app_get_folder (priv->app));
+ gtk_widget_set_visible (priv->folder_label,
+ gs_app_get_folder (priv->app) != NULL);
if (gs_app_get_pixbuf (priv->app))
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image),
gs_app_get_pixbuf (priv->app));
@@ -247,6 +252,7 @@ gs_app_widget_class_init (GsAppWidgetClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GsAppWidget, name_box);
gtk_widget_class_bind_template_child_private (widget_class, GsAppWidget, name_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppWidget, version_label);
+ gtk_widget_class_bind_template_child_private (widget_class, GsAppWidget, folder_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppWidget, description_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppWidget, button_box);
gtk_widget_class_bind_template_child_private (widget_class, GsAppWidget, button);
diff --git a/src/gtk-style.css b/src/gtk-style.css
index ef5f580..aef3909 100644
--- a/src/gtk-style.css
+++ b/src/gtk-style.css
@@ -61,6 +61,13 @@ GtkNotebook.main-notebook-software > GtkScrolledWindow {
text-shadow: none;
}
+.folder-label {
+ background-color: #999999;
+ border-radius: 5;
+ padding: 5;
+ color: white;
+}
+
.header-label {
font-size: 11px;
padding: 6px;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]