Class AboutDialog.Builder<B extends AboutDialog.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Accessible.Builder<B>, BuilderInterface
Enclosing class:
AboutDialog

public static class AboutDialog.Builder<B extends AboutDialog.Builder<B>> extends Dialog.Builder<B> implements Accessible.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
1.5
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public AboutDialog build()
      Finish building the AboutDialog object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to AboutDialog.
      Overrides:
      build in class Dialog.Builder<B extends AboutDialog.Builder<B>>
      Returns:
      a new instance of AboutDialog with the properties that were set in the Builder object.
    • setAppdataResourcePath

      public B setAppdataResourcePath(String appdataResourcePath)

      The path to the Appstream metadata resource.

      If provided, the dialog will be constructed from it.

      See AboutDialog.fromAppdata(String, String).

      If AboutDialog:release-notes-version is set, release notes will be set from the AppStream release description for that version.

      Parameters:
      appdataResourcePath - the value for the appdata-resource-path property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.9
    • setApplicationIcon

      public B setApplicationIcon(String applicationIcon)

      The name of the application icon.

      The icon is displayed at the top of the main page.

      Parameters:
      applicationIcon - the value for the application-icon property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setApplicationName

      public B setApplicationName(String applicationName)

      The name of the application.

      The name is displayed at the top of the main page.

      Parameters:
      applicationName - the value for the application-name property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setArtists

      public B setArtists(String[] artists)

      The list of artists of the application.

      It will be displayed on the Credits page.

      Each name may contain email addresses and URLs, see the introduction for more details.

      See also:

      Parameters:
      artists - the value for the artists property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setComments

      public B setComments(String comments)

      The comments about the application.

      Comments will be shown on the Details page, above links.

      Unlike Gtk.AboutDialog:comments, this string can be long and detailed. It can also contain links and Pango markup.

      Parameters:
      comments - the value for the comments property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setCopyright

      public B setCopyright(String copyright)

      The copyright information.

      This should be a short string of one or two lines, for example: © 2022 Example.

      The copyright information will be displayed on the Legal page, above the application license.

      AboutDialog.addLegalSection(String, String, License, String) can be used to add copyright information for the application dependencies or other components.

      Parameters:
      copyright - the value for the copyright property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setDebugInfo

      public B setDebugInfo(String debugInfo)

      The debug information.

      Debug information will be shown on the Troubleshooting page. It's intended to be attached to issue reports when reporting issues against the application.

      AdwAboutDialog provides a quick way to save debug information to a file. When saving, AboutDialog:debug-info-filename would be used as the suggested filename.

      Debug information cannot contain markup or links.

      Parameters:
      debugInfo - the value for the debug-info property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setDebugInfoFilename

      public B setDebugInfoFilename(String debugInfoFilename)

      The debug information filename.

      It will be used as the suggested filename when saving debug information to a file.

      See AboutDialog:debug-info.

      Parameters:
      debugInfoFilename - the value for the debug-info-filename property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setDesigners

      public B setDesigners(String[] designers)

      The list of designers of the application.

      It will be displayed on the Credits page.

      Each name may contain email addresses and URLs, see the introduction for more details.

      See also:

      Parameters:
      designers - the value for the designers property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setDeveloperName

      public B setDeveloperName(String developerName)

      The developer name.

      The developer name is displayed on the main page, under the application name.

      If the application is developed by multiple people, the developer name can be set to values like "AppName team", "AppName developers" or "The AppName project", and the individual contributors can be listed on the Credits page, with AboutDialog:developers and related properties.

      Parameters:
      developerName - the value for the developer-name property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setDevelopers

      public B setDevelopers(String[] developers)

      The list of developers of the application.

      It will be displayed on the Credits page.

      Each name may contain email addresses and URLs, see the introduction for more details.

      See also:

      Parameters:
      developers - the value for the developers property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setDocumenters

      public B setDocumenters(String[] documenters)

      The list of documenters of the application.

      It will be displayed on the Credits page.

      Each name may contain email addresses and URLs, see the introduction for more details.

      See also:

      Parameters:
      documenters - the value for the documenters property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setIssueUrl

      public B setIssueUrl(String issueUrl)

      The URL for the application's issue tracker.

      The issue tracker link is displayed on the main page.

      Parameters:
      issueUrl - the value for the issue-url property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setLicense

      public B setLicense(String license)

      The license text.

      This can be used to set a custom text for the license if it can't be set via AboutDialog:license-type.

      When set, AboutDialog:license-type will be set to Gtk.License.custom.

      The license text will be displayed on the Legal page, below the copyright information.

      License text can contain Pango markup and links.

      AboutDialog.addLegalSection(String, String, License, String) can be used to add license information for the application dependencies or other components.

      Parameters:
      license - the value for the license property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setLicenseType

      public B setLicenseType(License licenseType)

      The license type.

      Allows to set the application's license froma list of known licenses.

      If the application's license is not in the list, AboutDialog:license can be used instead. The license type will be automatically set to Gtk.License.custom in that case.

      If set to Gtk.License.unknown, no information will be displayed.

      If the license type is different from Gtk.License.custom. AboutDialog:license will be cleared out.

      The license description will be displayed on the Legal page, below the copyright information.

      AboutDialog.addLegalSection(String, String, License, String) can be used to add license information for the application dependencies or other components.

      Parameters:
      licenseType - the value for the license-type property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setReleaseNotes

      public B setReleaseNotes(String releaseNotes)

      The release notes of the application.

      Release notes are displayed on the the What's New page.

      Release notes are formatted the same way as AppStream descriptions.

      The supported formatting options are:

      • Paragraph (<p>)
      • Ordered list (<ol>), with list items (<li>)
      • Unordered list (<ul>), with list items (<li>)

      Within paragraphs and list items, emphasis (<em>) and inline code (<code>) text styles are supported. The emphasis is rendered in italic, while inline code is shown in a monospaced font.

      Any text outside paragraphs or list items is ignored.

      Nested lists are not supported.

      AdwAboutDialog displays the version above the release notes. If set, the AboutDialog:release-notes-version of the property will be used as the version; otherwise, AboutDialog:version is used.

      Parameters:
      releaseNotes - the value for the release-notes property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setReleaseNotesVersion

      public B setReleaseNotesVersion(String releaseNotesVersion)

      The version described by the application's release notes.

      The release notes version is displayed on the What's New page, above the release notes.

      If not set, AboutDialog:version will be used instead.

      For example, an application with the current version 2.0.2 might want to keep the release notes from 2.0.0, and set the release notes version accordingly.

      See AboutDialog:release-notes.

      Parameters:
      releaseNotesVersion - the value for the release-notes-version property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setSupportUrl

      public B setSupportUrl(String supportUrl)

      The URL of the application's support page.

      The support page link is displayed on the main page.

      Parameters:
      supportUrl - the value for the support-url property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setTranslatorCredits

      public B setTranslatorCredits(String translatorCredits)

      The translator credits string.

      It will be displayed on the Credits page.

      This string should be "translator-credits" or "translator_credits" and should be marked as translatable.

      The string may contain email addresses and URLs, see the introduction for more details.

      See also:

      Parameters:
      translatorCredits - the value for the translator-credits property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setVersion

      public B setVersion(String version)

      The version of the application.

      The version is displayed on the main page.

      If AboutDialog:release-notes-version is not set, the version will also be displayed above the release notes on the What's New page.

      Parameters:
      version - the value for the version property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • setWebsite

      public B setWebsite(String website)

      The URL of the application's website.

      Website is displayed on the Details page, below comments, or on the main page if the Details page doesn't have any other content.

      Applications can add other links below, see AboutDialog.addLink(String, String).

      Parameters:
      website - the value for the website property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
    • onActivateLink

      public B onActivateLink(AboutDialog.ActivateLinkCallback handler)

      Emitted when a URL is activated.

      Applications may connect to it to override the default behavior, which is to call Gtk#showUri.

      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      1.5
      See Also: