forked from aparoksha/adwaita-swift
Compare commits
No commits in common. "aababde03f61b4ce13eb92c5ec54fb6e8650f42e" and "9cb8ca266d93494aa7801773b3e5a5cddb7a37b2" have entirely different histories.
aababde03f
...
9cb8ca266d
@ -8,9 +8,6 @@
|
|||||||
import CAdw
|
import CAdw
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/// URL links for about dialog.
|
|
||||||
public typealias AboutLink = (title: String, url: String)
|
|
||||||
|
|
||||||
/// Initialization options for the about dialog wrapper.
|
/// Initialization options for the about dialog wrapper.
|
||||||
public struct AdwaitaAboutDialogConfig {
|
public struct AdwaitaAboutDialogConfig {
|
||||||
|
|
||||||
@ -81,12 +78,6 @@ public struct AdwaitaAboutDialogConfig {
|
|||||||
public var website: URL?
|
public var website: URL?
|
||||||
/// The link for opening issues.
|
/// The link for opening issues.
|
||||||
public var issues: URL?
|
public var issues: URL?
|
||||||
/// Additional links related to the app.
|
|
||||||
public var links: [AboutLink]?
|
|
||||||
/// The app's copyright information.
|
|
||||||
public var copyright: String?
|
|
||||||
/// The app's license.
|
|
||||||
public var license: String?
|
|
||||||
/// The app's release notes
|
/// The app's release notes
|
||||||
public var releaseNotes: String?
|
public var releaseNotes: String?
|
||||||
/// The comments about the application
|
/// The comments about the application
|
||||||
@ -100,9 +91,6 @@ public struct AdwaitaAboutDialogConfig {
|
|||||||
/// - icon: The app icon.
|
/// - icon: The app icon.
|
||||||
/// - website: The app's website.
|
/// - website: The app's website.
|
||||||
/// - issues: Website for reporting issues.
|
/// - issues: Website for reporting issues.
|
||||||
/// - links: Additional links related to the app.
|
|
||||||
/// - copyright: The app's copyright information.
|
|
||||||
/// - license: The app's license.
|
|
||||||
/// - releaseNotes: The app's release notes.
|
/// - releaseNotes: The app's release notes.
|
||||||
/// - comments: The comments about the application.
|
/// - comments: The comments about the application.
|
||||||
public init(
|
public init(
|
||||||
@ -112,9 +100,6 @@ public struct AdwaitaAboutDialogConfig {
|
|||||||
icon: Icon? = nil,
|
icon: Icon? = nil,
|
||||||
website: URL? = nil,
|
website: URL? = nil,
|
||||||
issues: URL? = nil,
|
issues: URL? = nil,
|
||||||
links: [AboutLink]? = nil,
|
|
||||||
copyright: String? = nil,
|
|
||||||
license: String? = nil,
|
|
||||||
releaseNotes: String? = nil,
|
releaseNotes: String? = nil,
|
||||||
comments: String? = nil
|
comments: String? = nil
|
||||||
) {
|
) {
|
||||||
@ -124,9 +109,6 @@ public struct AdwaitaAboutDialogConfig {
|
|||||||
self.icon = icon
|
self.icon = icon
|
||||||
self.website = website
|
self.website = website
|
||||||
self.issues = issues
|
self.issues = issues
|
||||||
self.links = links
|
|
||||||
self.copyright = copyright
|
|
||||||
self.license = license
|
|
||||||
self.releaseNotes = releaseNotes
|
self.releaseNotes = releaseNotes
|
||||||
self.comments = comments
|
self.comments = comments
|
||||||
}
|
}
|
||||||
@ -142,8 +124,6 @@ public struct AdwaitaAboutDialogConfig {
|
|||||||
(icon?.string, adw_about_dialog_set_application_icon),
|
(icon?.string, adw_about_dialog_set_application_icon),
|
||||||
(website?.absoluteString, adw_about_dialog_set_website),
|
(website?.absoluteString, adw_about_dialog_set_website),
|
||||||
(issues?.absoluteString, adw_about_dialog_set_issue_url),
|
(issues?.absoluteString, adw_about_dialog_set_issue_url),
|
||||||
(copyright, adw_about_dialog_set_copyright),
|
|
||||||
(license, adw_about_dialog_set_license),
|
|
||||||
(releaseNotes, adw_about_dialog_set_release_notes),
|
(releaseNotes, adw_about_dialog_set_release_notes),
|
||||||
(comments, adw_about_dialog_set_comments)
|
(comments, adw_about_dialog_set_comments)
|
||||||
]
|
]
|
||||||
@ -151,8 +131,6 @@ public struct AdwaitaAboutDialogConfig {
|
|||||||
for (value, action) in handlers {
|
for (value, action) in handlers {
|
||||||
value.map { action(dialog, $0) }
|
value.map { action(dialog, $0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
links?.forEach { (title: String, url: String) in adw_about_dialog_add_link(dialog, title, url) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,12 +157,6 @@ struct Demo: App {
|
|||||||
cfg.icon = .default(icon: .applicationXExecutable)
|
cfg.icon = .default(icon: .applicationXExecutable)
|
||||||
cfg.website = URL(string: "https://adwaita-swift.aparoksha.dev/")
|
cfg.website = URL(string: "https://adwaita-swift.aparoksha.dev/")
|
||||||
cfg.issues = URL(string: "https://git.aparoksha.dev/aparoksha/adwaita-swift/issues")
|
cfg.issues = URL(string: "https://git.aparoksha.dev/aparoksha/adwaita-swift/issues")
|
||||||
cfg.links = [
|
|
||||||
("Source Code", "https://git.aparoksha.dev/aparoksha/adwaita-swift"),
|
|
||||||
(title: "Donate", url: "https://ko-fi.com/david_swift")
|
|
||||||
]
|
|
||||||
cfg.copyright = "© 2026 david-swift"
|
|
||||||
cfg.license = "MIT"
|
|
||||||
cfg.releaseNotes = AdwaitaAboutDialogConfig.demoReleaseNotes
|
cfg.releaseNotes = AdwaitaAboutDialogConfig.demoReleaseNotes
|
||||||
cfg.comments = AdwaitaAboutDialogConfig.demoComments
|
cfg.comments = AdwaitaAboutDialogConfig.demoComments
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user