summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2020-07-18 14:58:55 +0200
committerJens Georg <mail@jensge.org>2020-07-18 14:58:58 +0200
commitc8d5f7a95c435ddac4b757803acff06fa4ec95bb (patch)
tree068923eeaceace9ef63fe10427faf72c95c25d4c
parentf442fefc757cd1135f7bdab0897bf437c918e20b (diff)
downloadgupnp-tools-c8d5f7a95c435ddac4b757803acff06fa4ec95bb.tar.gz
av-cp: Fix stray dialog when cancelling search
-rw-r--r--src/av-cp/search-dialog.c6
1 files 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;