mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Implement add to playlist
This commit is contained in:
parent
714722bd89
commit
4a33ed3fc5
5 changed files with 164 additions and 21 deletions
|
|
@ -33,6 +33,7 @@ template $MusicusSearchPage: Adw.NavigationPage {
|
|||
Gtk.Box {
|
||||
orientation: vertical;
|
||||
hexpand: true;
|
||||
valign: center;
|
||||
|
||||
Gtk.Label title_label {
|
||||
wrap: true;
|
||||
|
|
@ -49,10 +50,10 @@ template $MusicusSearchPage: Adw.NavigationPage {
|
|||
}
|
||||
}
|
||||
|
||||
Gtk.Button {
|
||||
icon-name: "document-edit-symbolic";
|
||||
Gtk.MenuButton {
|
||||
icon-name: "view-more-symbolic";
|
||||
menu-model: item_menu;
|
||||
valign: center;
|
||||
clicked => $edit_button_clicked() swapped;
|
||||
|
||||
styles [
|
||||
"flat",
|
||||
|
|
@ -60,8 +61,8 @@ template $MusicusSearchPage: Adw.NavigationPage {
|
|||
}
|
||||
|
||||
Gtk.Button {
|
||||
icon-name: "media-playback-start-symbolic";
|
||||
label: _("_Play");
|
||||
tooltip-text: _("Play this as a program");
|
||||
use-underline: true;
|
||||
valign: center;
|
||||
clicked => $play_button_clicked() swapped;
|
||||
|
|
@ -276,3 +277,24 @@ menu primary_menu {
|
|||
action: "app.about";
|
||||
}
|
||||
}
|
||||
|
||||
menu item_menu {
|
||||
section {
|
||||
item {
|
||||
label: _("_Add to playlist");
|
||||
action: "search.add-to-playlist";
|
||||
}
|
||||
}
|
||||
|
||||
section {
|
||||
item {
|
||||
label: _("_Edit item");
|
||||
action: "search.edit";
|
||||
}
|
||||
|
||||
item {
|
||||
label: _("_Delete item");
|
||||
action: "search.delete";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue