rename project lol
This commit is contained in:
parent
e8589b7d52
commit
9a974fabea
28 changed files with 90 additions and 90 deletions
|
@ -1,3 +1,3 @@
|
||||||
# wavelet
|
# audrey
|
||||||
|
|
||||||
A description of this project.
|
a native navidrome/subsonic player with all of the right features and none of the wrong ones
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<schemalist gettext-domain="wavelet">
|
|
||||||
<schema id="eu.callcc.Wavelet" path="/eu/callcc/Wavelet/">
|
|
||||||
</schema>
|
|
||||||
</schemalist>
|
|
|
@ -1,3 +0,0 @@
|
||||||
[D-BUS Service]
|
|
||||||
Name=eu.callcc.Wavelet
|
|
||||||
Exec=@bindir@/wavelet --gapplication-service
|
|
|
@ -1,7 +1,7 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=wavelet
|
Name=audrey
|
||||||
Exec=wavelet
|
Exec=audrey
|
||||||
Icon=eu.callcc.Wavelet
|
Icon=eu.callcc.audrey
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Utility;
|
Categories=Utility;
|
5
data/eu.callcc.audrey.gschema.xml
Normal file
5
data/eu.callcc.audrey.gschema.xml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<schemalist gettext-domain="audrey">
|
||||||
|
<schema id="eu.callcc.audrey" path="/eu/callcc/audrey/">
|
||||||
|
</schema>
|
||||||
|
</schemalist>
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<component type="desktop-application">
|
<component type="desktop-application">
|
||||||
<id>eu.callcc.Wavelet</id>
|
<id>eu.callcc.audrey</id>
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<project_license>AGPL-3.0-or-later</project_license>
|
<project_license>AGPL-3.0-or-later</project_license>
|
||||||
|
|
||||||
<name>Wavelet</name>
|
<name>audrey</name>
|
||||||
<summary>Keep the summary shorter, between 10 and 35 characters</summary>
|
<summary>Keep the summary shorter, between 10 and 35 characters</summary>
|
||||||
<description>
|
<description>
|
||||||
<p>No description</p>
|
<p>No description</p>
|
||||||
|
@ -33,10 +33,10 @@
|
||||||
<!--URLs of this type should point to a webpage showing information on how to contribute to the described software project -->
|
<!--URLs of this type should point to a webpage showing information on how to contribute to the described software project -->
|
||||||
<url type="contribute">https://example.org/contribute</url>
|
<url type="contribute">https://example.org/contribute</url>
|
||||||
|
|
||||||
<translation type="gettext">wavelet</translation>
|
<translation type="gettext">audrey</translation>
|
||||||
<!-- All graphical applications having a desktop file must have this tag in the MetaInfo.
|
<!-- All graphical applications having a desktop file must have this tag in the MetaInfo.
|
||||||
If this is present, appstreamcli compose will pull icons, keywords and categories from the desktop file. -->
|
If this is present, appstreamcli compose will pull icons, keywords and categories from the desktop file. -->
|
||||||
<launchable type="desktop-id">eu.callcc.Wavelet.desktop</launchable>
|
<launchable type="desktop-id">eu.callcc.audrey.desktop</launchable>
|
||||||
<!-- Use the OARS website (https://hughsie.github.io/oars/generate.html) to generate these and make sure to use oars-1.1 -->
|
<!-- Use the OARS website (https://hughsie.github.io/oars/generate.html) to generate these and make sure to use oars-1.1 -->
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
|
|
3
data/eu.callcc.audrey.service.in
Normal file
3
data/eu.callcc.audrey.service.in
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[D-BUS Service]
|
||||||
|
Name=eu.callcc.audrey
|
||||||
|
Exec=@bindir@/audrey --gapplication-service
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
@ -1,4 +1,4 @@
|
||||||
application_id = 'eu.callcc.Wavelet'
|
application_id = 'eu.callcc.audrey'
|
||||||
|
|
||||||
scalable_dir = 'hicolor' / 'scalable' / 'apps'
|
scalable_dir = 'hicolor' / 'scalable' / 'apps'
|
||||||
install_data(
|
install_data(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
desktop_file = i18n.merge_file(
|
desktop_file = i18n.merge_file(
|
||||||
input: 'eu.callcc.Wavelet.desktop.in',
|
input: 'eu.callcc.audrey.desktop.in',
|
||||||
output: 'eu.callcc.Wavelet.desktop',
|
output: 'eu.callcc.audrey.desktop',
|
||||||
type: 'desktop',
|
type: 'desktop',
|
||||||
po_dir: '../po',
|
po_dir: '../po',
|
||||||
install: true,
|
install: true,
|
||||||
|
@ -13,8 +13,8 @@ if desktop_utils.found()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
appstream_file = i18n.merge_file(
|
appstream_file = i18n.merge_file(
|
||||||
input: 'eu.callcc.Wavelet.metainfo.xml.in',
|
input: 'eu.callcc.audrey.metainfo.xml.in',
|
||||||
output: 'eu.callcc.Wavelet.metainfo.xml',
|
output: 'eu.callcc.audrey.metainfo.xml',
|
||||||
po_dir: '../po',
|
po_dir: '../po',
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: get_option('datadir') / 'metainfo'
|
install_dir: get_option('datadir') / 'metainfo'
|
||||||
|
@ -24,7 +24,7 @@ appstreamcli = find_program('appstreamcli', required: false, disabler: true)
|
||||||
test('Validate appstream file', appstreamcli,
|
test('Validate appstream file', appstreamcli,
|
||||||
args: ['validate', '--no-net', '--explain', appstream_file])
|
args: ['validate', '--no-net', '--explain', appstream_file])
|
||||||
|
|
||||||
install_data('eu.callcc.Wavelet.gschema.xml',
|
install_data('eu.callcc.audrey.gschema.xml',
|
||||||
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
|
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ test('Validate schema file',
|
||||||
service_conf = configuration_data()
|
service_conf = configuration_data()
|
||||||
service_conf.set('bindir', get_option('prefix') / get_option('bindir'))
|
service_conf.set('bindir', get_option('prefix') / get_option('bindir'))
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'eu.callcc.Wavelet.service.in',
|
input: 'eu.callcc.audrey.service.in',
|
||||||
output: 'eu.callcc.Wavelet.service',
|
output: 'eu.callcc.audrey.service',
|
||||||
configuration: service_conf,
|
configuration: service_conf,
|
||||||
install_dir: get_option('datadir') / 'dbus-1' / 'services'
|
install_dir: get_option('datadir') / 'dbus-1' / 'services'
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
project('wavelet', ['c', 'vala'],
|
project('audrey', ['c', 'vala'],
|
||||||
version: '0.1.0', # WAVELET_VERSION
|
version: '0.1.0', # AUDREY_VERSION
|
||||||
meson_version: '>= 1.0.0',
|
meson_version: '>= 1.0.0',
|
||||||
default_options: [ 'warning_level=0', 'werror=false', ],
|
default_options: [ 'warning_level=0', 'werror=false', ],
|
||||||
)
|
)
|
||||||
|
@ -13,7 +13,7 @@ srcdir = meson.project_source_root() / 'src'
|
||||||
|
|
||||||
config_h = configuration_data()
|
config_h = configuration_data()
|
||||||
config_h.set_quoted('PACKAGE_VERSION', meson.project_version ())
|
config_h.set_quoted('PACKAGE_VERSION', meson.project_version ())
|
||||||
config_h.set_quoted('GETTEXT_PACKAGE', 'wavelet')
|
config_h.set_quoted('GETTEXT_PACKAGE', 'audrey')
|
||||||
config_h.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
|
config_h.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
|
||||||
configure_file(output: 'config.h', configuration: config_h)
|
configure_file(output: 'config.h', configuration: config_h)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# List of source files containing translatable strings.
|
# List of source files containing translatable strings.
|
||||||
# Please keep this file sorted alphabetically.
|
# Please keep this file sorted alphabetically.
|
||||||
data/eu.callcc.Wavelet.desktop.in
|
data/eu.callcc.audrey.desktop.in
|
||||||
data/eu.callcc.Wavelet.metainfo.xml.in
|
data/eu.callcc.audrey.metainfo.xml.in
|
||||||
data/eu.callcc.Wavelet.gschema.xml
|
data/eu.callcc.audrey.gschema.xml
|
||||||
src/main.vala
|
src/main.vala
|
||||||
src/window.vala
|
src/window.vala
|
||||||
src/window.ui
|
src/window.ui
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
i18n.gettext('wavelet', preset: 'glib')
|
i18n.gettext('audrey', preset: 'glib')
|
||||||
|
|
18
src/api.vala
18
src/api.vala
|
@ -3,9 +3,9 @@ errordomain SubsonicError {
|
||||||
ERROR,
|
ERROR,
|
||||||
}
|
}
|
||||||
|
|
||||||
public delegate void Wavelet.SongCallback (Song song);
|
public delegate void SongCallback (Song song);
|
||||||
|
|
||||||
public class Wavelet.Artist : Object, Json.Serializable {
|
public class Artist : Object, Json.Serializable {
|
||||||
public string index;
|
public string index;
|
||||||
public string id;
|
public string id;
|
||||||
public string name { get; private set; }
|
public string name { get; private set; }
|
||||||
|
@ -38,7 +38,7 @@ public class Wavelet.Artist : Object, Json.Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Wavelet.Album : Object {
|
public class Album : Object {
|
||||||
public string id;
|
public string id;
|
||||||
public string name;
|
public string name;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public class Wavelet.Album : Object {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Wavelet.Song : Object {
|
public class Song : Object {
|
||||||
public string id { get; private set; }
|
public string id { get; private set; }
|
||||||
public string title { get; private set; }
|
public string title { get; private set; }
|
||||||
public string album { get; private set; }
|
public string album { get; private set; }
|
||||||
|
@ -89,7 +89,7 @@ public class Wavelet.Song : Object {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct Wavelet.API.PlayQueue {
|
public struct API.PlayQueue {
|
||||||
public string current;
|
public string current;
|
||||||
public int64 position;
|
public int64 position;
|
||||||
public DateTime changed;
|
public DateTime changed;
|
||||||
|
@ -128,7 +128,7 @@ public struct Wavelet.API.PlayQueue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Wavelet.Subsonic : Object {
|
public class Subsonic : Object {
|
||||||
public ListStore artist_list;
|
public ListStore artist_list;
|
||||||
public ListStore album_list;
|
public ListStore album_list;
|
||||||
public ListStore song_list;
|
public ListStore song_list;
|
||||||
|
@ -139,10 +139,10 @@ public class Wavelet.Subsonic : Object {
|
||||||
|
|
||||||
public Subsonic.with_password (string url, string username, string password) {
|
public Subsonic.with_password (string url, string username, string password) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.parameters = @"u=$(Uri.escape_string(username))&p=$(Uri.escape_string(password))&v=1.16.1&c=eu.callcc.Wavelet";
|
this.parameters = @"u=$(Uri.escape_string(username))&p=$(Uri.escape_string(password))&v=1.16.1&c=eu.callcc.audrey";
|
||||||
|
|
||||||
this.session = new Soup.Session ();
|
this.session = new Soup.Session ();
|
||||||
this.session.user_agent = "Wavelet/0.1.0 (Linux)"; // WAVELET_VERSION
|
this.session.user_agent = "audrey/0.1.0 (Linux)"; // AUDREY_VERSION
|
||||||
|
|
||||||
this.artist_list = new ListStore (typeof (Artist));
|
this.artist_list = new ListStore (typeof (Artist));
|
||||||
this.album_list = new ListStore (typeof (Album));
|
this.album_list = new ListStore (typeof (Album));
|
||||||
|
@ -151,7 +151,7 @@ public class Wavelet.Subsonic : Object {
|
||||||
|
|
||||||
public Subsonic.with_token (string url, string username, string token, string salt) {
|
public Subsonic.with_token (string url, string username, string token, string salt) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.parameters = @"u=$(Uri.escape_string(username))&t=$(Uri.escape_string(token))&s=$(Uri.escape_string(salt))&v=1.16.1&c=eu.callcc.Wavelet";
|
this.parameters = @"u=$(Uri.escape_string(username))&t=$(Uri.escape_string(token))&s=$(Uri.escape_string(salt))&v=1.16.1&c=eu.callcc.audrey";
|
||||||
|
|
||||||
this.session = new Soup.Session ();
|
this.session = new Soup.Session ();
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
Wavelet.Subsonic public_api;
|
Subsonic public_api;
|
||||||
|
|
||||||
public class Wavelet.Application : Adw.Application {
|
public class Application : Adw.Application {
|
||||||
public Application () {
|
public Application () {
|
||||||
Object (
|
Object (
|
||||||
application_id: "eu.callcc.Wavelet",
|
application_id: "eu.callcc.audrey",
|
||||||
flags: ApplicationFlags.DEFAULT_FLAGS
|
flags: ApplicationFlags.DEFAULT_FLAGS
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -21,18 +21,18 @@ public class Wavelet.Application : Adw.Application {
|
||||||
public override void activate () {
|
public override void activate () {
|
||||||
base.activate ();
|
base.activate ();
|
||||||
// if this.active_window not null, this isnt the primary instance
|
// if this.active_window not null, this isnt the primary instance
|
||||||
var win = this.active_window ?? new Wavelet.Window (this);
|
var win = this.active_window ?? new Window (this);
|
||||||
win.present ();
|
win.present ();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void on_about_action () {
|
private void on_about_action () {
|
||||||
string[] developers = { "Erica Z" };
|
string[] developers = { "Erica Z" };
|
||||||
var about = new Adw.AboutDialog () {
|
var about = new Adw.AboutDialog () {
|
||||||
application_name = "wavelet",
|
application_name = "audrey",
|
||||||
application_icon = "eu.callcc.Wavelet",
|
application_icon = "eu.callcc.audrey",
|
||||||
developer_name = "Erica Z",
|
developer_name = "Erica Z",
|
||||||
translator_credits = _("translator-credits"),
|
translator_credits = _("translator-credits"),
|
||||||
version = "0.1.0", // WAVELET_VERSION
|
version = "0.1.0", // AUDREY_VERSION
|
||||||
developers = developers,
|
developers = developers,
|
||||||
copyright = "© 2024 Erica Z",
|
copyright = "© 2024 Erica Z",
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<gresources>
|
<gresources>
|
||||||
<gresource prefix="/eu/callcc/Wavelet">
|
<gresource prefix="/eu/callcc/audrey">
|
||||||
<file>wavelet.css</file>
|
<file>audrey.css</file>
|
||||||
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
|
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
|
||||||
<file preprocess="xml-stripblanks">play_queue.ui</file>
|
<file preprocess="xml-stripblanks">play_queue.ui</file>
|
||||||
<file preprocess="xml-stripblanks">setup.ui</file>
|
<file preprocess="xml-stripblanks">setup.ui</file>
|
|
@ -5,6 +5,6 @@ int main (string[] args) {
|
||||||
|
|
||||||
Gst.init (ref args);
|
Gst.init (ref args);
|
||||||
|
|
||||||
var app = new Wavelet.Application ();
|
var app = new Application ();
|
||||||
return app.run (args);
|
return app.run (args);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
wavelet_sources = [
|
audrey_sources = [
|
||||||
'api.vala',
|
'api.vala',
|
||||||
'application.vala',
|
'application.vala',
|
||||||
'main.vala',
|
'main.vala',
|
||||||
|
@ -9,7 +9,7 @@ wavelet_sources = [
|
||||||
'window.vala',
|
'window.vala',
|
||||||
]
|
]
|
||||||
|
|
||||||
wavelet_deps = [
|
audrey_deps = [
|
||||||
config_dep,
|
config_dep,
|
||||||
dependency('gstreamer-1.0'),
|
dependency('gstreamer-1.0'),
|
||||||
dependency('gstreamer-audio-1.0'),
|
dependency('gstreamer-audio-1.0'),
|
||||||
|
@ -40,14 +40,14 @@ blueprints = custom_target('blueprints',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
wavelet_sources += gnome.compile_resources('wavelet-resources',
|
audrey_sources += gnome.compile_resources('audrey-resources',
|
||||||
'wavelet.gresource.xml',
|
'audrey.gresource.xml',
|
||||||
c_name: 'wavelet',
|
c_name: 'audrey',
|
||||||
dependencies: blueprints,
|
dependencies: blueprints,
|
||||||
)
|
)
|
||||||
|
|
||||||
executable('wavelet', wavelet_sources,
|
executable('audrey', audrey_sources,
|
||||||
dependencies: wavelet_deps,
|
dependencies: audrey_deps,
|
||||||
include_directories: config_inc,
|
include_directories: config_inc,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -16,8 +16,8 @@ class Mpris : Object {
|
||||||
public bool can_set_fullscreen { get { return false; } }
|
public bool can_set_fullscreen { get { return false; } }
|
||||||
public bool fullscreen { get { return false; } set { assert (false); } }
|
public bool fullscreen { get { return false; } set { assert (false); } }
|
||||||
public bool has_track_list { get { return false; } }
|
public bool has_track_list { get { return false; } }
|
||||||
public string identity { owned get { return "Wavelet"; } }
|
public string identity { owned get { return "audrey"; } }
|
||||||
public string desktop_entry { owned get { return "wavelet"; } }
|
public string desktop_entry { owned get { return "eu.callcc.audrey"; } }
|
||||||
public string[] supported_uri_schemes { owned get { return {}; } }
|
public string[] supported_uri_schemes { owned get { return {}; } }
|
||||||
public string[] supported_mime_types { owned get { return {}; } }
|
public string[] supported_mime_types { owned get { return {}; } }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using Gtk 4.0;
|
using Gtk 4.0;
|
||||||
using Adw 1;
|
using Adw 1;
|
||||||
|
|
||||||
template $WaveletPlayQueue: Adw.NavigationPage {
|
template $PlayQueue: Adw.NavigationPage {
|
||||||
title: _("Play queue");
|
title: _("Play queue");
|
||||||
|
|
||||||
Adw.ToolbarView {
|
Adw.ToolbarView {
|
||||||
|
@ -38,8 +38,8 @@ template $WaveletPlayQueue: Adw.NavigationPage {
|
||||||
template ColumnViewCell {
|
template ColumnViewCell {
|
||||||
child: Label {
|
child: Label {
|
||||||
halign: start;
|
halign: start;
|
||||||
label: bind template.item as <$WaveletSong>.title;
|
label: bind template.item as <$Song>.title;
|
||||||
tooltip-text: bind template.item as <$WaveletSong>.title;
|
tooltip-text: bind template.item as <$Song>.title;
|
||||||
ellipsize: end;
|
ellipsize: end;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -54,8 +54,8 @@ template $WaveletPlayQueue: Adw.NavigationPage {
|
||||||
template ColumnViewCell {
|
template ColumnViewCell {
|
||||||
child: Label {
|
child: Label {
|
||||||
halign: start;
|
halign: start;
|
||||||
label: bind template.item as <$WaveletSong>.artist;
|
label: bind template.item as <$Song>.artist;
|
||||||
tooltip-text: bind template.item as <$WaveletSong>.artist;
|
tooltip-text: bind template.item as <$Song>.artist;
|
||||||
ellipsize: end;
|
ellipsize: end;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[GtkTemplate (ui = "/eu/callcc/Wavelet/play_queue.ui")]
|
[GtkTemplate (ui = "/eu/callcc/audrey/play_queue.ui")]
|
||||||
public class Wavelet.PlayQueue : Adw.NavigationPage {
|
public class PlayQueue : Adw.NavigationPage {
|
||||||
public ListStore songs { get; private set; }
|
public ListStore songs { get; private set; }
|
||||||
|
|
||||||
public uint selected_index { get; set; }
|
public uint selected_index { get; set; }
|
||||||
|
|
|
@ -30,9 +30,9 @@ class Playbin : Object {
|
||||||
this.playbin = Gst.ElementFactory.make ("playbin3", null);
|
this.playbin = Gst.ElementFactory.make ("playbin3", null);
|
||||||
assert (this.playbin != null);
|
assert (this.playbin != null);
|
||||||
|
|
||||||
//dynamic Gst.Element souphttpsrc = ((Gst.Bin) this.playbin).get_by_name ("souphttpsrc");
|
//dynamic Gst.Element souphttpsrc = ((Gst.Bin) this.playbin).get_by_name ("souphttpsrc0");
|
||||||
//assert (souphttpsrc != null);
|
//assert (souphttpsrc != null);
|
||||||
//souphttpsrc.user_agent = "Wavelet/0.1.0 (Linux)"; // WAVELET_VERSION
|
//souphttpsrc.user_agent = "audrey/0.1.0 (Linux)"; // AUDREY_VERSION
|
||||||
|
|
||||||
// regularly update position
|
// regularly update position
|
||||||
Timeout.add (500, () => {
|
Timeout.add (500, () => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using Gtk 4.0;
|
using Gtk 4.0;
|
||||||
using Adw 1;
|
using Adw 1;
|
||||||
|
|
||||||
template $WaveletSetup: Adw.PreferencesDialog {
|
template $Setup: Adw.PreferencesDialog {
|
||||||
title: _("Setup");
|
title: _("Setup");
|
||||||
|
|
||||||
Adw.ToolbarView {
|
Adw.ToolbarView {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[CCode (cname = "sqlite3_randomness")]
|
[CCode (cname = "sqlite3_randomness")]
|
||||||
public extern void randomness (int N, void *P);
|
public extern void randomness (int N, void *P);
|
||||||
|
|
||||||
[GtkTemplate (ui = "/eu/callcc/Wavelet/setup.ui")]
|
[GtkTemplate (ui = "/eu/callcc/audrey/setup.ui")]
|
||||||
public class Wavelet.Setup : Adw.PreferencesDialog {
|
public class Setup : Adw.PreferencesDialog {
|
||||||
public string status { get; private set; default = _("Not connected"); }
|
public string status { get; private set; default = _("Not connected"); }
|
||||||
|
|
||||||
public bool authn_can_edit { get; private set; default = true; }
|
public bool authn_can_edit { get; private set; default = true; }
|
||||||
|
@ -14,14 +14,14 @@ public class Wavelet.Setup : Adw.PreferencesDialog {
|
||||||
public string token;
|
public string token;
|
||||||
public string salt;
|
public string salt;
|
||||||
|
|
||||||
public signal void connected (Wavelet.Subsonic api);
|
public signal void connected (Subsonic api);
|
||||||
|
|
||||||
private Sqlite.Database db;
|
private Sqlite.Database db;
|
||||||
private Sqlite.Statement db_get;
|
private Sqlite.Statement db_get;
|
||||||
private Sqlite.Statement db_set;
|
private Sqlite.Statement db_set;
|
||||||
|
|
||||||
construct {
|
construct {
|
||||||
var app_config_dir = Path.build_filename (Environment.get_user_config_dir (), "wavelet");
|
var app_config_dir = Path.build_filename (Environment.get_user_config_dir (), "audrey");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
File.new_build_filename (app_config_dir).make_directory_with_parents ();
|
File.new_build_filename (app_config_dir).make_directory_with_parents ();
|
||||||
|
@ -60,7 +60,7 @@ public class Wavelet.Setup : Adw.PreferencesDialog {
|
||||||
new_token = this.token;
|
new_token = this.token;
|
||||||
new_salt = this.salt;
|
new_salt = this.salt;
|
||||||
}
|
}
|
||||||
var api = new Wavelet.Subsonic.with_token (
|
var api = new Subsonic.with_token (
|
||||||
this.server_url,
|
this.server_url,
|
||||||
this.username,
|
this.username,
|
||||||
new_token,
|
new_token,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using Gtk 4.0;
|
using Gtk 4.0;
|
||||||
using Adw 1;
|
using Adw 1;
|
||||||
|
|
||||||
template $WaveletWindow: Adw.ApplicationWindow {
|
template $Window: Adw.ApplicationWindow {
|
||||||
title: _("Wavelet");
|
title: _("audrey");
|
||||||
default-width: 800;
|
default-width: 800;
|
||||||
default-height: 600;
|
default-height: 600;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ template $WaveletWindow: Adw.ApplicationWindow {
|
||||||
[sidebar]
|
[sidebar]
|
||||||
Adw.NavigationPage {
|
Adw.NavigationPage {
|
||||||
width-request: 100;
|
width-request: 100;
|
||||||
title: _("Wavelet");
|
title: _("audrey");
|
||||||
|
|
||||||
Adw.ToolbarView {
|
Adw.ToolbarView {
|
||||||
[top]
|
[top]
|
||||||
|
@ -81,7 +81,7 @@ paintable: bind template.playing_cover_art;
|
||||||
name: "play_queue";
|
name: "play_queue";
|
||||||
title: _("Play queue");
|
title: _("Play queue");
|
||||||
|
|
||||||
child: $WaveletPlayQueue play_queue {};
|
child: $PlayQueue play_queue {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,14 +100,14 @@ paintable: bind template.playing_cover_art;
|
||||||
Label {
|
Label {
|
||||||
styles [ "heading" ]
|
styles [ "heading" ]
|
||||||
halign: start;
|
halign: start;
|
||||||
label: bind template.song as <$WaveletSong>.title;
|
label: bind template.song as <$Song>.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
Box {
|
Box {
|
||||||
halign: start;
|
halign: start;
|
||||||
Label {
|
Label {
|
||||||
styles [ "caption" ]
|
styles [ "caption" ]
|
||||||
label: bind template.song as <$WaveletSong>.artist;
|
label: bind template.song as <$Song>.artist;
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
styles [ "caption" ]
|
styles [ "caption" ]
|
||||||
|
@ -115,7 +115,7 @@ paintable: bind template.playing_cover_art;
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
styles [ "caption" ]
|
styles [ "caption" ]
|
||||||
label: bind template.song as <$WaveletSong>.album;
|
label: bind template.song as <$Song>.album;
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
styles [ "caption" ]
|
styles [ "caption" ]
|
||||||
|
@ -123,7 +123,7 @@ paintable: bind template.playing_cover_art;
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
styles [ "caption" ]
|
styles [ "caption" ]
|
||||||
label: bind template.song as <$WaveletSong>.year;
|
label: bind template.song as <$Song>.year;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
[GtkTemplate (ui = "/eu/callcc/Wavelet/window.ui")]
|
[GtkTemplate (ui = "/eu/callcc/audrey/window.ui")]
|
||||||
class Wavelet.Window : Adw.ApplicationWindow {
|
class Window : Adw.ApplicationWindow {
|
||||||
[GtkChild] private unowned Gtk.ListBox sidebar;
|
[GtkChild] private unowned Gtk.ListBox sidebar;
|
||||||
[GtkChild] private unowned Gtk.ListBoxRow sidebar_play_queue;
|
[GtkChild] private unowned Gtk.ListBoxRow sidebar_play_queue;
|
||||||
[GtkChild] private unowned Gtk.Stack stack;
|
[GtkChild] private unowned Gtk.Stack stack;
|
||||||
|
|
||||||
[GtkChild] public unowned Wavelet.PlayQueue play_queue;
|
[GtkChild] public unowned PlayQueue play_queue;
|
||||||
[GtkChild] public unowned Adw.ButtonRow shuffle_all_tracks;
|
[GtkChild] public unowned Adw.ButtonRow shuffle_all_tracks;
|
||||||
|
|
||||||
private Wavelet.Setup setup;
|
private Setup setup;
|
||||||
|
|
||||||
public bool playing { get; private set; default = false; }
|
public bool playing { get; private set; default = false; }
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class Wavelet.Window : Adw.ApplicationWindow {
|
||||||
Object (application: app);
|
Object (application: app);
|
||||||
|
|
||||||
var provider = new Gtk.CssProvider ();
|
var provider = new Gtk.CssProvider ();
|
||||||
provider.load_from_resource("/eu/callcc/Wavelet/wavelet.css");
|
provider.load_from_resource("/eu/callcc/audrey/audrey.css");
|
||||||
|
|
||||||
Gtk.StyleContext.add_provider_for_display (Gdk.Display.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
|
Gtk.StyleContext.add_provider_for_display (Gdk.Display.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class Wavelet.Window : Adw.ApplicationWindow {
|
||||||
construct {
|
construct {
|
||||||
Bus.own_name (
|
Bus.own_name (
|
||||||
BusType.SESSION,
|
BusType.SESSION,
|
||||||
"org.mpris.MediaPlayer2.wavelet",
|
"org.mpris.MediaPlayer2.audrey",
|
||||||
BusNameOwnerFlags.NONE,
|
BusNameOwnerFlags.NONE,
|
||||||
(conn) => {
|
(conn) => {
|
||||||
try {
|
try {
|
||||||
|
@ -61,7 +61,7 @@ class Wavelet.Window : Adw.ApplicationWindow {
|
||||||
() => {},
|
() => {},
|
||||||
() => { error ("could not acquire dbus name"); });
|
() => { error ("could not acquire dbus name"); });
|
||||||
|
|
||||||
this.setup = new Wavelet.Setup ();
|
this.setup = new Setup ();
|
||||||
|
|
||||||
this.setup.connected.connect ((api) => {
|
this.setup.connected.connect ((api) => {
|
||||||
public_api = api;
|
public_api = api;
|
||||||
|
|
Loading…
Reference in a new issue