@@ -595,7 +595,13 @@ update_status_icon_and_window (void)
595595{
596596 char * tooltip ;
597597 gboolean toshow ;
598- static gboolean window_shown = TRUE;
598+ GIcon * icon ;
599+ GNotification * notification ;
600+ static gboolean window_shown = FALSE;
601+
602+ notification = g_notification_new ("caja" );
603+ icon = g_themed_icon_new ("system-file-manager" );
604+ g_notification_set_icon (notification , icon );
599605
600606 tooltip = g_strdup_printf (ngettext ("%'d file operation active" ,
601607 "%'d file operations active" ,
@@ -607,17 +613,25 @@ update_status_icon_and_window (void)
607613
608614 toshow = (n_progress_ops > 0 );
609615
610- if (!toshow && window_shown )
616+ if (!toshow )
611617 {
612618 gtk_status_icon_set_visible (status_icon , FALSE);
613- gtk_widget_hide (get_progress_window ());
614- window_shown = FALSE;
619+
620+ if (window_shown )
621+ {
622+ gtk_widget_hide (get_progress_window ());
623+ g_notification_set_body (notification , _ ("Process completed" ));
624+ g_application_send_notification (g_application_get_default (), "caja" , notification );
625+ window_shown = FALSE;
626+ }
615627 }
616628 else if (toshow && !window_shown )
617629 {
618630 gtk_widget_show_all (get_progress_window ());
619631 gtk_status_icon_set_visible (status_icon , TRUE);
620632 gtk_window_present (GTK_WINDOW (get_progress_window ()));
633+ g_notification_set_body (notification , _ ("Working..." ));
634+ g_application_send_notification (g_application_get_default (), "caja" , notification );
621635 window_shown = TRUE;
622636 }
623637}
0 commit comments