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
// Adwaita
//
// Created by auto-generation on 09.05.24.
// Created by auto-generation on 22.05.24.
//
import CAdw
@ -156,18 +156,12 @@ public struct ActionRow: Widget {
if let iconName, updateProperties {
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 {
adw_action_row_set_subtitle_lines(widget?.cast(), subtitleLines.cInt)
}
if let subtitleSelectable, updateProperties {
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 {
adw_action_row_set_title_lines(widget?.cast(), titleLines.cInt)
}
@ -180,6 +174,12 @@ public struct ActionRow: Widget {
if let useUnderline, updateProperties {
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"] {
for (index, view) in suffix().enumerated() {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -186,6 +186,7 @@ extension Class {
) -> String {
var content = ""
for property in properties(namespace: namespace, configurations: configs)
.sorted(by: { config.lastProperties.contains($1.name) })
where !config.excludeProperties.contains(property.name) {
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: "prefix", add: "adw_action_row_add_prefix")
],
cast: true
cast: true,
lastProperties: ["title", "subtitle"]
),
.init(class: "SwitchRow", bindings: [.init(property: "active")]),
.init(

View File

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