static void
progress_ui_handler_update_notification_or_status (AthenaProgressUIHandler *self)
{
    if (server_has_persistence ()) {
        progress_ui_handler_update_notification (self);
    } else {
        progress_ui_handler_update_status_icon (self);
    }
}
static void
nautilus_progress_ui_handler_init (NautilusProgressUIHandler *self)
{
	self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, NAUTILUS_TYPE_PROGRESS_UI_HANDLER,
						  NautilusProgressUIHandlerPriv);

	self->priv->manager = nautilus_progress_info_manager_new ();
	g_signal_connect (self->priv->manager, "new-progress-info",
			  G_CALLBACK (new_progress_info_cb), self);

	self->priv->notification_supports_persistence = server_has_persistence ();
}
static gboolean
progress_window_delete_event (GtkWidget *widget,
                              GdkEvent *event,
                              AthenaProgressUIHandler *self)
{
    gtk_widget_hide (widget);

    if (server_has_persistence ()) {
        progress_ui_handler_update_notification (self);
    } else {
        progress_ui_handler_update_status_icon (self);
    }

    return TRUE;
}
static void
progress_ui_handler_show_complete_notification (AthenaProgressUIHandler *self)
{
    NotifyNotification *complete_notification;

    /* don't display the notification if we'd be using a status icon */
    if (!server_has_persistence ()) {
        return;
    }

    complete_notification = notify_notification_new (_("File Operations"),
                            _("All file operations have been successfully completed"),
                            NULL);
    notify_notification_show (complete_notification, NULL);

    g_object_unref (complete_notification);
}