[gnome-software/wip/hughsie/sandbox-ui: 7/7] Never show the folder name in the search results
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/sandbox-ui: 7/7] Never show the folder name in the search results
- Date: Thu, 7 Jul 2016 19:43:25 +0000 (UTC)
commit e01ca33338db8c55d5e0b3a211b331562245e2d4
Author: Richard Hughes <richard hughsie com>
Date: Thu Jul 7 13:55:11 2016 +0100
Never show the folder name in the search results
It's just not helpful, and visually distracting.
src/gs-app-row.c | 25 -------------------------
src/gs-app-row.ui | 16 ----------------
2 files changed, 0 insertions(+), 41 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 92a92eb..4069267 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -29,7 +29,6 @@
#include "gs-star-widget.h"
#include "gs-progress-button.h"
#include "gs-common.h"
-#include "gs-folders.h"
typedef struct
{
@@ -39,7 +38,6 @@ typedef struct
GtkWidget *name_label;
GtkWidget *version_label;
GtkWidget *star;
- GtkWidget *folder_label;
GtkWidget *description_label;
GtkWidget *button_box;
GtkWidget *button;
@@ -158,7 +156,6 @@ gs_app_row_refresh (GsAppRow *app_row)
const gchar *tmp;
gboolean missing_search_result;
gboolean show_nonfree = FALSE;
- gboolean use_folders = FALSE;
if (priv->app == NULL)
return;
@@ -290,27 +287,6 @@ gs_app_row_refresh (GsAppRow *app_row)
gs_app_get_version_ui (priv->app));
}
- 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;
- const gchar *folder;
- folders = gs_folders_get ();
- folder = gs_folders_get_app_folder (folders, gs_app_get_id (priv->app), gs_app_get_categories
(priv->app));
- if (folder)
- folder = gs_folders_get_folder_name (folders, folder);
-
- /* we overwrite this for some apps */
- if (folder == NULL)
- folder = gs_app_get_metadata_item (priv->app, "X-XdgApp-Tags");
-
- gtk_label_set_label (GTK_LABEL (priv->folder_label), folder);
- gtk_widget_set_visible (priv->folder_label, folder != NULL);
- }
-
if (gs_app_get_pixbuf (priv->app) != NULL)
gs_image_set_from_pixbuf (GTK_IMAGE (priv->image),
gs_app_get_pixbuf (priv->app));
@@ -606,7 +582,6 @@ gs_app_row_class_init (GsAppRowClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, name_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, version_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, star);
- gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, folder_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, description_label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, button_box);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, button);
diff --git a/src/gs-app-row.ui b/src/gs-app-row.ui
index 1177cee..91a4daa 100644
--- a/src/gs-app-row.ui
+++ b/src/gs-app-row.ui
@@ -80,22 +80,6 @@
</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>
- <property name="ellipsize">end</property>
- <style>
- <class name="folder-label"/>
- </style>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label_origin">
<property name="visible">True</property>
<property name="xalign">0.0</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]