Skip to content

Commit 639c902

Browse files
sc0wlukefromdc
authored andcommitted
caja-progress-info.c: avoid deprecated 'gtk_status_icon_get_visible'
1 parent e7942e9 commit 639c902

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libcaja-private/caja-progress-info.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,28 +594,31 @@ static void
594594
update_status_icon_and_window (void)
595595
{
596596
char *tooltip;
597-
gboolean toshow, window_shown;
597+
gboolean toshow;
598+
static gboolean window_shown = TRUE;
598599

599600
tooltip = g_strdup_printf (ngettext ("%'d file operation active",
600601
"%'d file operations active",
601602
n_progress_ops),
602603
n_progress_ops);
604+
603605
gtk_status_icon_set_tooltip_text (status_icon, tooltip);
604606
g_free (tooltip);
605607

606608
toshow = (n_progress_ops > 0);
607-
window_shown = gtk_status_icon_get_visible (status_icon);
608609

609610
if (!toshow && window_shown)
610611
{
611612
gtk_status_icon_set_visible (status_icon, FALSE);
612613
gtk_widget_hide (get_progress_window ());
614+
window_shown = FALSE;
613615
}
614616
else if (toshow && !window_shown)
615617
{
616618
gtk_widget_show_all (get_progress_window ());
617619
gtk_status_icon_set_visible (status_icon, TRUE);
618620
gtk_window_present (GTK_WINDOW (get_progress_window ()));
621+
window_shown = TRUE;
619622
}
620623
}
621624

0 commit comments

Comments
 (0)