Skip to content

Commit 75e89ca

Browse files
committed
caja-progress-info: new behavior with notifications:
- remove the "Working..." notification - show the "Process completed" notification only if the progress window is inactive
1 parent 08f479a commit 75e89ca

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

libcaja-private/caja-progress-info.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -623,14 +623,14 @@ update_status_icon_and_window (void)
623623

624624
if (window_shown)
625625
{
626-
gtk_widget_hide (get_progress_window ());
627-
628-
if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_NOTIFICATIONS))
626+
if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_NOTIFICATIONS) &&
627+
!gtk_window_is_active (GTK_WINDOW (get_progress_window ())))
629628
{
630629
g_notification_set_body (notification, _("Process completed"));
631630
g_application_send_notification (g_application_get_default (), "caja", notification);
632631
}
633632

633+
gtk_widget_hide (get_progress_window ());
634634
window_shown = FALSE;
635635
}
636636
}
@@ -639,13 +639,6 @@ update_status_icon_and_window (void)
639639
gtk_widget_show_all (get_progress_window ());
640640
gtk_status_icon_set_visible (status_icon, TRUE);
641641
gtk_window_present (GTK_WINDOW (get_progress_window ()));
642-
643-
if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_NOTIFICATIONS))
644-
{
645-
g_notification_set_body (notification, _("Working..."));
646-
g_application_send_notification (g_application_get_default (), "caja", notification);
647-
}
648-
649642
window_shown = TRUE;
650643
}
651644
}

0 commit comments

Comments
 (0)