Fix ActionRow setting text before markup option

This commit is contained in:
david-swift 2024-05-22 07:19:29 +02:00
parent c82957e239
commit 7ac57d8a59
46 changed files with 54 additions and 50 deletions

View File

@ -2,7 +2,7 @@
// ActionRow.swift // ActionRow.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw
@ -156,18 +156,12 @@ public struct ActionRow: Widget {
if let iconName, updateProperties { if let iconName, updateProperties {
adw_action_row_set_icon_name(widget?.cast(), iconName) adw_action_row_set_icon_name(widget?.cast(), iconName)
} }
if let subtitle, updateProperties {
adw_action_row_set_subtitle(widget?.cast(), subtitle)
}
if let subtitleLines, updateProperties { if let subtitleLines, updateProperties {
adw_action_row_set_subtitle_lines(widget?.cast(), subtitleLines.cInt) adw_action_row_set_subtitle_lines(widget?.cast(), subtitleLines.cInt)
} }
if let subtitleSelectable, updateProperties { if let subtitleSelectable, updateProperties {
adw_action_row_set_subtitle_selectable(widget?.cast(), subtitleSelectable.cBool) adw_action_row_set_subtitle_selectable(widget?.cast(), subtitleSelectable.cBool)
} }
if let title, updateProperties {
adw_preferences_row_set_title(widget?.cast(), title)
}
if let titleLines, updateProperties { if let titleLines, updateProperties {
adw_action_row_set_title_lines(widget?.cast(), titleLines.cInt) adw_action_row_set_title_lines(widget?.cast(), titleLines.cInt)
} }
@ -180,6 +174,12 @@ public struct ActionRow: Widget {
if let useUnderline, updateProperties { if let useUnderline, updateProperties {
adw_preferences_row_set_use_underline(widget?.cast(), useUnderline.cBool) adw_preferences_row_set_use_underline(widget?.cast(), useUnderline.cBool)
} }
if let title, updateProperties {
adw_preferences_row_set_title(widget?.cast(), title)
}
if let subtitle, updateProperties {
adw_action_row_set_subtitle(widget?.cast(), subtitle)
}
if let suffixStorage = storage.content["suffix"] { if let suffixStorage = storage.content["suffix"] {
for (index, view) in suffix().enumerated() { for (index, view) in suffix().enumerated() {

View File

@ -2,7 +2,7 @@
// Avatar.swift // Avatar.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Banner.swift // Banner.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Bin.swift // Bin.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Box.swift // Box.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Button.swift // Button.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// ButtonContent.swift // ButtonContent.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Carousel.swift // Carousel.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// CenterBox.swift // CenterBox.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// CheckButton.swift // CheckButton.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Clamp.swift // Clamp.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// ComboRow.swift // ComboRow.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// EntryRow.swift // EntryRow.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// ExpanderRow.swift // ExpanderRow.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// FlowBox.swift // FlowBox.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// HeaderBar.swift // HeaderBar.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Label.swift // Label.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// LevelBar.swift // LevelBar.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// LinkButton.swift // LinkButton.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// ListBox.swift // ListBox.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Menu.swift // Menu.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// NavigationView.swift // NavigationView.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Overlay.swift // Overlay.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// OverlaySplitView.swift // OverlaySplitView.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// PasswordEntryRow.swift // PasswordEntryRow.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Picture.swift // Picture.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Popover.swift // Popover.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// PreferencesGroup.swift // PreferencesGroup.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// PreferencesPage.swift // PreferencesPage.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// PreferencesRow.swift // PreferencesRow.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// ProgressBar.swift // ProgressBar.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// ScrolledWindow.swift // ScrolledWindow.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// SearchBar.swift // SearchBar.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// SearchEntry.swift // SearchEntry.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// SpinRow.swift // SpinRow.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// Spinner.swift // Spinner.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// SplitButton.swift // SplitButton.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// StatusPage.swift // StatusPage.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// SwitchRow.swift // SwitchRow.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// ToastOverlay.swift // ToastOverlay.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// ToggleButton.swift // ToggleButton.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// ToolbarView.swift // ToolbarView.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -2,7 +2,7 @@
// WindowTitle.swift // WindowTitle.swift
// Adwaita // Adwaita
// //
// Created by auto-generation on 09.05.24. // Created by auto-generation on 22.05.24.
// //
import CAdw import CAdw

View File

@ -186,6 +186,7 @@ extension Class {
) -> String { ) -> String {
var content = "" var content = ""
for property in properties(namespace: namespace, configurations: configs) for property in properties(namespace: namespace, configurations: configs)
.sorted(by: { config.lastProperties.contains($1.name) })
where !config.excludeProperties.contains(property.name) { where !config.excludeProperties.contains(property.name) {
content += property.generateModification(config: config, genConfig: genConfig, prefix: prefix()) content += property.generateModification(config: config, genConfig: genConfig, prefix: prefix())
} }

View File

@ -71,7 +71,8 @@ struct GenerationConfiguration {
.init(name: "suffix", add: "adw_action_row_add_suffix"), .init(name: "suffix", add: "adw_action_row_add_suffix"),
.init(name: "prefix", add: "adw_action_row_add_prefix") .init(name: "prefix", add: "adw_action_row_add_prefix")
], ],
cast: true cast: true,
lastProperties: ["title", "subtitle"]
), ),
.init(class: "SwitchRow", bindings: [.init(property: "active")]), .init(class: "SwitchRow", bindings: [.init(property: "active")]),
.init( .init(

View File

@ -32,6 +32,8 @@ struct WidgetConfiguration {
var cast = false var cast = false
/// Conditions for when to update a property. /// Conditions for when to update a property.
var setConditions: [String: String] = [:] var setConditions: [String: String] = [:]
/// Properties that are set in the end of an update.
var lastProperties: [String] = []
/// The configuration for a binding. /// The configuration for a binding.
struct BindingConfiguration { struct BindingConfiguration {