From 0816105028c26965e37c9afc7c598854f3fecde1 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Tue, 26 Oct 2021 15:03:25 -0700 Subject: [PATCH] Adhere to GLib.Object naming conventions for properties Vala now validates property names against GLib.Object conventions, this fixes a compilation error as a result of this enforcement: ../src/API/Status.vala:27.5-27.23: error: Name `_url' is not valid for a GLib.Object property public string? _url { get; set; } ^^^^^^^^^^^^^^^^^^^ Relevant Vala change: https://gitlab.gnome.org/GNOME/vala/-/commit/38d61fbff037687ea4772e6df85c7e22a74b335e fixes #337 Signed-off-by: Clayton Craft --- src/API/Attachment.vala | 6 +++--- src/API/Status.vala | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/API/Attachment.vala b/src/API/Attachment.vala index 88bc5bb..35c4018 100644 --- a/src/API/Attachment.vala +++ b/src/API/Attachment.vala @@ -4,10 +4,10 @@ public class Tootle.API.Attachment : Entity, Widgetizable { public string kind { get; set; default = "unknown"; } public string url { get; set; } public string? description { get; set; } - public string? _preview_url { get; set; } + private string? t_preview_url { get; set; } public string? preview_url { - set { this._preview_url = value; } - get { return (this._preview_url == null || this._preview_url == "") ? url : _preview_url; } + set { this.t_preview_url = value; } + get { return (this.t_preview_url == null || this.t_preview_url == "") ? url : t_preview_url; } } public File? source_file { get; set; } diff --git a/src/API/Status.vala b/src/API/Status.vala index 4f92cdb..00e8a9f 100644 --- a/src/API/Status.vala +++ b/src/API/Status.vala @@ -28,16 +28,16 @@ public class Tootle.API.Status : Entity, Widgetizable { public ArrayList? mentions { get; set; default = null; } public ArrayList? media_attachments { get; set; default = null; } - public string? _url { get; set; } + private string? t_url { get; set; } public string url { owned get { return this.get_modified_url (); } - set { this._url = value; } + set { this.t_url = value; } } string get_modified_url () { - if (this._url == null) { + if (this.t_url == null) { return this.uri.replace ("/activity", ""); } - return this._url; + return this.t_url; } public Status formal { -avail'>...Ludovic Courtès 2020-09-08Remove (guix json) and require Guile-JSON 4.3.0+....Ludovic Courtès 2020-08-29build: Remove check for Guile 2.2.1 bug....Ludovic Courtès 2020-08-24Use "guile-zlib" and "guile-lzlib" instead of (guix config)....Mathieu Othacehe 2020-07-20ssh: Speed up RPCs by using #:nodelay....Lars-Dominik Braun 2020-05-28doc: Remove explicit support for mips64el-linux....Efraim Flashner 2020-05-28maint: Check whether Guile-Gcrypt is recent enough....Ludovic Courtès 2020-02-22build: Depend on guile-ssh 0.12.0...Lars-Dominik Braun 2019-08-17build: 'GUIX_CHECK_GUILE_JSON' really checks for Guile-JSON 3.x....Ludovic Courtès 2019-07-25maint: Switch to Guile-JSON 3.x....Ludovic Courtès 2019-05-06Add (guix lzlib)....Pierre Neidhardt 2018-11-23Update Guile-SQLite3 URL everywhere....Ludovic Courtès