Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

WIP: Fix build with newer vala and libadwaita #358

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/ui/dialogs/list_editor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<property name="revealed">0</property>
<signal name="response" handler="infobar_response" swapped="no"/>
<child internal-child="action_area">
<object class="GtkButtonBox">
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="spacing">6</property>
<property name="layout_style">end</property>
Expand Down
5 changes: 2 additions & 3 deletions src/API/Attachment.vala
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ 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; }
public string? preview_url {
set { this._preview_url = value; }
get { return (this._preview_url == null || this._preview_url == "") ? url : _preview_url; }
set { this.preview_url = value; }
get { return (this.preview_url == null || this.preview_url == "") ? url : preview_url; }
}

public File? source_file { get; set; }
Expand Down
8 changes: 4 additions & 4 deletions src/API/Status.vala
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ public class Tootle.API.Status : Entity, Widgetizable {
public ArrayList<API.Mention>? mentions { get; set; default = null; }
public ArrayList<API.Attachment>? media_attachments { get; set; default = null; }

public string? _url { get; set; }
public string? unmodified_url { get; set; }
public string url {
owned get { return this.get_modified_url (); }
set { this._url = value; }
set { this.unmodified_url = value; }
}
string get_modified_url () {
if (this._url == null) {
if (this.unmodified_url == null) {
return this.uri.replace ("/activity", "");
}
return this._url;
return this.unmodified_url;
}

public Status formal {
Expand Down
10 changes: 5 additions & 5 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -151,23 +151,23 @@ namespace Tootle {
// return false;
// }

void compose_activated () {
public void compose_activated () {
new Dialogs.Compose ();
}

void back_activated () {
public void back_activated () {
main_window.back ();
}

void search_activated () {
public void search_activated () {
main_window.open_view (new Views.Search ());
}

void refresh_activated () {
public void refresh_activated () {
refresh ();
}

void about_activated () {
public void about_activated () {
var dialog = new AboutDialog () {
transient_for = main_window,
modal = true,
Expand Down
2 changes: 1 addition & 1 deletion src/Dialogs/NewAccount.vala
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public class Tootle.Dialogs.NewAccount: Adw.Window {
if (!deck.child_transition_running && deck.visible_child == instance_step)
reset ();

deck.can_swipe_back = deck.visible_child != done_step;
deck.can_navigate_back = deck.visible_child != done_step;
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Accounts/InstanceAccount.vala
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public class Tootle.InstanceAccount : API.Account, Streamable {

// Streamable

public string? _connection_url { get; set; }
public string? connection_url { get; set; }
public bool subscribed { get; set; }

public virtual string? get_stream_url () {
Expand Down
8 changes: 4 additions & 4 deletions src/Services/Network/Streamable.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public abstract interface Tootle.Streamable : Object {
}
}

public abstract string? _connection_url { get; set; }
public abstract string? connection_url { get; set; }
public abstract bool subscribed { get; set; default = false; }

public abstract string? get_stream_url ();
Expand All @@ -29,14 +29,14 @@ public abstract interface Tootle.Streamable : Object {
public signal void stream_event (Event ev);

void subscribe () {
streams.unsubscribe (_connection_url, this);
streams.unsubscribe (connection_url, this);
streams.subscribe (get_stream_url (), this);
_connection_url = get_stream_url ();
connection_url = get_stream_url ();
}

void unsubscribe () {
streams.unsubscribe (get_stream_url (), this);
_connection_url = null;
connection_url = null;
}

public string get_subscriber_name () {
Expand Down
2 changes: 1 addition & 1 deletion src/Views/Timeline.vala
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public class Tootle.Views.Timeline : AccountHolder, Streamable, Views.ContentBas

// Streamable

public string? _connection_url { get; set; }
public string? connection_url { get; set; }
public bool subscribed { get; set; }

protected override void on_streaming_policy_changed () {
Expand Down