Use Blueprint menu item shorthands

This commit is contained in:
kramo
2023-10-22 22:36:14 +02:00
parent a48841e5cb
commit 9557caecbc
2 changed files with 16 additions and 74 deletions

View File

@@ -99,38 +99,16 @@ template $Game : Box {
menu game_options { menu game_options {
section { section {
item { item (_("Edit"), "app.edit_game")
label: _("Edit"); item (_("Hide"), "app.hide_game")
action: "app.edit_game"; item (_("Remove"), "app.remove_game")
}
item {
label: _("Hide");
action: "app.hide_game";
}
item {
label: _("Remove");
action: "app.remove_game";
}
} }
} }
menu hidden_game_options { menu hidden_game_options {
section { section {
item { item (_("Edit"), "app.edit_game")
label: _("Edit"); item (_("Unhide"), "app.hide_game")
action: "app.edit_game"; item (_("Remove"), "app.remove_game")
}
item {
label: _("Unhide");
action: "app.hide_game";
}
item {
label: _("Remove");
action: "app.remove_game";
}
} }
} }

View File

@@ -511,36 +511,19 @@ menu primary_menu {
} }
section { section {
item { item (_("Preferences"), "app.preferences")
label: _("Preferences"); item (_("Keyboard Shortcuts"), "win.show-help-overlay")
action: "app.preferences"; item (_("About Cartridges"), "app.about")
}
item {
label: _("Keyboard Shortcuts");
action: "win.show-help-overlay";
}
item {
label: _("About Cartridges");
action: "app.about";
}
} }
} }
menu add_games { menu add_games {
section { section {
item { item (_("Add Game"), "app.add_game")
label: _("Add Game");
action: "app.add_game";
}
} }
section { section {
item { item (_("Import"), "app.import")
label: _("Import");
action: "app.import";
}
} }
} }
@@ -548,29 +531,10 @@ menu search {
section { section {
label: "Search on…"; label: "Search on…";
item { item (_("IGDB"), "app.igdb_search")
label: "IGDB"; item (_("SteamGridDB"), "app.sgdb_search")
action: "app.igdb_search"; item (_("ProtonDB"), "app.protondb_search")
} item (_("Lutris"), "app.lutris_search")
item (_("HowLongToBeat"), "app.hltb_search")
item {
label: "SteamGridDB";
action: "app.sgdb_search";
}
item {
label: "ProtonDB";
action: "app.protondb_search";
}
item {
label: "Lutris";
action: "app.lutris_search";
}
item {
label: "HowLongToBeat";
action: "app.hltb_search";
}
} }
} }