Skip to content

Commit

Permalink
feat: поменять Sdk Devel версии на master
Browse files Browse the repository at this point in the history
Также исправить ошибки из-за невозможности определения кастомных типов в шаблонах путём добавления их через `[GtkChild]`.
  • Loading branch information
Rirusha committed May 22, 2024
1 parent ede0376 commit 920d542
Show file tree
Hide file tree
Showing 22 changed files with 55 additions and 34 deletions.
12 changes: 8 additions & 4 deletions build-aux/flatpak/nightly/io.github.Rirusha.Cassette-Devel.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"id" : "io.github.Rirusha.Cassette-Devel",
"runtime" : "org.gnome.Platform",
"runtime-version" : "46",
"runtime-version" : "master",
"sdk" : "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.vala-nightly"
],
"command" : "cassette",
"tags": ["nightly"],
"finish-args" : [
"--share=network",
"--share=ipc",
Expand All @@ -16,9 +20,9 @@
"--talk-name=org.mpris.MediaPlayer2.Player",
"--own-name=org.mpris.MediaPlayer2.cassette"
],
"build-options" : {
"append-path" : "/usr/lib/sdk/vala/bin",
"prepend-ld-library-path" : "/usr/lib/sdk/vala/lib"
"build-options": {
"prepend-path": "/usr/lib/sdk/vala-nightly/bin/",
"prepend-ld-library-path": "/usr/lib/sdk/vala-nightly/lib"
},
"cleanup" : [
"/include",
Expand Down
1 change: 0 additions & 1 deletion data/io.github.Rirusha.Cassette.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
<file preprocess="xml-stripblanks">ui/track-local-content.ui</file>
<file preprocess="xml-stripblanks">ui/track-placeholder.ui</file>
<file preprocess="xml-stripblanks">ui/track-queue-content.ui</file>
<file preprocess="xml-stripblanks">ui/track-row.ui</file>
<file preprocess="xml-stripblanks">ui/volume-button.ui</file>
</gresource>
</gresources>
2 changes: 1 addition & 1 deletion data/ui/devel-view.blp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ template $CassetteDevelView: $CassetteBaseView {
vexpand: true;
vscrollbar-policy: external;

$CassetteTrackCarousel {
$CassetteTrackCarousel track_carousel {
interactive: true;
spacing: 16;
panels-width: 270;
Expand Down
2 changes: 1 addition & 1 deletion data/ui/header-bar.blp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ template $CassetteHeaderBar: $CassetteShrinkableBin {
}

[end]
$CassetteCacheIndicator {
$CassetteCacheIndicator cache_indicator {
visible: bind template.sidebar-shown inverted;
sensitive: bind template.interactive;
}
Expand Down
4 changes: 2 additions & 2 deletions data/ui/player-bar.blp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ template $CassettePlayerBar: Adw.Bin {
hexpand: true;
tooltip-text: _("Show track info");

$CassetteTrackCarousel {
$CassetteTrackCarousel track_carousel {
interactive: false;
spacing: 4;
halign: start;
Expand Down Expand Up @@ -99,7 +99,7 @@ template $CassettePlayerBar: Adw.Bin {
margin-start: 4;
margin-end: 4;

$CassettePlayMarkGlobal {}
$CassettePlayMarkGlobal play_mark_global {}
};

end-widget: Box {
Expand Down
2 changes: 1 addition & 1 deletion data/ui/preferences-dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
</object>
</child>
<child>
<object class="CassetteCustomPagesPreferences"/>
<object class="CassetteCustomPagesPreferences" id="custom_pages_preferences"/>
</child>
</object>
</child>
Expand Down
2 changes: 1 addition & 1 deletion data/ui/sidebar.blp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ template $CassetteSideBar: $CassetteShrinkableBin {
$CassettePrimaryMenuButton menu_button {}

[end]
$CassetteCacheIndicator {}
$CassetteCacheIndicator cache_indicator {}
}

content: Gtk.ScrolledWindow sidebar_content {
Expand Down
2 changes: 1 addition & 1 deletion data/ui/track-info.blp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ template $CassetteTrackInfo: Adw.Bin {
StackPage {
name: "loading";

child: $CassetteLoadingSpinner {
child: $CassetteLoadingSpinner loading_spinner {
size: 24;
};
}
Expand Down
8 changes: 0 additions & 8 deletions data/ui/track-row.ui

This file was deleted.

2 changes: 1 addition & 1 deletion data/ui/window.blp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ template $CassetteWindow: $CassetteApplicationWindow {
StackPage {
name: "loading";

child: $CassetteLoadingSpinner {
child: $CassetteLoadingSpinner loading_spinner {
size: 24;
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/action-cards/station.vala
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

[GtkTemplate (ui = "/io/github/Rirusha/Cassette/ui/action-card-station.ui")]
/**
* A class for convenient work with clickable cards.
*/
* A class for convenient work with clickable cards.
*/
public class Cassette.ActionCardStation : ActionCardCustom {

[GtkChild]
Expand Down
6 changes: 3 additions & 3 deletions src/widgets/buttons/menu/menu-dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
public class Cassette.MenuDialog : Adw.Dialog {

[GtkChild]
unowned Adw.Clamp menu_clamp;
unowned ShrinkableBin shrinkable_bin;
[GtkChild]
unowned Adw.Clamp title_clamp;
[GtkChild]
unowned ShrinkableBin shrinkable_bin;
[GtkChild]
unowned Gtk.ScrolledWindow scrolled_window;
[GtkChild]
unowned Adw.Clamp menu_clamp;

public Gtk.Widget? menu_widget {
get {
Expand Down
4 changes: 4 additions & 0 deletions src/widgets/header-bar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ public class Cassette.HeaderBar : ShrinkableBin {
[GtkChild]
unowned Adw.ViewSwitcher switcher_title;
[GtkChild]
unowned PrimaryMenuButton menu_button;
[GtkChild]
unowned Gtk.Button avatar_button;
[GtkChild]
unowned Adw.Avatar avatar;
[GtkChild]
unowned CacheIndicator cache_indicator;

public bool sidebar_shown { get; set; }

Expand Down
7 changes: 7 additions & 0 deletions src/widgets/player-bar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ using Cassette.Client;
namespace Cassette {
[GtkTemplate (ui = "/io/github/Rirusha/Cassette/ui/player-bar.ui")]
public class PlayerBar : Adw.Bin {

[GtkChild]
unowned TrackCarousel track_carousel;
[GtkChild]
unowned Gtk.Label current_time_mark;
[GtkChild]
Expand All @@ -33,6 +36,8 @@ namespace Cassette {
[GtkChild]
unowned Gtk.Button prev_track_button;
[GtkChild]
unowned PlayMarkGlobal play_mark_global;
[GtkChild]
unowned Gtk.Button next_track_button;
[GtkChild]
unowned Gtk.Button track_detailed_button;
Expand All @@ -52,6 +57,8 @@ namespace Cassette {
unowned Gtk.Button fullscreen_button;
[GtkChild]
unowned TrackOptionsButton track_options_button;
[GtkChild]
unowned VolumeButton volume_button;

public Window window { get; construct set; }

Expand Down
2 changes: 2 additions & 0 deletions src/widgets/preferences/preferences-dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ namespace Cassette {
[GtkChild]
unowned Adw.SwitchRow show_playlists_switch;
[GtkChild]
unowned CustomPagesPreferences custom_pages_preferences;
[GtkChild]
unowned Adw.SwitchRow can_cache_switch;
[GtkChild]
unowned Adw.SpinRow max_thread_number_spin;
Expand Down
2 changes: 2 additions & 0 deletions src/widgets/sidebar/childs/track-info.vala
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ namespace Cassette {
[GtkChild]
unowned Gtk.Stack loading_stack;
[GtkChild]
unowned LoadingSpinner loading_spinner;
[GtkChild]
unowned Gtk.Box lyrics_box;
[GtkChild]
unowned Gtk.Box similar_box;
Expand Down
5 changes: 5 additions & 0 deletions src/widgets/sidebar/sidebar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ using Gee;
namespace Cassette {
[GtkTemplate (ui = "/io/github/Rirusha/Cassette/ui/sidebar.ui")]
public class SideBar : ShrinkableBin {

[GtkChild]
unowned Adw.OverlaySplitView root_flap;
[GtkChild]
unowned PrimaryMenuButton menu_button;
[GtkChild]
unowned CacheIndicator cache_indicator;
[GtkChild]
public unowned Gtk.ScrolledWindow sidebar_content;

TrackList?_track_list = null;
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/track-rows/default.vala
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ namespace Cassette {
[GtkChild]
unowned SaveStack save_stack;
[GtkChild]
unowned LikeButton like_button;
[GtkChild]
unowned DislikeButton dislike_button;
[GtkChild]
unowned LikeButton like_button;
[GtkChild]
unowned Gtk.Label duration_label;
[GtkChild]
unowned TrackOptionsButton track_options_button;
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/track-rows/queue.vala
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ namespace Cassette {
unowned LikeButton like_button;
[GtkChild]
unowned Gtk.Label duration_label;
// [GtkChild]
// unowned TrackOptionsButton track_options_button;
[GtkChild]
unowned TrackOptionsButton track_options_button;

public YaMAPI.Track track_info { get; construct set; }

Expand Down
2 changes: 2 additions & 0 deletions src/widgets/views/devel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public class Cassette.DevelView : BaseView {
unowned Gtk.Button stations_view_button;
[GtkChild]
unowned Gtk.ScrolledWindow scrolled_window;
[GtkChild]
unowned TrackCarousel track_carousel;

construct {
stations_view_button.clicked.connect (() => {
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/views/playlist.vala
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ namespace Cassette {
unowned Gtk.Button add_page_button;
[GtkChild]
unowned Gtk.Box main_box;
// [GtkChild]
// unowned PlaylistOptionsButton playlist_options_button;
[GtkChild]
unowned PlaylistOptionsButton playlist_options_button;
[GtkChild]
unowned Gtk.Switch visibility_switch;
[GtkChild]
Expand Down
8 changes: 6 additions & 2 deletions src/window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,20 @@ public class Cassette.Window : ApplicationWindow {
unowned Adw.ToastOverlay toast_overlay;
[GtkChild]
unowned HeaderBar header_bar;
// [GtkChild]
// unowned Gtk.SearchEntry search_entry;
[GtkChild]
unowned Gtk.SearchEntry search_entry;
[GtkChild]
unowned Adw.Banner info_banner;
[GtkChild]
unowned Gtk.Stack loading_stack;
[GtkChild]
unowned LoadingSpinner loading_spinner;
[GtkChild]
unowned Adw.ViewStack main_stack;
[GtkChild]
unowned Adw.ToolbarView switcher_toolbar;
[GtkChild]
unowned PlayerBar player_bar;

int reconnect_timer = Cassette.Client.TIMEOUT;

Expand Down

0 comments on commit 920d542

Please sign in to comment.