Commit 41be27e9 authored by Adrien Plazas's avatar Adrien Plazas

Merge branch 'librem5-3-36-1' into pureos-3-36-1

parents 316344bd 6836920f
......@@ -106,6 +106,7 @@ gmodule = dependency('gmodule-2.0')
goa = dependency('goa-1.0')
gtk = dependency('gtk+-3.0', version : '>= 3.22.4')
glib = dependency('glib-2.0', version : '>= 2.55.0')
libhandy = dependency('libhandy-1', version: '>= 1.0.0')
json_glib = dependency('json-glib-1.0', version : '>= 1.2.0')
libm = cc.find_library('m', required: false)
libsoup = dependency('libsoup-2.4', version : '>= 2.52.0')
......
......@@ -38,4 +38,7 @@
<file>gtk-style.css</file>
<file>gtk-style-hc.css</file>
</gresource>
<gresource prefix="/org/gnome/Software/icons/hicolor/scalable/status">
<file preprocess="xml-stripblanks">navigate-symbolic.svg</file>
</gresource>
</gresources>
This diff is collapsed.
......@@ -32,6 +32,9 @@ typedef struct
GtkWidget *description_label;
GtkWidget *button_box;
GtkWidget *button;
GtkWidget *button_stack;
GtkWidget *button_image;
GtkWidget *button_spinner;
GtkWidget *spinner;
GtkWidget *label;
GtkWidget *label_warning;
......@@ -115,12 +118,18 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
if (missing_search_result) {
/* TRANSLATORS: this is a button next to the search results that
* allows the application to be easily installed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Visit website"));
gtk_stack_set_visible_child (GTK_STACK (priv->button_stack), priv->button_image);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->button_image),
"web-browser-symbolic",
GTK_ICON_SIZE_BUTTON);
} else {
/* TRANSLATORS: this is a button next to the search results that
* allows the application to be easily installed.
* The ellipsis indicates that further steps are required */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Install…"));
gtk_stack_set_visible_child (GTK_STACK (priv->button_stack), priv->button_image);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->button_image),
"system-software-install-symbolic",
GTK_ICON_SIZE_BUTTON);
}
break;
case AS_APP_STATE_QUEUED_FOR_INSTALL:
......@@ -134,18 +143,27 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
gtk_widget_set_visible (priv->button, TRUE);
/* TRANSLATORS: this is a button next to the search results that
* allows the application to be easily installed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Install"));
gtk_stack_set_visible_child (GTK_STACK (priv->button_stack), priv->button_image);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->button_image),
"system-software-install-symbolic",
GTK_ICON_SIZE_BUTTON);
break;
case AS_APP_STATE_UPDATABLE_LIVE:
gtk_widget_set_visible (priv->button, TRUE);
if (priv->show_update) {
/* TRANSLATORS: this is a button in the updates panel
* that allows the app to be easily updated live */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Update"));
gtk_stack_set_visible_child (GTK_STACK (priv->button_stack), priv->button_image);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->button_image),
"software-update-available-symbolic",
GTK_ICON_SIZE_BUTTON);
} else {
/* TRANSLATORS: this is a button next to the search results that
* allows the application to be easily removed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Remove"));
gtk_stack_set_visible_child (GTK_STACK (priv->button_stack), priv->button_image);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->button_image),
"edit-delete-symbolic",
GTK_ICON_SIZE_BUTTON);
}
break;
case AS_APP_STATE_UPDATABLE:
......@@ -154,19 +172,24 @@ gs_app_row_refresh_button (GsAppRow *app_row, gboolean missing_search_result)
gtk_widget_set_visible (priv->button, TRUE);
/* TRANSLATORS: this is a button next to the search results that
* allows the application to be easily removed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Remove"));
gtk_stack_set_visible_child (GTK_STACK (priv->button_stack), priv->button_image);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->button_image),
"edit-delete-symbolic",
GTK_ICON_SIZE_BUTTON);
break;
case AS_APP_STATE_INSTALLING:
gtk_widget_set_visible (priv->button, TRUE);
/* TRANSLATORS: this is a button next to the search results that
* shows the status of an application being installed */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Installing"));
gtk_stack_set_visible_child (GTK_STACK (priv->button_stack), priv->button_spinner);
gtk_spinner_start (GTK_SPINNER (priv->button_spinner));
break;
case AS_APP_STATE_REMOVING:
gtk_widget_set_visible (priv->button, TRUE);
/* TRANSLATORS: this is a button next to the search results that
* shows the status of an application being erased */
gtk_button_set_label (GTK_BUTTON (priv->button), _("Removing"));
gtk_stack_set_visible_child (GTK_STACK (priv->button_stack), priv->button_spinner);
gtk_spinner_start (GTK_SPINNER (priv->button_spinner));
break;
default:
break;
......@@ -604,6 +627,9 @@ gs_app_row_class_init (GsAppRowClass *klass)
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);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, button_stack);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, button_image);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, button_spinner);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, spinner);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, label);
gtk_widget_class_bind_template_child_private (widget_class, GsAppRow, label_warning);
......@@ -648,7 +674,6 @@ gs_app_row_set_size_groups (GsAppRow *app_row,
gtk_size_group_add_widget (image, priv->image);
gtk_size_group_add_widget (name, priv->name_box);
gtk_size_group_add_widget (desc, priv->description_box);
gtk_size_group_add_widget (button, priv->button);
}
void
......
......@@ -7,16 +7,24 @@
<class name="list-box-app-row"/>
</style>
<child>
<object class="GtkBox" id="box">
<object class="GtkBox" id="vbox">
<property name="visible">True</property>
<property name="margin_top">16</property>
<property name="margin_bottom">16</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="spacing">16</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="spacing">12</property>
<child>
<object class="GtkImage" id="image">
<property name="visible">True</property>
<property name="pixel_size">64</property>
<property name="margin_start">24</property>
<property name="margin_start">12</property>
<property name="valign">center</property>
</object>
</child>
......@@ -24,14 +32,12 @@
<object class="GtkBox" id="name_box">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin-start">12</property>
<property name="spacing">6</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel" id="name_label">
<property name="visible">True</property>
<property name="wrap">True</property>
<property name="max_width_chars">20</property>
<property name="xalign">0.0</property>
<property name="yalign">0.5</property>
<property name="ellipsize">end</property>
......@@ -85,6 +91,90 @@
</child>
</object>
</child>
<child>
<object class="GtkBox" id="vertical_box">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="halign">center</property>
<property name="valign">center</property>
<child>
<object class="GtkBox" id="button_box">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="halign">end</property>
<property name="valign">center</property>
<child>
<object class="GsProgressButton" id="button">
<property name="visible">False</property>
<style>
<class name="image-button"/>
</style>
<child>
<object class="GtkStack" id="button_stack">
<property name="visible">True</property>
<property name="transition-type">crossfade</property>
<child>
<object class="GtkImage" id="button_image">
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkSpinner" id="button_spinner">
<property name="visible">True</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkSpinner" id="spinner">
<property name="visible">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="halign">end</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label">
<property name="visible">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="halign">end</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="label_app_size">
<property name="visible">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<property name="label">150 MB</property>
<property name="margin-top">6</property>
<style>
<class name="app-row-app-size"/>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="description_box">
<property name="visible">True</property>
......@@ -98,8 +188,6 @@
<property name="visible">True</property>
<property name="valign">start</property>
<property name="vexpand">True</property>
<property name="margin_start">24</property>
<property name="margin_end">24</property>
<property name="wrap">True</property>
<property name="wrap-mode">word-char</property>
<property name="ellipsize">end</property>
......@@ -185,72 +273,6 @@
</child>
</object>
</child>
<child>
<object class="GtkBox" id="vertical_box">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin-right">6</property>
<child>
<object class="GtkBox" id="button_box">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="halign">end</property>
<property name="valign">center</property>
<child>
<object class="GsProgressButton" id="button">
<property name="visible">False</property>
<property name="width_request">100</property>
<property name="halign">end</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkSpinner" id="spinner">
<property name="visible">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="halign">end</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label">
<property name="visible">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="halign">end</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkLabel" id="label_app_size">
<property name="visible">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<property name="label">150 MB</property>
<property name="margin-top">6</property>
<style>
<class name="app-row-app-size"/>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</template>
......
......@@ -15,6 +15,7 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <gio/gdesktopappinfo.h>
#include <handy.h>
#include <libsoup/soup.h>
#ifdef GDK_WINDOWING_X11
......@@ -948,6 +949,8 @@ gs_application_startup (GApplication *application)
GsApplication *app = GS_APPLICATION (application);
G_APPLICATION_CLASS (gs_application_parent_class)->startup (application);
hdy_init ();
gs_application_add_wrapper_actions (application);
g_action_map_add_action_entries (G_ACTION_MAP (application),
......@@ -972,6 +975,9 @@ gs_application_startup (GApplication *application)
gs_folders_convert ();
gs_application_update_software_sources_presence (application);
gtk_icon_theme_add_resource_path (gtk_icon_theme_get_default (),
"/org/gnome/Software/icons/hicolor");
}
static void
......
......@@ -104,16 +104,22 @@
<property name="margin_start">24</property>
<property name="margin_end">24</property>
<property name="margin_top">36</property>
<property name="spacing">9</property>
<property name="row_spacing">12</property>
<property name="column_spacing">9</property>
<child>
<object class="GtkLabel" id="subcats_filter_label">
<property name="visible">True</property>
<property name="label" translatable="yes" comments="TRANSLATORS: This is a label for the category filter drop down, which all together can read e.g. 'Show Vector Graphics'.">Show</property>
<property name="margin_start">2</property>
<property name="halign">end</property>
<accessibility>
<relation target="subcats_filter_button" type="label-for"/>
</accessibility>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkMenuButton" id="subcats_filter_button">
......@@ -122,7 +128,6 @@
<property name="receives_default">True</property>
<property name="relief">normal</property>
<property name="popover">categories_popover</property>
<property name="margin_end">24</property>
<child internal-child="accessible">
<object class="AtkObject">
<property name="accessible-name" translatable="yes">Subcategories filter menu</property>
......@@ -137,7 +142,9 @@
<child>
<object class="GtkLabel" id="subcats_filter_button_label">
<property name="visible">True</property>
<property name="ellipsize">end</property>
<property name="xalign">0.0</property>
<property name="hexpand">True</property>
</object>
</child>
<child>
......@@ -152,16 +159,25 @@
<class name="text-button"/>
</style>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="subcats_sort_label">
<property name="visible">True</property>
<property name="label" translatable="yes" comments="TRANSLATORS: This is a label for the category sort drop down, which all together can read e.g. 'Sort Top Rated'.">Sort</property>
<property name="margin_start">2</property>
<property name="halign">end</property>
<accessibility>
<relation target="subcats_sort_button" type="label-for"/>
</accessibility>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkMenuButton" id="subcats_sort_button">
......@@ -184,7 +200,9 @@
<child>
<object class="GtkLabel" id="subcats_sort_button_label">
<property name="visible">True</property>
<property name="ellipsize">end</property>
<property name="xalign">0.0</property>
<property name="hexpand">True</property>
</object>
</child>
<child>
......@@ -202,14 +220,18 @@
<class name="text-button"/>
</style>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkFlowBox" id="category_detail_box">
<property name="margin_start">24</property>
<property name="margin_end">24</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">14</property>
<property name="margin_bottom">21</property>
<property name="halign">fill</property>
......@@ -237,20 +259,4 @@
</object>
</child>
</template>
<object class="GtkSizeGroup">
<property name="ignore-hidden">False</property>
<property name="mode">horizontal</property>
<widgets>
<widget name="subcats_filter_button_label"/>
<widget name="popover_filter_box"/>
</widgets>
</object>
<object class="GtkSizeGroup">
<property name="ignore-hidden">False</property>
<property name="mode">horizontal</property>
<widgets>
<widget name="subcats_sort_button_label"/>
<widget name="sorting_popover_box"/>
</widgets>
</object>
</interface>
......@@ -21,7 +21,6 @@
#include "gs-app-addon-row.h"
#include "gs-history-dialog.h"
#include "gs-origin-popover-row.h"
#include "gs-screenshot-image.h"
#include "gs-star-widget.h"
#include "gs-review-histogram.h"
#include "gs-review-dialog.h"
......@@ -66,10 +65,6 @@ struct _GsDetailsPage
GtkWidget *box_progress2;
GtkWidget *star;
GtkWidget *label_review_count;
GtkWidget *box_details_screenshot;
GtkWidget *box_details_screenshot_main;
GtkWidget *box_details_screenshot_scrolledwindow;
GtkWidget *box_details_screenshot_thumbnails;
GtkWidget *box_details_license_list;
GtkWidget *button_details_launch;
GtkWidget *button_details_add_shortcut;
......@@ -118,7 +113,6 @@ struct _GsDetailsPage
GtkWidget *label_licenses_intro;
GtkWidget *list_box_addons;
GtkWidget *box_reviews;
GtkWidget *box_details_screenshot_fallback;
GtkWidget *histogram;
GtkWidget *button_review;
GtkWidget *list_box_reviews;
......@@ -469,191 +463,6 @@ gs_details_page_notify_state_changed_cb (GsApp *app,
g_idle_add (gs_details_page_switch_to_idle, g_object_ref (self));
}
static void
gs_details_page_load_main_screenshot (GsDetailsPage *self,
AsScreenshot *screenshot)
{
GsScreenshotImage *ssmain;
g_autoptr(GList) children = NULL;
children = gtk_container_get_children (GTK_CONTAINER (self->box_details_screenshot_main));
ssmain = GS_SCREENSHOT_IMAGE (children->data);
gs_screenshot_image_set_screenshot (ssmain, screenshot);
gs_screenshot_image_load_async (ssmain, NULL);
}
static void
gs_details_page_screenshot_selected_cb (GtkListBox *list,
GtkListBoxRow *row,
GsDetailsPage *self)
{
GsScreenshotImage *ssthumb;
AsScreenshot *ss;
g_autoptr(GList) children = NULL;
if (row == NULL)
return;
ssthumb = GS_SCREENSHOT_IMAGE (gtk_bin_get_child (GTK_BIN (row)));
ss = gs_screenshot_image_get_screenshot (ssthumb);
gs_details_page_load_main_screenshot (self, ss);
}
static void
gs_details_page_refresh_screenshots (GsDetailsPage *self)
{
GPtrArray *screenshots;
AsScreenshot *ss;
GtkWidget *label;
GtkWidget *list;
GtkWidget *ssimg;
GtkWidget *main_screenshot = NULL;
guint i;
gboolean is_offline = !gs_plugin_loader_get_network_available (self->plugin_loader);
guint num_screenshots_loaded = 0;
/* reset the visibility of screenshots */
gtk_widget_show (self->box_details_screenshot);
/* treat screenshots differently */
if (gs_app_get_kind (self->app) == AS_APP_KIND_FONT) {
gs_container_remove_all (GTK_CONTAINER (self->box_details_screenshot_thumbnails));
gs_container_remove_all (GTK_CONTAINER (self->box_details_screenshot_main));
screenshots = gs_app_get_screenshots (self->app);
for (i = 0; i < screenshots->len; i++) {
ss = g_ptr_array_index (screenshots, i);
/* set caption */
label = gtk_label_new (as_screenshot_get_caption (ss, NULL));
g_object_set (label,
"xalign", 0.0,
"max-width-chars", 10,
"wrap", TRUE,
NULL);
gtk_container_add (GTK_CONTAINER (self->box_details_screenshot_main), label);
gtk_widget_set_visible (label, TRUE);
/* set images */
ssimg = gs_screenshot_image_new (self->session);
gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
640,
48);
gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), NULL);
gtk_container_add (GTK_CONTAINER (self->box_details_screenshot_main), ssimg);
gtk_widget_set_visible (ssimg, TRUE);
}
gtk_widget_set_visible (self->box_details_screenshot,
screenshots->len > 0);
gtk_widget_set_visible (self->box_details_screenshot_fallback,
screenshots->len == 0 && !is_offline);
return;
}
/* fallback warning */
screenshots = gs_app_get_screenshots (self->app);
switch (gs_app_get_kind (self->app)) {
case AS_APP_KIND_GENERIC:
case AS_APP_KIND_CODEC:
case AS_APP_KIND_ADDON:
case AS_APP_KIND_SOURCE:
case AS_APP_KIND_FIRMWARE:
case AS_APP_KIND_DRIVER:
case AS_APP_KIND_INPUT_METHOD:
case AS_APP_KIND_LOCALIZATION:
case AS_APP_KIND_RUNTIME:
gtk_widget_set_visible (self->box_details_screenshot_fallback, FALSE);
break;
default:
gtk_widget_set_visible (self->box_details_screenshot_fallback,
screenshots->len == 0 && !is_offline);
break;
}
/* reset screenshots */
gs_container_remove_all (GTK_CONTAINER (self->box_details_screenshot_main));
gs_container_remove_all (GTK_CONTAINER (self->box_details_screenshot_thumbnails));
list = gtk_list_box_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (list), "image-list");
gtk_widget_show (list);
gtk_widget_show (self->box_details_screenshot_scrolledwindow);
gtk_container_add (GTK_CONTAINER (self->box_details_screenshot_thumbnails), list);
for (i = 0; i < screenshots->len; i++) {
ss = g_ptr_array_index (screenshots, i);
/* we need to load the main screenshot only once if we're online
* but all times if we're offline (to check which are cached and
* hide those who aren't) */
if (is_offline || main_screenshot == NULL) {
GtkWidget *ssmain = gs_screenshot_image_new (self->session);
gtk_widget_set_can_focus (gtk_bin_get_child (GTK_BIN (ssmain)), FALSE);
gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssmain), ss);
gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssmain),
AS_IMAGE_NORMAL_WIDTH,
AS_IMAGE_NORMAL_HEIGHT);
gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssmain), NULL);
/* when we're offline, the load will be immediate, so we
* can check if it succeeded, and just skip it and its
* thumbnails otherwise */
if (is_offline &&
!gs_screenshot_image_is_showing (GS_SCREENSHOT_IMAGE (ssmain)))
continue;
/* only set the main_screenshot once */
if (main_screenshot == NULL) {
main_screenshot = ssmain;
gtk_box_pack_start (GTK_BOX (self->box_details_screenshot_main),
main_screenshot, FALSE, FALSE, 0);
gtk_widget_show (main_screenshot);
}
}
ssimg = gs_screenshot_image_new (self->session);
gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
AS_IMAGE_THUMBNAIL_WIDTH,
AS_IMAGE_THUMBNAIL_HEIGHT);
gtk_style_context_add_class (gtk_widget_get_style_context (ssimg),
"screenshot-image-thumb");
gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), NULL);
gtk_list_box_insert (GTK_LIST_BOX (list), ssimg, -1);
gtk_widget_set_visible (ssimg, TRUE);
++num_screenshots_loaded;
}
if (main_screenshot == NULL) {
gtk_widget_hide (self->box_details_screenshot);
return;
}
/* reload the main screenshot with a larger size if it's the only screenshot
* available */
if (num_screenshots_loaded == 1) {
gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (main_screenshot),
AS_IMAGE_LARGE_WIDTH,
AS_IMAGE_LARGE_HEIGHT);
gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (main_screenshot), NULL);
}
if (num_screenshots_loaded <= 1) {
gtk_widget_hide (self->box_details_screenshot_thumbnails);
return;
}
gtk_widget_show (self->box_details_screenshot_thumbnails);
gtk_list_box_set_selection_mode (GTK_LIST_BOX (list), GTK_SELECTION_BROWSE);
g_signal_connect (list, "row-selected",
G_CALLBACK (gs_details_page_screenshot_selected_cb),
self);
gtk_list_box_select_row (GTK_LIST_BOX (list),
gtk_list_box_get_row_at_index (GTK_LIST_BOX (list), 0));
}
static void
gs_details_page_website_cb (GtkWidget *widget, GsDetailsPage *self)
{
......@@ -1773,7 +1582,6 @@ gs_details_page_load_stage2 (GsDetailsPage *self)
/* update UI */
gs_details_page_set_state (self, GS_DETAILS_PAGE_STATE_READY);
gs_details_page_refresh_screenshots (self);
gs_details_page_refresh_addons (self);
gs_details_page_refresh_reviews (self);
gs_details_page_refresh_all (self);
......@@ -2698,10 +2506,6 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, box_progress2);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, star);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_review_count);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, box_details_screenshot);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, box_details_screenshot_main);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, box_details_screenshot_scrolledwindow);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, box_details_screenshot_thumbnails);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, box_details_license_list);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_launch);
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, button_details_add_shortcut);
......@@ -2748,7 +2552,6 @@ gs_details_page_class_init (GsDetailsPageClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsDetailsPage, label_failed);<