summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-12-17 22:07:40 +0100
committerZenWalker <[email protected]>2018-12-27 12:35:47 +0100
commit75e89ca629a0d908924ac5c857ed3408abbdae75 (patch)
tree8748d6f7a0ee50606a47fca824610e1e64b29d18
parent08f479a8540b60dccef47a2d30cb83deba54bdcd (diff)
downloadcaja-75e89ca629a0d908924ac5c857ed3408abbdae75.tar.bz2
caja-75e89ca629a0d908924ac5c857ed3408abbdae75.tar.xz
caja-progress-info: new behavior with notifications:
- remove the "Working..." notification - show the "Process completed" notification only if the progress window is inactive
-rw-r--r--libcaja-private/caja-progress-info.c13
1 files changed, 3 insertions, 10 deletions
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;
}
}