[gnome-software: 8/18] gs-details-page: Drop the updated label
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 8/18] gs-details-page: Drop the updated label
- Date: Wed, 4 Aug 2021 14:14:22 +0000 (UTC)
commit db0814e5ee66e24906385a4953b6f3c37d0b7509
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Jul 26 15:50:44 2021 +0100
gs-details-page: Drop the updated label
It seems to have been broken for a while (always shows ‘Never’) and
doesn’t fit in the new designs:
https://gitlab.gnome.org/Teams/Design/software-mockups/-/raw/master/adaptive/app-page-adaptive.png.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1111
src/gs-details-page.c | 59 --------------------------------------------------
src/gs-details-page.ui | 35 ------------------------------
2 files changed, 94 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index d828ee453..668e89add 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -127,8 +127,6 @@ struct _GsDetailsPage
GtkWidget *label_details_channel_value;
GtkWidget *label_details_origin_title;
GtkWidget *label_details_origin_value;
- GtkWidget *label_details_updated_title;
- GtkWidget *label_details_updated_value;
GtkWidget *label_failed;
GtkWidget *list_box_addons;
GtkWidget *list_box_version_history;
@@ -574,24 +572,6 @@ gs_details_page_set_description (GsDetailsPage *self, const gchar *tmp)
gtk_widget_set_visible (self->label_webapp_warning, gs_app_get_kind (self->app) ==
AS_COMPONENT_KIND_WEB_APP);
}
-static gboolean
-gs_details_page_history_cb (GtkLabel *label,
- gchar *uri,
- GsDetailsPage *self)
-{
- GtkWidget *dialog;
-
- dialog = gs_history_dialog_new ();
- gs_history_dialog_set_app (GS_HISTORY_DIALOG (dialog), self->app);
- gs_shell_modal_dialog_present (self->shell, GTK_WINDOW (dialog));
-
- /* just destroy */
- g_signal_connect_swapped (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), dialog);
-
- return TRUE;
-}
-
static gboolean
app_origin_equal (GsApp *a,
GsApp *b)
@@ -1014,11 +994,9 @@ update_action_row_from_link (HdyActionRow *row,
static void
gs_details_page_refresh_all (GsDetailsPage *self)
{
- GsAppList *history;
g_autoptr(GIcon) icon = NULL;
GList *addons;
const gchar *tmp;
- guint64 updated;
g_autofree gchar *origin = NULL;
g_autoptr(GPtrArray) version_history = NULL;
guint icon_size;
@@ -1127,38 +1105,6 @@ gs_details_page_refresh_all (GsDetailsPage *self)
gtk_widget_set_visible (self->version_history_button, version_history != NULL && version_history->len
1);
- /* set the updated date */
- updated = gs_app_get_install_date (self->app);
- if (updated == GS_APP_INSTALL_DATE_UNSET) {
- gtk_widget_set_visible (self->label_details_updated_title, FALSE);
- gtk_widget_set_visible (self->label_details_updated_value, FALSE);
- } else if (updated == GS_APP_INSTALL_DATE_UNKNOWN) {
- /* TRANSLATORS: this is where the updated date is not known */
- gtk_label_set_label (GTK_LABEL (self->label_details_updated_value), C_("updated", "Never"));
- gtk_widget_set_visible (self->label_details_updated_title, TRUE);
- gtk_widget_set_visible (self->label_details_updated_value, TRUE);
- } else {
- g_autoptr(GDateTime) dt = NULL;
- g_autofree gchar *updated_str = NULL;
- dt = g_date_time_new_from_unix_utc ((gint64) updated);
- updated_str = g_date_time_format (dt, "%x");
-
- history = gs_app_get_history (self->app);
-
- if (gs_app_list_length (history) == 0) {
- gtk_label_set_label (GTK_LABEL (self->label_details_updated_value), updated_str);
- } else {
- GString *url;
-
- url = g_string_new (NULL);
- g_string_printf (url, "<a href=\"show-history\">%s</a>", updated_str);
- gtk_label_set_markup (GTK_LABEL (self->label_details_updated_value), url->str);
- g_string_free (url, TRUE);
- }
- gtk_widget_set_visible (self->label_details_updated_title, TRUE);
- gtk_widget_set_visible (self->label_details_updated_value, TRUE);
- }
-
/* set the origin */
origin = g_strdup (gs_app_get_origin_hostname (self->app));
if (origin == NULL)
@@ -2190,9 +2136,6 @@ gs_details_page_setup (GsPage *page,
g_signal_connect (self->button_more_reviews, "clicked",
G_CALLBACK (gs_details_page_more_reviews_button_cb),
self);
- g_signal_connect (self->label_details_updated_value, "activate-link",
- G_CALLBACK (gs_details_page_history_cb),
- self);
g_signal_connect (self->button_details_launch, "clicked",
G_CALLBACK (gs_details_page_app_launch_button_cb),
self);
@@ -2404,8 +2347,6 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_channel_value);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_origin_title);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_origin_value);
- gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_updated_title);
- gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_details_updated_value);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_failed);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, list_box_addons);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, list_box_version_history);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index c5fe8d78d..ad80b04ac 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -839,41 +839,6 @@
</packing>
</child>
- <child>
- <object class="GtkLabel" id="label_details_updated_title">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Updated</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="vexpand">True</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_details_updated_value">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="label">May 12, 2012</property>
- <property name="selectable">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <accessibility>
- <relation type="labelled-by" target="label_details_updated_title"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
-
<child>
<object class="GtkLabel" id="label_details_origin_title">
<property name="visible">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]