[epiphany] flatpak: Make download popover rows unselectable
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] flatpak: Make download popover rows unselectable
- Date: Tue, 21 Nov 2017 22:42:53 +0000 (UTC)
commit 6c30ecd09a899fb792b990d454709eb2ed663b4e
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Tue Nov 21 16:42:03 2017 -0600
flatpak: Make download popover rows unselectable
This avoids confusion caused by popover rows that look like they ought
to be selectable, but aren't really.
lib/widgets/ephy-downloads-popover.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/lib/widgets/ephy-downloads-popover.c b/lib/widgets/ephy-downloads-popover.c
index 3ebe9cf..b70c63f 100644
--- a/lib/widgets/ephy-downloads-popover.c
+++ b/lib/widgets/ephy-downloads-popover.c
@@ -74,8 +74,17 @@ static void
download_added_cb (EphyDownloadsPopover *popover,
EphyDownload *download)
{
+ GtkWidget *row;
GtkWidget *widget;
+ row = gtk_list_box_row_new ();
+ if (ephy_is_running_inside_flatpak ()) {
+ gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
+ gtk_list_box_row_set_selectable (GTK_LIST_BOX_ROW (row), FALSE);
+ }
+ gtk_list_box_prepend (GTK_LIST_BOX (popover->downloads_box), row);
+ gtk_widget_show (row);
+
widget = ephy_download_widget_new (download);
g_signal_connect_object (download, "completed",
G_CALLBACK (download_completed_cb),
@@ -83,7 +92,7 @@ download_added_cb (EphyDownloadsPopover *popover,
g_signal_connect_object (download, "error",
G_CALLBACK (download_failed_cb),
popover, G_CONNECT_SWAPPED);
- gtk_list_box_prepend (GTK_LIST_BOX (popover->downloads_box), widget);
+ gtk_container_add (GTK_CONTAINER (row), widget);
gtk_widget_show (widget);
}
@@ -194,6 +203,7 @@ ephy_downloads_popover_init (EphyDownloadsPopover *popover)
downloads = ephy_downloads_manager_get_downloads (manager);
for (l = downloads; l != NULL; l = g_list_next (l)) {
EphyDownload *download = (EphyDownload *)l->data;
+ GtkWidget *row;
GtkWidget *widget;
g_signal_connect_object (download, "completed",
@@ -203,8 +213,16 @@ ephy_downloads_popover_init (EphyDownloadsPopover *popover)
G_CALLBACK (download_failed_cb),
popover, G_CONNECT_SWAPPED);
+ row = gtk_list_box_row_new ();
+ if (ephy_is_running_inside_flatpak ()) {
+ gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
+ gtk_list_box_row_set_selectable (GTK_LIST_BOX_ROW (row), FALSE);
+ }
+ gtk_list_box_prepend (GTK_LIST_BOX (popover->downloads_box), row);
+ gtk_widget_show (row);
+
widget = ephy_download_widget_new (download);
- gtk_list_box_prepend (GTK_LIST_BOX (popover->downloads_box), widget);
+ gtk_container_add (GTK_CONTAINER (row), widget);
gtk_widget_show (widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]