From 75e89ca629a0d908924ac5c857ed3408abbdae75 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Mon, 17 Dec 2018 22:07:40 +0100 Subject: caja-progress-info: new behavior with notifications: - remove the "Working..." notification - show the "Process completed" notification only if the progress window is inactive --- libcaja-private/caja-progress-info.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'libcaja-private') diff --git a/libcaja-private/caja-progress-info.c b/libcaja-private/caja-progress-info.c index a0e2fd7e..4e331f1c 100644 --- a/libcaja-private/caja-progress-info.c +++ b/libcaja-private/caja-progress-info.c @@ -623,14 +623,14 @@ update_status_icon_and_window (void) if (window_shown) { - gtk_widget_hide (get_progress_window ()); - - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_NOTIFICATIONS)) + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_NOTIFICATIONS) && + !gtk_window_is_active (GTK_WINDOW (get_progress_window ()))) { g_notification_set_body (notification, _("Process completed")); g_application_send_notification (g_application_get_default (), "caja", notification); } + gtk_widget_hide (get_progress_window ()); window_shown = FALSE; } } @@ -639,13 +639,6 @@ update_status_icon_and_window (void) gtk_widget_show_all (get_progress_window ()); gtk_status_icon_set_visible (status_icon, TRUE); gtk_window_present (GTK_WINDOW (get_progress_window ())); - - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_NOTIFICATIONS)) - { - g_notification_set_body (notification, _("Working...")); - g_application_send_notification (g_application_get_default (), "caja", notification); - } - window_shown = TRUE; } } -- cgit v1.2.1