summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-progress-info.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-06-07 12:15:41 +0200
committerlukefromdc <[email protected]>2018-06-07 14:30:12 -0400
commit639c9028f8fd42c495296031e04e7b2117759d61 (patch)
tree726e628c1f11534f690851f3e41acd932983b416 /libcaja-private/caja-progress-info.c
parente7942e9bafbd5cbd47553402ba67e7232431d431 (diff)
downloadcaja-639c9028f8fd42c495296031e04e7b2117759d61.tar.bz2
caja-639c9028f8fd42c495296031e04e7b2117759d61.tar.xz
caja-progress-info.c: avoid deprecated 'gtk_status_icon_get_visible'
Diffstat (limited to 'libcaja-private/caja-progress-info.c')
-rw-r--r--libcaja-private/caja-progress-info.c7
1 files 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;
}
}