From 639c9028f8fd42c495296031e04e7b2117759d61 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Thu, 7 Jun 2018 12:15:41 +0200 Subject: caja-progress-info.c: avoid deprecated 'gtk_status_icon_get_visible' --- libcaja-private/caja-progress-info.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libcaja-private/caja-progress-info.c b/libcaja-private/caja-progress-info.c index 739c692b..0c4720a9 100644 --- a/libcaja-private/caja-progress-info.c +++ b/libcaja-private/caja-progress-info.c @@ -594,28 +594,31 @@ static void update_status_icon_and_window (void) { char *tooltip; - gboolean toshow, window_shown; + gboolean toshow; + static gboolean window_shown = TRUE; tooltip = g_strdup_printf (ngettext ("%'d file operation active", "%'d file operations active", n_progress_ops), n_progress_ops); + gtk_status_icon_set_tooltip_text (status_icon, tooltip); g_free (tooltip); toshow = (n_progress_ops > 0); - window_shown = gtk_status_icon_get_visible (status_icon); if (!toshow && window_shown) { gtk_status_icon_set_visible (status_icon, FALSE); gtk_widget_hide (get_progress_window ()); + window_shown = FALSE; } else if (toshow && !window_shown) { gtk_widget_show_all (get_progress_window ()); gtk_status_icon_set_visible (status_icon, TRUE); gtk_window_present (GTK_WINDOW (get_progress_window ())); + window_shown = TRUE; } } -- cgit v1.2.1