mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 03:47:23 +01:00
editor: Use AdwButtonRow where possible
This commit is contained in:
parent
18ba84c86f
commit
e59052a362
8 changed files with 40 additions and 91 deletions
|
|
@ -45,18 +45,11 @@ template $MusicusAlbumEditor: Adw.NavigationPage {
|
|||
"boxed-list"
|
||||
]
|
||||
|
||||
Adw.ActionRow {
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _recording");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activatable: true;
|
||||
activated => $select_recording() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Box select_recording_box {
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
|
|||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ActionRow work_row {
|
||||
|
|
@ -68,7 +68,7 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -77,21 +77,14 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
|
|||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ActionRow {
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _performer");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activatable: true;
|
||||
activated => $select_person() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Box select_person_box {
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -101,7 +94,7 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -110,21 +103,14 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
|
|||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ActionRow {
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _ensemble");
|
||||
use-underline: true;
|
||||
activatable: true;
|
||||
start-icon-name: "list-add-symbolic";
|
||||
activated => $select_ensemble() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Box select_ensemble_box {
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -133,7 +119,7 @@ template $MusicusRecordingEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ButtonRow save_row {
|
||||
|
|
|
|||
|
|
@ -70,16 +70,11 @@ template $MusicusTracksEditor: Adw.NavigationPage {
|
|||
"boxed-list"
|
||||
]
|
||||
|
||||
Adw.ActionRow {
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _files");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activatable: true;
|
||||
activated => $add_files() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,17 +14,11 @@ template $MusicusTranslationEditor: Adw.Bin {
|
|||
use-underline: true;
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Add translation");
|
||||
activatable: true;
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _translation");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activated => $add_translation() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Box select_person_box {
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -45,21 +45,14 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ActionRow {
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _composer");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activatable: true;
|
||||
activated => $add_person() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Box select_person_box {
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +62,7 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -78,19 +71,14 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ActionRow {
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _part");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activatable: true;
|
||||
activated => $add_part() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -100,7 +88,7 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -110,21 +98,14 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
margin-bottom: 24;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ActionRow {
|
||||
Adw.ButtonRow {
|
||||
title: _("Add _instrument");
|
||||
start-icon-name: "list-add-symbolic";
|
||||
use-underline: true;
|
||||
activatable: true;
|
||||
activated => $add_instrument() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Box select_instrument_box {
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -133,7 +114,7 @@ template $MusicusWorkEditor: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
"boxed-list",
|
||||
]
|
||||
|
||||
Adw.ButtonRow save_row {
|
||||
|
|
|
|||
|
|
@ -232,17 +232,17 @@ impl MusicusRecordingEditor {
|
|||
}
|
||||
|
||||
#[template_callback]
|
||||
fn select_work(&self, _: &adw::ActionRow) {
|
||||
fn select_work(&self) {
|
||||
self.imp().work_selector_popover.get().unwrap().popup();
|
||||
}
|
||||
|
||||
#[template_callback]
|
||||
fn select_person(&self, _: &adw::ActionRow) {
|
||||
fn select_person(&self) {
|
||||
self.imp().persons_popover.get().unwrap().popup();
|
||||
}
|
||||
|
||||
#[template_callback]
|
||||
fn select_ensemble(&self, _: &adw::ActionRow) {
|
||||
fn select_ensemble(&self) {
|
||||
self.imp().ensembles_popover.get().unwrap().popup();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ impl MusicusTranslationEditor {
|
|||
}
|
||||
|
||||
#[template_callback]
|
||||
fn add_translation(&self, _: &adw::ActionRow) {
|
||||
fn add_translation(&self) {
|
||||
self.add_entry(&util::LANG, &self.imp().entry_row.text());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -212,12 +212,12 @@ impl MusicusWorkEditor {
|
|||
}
|
||||
|
||||
#[template_callback]
|
||||
fn add_person(&self, _: &adw::ActionRow) {
|
||||
fn add_person(&self) {
|
||||
self.imp().persons_popover.get().unwrap().popup();
|
||||
}
|
||||
|
||||
#[template_callback]
|
||||
fn add_part(&self, _: &adw::ActionRow) {
|
||||
fn add_part(&self) {
|
||||
let editor = MusicusWorkEditor::new(&self.navigation(), &self.library(), None, true);
|
||||
|
||||
editor.connect_created(clone!(
|
||||
|
|
@ -232,7 +232,7 @@ impl MusicusWorkEditor {
|
|||
}
|
||||
|
||||
#[template_callback]
|
||||
fn add_instrument(&self, _: &adw::ActionRow) {
|
||||
fn add_instrument(&self) {
|
||||
self.imp().instruments_popover.get().unwrap().popup();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue