## IO error info bars

IO error info bars — Verbose error reporting for file I/O operations

## Functions

TeplInfoBar * | tepl_io_error_info_bar_file_already_open ()
TeplInfoBar * | tepl_io_error_info_bar_cant_create_backup ()
TeplInfoBar * | tepl_io_error_info_bar_externally_modified ()
TeplInfoBar * | tepl_io_error_info_bar_saving_externally_modified ()
TeplInfoBar * | tepl_io_error_info_bar_invalid_characters ()

## Includes

    #include <tepl/tepl.h>

## Description

Verbose error reporting for file I/O operations.

## Functions

### tepl_io_error_info_bar_file_already_open ()

    TeplInfoBar *
    tepl_io_error_info_bar_file_already_open
                                   (GFile *location);

Creates a warning about `location` being already open in another window, offering two possible actions:

- Edit anyway: `GTK_RESPONSE_YES`.

- Don't edit: `GTK_RESPONSE_CANCEL`.

#### Parameters

location | the GFile already open in another window. |

#### Returns

the newly created TeplInfoBar.

[transfer floating]

Since: 5.0

### tepl_io_error_info_bar_cant_create_backup ()

    TeplInfoBar *
    tepl_io_error_info_bar_cant_create_backup
                                   (GFile *location,
                                    const GError *error);

When a `G_IO_ERROR_CANT_CREATE_BACKUP` error occurs while saving `location` , offer two possible actions:

- Save anyway: `GTK_RESPONSE_YES`.

- Don't save: `GTK_RESPONSE_CANCEL`.

#### Parameters

location | the GFile for which the backup failed to be created. |
error | must be a `G_IO_ERROR_CANT_CREATE_BACKUP`. |

#### Returns

the newly created TeplInfoBar.

[transfer floating]

Since: 5.0

### tepl_io_error_info_bar_externally_modified ()

    TeplInfoBar *
    tepl_io_error_info_bar_externally_modified
                                   (GFile *location,
                                    gboolean document_modified);

Creates a warning about `location` having changed on disk. The possible actions:

- Depending on `document_modified` , "Reload" or "Drop changes and reload": `GTK_RESPONSE_OK`.

- Ignore: `GTK_RESPONSE_CLOSE`.

#### Parameters

location | the GFile for which there has been an external modification. |
document_modified | whether the document (e.g. the GtkTextBuffer) has unsaved modifications. |

#### Returns

the newly created TeplInfoBar.

[transfer floating]

Since: 5.0

### tepl_io_error_info_bar_saving_externally_modified ()

    TeplInfoBar *
    tepl_io_error_info_bar_saving_externally_modified
                                   (GFile *location);

When attempting to save `location` , creates a warning about `location` having changed on disk. The possible actions:

- Save anyway: `GTK_RESPONSE_YES`.

- Don't save: `GTK_RESPONSE_CANCEL`.

#### Parameters

location | a GFile. |

#### Returns

the newly created TeplInfoBar.

[transfer floating]

Since: 6.4

### tepl_io_error_info_bar_invalid_characters ()

    TeplInfoBar *
    tepl_io_error_info_bar_invalid_characters
                                   (GFile *location);

For file saving, creates a warning about invalid characters that can corrupt the file. Possible actions:

- Save anyway: `GTK_RESPONSE_YES`.

- Don't save: `GTK_RESPONSE_CANCEL`.

#### Parameters

location | where to save the document. |

#### Returns

the newly created TeplInfoBar.

[transfer floating]

Since: 5.0