[gupnp-tools] av-cp: Fix stray dialog when cancelling search



commit c8d5f7a95c435ddac4b757803acff06fa4ec95bb
Author: Jens Georg <mail jensge org>
Date:   Sat Jul 18 14:58:55 2020 +0200

    av-cp: Fix stray dialog when cancelling search

 src/av-cp/search-dialog.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/av-cp/search-dialog.c b/src/av-cp/search-dialog.c
index 35d6f34..54d1eec 100644
--- a/src/av-cp/search-dialog.c
+++ b/src/av-cp/search-dialog.c
@@ -442,9 +442,11 @@ search_dialog_on_search_task_done (gpointer user_data)
         gtk_entry_set_progress_fraction (priv->search_dialog_entry, 0);
         gtk_widget_set_sensitive (GTK_WIDGET (priv->search_dialog_entry), TRUE);
 
-        /* Only show visible error if dialog is visible. If it's not visible,
-         * it's likely to be a cancelled error */
+        /* Only show visible error if dialog is visible. */
         if (priv->task->error != NULL &&
+            !g_error_matches (priv->task->error,
+                              G_IO_ERROR,
+                              G_IO_ERROR_CANCELLED) &&
             gtk_widget_is_visible (GTK_WIDGET (self))) {
                 GtkWidget *dialog = NULL;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]