EDataServer.SourceRegistry.dup_unique_display_name

### Method

# EDataServer SourceRegistrydup_unique_display_name

since: 3.8

#### Declaration [src]

    gchar*
    e_source_registry_dup_unique_display_name (
      ESourceRegistry* registry,
      ESource* source,
      const gchar* extension_name
    )

#### Description [src]

Compares `source`‘s `ESource:display-name` against other sources having an `ESourceExtension` named `extension_name`, if given, or else against all other sources in the `registry`.

If `sources`‘s `ESource:display-name` is unique among these other sources, the function will return the `ESource:display-name` verbatim. Otherwise the function will construct a string that includes the `sources`‘s own `ESource:display-name` as well as those of its ancestors.

The function’s return value is intended to be used in messages shown to the user to help clarify which source is being referred to. It assumes `source`‘s `ESource:display-name` is at least unique among its siblings.

Free the returned string with `g_free()` when finished with it.

Available since: 3.8

#### Parameters

`source`

  Type: `ESource`

  An `ESource`.

  The data is owned by the caller of the method.

`extension_name`

  Type: `const gchar*`

  An extension name, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `gchar*`

A unique display name for `source`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.