Unify games import

This commit is contained in:
kramo
2023-03-29 00:23:23 +02:00
parent 3f4443d703
commit 643ca368a6
16 changed files with 252 additions and 331 deletions

View File

@@ -8,49 +8,54 @@ ShortcutsWindow help_overlay {
max-height: 10;
ShortcutsGroup {
title: C_("shortcut window", "General");
title: C_("shortcuts window", "General");
ShortcutsShortcut {
title: C_("shortcut window", "Quit");
title: C_("shortcuts window", "Quit");
action-name: "app.quit";
}
ShortcutsShortcut {
title: C_("shortcut window", "Search");
title: C_("shortcuts window", "Search");
action-name: "win.toggle_search";
}
ShortcutsShortcut {
title: C_("shortcut window", "Show preferences");
title: C_("shortcuts window", "Show preferences");
action-name: "app.preferences";
}
ShortcutsShortcut {
title: C_("shortcut window", "Shortcuts");
title: C_("shortcuts window", "Shortcuts");
action-name: "win.show-help-overlay";
}
ShortcutsShortcut {
title: C_("shortcut window", "Undo");
title: C_("shortcuts window", "Undo");
action-name: "win.undo_remove";
}
ShortcutsShortcut {
title: C_("shortcut window", "Open menu");
title: C_("shortcuts window", "Open menu");
action-name: "win.open_menu";
}
}
ShortcutsGroup {
title: C_("shortcut window", "Games");
title: C_("shortcuts window", "Games");
ShortcutsShortcut {
title: C_("shortcut window", "Add new game");
title: C_("shortcuts window", "Add new game");
action-name: "app.add_game";
}
ShortcutsShortcut {
title: C_("shortcut window", "Show hidden games");
title: C_("shortcuts window", "Import games");
action-name: "app.import";
}
ShortcutsShortcut {
title: C_("shortcuts window", "Show hidden games");
action-name: "win.show_hidden";
}
}

View File

@@ -3,7 +3,7 @@ using Adw 1;
template PreferencesWindow : Adw.PreferencesWindow {
search-enabled: false;
default-height: 550;
default-height: 500;
Adw.PreferencesPage page {
Adw.PreferencesGroup general_group {
@@ -39,6 +39,14 @@ template PreferencesWindow : Adw.PreferencesWindow {
Adw.PreferencesGroup steam_group {
title: _("Steam");
Adw.ActionRow {
title: _("Import From Steam");
Switch steam_switch {
valign: center;
}
}
Adw.ActionRow {
title: _("Steam Install Location");
subtitle: _("Directory to use when importing games");
@@ -77,6 +85,14 @@ template PreferencesWindow : Adw.PreferencesWindow {
Adw.PreferencesGroup heroic_group {
title: _("Heroic");
Adw.ActionRow {
title: _("Import From Heroic");
Switch heroic_switch {
valign: center;
}
}
Adw.ActionRow {
title: _("Heroic Install Location");
subtitle: _("Directory to use when importing games");
@@ -115,6 +131,14 @@ template PreferencesWindow : Adw.PreferencesWindow {
Adw.PreferencesGroup bottles_group {
title: _("Bottles");
Adw.ActionRow {
title: _("Import From Bottles");
Switch bottles_switch {
valign: center;
}
}
Adw.ActionRow {
title: _("Bottles Install Location");
subtitle: _("Directory to use when importing games");

View File

@@ -384,23 +384,9 @@ menu add_games {
}
}
section {
submenu {
label: _("Import from");
item {
label: _("Steam");
action: "app.steam_import";
}
item {
label: _("Heroic");
action: "app.heroic_import";
}
item {
label: _("Bottles");
action: "app.bottles_import";
hidden-when: "action-disabled";
}
item {
label: _("Import");
action: "app.import";
}
}
}