# API Breaks

## Gtef 1 -> Gtef 2

- The `GtefBuffer::cursor-moved` signal has been renamed to `GtefBuffer::gtef-cursor-moved`.

- The `GtefBuffer:title` property has been renamed to `GtefBuffer:gtef-title`.

## Gtef 2 -> Tepl 3

- The library has been renamed to Tepl (Text editor product line). So the namespace of the code has changed.

  The new version is Tepl 3 and not Tepl 1, to avoid confusion with the git tags (the git repository is still the same), since the repository already contains tags for versions 1 and 2.

- The TeplTab class has been revamped. The tepl_tab_new() function doesn't take a GtkWidget parameter anymore, a TeplView is created instead.

- The `TeplBuffer:tepl-title` property has been renamed to TeplBuffer:tepl-full-title, and `tepl_buffer_get_title()` has been renamed to tepl_buffer_get_full_title().

## Gtef 2 -> Amtk 3

- The classes and functions related to actions and menus have been moved to a new shared library called Amtk (Actions, Menus and Toolbars Kit), since it was not really related to text editors, it is more general. But Amtk is still developed inside the Tepl repository.

- The AmtkFactory class has been added, which replace `gtef_action_info_store_create_menu_item()` and removes the `GtefActionInfoStore:application` property.

- `gtef_action_info_central_store_get_instance()` has been renamed to amtk_action_info_central_store_get_singleton().

- amtk_application_window_connect_menu_to_statusbar() now takes a GtkMenuShell parameter instead of AmtkMenuShell.

## Tepl 3 -> Tepl 4

- Tepl 3 depended on GtkSourceView 3, Tepl 4 depends on GtkSourceView 4. So to be able to use Tepl 4, you need to port your code to GtkSourceView 4. Note that the GTK dependency is still GTK 3.

- The TeplTab::close-request signal has now a default object method handler.

## Tepl 4 -> Tepl 5

- The `TeplEncoding` class has been removed, as part of the beginning of a complete overhaul of the file loading and saving functionality.

- Start to rework the TeplFile, TeplFileLoader and TeplFileSaver classes. As such, there are some API breaks in those classes. And as a result, they currently contain less features as before, unfortunately.

- The TeplMetadataManager API has been re-worked.

- The `TeplFileMetadata` class has been replaced by TeplMetadata, the latter no longer depends on TeplFile.

- The `tepl_file_get_file_metadata()` function has been removed.

- The tepl_tab_load_file() function no longer loads the file metadata (but it was anyway an implementation detail).

- The `TeplAbstractFactoryVala` class has been removed, because it's possible to manually manage GObject references in Vala.

## Tepl 5 -> Tepl 6

- The tepl_info_bar_set_buttons_orientation() now takes a GtkInfoBar parameter, not a TeplInfoBar.

- The `tepl_info_bar_add_close_button()` function has been renamed to tepl_info_bar_setup_close_button().

- The `tepl_info_bar_add_icon()` function has been replaced by tepl_info_bar_set_icon_from_message_type().

- A `location` parameter has been added to the tepl_info_bar_add_content_widget() function.

## API breaks during Tepl 6

There are also ABI breaks not affecting the API, so just re-compiling the program is sufficient in that case.

Tepl 6.0 to Tepl 6.2:

- The `tepl_utils_override_font()` function has been renamed to tepl_utils_override_font_string().

Tepl 6.2 to Tepl 6.4:

- The `tepl_statusbar_*()` functions have been removed, you can use TeplLineColumnIndicator instead.

Tepl 6.4 to Tepl 6.6:

- Tepl now depends on libgedit-gtksourceview instead of GtkSourceView.

- The `TeplWidgetListItem` and `TeplWidgetListCategory` classes have been removed.

Tepl 6.6 to Tepl 6.8:

- The `TeplPanel` class has been renamed to TeplPanel1.

- The `TeplStack`, `TeplStackItem` and `TeplStackSwitcherMenu` classes have been removed. They are superseded by TeplPanel (and related classes and interfaces).

- The `TeplStatusbar` class has been removed, and is replaced by tepl_utils_setup_statusbar().

Tepl 6.8 to libgedit-tepl 6.10:

- Tepl has been renamed to libgedit-tepl.

- TeplFile now uses GflsUnsavedDocumentTitles. This affects the TeplFile:short-name property. Also, `tepl_file_set_untitled_file_callback()` and `TeplUntitledFileCallback` have been removed.