slightly more explicit imports

i had no idea where these were from; now i do :)

vala is super loose about these..
This commit is contained in:
psykose 2024-10-16 05:58:40 +02:00
parent 367111171f
commit 8c42d99c18
7 changed files with 13 additions and 13 deletions

View file

@ -1,6 +1,6 @@
Subsonic public_api; Subsonic public_api;
public class Application : Adw.Application { public class Audrey.Application : Adw.Application {
public Application () { public Application () {
Object ( Object (
application_id: "eu.callcc.audrey", application_id: "eu.callcc.audrey",
@ -9,7 +9,7 @@ public class Application : Adw.Application {
} }
construct { construct {
ActionEntry[] action_entries = { GLib.ActionEntry[] action_entries = {
{ "about", this.on_about_action }, { "about", this.on_about_action },
{ "preferences", this.on_preferences_action }, { "preferences", this.on_preferences_action },
{ "quit", this.quit } { "quit", this.quit }

View file

@ -1,5 +1,5 @@
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")] [CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
namespace Config { namespace Audrey.Config {
public const string GETTEXT_PACKAGE; public const string GETTEXT_PACKAGE;
public const string LOCALEDIR; public const string LOCALEDIR;
public const string PACKAGE_VERSION; public const string PACKAGE_VERSION;

View file

@ -1,10 +1,10 @@
int main (string[] args) { int main (string[] args) {
Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR); Intl.bindtextdomain (Audrey.Config.GETTEXT_PACKAGE, Audrey.Config.LOCALEDIR);
Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8"); Intl.bind_textdomain_codeset (Audrey.Config.GETTEXT_PACKAGE, "UTF-8");
Intl.textdomain (Config.GETTEXT_PACKAGE); Intl.textdomain (Audrey.Config.GETTEXT_PACKAGE);
Gst.init (ref args); Gst.init (ref args);
var app = new Application (); var app = new Audrey.Application ();
return app.run (args); return app.run (args);
} }

View file

@ -4,7 +4,7 @@ enum PlaybinState {
PLAYING, PLAYING,
} }
class Playbin : Object { class Playbin : GLib.Object {
// dynamic: undocumented vala feature // dynamic: undocumented vala feature
// lets us access the about-to-finish signal // lets us access the about-to-finish signal
private dynamic Gst.Element playbin = Gst.ElementFactory.make ("playbin3", null); private dynamic Gst.Element playbin = Gst.ElementFactory.make ("playbin3", null);
@ -45,7 +45,7 @@ class Playbin : Object {
// ASSUMPTION: about-to-finish will be signalled exactly once per track // ASSUMPTION: about-to-finish will be signalled exactly once per track
// even if seeking backwards after // even if seeking backwards after
AsyncQueue<string> next_uri = new AsyncQueue<string> (); GLib.AsyncQueue<string> next_uri = new GLib.AsyncQueue<string> ();
private ListModel _play_queue = null; private ListModel _play_queue = null;
private ulong _play_queue_items_changed; private ulong _play_queue_items_changed;

View file

@ -1,6 +1,6 @@
// this is a custom SelectionModel that lets us only signal the // this is a custom SelectionModel that lets us only signal the
// selection has changed on user interaction // selection has changed on user interaction
class PlayQueueSelection : Object, ListModel, Gtk.SelectionModel { class PlayQueueSelection : GLib.Object, GLib.ListModel, Gtk.SelectionModel {
public ListStore inner { get; private set; } public ListStore inner { get; private set; }
private uint _selected_position; private uint _selected_position;
@ -22,7 +22,7 @@ class PlayQueueSelection : Object, ListModel, Gtk.SelectionModel {
public signal void user_selected (uint position); public signal void user_selected (uint position);
internal PlayQueueSelection () { internal PlayQueueSelection () {
this.inner = new ListStore (typeof (Song)); this.inner = new GLib.ListStore (typeof (Song));
this._selected_position = inner.get_n_items (); this._selected_position = inner.get_n_items ();
this.inner.items_changed.connect ((position, removed, added) => { this.inner.items_changed.connect ((position, removed, added) => {

View file

@ -8,7 +8,7 @@ static void salt_password (string password, out string token, out string salt) {
salt_chars[2*i+1] = "0123456789abcdef"[(salt_bytes[i]>>0)&0xf]; salt_chars[2*i+1] = "0123456789abcdef"[(salt_bytes[i]>>0)&0xf];
} }
salt_chars[2*SALT_BYTES] = 0; salt_chars[2*SALT_BYTES] = 0;
var checksum = new Checksum (ChecksumType.MD5); var checksum = new GLib.Checksum (ChecksumType.MD5);
checksum.update ((uchar[]) password, -1); checksum.update ((uchar[]) password, -1);
checksum.update (salt_chars, -1); checksum.update (salt_chars, -1);

View file

@ -100,7 +100,7 @@ class Ui.Window : Adw.ApplicationWindow {
if (this.cancel_loading_art != null) { if (this.cancel_loading_art != null) {
this.cancel_loading_art.cancel (); this.cancel_loading_art.cancel ();
} }
this.cancel_loading_art = new Cancellable (); this.cancel_loading_art = new GLib.Cancellable ();
this.playing_cover_art = Gdk.Paintable.empty (1, 1); this.playing_cover_art = Gdk.Paintable.empty (1, 1);
if (this.song != null) { if (this.song != null) {