@@ -595,7 +595,13 @@ update_status_icon_and_window (void)
595
595
{
596
596
char * tooltip ;
597
597
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 );
599
605
600
606
tooltip = g_strdup_printf (ngettext ("%'d file operation active" ,
601
607
"%'d file operations active" ,
@@ -607,17 +613,25 @@ update_status_icon_and_window (void)
607
613
608
614
toshow = (n_progress_ops > 0 );
609
615
610
- if (!toshow && window_shown )
616
+ if (!toshow )
611
617
{
612
618
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
+ }
615
627
}
616
628
else if (toshow && !window_shown )
617
629
{
618
630
gtk_widget_show_all (get_progress_window ());
619
631
gtk_status_icon_set_visible (status_icon , TRUE);
620
632
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 );
621
635
window_shown = TRUE;
622
636
}
623
637
}
0 commit comments