diff --git a/data/com.github.tkashkin.gamehub.appdata.xml.in b/data/com.github.tkashkin.gamehub.appdata.xml.in index b5de4870..93f15dd8 100644 --- a/data/com.github.tkashkin.gamehub.appdata.xml.in +++ b/data/com.github.tkashkin.gamehub.appdata.xml.in @@ -41,6 +41,11 @@ + + +

Option to merge games from different sources

+
+

Settings dialog rework

diff --git a/data/com.github.tkashkin.gamehub.gschema.xml b/data/com.github.tkashkin.gamehub.gschema.xml index 408350f3..cf0364d9 100644 --- a/data/com.github.tkashkin.gamehub.gschema.xml +++ b/data/com.github.tkashkin.gamehub.gschema.xml @@ -40,6 +40,9 @@ false + + true + diff --git a/debian/changelog b/debian/changelog index f4e5e3dd..505b544a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +com.github.tkashkin.gamehub (0.8.0) xenial; urgency=low + + * Option to merge games from different sources + + -- tkashkin Wed, 15 Aug 2018 16:25:54 +0300 + com.github.tkashkin.gamehub (0.7.0) xenial; urgency=low * Settings dialog rework diff --git a/meson.build b/meson.build index 5a189f3d..36dd5e48 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('com.github.tkashkin.gamehub', 'vala', 'c', version: '0.7.0') +project('com.github.tkashkin.gamehub', 'vala', 'c', version: '0.8.0') i18n = import('i18n') gnome = import('gnome') diff --git a/po/POTFILES b/po/POTFILES index 3b4d4e38..872e357e 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -41,6 +41,7 @@ src/ui/views/GamesView/GameListRow.vala src/ui/views/GamesView/GameDownloadProgressView.vala src/ui/views/GameDetailsView/GameDetailsView.vala +src/ui/views/GameDetailsView/GameDetailsPage.vala src/ui/widgets/AutoSizeImage.vala src/ui/widgets/ActionButton.vala diff --git a/po/com.github.tkashkin.gamehub.pot b/po/com.github.tkashkin.gamehub.pot index 1bf75f43..51d4f71f 100644 --- a/po/com.github.tkashkin.gamehub.pot +++ b/po/com.github.tkashkin.gamehub.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.tkashkin.gamehub\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-08-09 20:06+0300\n" +"POT-Creation-Date: 2018-08-15 16:17+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -34,35 +34,35 @@ msgstr "" msgid "Manage your Steam, GOG and Humble Bundle games in one place." msgstr "" -#: src/data/Game.vala:75 +#: src/data/Game.vala:80 msgid "Installed" msgstr "" -#: src/data/Game.vala:76 +#: src/data/Game.vala:81 msgid "Installing" msgstr "" -#: src/data/Game.vala:77 src/utils/downloader/Downloader.vala:137 +#: src/data/Game.vala:82 src/utils/downloader/Downloader.vala:137 msgid "Download started" msgstr "" -#: src/data/Game.vala:79 +#: src/data/Game.vala:84 msgid "Not installed" msgstr "" -#: src/data/Game.vala:89 +#: src/data/Game.vala:94 msgid "Installed:" msgstr "" -#: src/data/Game.vala:90 +#: src/data/Game.vala:95 msgid "Installing:" msgstr "" -#: src/data/Game.vala:91 +#: src/data/Game.vala:96 msgid "Downloading:" msgstr "" -#: src/data/Game.vala:93 +#: src/data/Game.vala:98 msgid "Not installed:" msgstr "" @@ -78,8 +78,8 @@ msgstr "" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:17 #: src/ui/views/WelcomeView.vala:34 src/ui/views/WelcomeView.vala:58 -#: src/ui/views/GamesView/GamesView.vala:159 -#: src/ui/views/GamesView/GamesView.vala:379 +#: src/ui/views/GamesView/GamesView.vala:163 +#: src/ui/views/GamesView/GamesView.vala:384 msgid "Settings" msgstr "" @@ -92,19 +92,19 @@ msgid "Interface" msgstr "" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:60 -#: src/ui/dialogs/GameDetailsDialog.vala:31 +#: src/ui/dialogs/GameDetailsDialog.vala:32 msgid "Close" msgstr "" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:134 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:132 msgid "Open" msgstr "" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:141 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:139 msgid "Clear" msgstr "" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:157 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:155 #, c-format msgid "%llu installer; %s" msgid_plural "%llu installers; %s" @@ -119,49 +119,53 @@ msgstr "" msgid "Compact list" msgstr "" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:20 +#: src/ui/dialogs/SettingsDialog/tabs/UI.vala:23 +msgid "Merge games from different sources" +msgstr "" + +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:23 msgid "Enabled" msgstr "" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Steam API keys have limited number of uses per day" msgstr "" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Generate key" msgstr "" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:29 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:32 msgid "Installation directory" msgstr "" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:37 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:50 msgid "Default" msgstr "" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:45 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:58 msgid "Restore default API key" msgstr "" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:56 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:69 msgid "Steam API key" msgstr "" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:25 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:28 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:28 msgid "Games directory" msgstr "" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:27 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:27 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:30 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:30 msgid "Installers cache" msgstr "" #: src/ui/dialogs/GameInstallDialog.vala:31 #: src/ui/dialogs/GameInstallDialog.vala:131 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:202 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:187 msgid "Install" msgstr "" @@ -219,138 +223,138 @@ msgstr "" msgid "Return to GameHub after installing" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "No games" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "Get some games or enable some game sources in settings" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:63 -#: src/ui/views/GamesView/GamesView.vala:281 +#: src/ui/views/GamesView/GamesView.vala:67 +#: src/ui/views/GamesView/GamesView.vala:285 msgid "Reload" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:109 +#: src/ui/views/GamesView/GamesView.vala:113 msgid "Grid view" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:110 +#: src/ui/views/GamesView/GamesView.vala:114 msgid "List view" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:122 +#: src/ui/views/GamesView/GamesView.vala:126 msgid "All games" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:126 +#: src/ui/views/GamesView/GamesView.vala:130 #, c-format msgid "%s games" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:132 +#: src/ui/views/GamesView/GamesView.vala:136 msgid "Downloads" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:154 +#: src/ui/views/GamesView/GamesView.vala:158 msgid "Search" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:274 +#: src/ui/views/GamesView/GamesView.vala:278 #, c-format msgid "%u game" msgid_plural "%u games" msgstr[0] "" msgstr[1] "" -#: src/ui/views/GamesView/GamesView.vala:278 +#: src/ui/views/GamesView/GamesView.vala:282 #, c-format msgid "No %s games" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:279 +#: src/ui/views/GamesView/GamesView.vala:283 msgid "Get some Linux-compatible games" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:300 +#: src/ui/views/GamesView/GamesView.vala:304 #, c-format msgid "No games matching “%s”" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:305 +#: src/ui/views/GamesView/GamesView.vala:309 #, c-format msgid "No %1$s games matching “%2$s”" msgstr "" -#: src/ui/views/GamesView/GamesView.vala:377 +#: src/ui/views/GamesView/GamesView.vala:382 msgid "" "No games were loaded from Steam. Set your games list privacy to public or " "use your own Steam API key in settings." msgstr "" -#: src/ui/views/GamesView/GamesView.vala:378 +#: src/ui/views/GamesView/GamesView.vala:383 msgid "Privacy" msgstr "" #: src/ui/views/GamesView/GameDownloadProgressView.vala:59 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:129 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:114 msgid "Pause download" msgstr "" #: src/ui/views/GamesView/GameDownloadProgressView.vala:64 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:135 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:120 msgid "Resume download" msgstr "" #: src/ui/views/GamesView/GameDownloadProgressView.vala:69 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:141 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:126 msgid "Cancel download" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:162 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:147 msgid "Description" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:203 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:188 msgid "Run" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:204 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:189 msgid "Open installation directory" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:205 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:190 msgid "Open store page" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:206 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:191 msgid "Uninstall" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:313 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:367 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:304 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:358 msgid "Language" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:316 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:370 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:307 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:361 msgid "Languages" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:337 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:328 msgid "Category" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:340 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:331 msgid "Categories" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:355 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:346 msgid "Genre" msgstr "" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:358 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:349 msgid "Genres" msgstr "" diff --git a/po/de.po b/po/de.po index 8cb3ad58..9da89086 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.tkashkin.gamehub\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-08-09 20:06+0300\n" +"POT-Creation-Date: 2018-08-15 16:17+0300\n" "PO-Revision-Date: 2018-07-14 00:51+0300\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -33,35 +33,35 @@ msgstr "Alle Spiele an einem Ort" msgid "Manage your Steam, GOG and Humble Bundle games in one place." msgstr "Verwalten Sie Ihre Steam, GOG und Humble Bundle Spiele an einem Ort." -#: src/data/Game.vala:75 +#: src/data/Game.vala:80 msgid "Installed" msgstr "Installiert" -#: src/data/Game.vala:76 +#: src/data/Game.vala:81 msgid "Installing" msgstr "Wird installiert" -#: src/data/Game.vala:77 src/utils/downloader/Downloader.vala:137 +#: src/data/Game.vala:82 src/utils/downloader/Downloader.vala:137 msgid "Download started" msgstr "Download ist gestartet" -#: src/data/Game.vala:79 +#: src/data/Game.vala:84 msgid "Not installed" msgstr "Nicht installiert" -#: src/data/Game.vala:89 +#: src/data/Game.vala:94 msgid "Installed:" msgstr "Installiert:" -#: src/data/Game.vala:90 +#: src/data/Game.vala:95 msgid "Installing:" msgstr "Wird installiert:" -#: src/data/Game.vala:91 +#: src/data/Game.vala:96 msgid "Downloading:" msgstr "Wird heruntergeladen:" -#: src/data/Game.vala:93 +#: src/data/Game.vala:98 msgid "Not installed:" msgstr "Nicht installiert:" @@ -79,8 +79,8 @@ msgstr "" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:17 #: src/ui/views/WelcomeView.vala:34 src/ui/views/WelcomeView.vala:58 -#: src/ui/views/GamesView/GamesView.vala:159 -#: src/ui/views/GamesView/GamesView.vala:379 +#: src/ui/views/GamesView/GamesView.vala:163 +#: src/ui/views/GamesView/GamesView.vala:384 msgid "Settings" msgstr "Einstellungen" @@ -93,19 +93,19 @@ msgid "Interface" msgstr "Schnittstelle" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:60 -#: src/ui/dialogs/GameDetailsDialog.vala:31 +#: src/ui/dialogs/GameDetailsDialog.vala:32 msgid "Close" msgstr "Schließen" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:134 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:132 msgid "Open" msgstr "Öffnen" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:141 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:139 msgid "Clear" msgstr "Löschen" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:157 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:155 #, c-format msgid "%llu installer; %s" msgid_plural "%llu installers; %s" @@ -120,50 +120,54 @@ msgstr "Dunkles Theme benutzen" msgid "Compact list" msgstr "Kompakte Liste" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:20 +#: src/ui/dialogs/SettingsDialog/tabs/UI.vala:23 +msgid "Merge games from different sources" +msgstr "Spiele aus verschiedenen Quellen zusammenführen" + +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:23 msgid "Enabled" msgstr "Aktiviert" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Steam API keys have limited number of uses per day" msgstr "" "Steam-API-Schlüssel haben eine begrenzte Anzahl von Verwendungen pro Tag" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Generate key" msgstr "Schlüssel generieren" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:29 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:32 msgid "Installation directory" msgstr "Installationsordner" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:37 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:50 msgid "Default" msgstr "Standard" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:45 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:58 msgid "Restore default API key" msgstr "Wiederherstellen des Standard-API-Schlüssels" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:56 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:69 msgid "Steam API key" msgstr "Steam-API-Schlüssel" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:25 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:28 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:28 msgid "Games directory" msgstr "Spieleordner" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:27 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:27 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:30 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:30 msgid "Installers cache" msgstr "Installateure Cache" #: src/ui/dialogs/GameInstallDialog.vala:31 #: src/ui/dialogs/GameInstallDialog.vala:131 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:202 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:187 msgid "Install" msgstr "Installieren" @@ -221,73 +225,73 @@ msgstr "%s installieren" msgid "Return to GameHub after installing" msgstr "Zurück zu GameHub nach der Installation" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "No games" msgstr "Keine Spiele" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "Get some games or enable some game sources in settings" msgstr "" "Holen Sie sich einige Spiele oder aktivieren Sie einige Spielquellen in den " "Einstellungen" -#: src/ui/views/GamesView/GamesView.vala:63 -#: src/ui/views/GamesView/GamesView.vala:281 +#: src/ui/views/GamesView/GamesView.vala:67 +#: src/ui/views/GamesView/GamesView.vala:285 msgid "Reload" msgstr "Neu laden" -#: src/ui/views/GamesView/GamesView.vala:109 +#: src/ui/views/GamesView/GamesView.vala:113 msgid "Grid view" msgstr "Rasteransicht" -#: src/ui/views/GamesView/GamesView.vala:110 +#: src/ui/views/GamesView/GamesView.vala:114 msgid "List view" msgstr "Listenansicht" -#: src/ui/views/GamesView/GamesView.vala:122 +#: src/ui/views/GamesView/GamesView.vala:126 msgid "All games" msgstr "Alle Spiele" -#: src/ui/views/GamesView/GamesView.vala:126 +#: src/ui/views/GamesView/GamesView.vala:130 #, c-format msgid "%s games" msgstr "Spiele von %s" -#: src/ui/views/GamesView/GamesView.vala:132 +#: src/ui/views/GamesView/GamesView.vala:136 msgid "Downloads" msgstr "Downloads" -#: src/ui/views/GamesView/GamesView.vala:154 +#: src/ui/views/GamesView/GamesView.vala:158 msgid "Search" msgstr "Suche" -#: src/ui/views/GamesView/GamesView.vala:274 +#: src/ui/views/GamesView/GamesView.vala:278 #, c-format msgid "%u game" msgid_plural "%u games" msgstr[0] "%u Spiel" msgstr[1] "%u Spiele" -#: src/ui/views/GamesView/GamesView.vala:278 +#: src/ui/views/GamesView/GamesView.vala:282 #, c-format msgid "No %s games" msgstr "Keine Spiele von %s" -#: src/ui/views/GamesView/GamesView.vala:279 +#: src/ui/views/GamesView/GamesView.vala:283 msgid "Get some Linux-compatible games" msgstr "Holen Sie sich einige Linux-kompatible Spiele" -#: src/ui/views/GamesView/GamesView.vala:300 +#: src/ui/views/GamesView/GamesView.vala:304 #, c-format msgid "No games matching “%s”" msgstr "Keine Spiele, die mit „%s“ übereinstimmen" -#: src/ui/views/GamesView/GamesView.vala:305 +#: src/ui/views/GamesView/GamesView.vala:309 #, c-format msgid "No %1$s games matching “%2$s”" msgstr "Keine Spiele von %1$s, die zu „%2$s“ passen" -#: src/ui/views/GamesView/GamesView.vala:377 +#: src/ui/views/GamesView/GamesView.vala:382 msgid "" "No games were loaded from Steam. Set your games list privacy to public or " "use your own Steam API key in settings." @@ -296,68 +300,68 @@ msgstr "" "Öffentlichkeit oder benutze deinen eigenen Steam-API-Schlüssel in den " "Einstellungen." -#: src/ui/views/GamesView/GamesView.vala:378 +#: src/ui/views/GamesView/GamesView.vala:383 msgid "Privacy" msgstr "Datenschutz" #: src/ui/views/GamesView/GameDownloadProgressView.vala:59 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:129 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:114 msgid "Pause download" msgstr "Download pausieren" #: src/ui/views/GamesView/GameDownloadProgressView.vala:64 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:135 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:120 msgid "Resume download" msgstr "Download fortsetzen" #: src/ui/views/GamesView/GameDownloadProgressView.vala:69 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:141 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:126 msgid "Cancel download" msgstr "Download abbrechen" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:162 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:147 msgid "Description" msgstr "Beschreibung" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:203 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:188 msgid "Run" msgstr "Ausführen" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:204 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:189 msgid "Open installation directory" msgstr "Installationsordner öffnen" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:205 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:190 msgid "Open store page" msgstr "Shopseite öffnen" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:206 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:191 msgid "Uninstall" msgstr "Deinstallieren" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:313 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:367 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:304 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:358 msgid "Language" msgstr "Sprache" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:316 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:370 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:307 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:361 msgid "Languages" msgstr "Sprachen" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:337 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:328 msgid "Category" msgstr "Kategorie" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:340 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:331 msgid "Categories" msgstr "Kategorien" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:355 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:346 msgid "Genre" msgstr "Genre" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:358 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:349 msgid "Genres" msgstr "Genres" diff --git a/po/id.po b/po/id.po index 3262fc27..ab5eebdf 100644 --- a/po/id.po +++ b/po/id.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.tkashkin.gamehub\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-08-09 20:06+0300\n" +"POT-Creation-Date: 2018-08-15 16:17+0300\n" "PO-Revision-Date: 2018-07-23 18:31+0700\n" "Last-Translator: Kukuh Syafaat \n" "Language-Team: \n" @@ -34,35 +34,35 @@ msgstr "Semua permainan Anda di satu tempat" msgid "Manage your Steam, GOG and Humble Bundle games in one place." msgstr "Kelola permainan Steam, GOG, dan Humble Bundle Anda di satu tempat." -#: src/data/Game.vala:75 +#: src/data/Game.vala:80 msgid "Installed" msgstr "Terpasang" -#: src/data/Game.vala:76 +#: src/data/Game.vala:81 msgid "Installing" msgstr "Memasang" -#: src/data/Game.vala:77 src/utils/downloader/Downloader.vala:137 +#: src/data/Game.vala:82 src/utils/downloader/Downloader.vala:137 msgid "Download started" msgstr "Unduhan dimulai" -#: src/data/Game.vala:79 +#: src/data/Game.vala:84 msgid "Not installed" msgstr "Tidak terpasang" -#: src/data/Game.vala:89 +#: src/data/Game.vala:94 msgid "Installed:" msgstr "Terpasang:" -#: src/data/Game.vala:90 +#: src/data/Game.vala:95 msgid "Installing:" msgstr "Memasang:" -#: src/data/Game.vala:91 +#: src/data/Game.vala:96 msgid "Downloading:" msgstr "Unduh:" -#: src/data/Game.vala:93 +#: src/data/Game.vala:98 msgid "Not installed:" msgstr "Tidak terpasang:" @@ -80,8 +80,8 @@ msgstr "" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:17 #: src/ui/views/WelcomeView.vala:34 src/ui/views/WelcomeView.vala:58 -#: src/ui/views/GamesView/GamesView.vala:159 -#: src/ui/views/GamesView/GamesView.vala:379 +#: src/ui/views/GamesView/GamesView.vala:163 +#: src/ui/views/GamesView/GamesView.vala:384 msgid "Settings" msgstr "Pengaturan" @@ -94,19 +94,19 @@ msgid "Interface" msgstr "Antarmuka" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:60 -#: src/ui/dialogs/GameDetailsDialog.vala:31 +#: src/ui/dialogs/GameDetailsDialog.vala:32 msgid "Close" msgstr "Tutup" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:134 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:132 msgid "Open" msgstr "Buka" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:141 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:139 msgid "Clear" msgstr "Bersih" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:157 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:155 #, c-format msgid "%llu installer; %s" msgid_plural "%llu installers; %s" @@ -120,49 +120,53 @@ msgstr "Gunakan tema gelap" msgid "Compact list" msgstr "Daftar kompak" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:20 +#: src/ui/dialogs/SettingsDialog/tabs/UI.vala:23 +msgid "Merge games from different sources" +msgstr "Gabungkan permainan dari berbagai sumber" + +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:23 msgid "Enabled" msgstr "Diaktifkan" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Steam API keys have limited number of uses per day" msgstr "Kunci API Steam memiliki jumlah penggunaan terbatas per hari" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Generate key" msgstr "Hasilkan kunci" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:29 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:32 msgid "Installation directory" msgstr "Direktori pemasangan" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:37 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:50 msgid "Default" msgstr "Bawaan" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:45 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:58 msgid "Restore default API key" msgstr "Kembalikan kunci API default" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:56 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:69 msgid "Steam API key" msgstr "Kunci API Steam" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:25 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:28 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:28 msgid "Games directory" msgstr "Direktori permainan" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:27 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:27 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:30 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:30 msgid "Installers cache" msgstr "Penginstal cache" #: src/ui/dialogs/GameInstallDialog.vala:31 #: src/ui/dialogs/GameInstallDialog.vala:131 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:202 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:187 msgid "Install" msgstr "Pasang" @@ -220,72 +224,72 @@ msgstr "Pasang %s" msgid "Return to GameHub after installing" msgstr "Kembali ke GameHub setelah memasang" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "No games" msgstr "Tidak ada permainan" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "Get some games or enable some game sources in settings" msgstr "" "Dapatkan beberapa permainan atau aktifkan beberapa sumber permainan di " "pengaturan" -#: src/ui/views/GamesView/GamesView.vala:63 -#: src/ui/views/GamesView/GamesView.vala:281 +#: src/ui/views/GamesView/GamesView.vala:67 +#: src/ui/views/GamesView/GamesView.vala:285 msgid "Reload" msgstr "Muat ulang" -#: src/ui/views/GamesView/GamesView.vala:109 +#: src/ui/views/GamesView/GamesView.vala:113 msgid "Grid view" msgstr "Tilikan kisi" -#: src/ui/views/GamesView/GamesView.vala:110 +#: src/ui/views/GamesView/GamesView.vala:114 msgid "List view" msgstr "Tilikan daftar" -#: src/ui/views/GamesView/GamesView.vala:122 +#: src/ui/views/GamesView/GamesView.vala:126 msgid "All games" msgstr "Semua permainan" -#: src/ui/views/GamesView/GamesView.vala:126 +#: src/ui/views/GamesView/GamesView.vala:130 #, c-format msgid "%s games" msgstr "%s permainan" -#: src/ui/views/GamesView/GamesView.vala:132 +#: src/ui/views/GamesView/GamesView.vala:136 msgid "Downloads" msgstr "Unduh" -#: src/ui/views/GamesView/GamesView.vala:154 +#: src/ui/views/GamesView/GamesView.vala:158 msgid "Search" msgstr "Cari" -#: src/ui/views/GamesView/GamesView.vala:274 +#: src/ui/views/GamesView/GamesView.vala:278 #, c-format msgid "%u game" msgid_plural "%u games" msgstr[0] "%u permainan" -#: src/ui/views/GamesView/GamesView.vala:278 +#: src/ui/views/GamesView/GamesView.vala:282 #, c-format msgid "No %s games" msgstr "Tidak ada %s permainan" -#: src/ui/views/GamesView/GamesView.vala:279 +#: src/ui/views/GamesView/GamesView.vala:283 msgid "Get some Linux-compatible games" msgstr "Dapatkan beberapa permainan Linux yang kompatibel" -#: src/ui/views/GamesView/GamesView.vala:300 +#: src/ui/views/GamesView/GamesView.vala:304 #, c-format msgid "No games matching “%s”" msgstr "Tidak ada permainan yang cocok dengan “%s”" -#: src/ui/views/GamesView/GamesView.vala:305 +#: src/ui/views/GamesView/GamesView.vala:309 #, c-format msgid "No %1$s games matching “%2$s”" msgstr "Tidak ada permainan dari %1$s yang cocok dengan “%2$s”" -#: src/ui/views/GamesView/GamesView.vala:377 +#: src/ui/views/GamesView/GamesView.vala:382 msgid "" "No games were loaded from Steam. Set your games list privacy to public or " "use your own Steam API key in settings." @@ -293,68 +297,68 @@ msgstr "" "Tidak ada permainan yang dimuat dari Steam. Setel privasi daftar permainan " "anda ke publik atau gunakan kunci API Steam anda sendiri dalam pengaturan." -#: src/ui/views/GamesView/GamesView.vala:378 +#: src/ui/views/GamesView/GamesView.vala:383 msgid "Privacy" msgstr "Privasi" #: src/ui/views/GamesView/GameDownloadProgressView.vala:59 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:129 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:114 msgid "Pause download" msgstr "Jeda unduhan" #: src/ui/views/GamesView/GameDownloadProgressView.vala:64 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:135 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:120 msgid "Resume download" msgstr "Lanjutkan unduhan" #: src/ui/views/GamesView/GameDownloadProgressView.vala:69 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:141 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:126 msgid "Cancel download" msgstr "Batalkan unduhan" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:162 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:147 msgid "Description" msgstr "Deskripsi" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:203 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:188 msgid "Run" msgstr "Jalankan" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:204 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:189 msgid "Open installation directory" msgstr "Buka direktori pemasangan" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:205 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:190 msgid "Open store page" msgstr "Buka halaman toko" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:206 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:191 msgid "Uninstall" msgstr "Copot pemasangan" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:313 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:367 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:304 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:358 msgid "Language" msgstr "Bahasa" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:316 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:370 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:307 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:361 msgid "Languages" msgstr "Bahasa" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:337 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:328 msgid "Category" msgstr "Kategori" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:340 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:331 msgid "Categories" msgstr "Kategori" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:355 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:346 msgid "Genre" msgstr "Aliran" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:358 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:349 msgid "Genres" msgstr "Aliran" diff --git a/po/pl.po b/po/pl.po index ccb44b79..b0bee723 100644 --- a/po/pl.po +++ b/po/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.tkashkin.gamehub\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-08-09 20:06+0300\n" +"POT-Creation-Date: 2018-08-15 16:17+0300\n" "PO-Revision-Date: 2018-07-14 00:51+0300\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -34,35 +34,35 @@ msgstr "Wszystkie gry w jednym miejscu" msgid "Manage your Steam, GOG and Humble Bundle games in one place." msgstr "Zarządzaj grami Steam, GOG i Humble Bundle w jednym miejscu" -#: src/data/Game.vala:75 +#: src/data/Game.vala:80 msgid "Installed" msgstr "Zainstalowana" -#: src/data/Game.vala:76 +#: src/data/Game.vala:81 msgid "Installing" msgstr "Instalacja" -#: src/data/Game.vala:77 src/utils/downloader/Downloader.vala:137 +#: src/data/Game.vala:82 src/utils/downloader/Downloader.vala:137 msgid "Download started" msgstr "Pobieranie rozpoczęte" -#: src/data/Game.vala:79 +#: src/data/Game.vala:84 msgid "Not installed" msgstr "Nie zainstalowana" -#: src/data/Game.vala:89 +#: src/data/Game.vala:94 msgid "Installed:" msgstr "Zainstalowani:" -#: src/data/Game.vala:90 +#: src/data/Game.vala:95 msgid "Installing:" msgstr "Instalowanie:" -#: src/data/Game.vala:91 +#: src/data/Game.vala:96 msgid "Downloading:" msgstr "Ściąganie:" -#: src/data/Game.vala:93 +#: src/data/Game.vala:98 msgid "Not installed:" msgstr "Nie zainstalowani:" @@ -80,8 +80,8 @@ msgstr "" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:17 #: src/ui/views/WelcomeView.vala:34 src/ui/views/WelcomeView.vala:58 -#: src/ui/views/GamesView/GamesView.vala:159 -#: src/ui/views/GamesView/GamesView.vala:379 +#: src/ui/views/GamesView/GamesView.vala:163 +#: src/ui/views/GamesView/GamesView.vala:384 msgid "Settings" msgstr "Ustawienia" @@ -95,19 +95,19 @@ msgid "Interface" msgstr "Interface" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:60 -#: src/ui/dialogs/GameDetailsDialog.vala:31 +#: src/ui/dialogs/GameDetailsDialog.vala:32 msgid "Close" msgstr "Zamknij" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:134 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:132 msgid "Open" msgstr "Otwórz" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:141 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:139 msgid "Clear" msgstr "Oczyścić" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:157 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:155 #, c-format msgid "%llu installer; %s" msgid_plural "%llu installers; %s" @@ -123,49 +123,53 @@ msgstr "Użyj ciemnego wyglądu" msgid "Compact list" msgstr "Lista kompaktowa" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:20 +#: src/ui/dialogs/SettingsDialog/tabs/UI.vala:23 +msgid "Merge games from different sources" +msgstr "Scalaj gry z różnych źródeł" + +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:23 msgid "Enabled" msgstr "Włączone" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Steam API keys have limited number of uses per day" msgstr "Klucz Steam API mają ograniczoną liczbę zastosowań dziennie" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Generate key" msgstr "Wygeneruj klucz" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:29 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:32 msgid "Installation directory" msgstr "Katalog instalacyjny" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:37 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:50 msgid "Default" msgstr "Domyślny" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:45 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:58 msgid "Restore default API key" msgstr "Przywróć domyślny klucz API" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:56 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:69 msgid "Steam API key" msgstr "Klucz Steam API" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:25 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:28 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:28 msgid "Games directory" msgstr "Katalog gier" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:27 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:27 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:30 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:30 msgid "Installers cache" msgstr "Pamięć podręczna instalatorów" #: src/ui/dialogs/GameInstallDialog.vala:31 #: src/ui/dialogs/GameInstallDialog.vala:131 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:202 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:187 msgid "Install" msgstr "Instaluj" @@ -223,45 +227,45 @@ msgstr "Instaluj %s" msgid "Return to GameHub after installing" msgstr "Wróć do GameHub po instalacji" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "No games" msgstr "Brak gier" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "Get some games or enable some game sources in settings" msgstr "Pobierz gry lub włącz niektóre źródła gier w ustawieniach" -#: src/ui/views/GamesView/GamesView.vala:63 -#: src/ui/views/GamesView/GamesView.vala:281 +#: src/ui/views/GamesView/GamesView.vala:67 +#: src/ui/views/GamesView/GamesView.vala:285 msgid "Reload" msgstr "Przeładować" -#: src/ui/views/GamesView/GamesView.vala:109 +#: src/ui/views/GamesView/GamesView.vala:113 msgid "Grid view" msgstr "Widok siatki" -#: src/ui/views/GamesView/GamesView.vala:110 +#: src/ui/views/GamesView/GamesView.vala:114 msgid "List view" msgstr "Widok listy" -#: src/ui/views/GamesView/GamesView.vala:122 +#: src/ui/views/GamesView/GamesView.vala:126 msgid "All games" msgstr "Wszystkie gry" -#: src/ui/views/GamesView/GamesView.vala:126 +#: src/ui/views/GamesView/GamesView.vala:130 #, c-format msgid "%s games" msgstr "Gry z %s" -#: src/ui/views/GamesView/GamesView.vala:132 +#: src/ui/views/GamesView/GamesView.vala:136 msgid "Downloads" msgstr "Pliki do pobrania" -#: src/ui/views/GamesView/GamesView.vala:154 +#: src/ui/views/GamesView/GamesView.vala:158 msgid "Search" msgstr "Szukaj" -#: src/ui/views/GamesView/GamesView.vala:274 +#: src/ui/views/GamesView/GamesView.vala:278 #, c-format msgid "%u game" msgid_plural "%u games" @@ -269,26 +273,26 @@ msgstr[0] "%u gra" msgstr[1] "%u gry" msgstr[2] "%u gier" -#: src/ui/views/GamesView/GamesView.vala:278 +#: src/ui/views/GamesView/GamesView.vala:282 #, c-format msgid "No %s games" msgstr "Brak gier z %s" -#: src/ui/views/GamesView/GamesView.vala:279 +#: src/ui/views/GamesView/GamesView.vala:283 msgid "Get some Linux-compatible games" msgstr "Zdobądź gry kompatybilne z Linuksem" -#: src/ui/views/GamesView/GamesView.vala:300 +#: src/ui/views/GamesView/GamesView.vala:304 #, c-format msgid "No games matching “%s”" msgstr "Brak gier pasujących do «%s»" -#: src/ui/views/GamesView/GamesView.vala:305 +#: src/ui/views/GamesView/GamesView.vala:309 #, c-format msgid "No %1$s games matching “%2$s”" msgstr "Brak gier %1$s pasujących do «%2$s»" -#: src/ui/views/GamesView/GamesView.vala:377 +#: src/ui/views/GamesView/GamesView.vala:382 msgid "" "No games were loaded from Steam. Set your games list privacy to public or " "use your own Steam API key in settings." @@ -296,68 +300,68 @@ msgstr "" "Żadne gry nie zostały załadowane ze Steam. Ustaw prywatność listy gier jako " "publiczną lub użyj swojego własnego klucza Steam API w ustawieniach." -#: src/ui/views/GamesView/GamesView.vala:378 +#: src/ui/views/GamesView/GamesView.vala:383 msgid "Privacy" msgstr "Prywatność" #: src/ui/views/GamesView/GameDownloadProgressView.vala:59 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:129 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:114 msgid "Pause download" msgstr "Wstrzymaj pobieranie" #: src/ui/views/GamesView/GameDownloadProgressView.vala:64 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:135 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:120 msgid "Resume download" msgstr "Wznów pobieranie" #: src/ui/views/GamesView/GameDownloadProgressView.vala:69 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:141 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:126 msgid "Cancel download" msgstr "Anuluj pobieranie" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:162 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:147 msgid "Description" msgstr "Opis" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:203 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:188 msgid "Run" msgstr "Uruchom" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:204 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:189 msgid "Open installation directory" msgstr "Otwórz katalog instalacyjny" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:205 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:190 msgid "Open store page" msgstr "Otwórz stronę sklepu" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:206 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:191 msgid "Uninstall" msgstr "Odinstaluj" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:313 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:367 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:304 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:358 msgid "Language" msgstr "Język" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:316 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:370 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:307 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:361 msgid "Languages" msgstr "Języki" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:337 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:328 msgid "Category" msgstr "Kategoria" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:340 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:331 msgid "Categories" msgstr "Kategorie" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:355 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:346 msgid "Genre" msgstr "Gatunek" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:358 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:349 msgid "Genres" msgstr "Gatunki" diff --git a/po/pt_BR.po b/po/pt_BR.po index c61117d5..483202b8 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.tkashkin.gamehub\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-08-09 20:06+0300\n" +"POT-Creation-Date: 2018-08-15 16:17+0300\n" "PO-Revision-Date: 2018-07-13 16:18+0300\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -33,35 +33,35 @@ msgstr "Todos os seus jogos em um só lugar" msgid "Manage your Steam, GOG and Humble Bundle games in one place." msgstr "Gerencie seus jogos Steam, GOG e Humble Bundle em um só lugar." -#: src/data/Game.vala:75 +#: src/data/Game.vala:80 msgid "Installed" msgstr "Instalado" -#: src/data/Game.vala:76 +#: src/data/Game.vala:81 msgid "Installing" msgstr "Instalando" -#: src/data/Game.vala:77 src/utils/downloader/Downloader.vala:137 +#: src/data/Game.vala:82 src/utils/downloader/Downloader.vala:137 msgid "Download started" msgstr "Começou a baixar" -#: src/data/Game.vala:79 +#: src/data/Game.vala:84 msgid "Not installed" msgstr "Não instalado" -#: src/data/Game.vala:89 +#: src/data/Game.vala:94 msgid "Installed:" msgstr "Instalado:" -#: src/data/Game.vala:90 +#: src/data/Game.vala:95 msgid "Installing:" msgstr "Instalando:" -#: src/data/Game.vala:91 +#: src/data/Game.vala:96 msgid "Downloading:" msgstr "Baixado:" -#: src/data/Game.vala:93 +#: src/data/Game.vala:98 msgid "Not installed:" msgstr "Não instalado:" @@ -79,8 +79,8 @@ msgstr "" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:17 #: src/ui/views/WelcomeView.vala:34 src/ui/views/WelcomeView.vala:58 -#: src/ui/views/GamesView/GamesView.vala:159 -#: src/ui/views/GamesView/GamesView.vala:379 +#: src/ui/views/GamesView/GamesView.vala:163 +#: src/ui/views/GamesView/GamesView.vala:384 msgid "Settings" msgstr "Configurações" @@ -94,19 +94,19 @@ msgid "Interface" msgstr "Interface" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:60 -#: src/ui/dialogs/GameDetailsDialog.vala:31 +#: src/ui/dialogs/GameDetailsDialog.vala:32 msgid "Close" msgstr "Fechar" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:134 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:132 msgid "Open" msgstr "Abrir" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:141 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:139 msgid "Clear" msgstr "Limpar" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:157 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:155 #, c-format msgid "%llu installer; %s" msgid_plural "%llu installers; %s" @@ -121,50 +121,54 @@ msgstr "Use o tema escuro" msgid "Compact list" msgstr "Lista compacta" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:20 +#: src/ui/dialogs/SettingsDialog/tabs/UI.vala:23 +msgid "Merge games from different sources" +msgstr "Mesclar jogos de diferentes fontes" + +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:23 msgid "Enabled" msgstr "Ativado" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Steam API keys have limited number of uses per day" msgstr "" "As chaves da API do Steam têm um número limitado de utilizações por dia" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Generate key" msgstr "Gerar chave" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:29 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:32 msgid "Installation directory" msgstr "Diretório de instalação" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:37 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:50 msgid "Default" msgstr "Padrão" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:45 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:58 msgid "Restore default API key" msgstr "Restaurar chave de API padrão" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:56 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:69 msgid "Steam API key" msgstr "Chave da API do Steam" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:25 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:28 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:28 msgid "Games directory" msgstr "Diretório de jogos" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:27 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:27 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:30 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:30 msgid "Installers cache" msgstr "Cache de instaladores" #: src/ui/dialogs/GameInstallDialog.vala:31 #: src/ui/dialogs/GameInstallDialog.vala:131 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:202 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:187 msgid "Install" msgstr "Instalar" @@ -222,72 +226,72 @@ msgstr "Instalar %s" msgid "Return to GameHub after installing" msgstr "Retornar ao GameHub depois de instalar" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "No games" msgstr "Sem jogos" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "Get some games or enable some game sources in settings" msgstr "" "Obtenha alguns jogos ou ative algumas fontes de jogos nas configurações" -#: src/ui/views/GamesView/GamesView.vala:63 -#: src/ui/views/GamesView/GamesView.vala:281 +#: src/ui/views/GamesView/GamesView.vala:67 +#: src/ui/views/GamesView/GamesView.vala:285 msgid "Reload" msgstr "Recarregar" -#: src/ui/views/GamesView/GamesView.vala:109 +#: src/ui/views/GamesView/GamesView.vala:113 msgid "Grid view" msgstr "Visualizar grade" -#: src/ui/views/GamesView/GamesView.vala:110 +#: src/ui/views/GamesView/GamesView.vala:114 msgid "List view" msgstr "Visualizar lista" -#: src/ui/views/GamesView/GamesView.vala:122 +#: src/ui/views/GamesView/GamesView.vala:126 msgid "All games" msgstr "Todos os jogos" -#: src/ui/views/GamesView/GamesView.vala:126 +#: src/ui/views/GamesView/GamesView.vala:130 #, c-format msgid "%s games" msgstr "%s jogos" -#: src/ui/views/GamesView/GamesView.vala:132 +#: src/ui/views/GamesView/GamesView.vala:136 msgid "Downloads" msgstr "Baixado" -#: src/ui/views/GamesView/GamesView.vala:154 +#: src/ui/views/GamesView/GamesView.vala:158 msgid "Search" msgstr "Pesquisar" -#: src/ui/views/GamesView/GamesView.vala:274 +#: src/ui/views/GamesView/GamesView.vala:278 #, c-format msgid "%u game" msgid_plural "%u games" msgstr[0] "%u jogo" msgstr[1] "%u jogos" -#: src/ui/views/GamesView/GamesView.vala:278 +#: src/ui/views/GamesView/GamesView.vala:282 #, c-format msgid "No %s games" msgstr "Nenhum jogo do %s" -#: src/ui/views/GamesView/GamesView.vala:279 +#: src/ui/views/GamesView/GamesView.vala:283 msgid "Get some Linux-compatible games" msgstr "Obtenha alguns jogos compatíveis com o seu sistema" -#: src/ui/views/GamesView/GamesView.vala:300 +#: src/ui/views/GamesView/GamesView.vala:304 #, c-format msgid "No games matching “%s”" msgstr "Nenhum jogo corresponde a “%s”" -#: src/ui/views/GamesView/GamesView.vala:305 +#: src/ui/views/GamesView/GamesView.vala:309 #, c-format msgid "No %1$s games matching “%2$s”" msgstr "Nenhum jogo do %1$s correspondente a “%2$s”" -#: src/ui/views/GamesView/GamesView.vala:377 +#: src/ui/views/GamesView/GamesView.vala:382 msgid "" "No games were loaded from Steam. Set your games list privacy to public or " "use your own Steam API key in settings." @@ -295,68 +299,68 @@ msgstr "" "Nenhum jogo foi carregado do Steam. Defina a privacidade da lista de jogos " "como pública ou use sua própria chave de API do Steam nas configurações." -#: src/ui/views/GamesView/GamesView.vala:378 +#: src/ui/views/GamesView/GamesView.vala:383 msgid "Privacy" msgstr "Privacidade" #: src/ui/views/GamesView/GameDownloadProgressView.vala:59 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:129 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:114 msgid "Pause download" msgstr "Pausar o download" #: src/ui/views/GamesView/GameDownloadProgressView.vala:64 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:135 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:120 msgid "Resume download" msgstr "Retomar o download" #: src/ui/views/GamesView/GameDownloadProgressView.vala:69 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:141 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:126 msgid "Cancel download" msgstr "Cancelar o download" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:162 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:147 msgid "Description" msgstr "Descrição" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:203 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:188 msgid "Run" msgstr "Jogar" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:204 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:189 msgid "Open installation directory" msgstr "Abra o diretório de instalação" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:205 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:190 msgid "Open store page" msgstr "Abra a página da loja" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:206 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:191 msgid "Uninstall" msgstr "Desinstalar" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:313 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:367 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:304 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:358 msgid "Language" msgstr "Língua" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:316 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:370 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:307 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:361 msgid "Languages" msgstr "Línguas" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:337 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:328 msgid "Category" msgstr "Categoria" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:340 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:331 msgid "Categories" msgstr "Categorias" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:355 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:346 msgid "Genre" msgstr "Gênero" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:358 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:349 msgid "Genres" msgstr "Gêneros" diff --git a/po/ru.po b/po/ru.po index 24c58e6f..ce69bbef 100644 --- a/po/ru.po +++ b/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.tkashkin.gamehub\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-08-09 20:06+0300\n" +"POT-Creation-Date: 2018-08-15 16:17+0300\n" "PO-Revision-Date: 2018-05-27 03:39+0300\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -34,35 +34,35 @@ msgstr "Все игры в одном месте" msgid "Manage your Steam, GOG and Humble Bundle games in one place." msgstr "Управляйте играми из Steam, GOG и Humble Bundle в одном месте" -#: src/data/Game.vala:75 +#: src/data/Game.vala:80 msgid "Installed" msgstr "Установлена" -#: src/data/Game.vala:76 +#: src/data/Game.vala:81 msgid "Installing" msgstr "Установка" -#: src/data/Game.vala:77 src/utils/downloader/Downloader.vala:137 +#: src/data/Game.vala:82 src/utils/downloader/Downloader.vala:137 msgid "Download started" msgstr "Загрузка начата" -#: src/data/Game.vala:79 +#: src/data/Game.vala:84 msgid "Not installed" msgstr "Не установлена" -#: src/data/Game.vala:89 +#: src/data/Game.vala:94 msgid "Installed:" msgstr "Установленные:" -#: src/data/Game.vala:90 +#: src/data/Game.vala:95 msgid "Installing:" msgstr "Установка:" -#: src/data/Game.vala:91 +#: src/data/Game.vala:96 msgid "Downloading:" msgstr "Загрузки:" -#: src/data/Game.vala:93 +#: src/data/Game.vala:98 msgid "Not installed:" msgstr "Не установленные:" @@ -80,8 +80,8 @@ msgstr "" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:17 #: src/ui/views/WelcomeView.vala:34 src/ui/views/WelcomeView.vala:58 -#: src/ui/views/GamesView/GamesView.vala:159 -#: src/ui/views/GamesView/GamesView.vala:379 +#: src/ui/views/GamesView/GamesView.vala:163 +#: src/ui/views/GamesView/GamesView.vala:384 msgid "Settings" msgstr "Настройки" @@ -94,19 +94,19 @@ msgid "Interface" msgstr "Интерфейс" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:60 -#: src/ui/dialogs/GameDetailsDialog.vala:31 +#: src/ui/dialogs/GameDetailsDialog.vala:32 msgid "Close" msgstr "Закрыть" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:134 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:132 msgid "Open" msgstr "Открыть" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:141 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:139 msgid "Clear" msgstr "Очистить" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:157 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:155 #, c-format msgid "%llu installer; %s" msgid_plural "%llu installers; %s" @@ -122,49 +122,53 @@ msgstr "Использовать тёмную тему" msgid "Compact list" msgstr "Компактный список" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:20 +#: src/ui/dialogs/SettingsDialog/tabs/UI.vala:23 +msgid "Merge games from different sources" +msgstr "Объединить игры из разных источников" + +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:23 msgid "Enabled" msgstr "Включено" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Steam API keys have limited number of uses per day" msgstr "API-ключи Steam имеют ограничение на количество использований в день" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Generate key" msgstr "Сгенерировать ключ" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:29 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:32 msgid "Installation directory" msgstr "Папка установки" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:37 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:50 msgid "Default" msgstr "По умолчанию" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:45 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:58 msgid "Restore default API key" msgstr "Восстановить API-ключ по умолчанию" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:56 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:69 msgid "Steam API key" msgstr "API-ключ Steam" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:25 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:28 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:28 msgid "Games directory" msgstr "Папка игр" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:27 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:27 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:30 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:30 msgid "Installers cache" msgstr "Кэш установщиков" #: src/ui/dialogs/GameInstallDialog.vala:31 #: src/ui/dialogs/GameInstallDialog.vala:131 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:202 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:187 msgid "Install" msgstr "Установить" @@ -222,45 +226,45 @@ msgstr "Установить %s" msgid "Return to GameHub after installing" msgstr "Вернитесь в GameHub после установки" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "No games" msgstr "Нет игр" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "Get some games or enable some game sources in settings" msgstr "Получите игры или включите источники в настройках" -#: src/ui/views/GamesView/GamesView.vala:63 -#: src/ui/views/GamesView/GamesView.vala:281 +#: src/ui/views/GamesView/GamesView.vala:67 +#: src/ui/views/GamesView/GamesView.vala:285 msgid "Reload" msgstr "Обновить" -#: src/ui/views/GamesView/GamesView.vala:109 +#: src/ui/views/GamesView/GamesView.vala:113 msgid "Grid view" msgstr "Сетка" -#: src/ui/views/GamesView/GamesView.vala:110 +#: src/ui/views/GamesView/GamesView.vala:114 msgid "List view" msgstr "Список" -#: src/ui/views/GamesView/GamesView.vala:122 +#: src/ui/views/GamesView/GamesView.vala:126 msgid "All games" msgstr "Все игры" -#: src/ui/views/GamesView/GamesView.vala:126 +#: src/ui/views/GamesView/GamesView.vala:130 #, c-format msgid "%s games" msgstr "Игры из %s" -#: src/ui/views/GamesView/GamesView.vala:132 +#: src/ui/views/GamesView/GamesView.vala:136 msgid "Downloads" msgstr "Загрузки" -#: src/ui/views/GamesView/GamesView.vala:154 +#: src/ui/views/GamesView/GamesView.vala:158 msgid "Search" msgstr "Поиск" -#: src/ui/views/GamesView/GamesView.vala:274 +#: src/ui/views/GamesView/GamesView.vala:278 #, c-format msgid "%u game" msgid_plural "%u games" @@ -268,26 +272,26 @@ msgstr[0] "%u игра" msgstr[1] "%u игры" msgstr[2] "%u игр" -#: src/ui/views/GamesView/GamesView.vala:278 +#: src/ui/views/GamesView/GamesView.vala:282 #, c-format msgid "No %s games" msgstr "Нет игр из %s" -#: src/ui/views/GamesView/GamesView.vala:279 +#: src/ui/views/GamesView/GamesView.vala:283 msgid "Get some Linux-compatible games" msgstr "Получите игры, совместимые с Linux" -#: src/ui/views/GamesView/GamesView.vala:300 +#: src/ui/views/GamesView/GamesView.vala:304 #, c-format msgid "No games matching “%s”" msgstr "Нет игр, соответствующих запросу «%s»" -#: src/ui/views/GamesView/GamesView.vala:305 +#: src/ui/views/GamesView/GamesView.vala:309 #, c-format msgid "No %1$s games matching “%2$s”" msgstr "Нет игр из %1$s, соответствующих запросу «%2$s»" -#: src/ui/views/GamesView/GamesView.vala:377 +#: src/ui/views/GamesView/GamesView.vala:382 msgid "" "No games were loaded from Steam. Set your games list privacy to public or " "use your own Steam API key in settings." @@ -295,68 +299,68 @@ msgstr "" "Нет игр, загруженных из Steam. Настройте список игр как публичный или " "используйте свой API-ключ Steam в настройках." -#: src/ui/views/GamesView/GamesView.vala:378 +#: src/ui/views/GamesView/GamesView.vala:383 msgid "Privacy" msgstr "Приватность" #: src/ui/views/GamesView/GameDownloadProgressView.vala:59 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:129 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:114 msgid "Pause download" msgstr "Приостановить загрузку" #: src/ui/views/GamesView/GameDownloadProgressView.vala:64 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:135 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:120 msgid "Resume download" msgstr "Возобновить загрузку" #: src/ui/views/GamesView/GameDownloadProgressView.vala:69 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:141 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:126 msgid "Cancel download" msgstr "Отменить загрузку" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:162 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:147 msgid "Description" msgstr "Описание" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:203 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:188 msgid "Run" msgstr "Запустить" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:204 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:189 msgid "Open installation directory" msgstr "Открыть папку установки" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:205 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:190 msgid "Open store page" msgstr "Открыть страницу в магазине" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:206 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:191 msgid "Uninstall" msgstr "Удалить" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:313 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:367 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:304 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:358 msgid "Language" msgstr "Язык" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:316 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:370 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:307 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:361 msgid "Languages" msgstr "Языки" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:337 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:328 msgid "Category" msgstr "Категория" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:340 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:331 msgid "Categories" msgstr "Категории" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:355 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:346 msgid "Genre" msgstr "Жанр" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:358 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:349 msgid "Genres" msgstr "Жанры" diff --git a/po/uk.po b/po/uk.po index 8c27dda9..6b632f9b 100644 --- a/po/uk.po +++ b/po/uk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: com.github.tkashkin.gamehub\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-08-09 20:06+0300\n" +"POT-Creation-Date: 2018-08-15 16:17+0300\n" "PO-Revision-Date: 2018-07-14 00:51+0300\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -34,35 +34,35 @@ msgstr "Всі ігри в одному місці" msgid "Manage your Steam, GOG and Humble Bundle games in one place." msgstr "Керуйте іграми з Steam, GOG і Humble Bundle в одному місці." -#: src/data/Game.vala:75 +#: src/data/Game.vala:80 msgid "Installed" msgstr "Встановлено" -#: src/data/Game.vala:76 +#: src/data/Game.vala:81 msgid "Installing" msgstr "Встановлення" -#: src/data/Game.vala:77 src/utils/downloader/Downloader.vala:137 +#: src/data/Game.vala:82 src/utils/downloader/Downloader.vala:137 msgid "Download started" msgstr "Завантаження розпочато" -#: src/data/Game.vala:79 +#: src/data/Game.vala:84 msgid "Not installed" msgstr "Не встановлено" -#: src/data/Game.vala:89 +#: src/data/Game.vala:94 msgid "Installed:" msgstr "Встановлено:" -#: src/data/Game.vala:90 +#: src/data/Game.vala:95 msgid "Installing:" msgstr "Встановлення:" -#: src/data/Game.vala:91 +#: src/data/Game.vala:96 msgid "Downloading:" msgstr "Завантаження:" -#: src/data/Game.vala:93 +#: src/data/Game.vala:98 msgid "Not installed:" msgstr "Не встановлено:" @@ -80,8 +80,8 @@ msgstr "" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:17 #: src/ui/views/WelcomeView.vala:34 src/ui/views/WelcomeView.vala:58 -#: src/ui/views/GamesView/GamesView.vala:159 -#: src/ui/views/GamesView/GamesView.vala:379 +#: src/ui/views/GamesView/GamesView.vala:163 +#: src/ui/views/GamesView/GamesView.vala:384 msgid "Settings" msgstr "Налаштування" @@ -94,19 +94,19 @@ msgid "Interface" msgstr "Інтерфейс" #: src/ui/dialogs/SettingsDialog/SettingsDialog.vala:60 -#: src/ui/dialogs/GameDetailsDialog.vala:31 +#: src/ui/dialogs/GameDetailsDialog.vala:32 msgid "Close" msgstr "Закрити" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:134 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:132 msgid "Open" msgstr "Відкрити" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:141 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:139 msgid "Clear" msgstr "Очистити" -#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:157 +#: src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala:155 #, c-format msgid "%llu installer; %s" msgid_plural "%llu installers; %s" @@ -122,49 +122,53 @@ msgstr "Використовувати темну тему" msgid "Compact list" msgstr "Компактний список" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:20 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:20 +#: src/ui/dialogs/SettingsDialog/tabs/UI.vala:23 +msgid "Merge games from different sources" +msgstr "Об'єднати ігри з різних джерел" + +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:23 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:23 msgid "Enabled" msgstr "Увімкнено" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Steam API keys have limited number of uses per day" msgstr "Ключі API Steam мають обмежену кількість використань в день" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:28 msgid "Generate key" msgstr "Створити ключ" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:29 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:32 msgid "Installation directory" msgstr "Каталог встановлення" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:37 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:50 msgid "Default" msgstr "За замовчуванням" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:45 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:58 msgid "Restore default API key" msgstr "Відновити ключ API за замовчуванням" -#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:56 +#: src/ui/dialogs/SettingsDialog/tabs/Steam.vala:69 msgid "Steam API key" msgstr "Ключ API Steam" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:25 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:25 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:28 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:28 msgid "Games directory" msgstr "Каталог ігор" -#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:27 -#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:27 +#: src/ui/dialogs/SettingsDialog/tabs/GOG.vala:30 +#: src/ui/dialogs/SettingsDialog/tabs/Humble.vala:30 msgid "Installers cache" msgstr "Кеш інсталяторів" #: src/ui/dialogs/GameInstallDialog.vala:31 #: src/ui/dialogs/GameInstallDialog.vala:131 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:202 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:187 msgid "Install" msgstr "Встановити" @@ -222,45 +226,45 @@ msgstr "Встановити %s" msgid "Return to GameHub after installing" msgstr "Поверніться до GameHub після встановлення" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "No games" msgstr "Немає ігор" -#: src/ui/views/GamesView/GamesView.vala:62 +#: src/ui/views/GamesView/GamesView.vala:66 msgid "Get some games or enable some game sources in settings" msgstr "Отримайте ігри або увімкніть джерела ігор у налаштуваннях" -#: src/ui/views/GamesView/GamesView.vala:63 -#: src/ui/views/GamesView/GamesView.vala:281 +#: src/ui/views/GamesView/GamesView.vala:67 +#: src/ui/views/GamesView/GamesView.vala:285 msgid "Reload" msgstr "Перезавантажити" -#: src/ui/views/GamesView/GamesView.vala:109 +#: src/ui/views/GamesView/GamesView.vala:113 msgid "Grid view" msgstr "Сітка" -#: src/ui/views/GamesView/GamesView.vala:110 +#: src/ui/views/GamesView/GamesView.vala:114 msgid "List view" msgstr "Список" -#: src/ui/views/GamesView/GamesView.vala:122 +#: src/ui/views/GamesView/GamesView.vala:126 msgid "All games" msgstr "Всі ігри" -#: src/ui/views/GamesView/GamesView.vala:126 +#: src/ui/views/GamesView/GamesView.vala:130 #, c-format msgid "%s games" msgstr "Ігри з %s" -#: src/ui/views/GamesView/GamesView.vala:132 +#: src/ui/views/GamesView/GamesView.vala:136 msgid "Downloads" msgstr "Завантаження" -#: src/ui/views/GamesView/GamesView.vala:154 +#: src/ui/views/GamesView/GamesView.vala:158 msgid "Search" msgstr "Пошук" -#: src/ui/views/GamesView/GamesView.vala:274 +#: src/ui/views/GamesView/GamesView.vala:278 #, c-format msgid "%u game" msgid_plural "%u games" @@ -268,26 +272,26 @@ msgstr[0] "%u гра" msgstr[1] "%u гри" msgstr[2] "%u ігор" -#: src/ui/views/GamesView/GamesView.vala:278 +#: src/ui/views/GamesView/GamesView.vala:282 #, c-format msgid "No %s games" msgstr "Немає ігор з %s" -#: src/ui/views/GamesView/GamesView.vala:279 +#: src/ui/views/GamesView/GamesView.vala:283 msgid "Get some Linux-compatible games" msgstr "Отримайте сумісні з Linux ігри" -#: src/ui/views/GamesView/GamesView.vala:300 +#: src/ui/views/GamesView/GamesView.vala:304 #, c-format msgid "No games matching “%s”" msgstr "Немає ігор, які відповідають запиту «%s»" -#: src/ui/views/GamesView/GamesView.vala:305 +#: src/ui/views/GamesView/GamesView.vala:309 #, c-format msgid "No %1$s games matching “%2$s”" msgstr "Немає ігор з %1$s, які відповідають запиту «%2$s»" -#: src/ui/views/GamesView/GamesView.vala:377 +#: src/ui/views/GamesView/GamesView.vala:382 msgid "" "No games were loaded from Steam. Set your games list privacy to public or " "use your own Steam API key in settings." @@ -295,68 +299,68 @@ msgstr "" "Немає ігор, завантажених з Steam. Налаштуйте список ігор як публічний або " "використовуйте свій API-ключ Steam в налаштуваннях." -#: src/ui/views/GamesView/GamesView.vala:378 +#: src/ui/views/GamesView/GamesView.vala:383 msgid "Privacy" msgstr "Конфіденційність" #: src/ui/views/GamesView/GameDownloadProgressView.vala:59 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:129 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:114 msgid "Pause download" msgstr "Призупинити завантаження" #: src/ui/views/GamesView/GameDownloadProgressView.vala:64 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:135 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:120 msgid "Resume download" msgstr "Відновити завантаження" #: src/ui/views/GamesView/GameDownloadProgressView.vala:69 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:141 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:126 msgid "Cancel download" msgstr "Скасувати завантаження" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:162 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:147 msgid "Description" msgstr "Опис" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:203 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:188 msgid "Run" msgstr "Запустити" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:204 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:189 msgid "Open installation directory" msgstr "Відкрити каталог встановлення" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:205 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:190 msgid "Open store page" msgstr "Відкрити сторінку магазину" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:206 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:191 msgid "Uninstall" msgstr "Видалити" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:313 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:367 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:304 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:358 msgid "Language" msgstr "Мова" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:316 -#: src/ui/views/GameDetailsView/GameDetailsView.vala:370 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:307 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:361 msgid "Languages" msgstr "Мови" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:337 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:328 msgid "Category" msgstr "Категорія" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:340 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:331 msgid "Categories" msgstr "Категорії" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:355 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:346 msgid "Genre" msgstr "Жанр" -#: src/ui/views/GameDetailsView/GameDetailsView.vala:358 +#: src/ui/views/GameDetailsView/GameDetailsPage.vala:349 msgid "Genres" msgstr "Жанри" diff --git a/src/data/Game.vala b/src/data/Game.vala index 3c9a5f4d..42e50e16 100644 --- a/src/data/Game.vala +++ b/src/data/Game.vala @@ -34,6 +34,11 @@ namespace GameHub.Data { return first == second || (first.source == second.source && first.id == second.id); } + + public static uint hash(Game game) + { + return str_hash(@"$(game.source.name)/$(game.id)"); + } protected Game.Status _status = new Game.Status(); public signal void status_change(Game.Status status); diff --git a/src/data/GameSource.vala b/src/data/GameSource.vala index 79a950c7..40259cc7 100644 --- a/src/data/GameSource.vala +++ b/src/data/GameSource.vala @@ -24,6 +24,8 @@ namespace GameHub.Data public abstract bool is_authenticated(); public abstract bool can_authenticate_automatically(); + public ArrayList games { get; protected set; default = new ArrayList(Game.is_equal); } + public abstract async ArrayList load_games(FutureResult? game_loaded = null); public static GameSource? by_name(string name) diff --git a/src/data/sources/gog/GOG.vala b/src/data/sources/gog/GOG.vala index a4859486..2840aca2 100644 --- a/src/data/sources/gog/GOG.vala +++ b/src/data/sources/gog/GOG.vala @@ -153,7 +153,6 @@ namespace GameHub.Data.Sources.GOG return user_token != null; } - private ArrayList games = new ArrayList(Game.is_equal); public override async ArrayList load_games(FutureResult? game_loaded = null) { if(user_id == null || user_token == null || games.size > 0) diff --git a/src/data/sources/humble/Humble.vala b/src/data/sources/humble/Humble.vala index 24a6670f..e4ec150f 100644 --- a/src/data/sources/humble/Humble.vala +++ b/src/data/sources/humble/Humble.vala @@ -85,7 +85,6 @@ namespace GameHub.Data.Sources.Humble return user_token != null; } - private ArrayList games = new ArrayList(Game.is_equal); public override async ArrayList load_games(FutureResult? game_loaded = null) { if(user_token == null || games.size > 0) diff --git a/src/data/sources/steam/Steam.vala b/src/data/sources/steam/Steam.vala index 31d31201..a55a3997 100644 --- a/src/data/sources/steam/Steam.vala +++ b/src/data/sources/steam/Steam.vala @@ -125,7 +125,6 @@ namespace GameHub.Data.Sources.Steam return Settings.Auth.Steam.get_instance().authenticated && is_authenticated_in_steam_client; } - private ArrayList games = new ArrayList(Game.is_equal); public override async ArrayList load_games(FutureResult? game_loaded = null) { api_key = Settings.Auth.Steam.get_instance().api_key; diff --git a/src/meson.build b/src/meson.build index 8f7e012e..2f82463c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -80,6 +80,7 @@ executable( 'ui/views/GamesView/GameDownloadProgressView.vala', 'ui/views/GameDetailsView/GameDetailsView.vala', + 'ui/views/GameDetailsView/GameDetailsPage.vala', 'ui/widgets/AutoSizeImage.vala', 'ui/widgets/ActionButton.vala', diff --git a/src/ui/dialogs/GameDetailsDialog.vala b/src/ui/dialogs/GameDetailsDialog.vala index 0b2b4fd0..e29d2053 100644 --- a/src/ui/dialogs/GameDetailsDialog.vala +++ b/src/ui/dialogs/GameDetailsDialog.vala @@ -1,4 +1,5 @@ using Gtk; +using Gee; using Granite; using GameHub.Data; using GameHub.Utils; @@ -7,7 +8,7 @@ namespace GameHub.UI.Dialogs { public class GameDetailsDialog: Dialog { - public GameDetailsDialog(Game? game) + public GameDetailsDialog(Game? game, HashMap> merged_games) { Object(transient_for: Windows.MainWindow.instance, deletable: false, resizable: false, title: game.name); @@ -17,7 +18,7 @@ namespace GameHub.UI.Dialogs var content = get_content_area(); content.set_size_request(560, -1); - content.add(new GameHub.UI.Views.GameDetailsView(game)); + content.add(new GameHub.UI.Views.GameDetailsView(game, merged_games)); response.connect((source, response_id) => { switch(response_id) diff --git a/src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala b/src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala index d159ee1f..27572da4 100644 --- a/src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala +++ b/src/ui/dialogs/SettingsDialog/SettingsDialogTab.vala @@ -13,7 +13,7 @@ namespace GameHub.UI.Dialogs.SettingsDialog Object(orientation: Orientation.VERTICAL, dialog: dlg); } - protected void add_switch(string text, bool enabled, owned SwitchAction action) + protected Box add_switch(string text, bool enabled, owned SwitchAction action) { var sw = new Switch(); sw.active = enabled; @@ -27,10 +27,10 @@ namespace GameHub.UI.Dialogs.SettingsDialog var hbox = new Box(Orientation.HORIZONTAL, 12); hbox.add(label); hbox.add(sw); - add_widget(hbox); + return add_widget(hbox); } - protected void add_entry(string text, string val, owned EntryAction action) + protected Box add_entry(string text, string val, owned EntryAction action) { var entry = new Entry(); entry.text = val; @@ -44,10 +44,10 @@ namespace GameHub.UI.Dialogs.SettingsDialog var hbox = new Box(Orientation.HORIZONTAL, 12); hbox.add(label); hbox.add(entry); - add_widget(hbox); + return add_widget(hbox); } - protected void add_file_chooser(string text, FileChooserAction mode, string val, owned EntryAction action, bool create=true) + protected Box add_file_chooser(string text, FileChooserAction mode, string val, owned EntryAction action, bool create=true) { var chooser = new FileChooserButton(text, mode); chooser.create_folders = create; @@ -62,48 +62,46 @@ namespace GameHub.UI.Dialogs.SettingsDialog var hbox = new Box(Orientation.HORIZONTAL, 12); hbox.add(label); hbox.add(chooser); - add_widget(hbox); + return add_widget(hbox); } - protected void add_label(string text) + protected Label add_label(string text) { var label = new Label(text); label.halign = Align.START; label.hexpand = true; - add_widget(label); + return add_widget(label); } - protected void add_header(string text) + protected HeaderLabel add_header(string text) { var label = new HeaderLabel(text); label.xpad = 4; label.halign = Align.START; label.hexpand = true; - add_widget(label); + return add_widget(label); } - protected void add_header_with_checkbox(string text, bool enabled, owned SwitchAction action) + protected CheckButton add_header_with_checkbox(string text, bool enabled, owned SwitchAction action) { var cb = new CheckButton.with_label(text); cb.active = enabled; cb.halign = Align.START; cb.hexpand = true; cb.notify["active"].connect(() => { action(cb.active); }); - cb.get_style_context().add_class(Granite.STYLE_CLASS_H4_LABEL); - - add_widget(cb); + return add_widget(cb); } - protected void add_link(string text, string uri) + protected LinkButton add_link(string text, string uri) { var link = new LinkButton.with_label(uri, text); link.halign = Align.START; link.hexpand = true; - add_widget(link); + return add_widget(link); } - protected void add_labeled_link(string label_text, string text, string uri) + protected Box add_labeled_link(string label_text, string text, string uri) { var label = new Label(label_text); label.max_width_chars = 44; @@ -118,10 +116,10 @@ namespace GameHub.UI.Dialogs.SettingsDialog var hbox = new Box(Orientation.HORIZONTAL, 12); hbox.add(label); hbox.add(link); - add_widget(hbox); + return add_widget(hbox); } - protected void add_cache_directory(string name, string path) + protected Box add_cache_directory(string name, string path) { var bbox = new Box(Orientation.HORIZONTAL, 2); bbox.set_size_request(280, -1); @@ -171,18 +169,19 @@ namespace GameHub.UI.Dialogs.SettingsDialog var hbox = new Box(Orientation.HORIZONTAL, 12); hbox.add(label); hbox.add(bbox); - add_widget(hbox); + return add_widget(hbox); } - protected void add_separator() + protected Separator add_separator() { - add_widget(new Separator(Orientation.HORIZONTAL)); + return add_widget(new Separator(Orientation.HORIZONTAL)); } - protected void add_widget(Widget widget) + protected T add_widget(T widget) { - if(!(widget is HeaderLabel)) widget.margin = 4; - add(widget); + if(!(widget is HeaderLabel)) (widget as Widget).margin = 4; + add(widget as Widget); + return widget; } protected delegate void SwitchAction(bool active); diff --git a/src/ui/dialogs/SettingsDialog/tabs/GOG.vala b/src/ui/dialogs/SettingsDialog/tabs/GOG.vala index d2795a7b..6c4689cd 100644 --- a/src/ui/dialogs/SettingsDialog/tabs/GOG.vala +++ b/src/ui/dialogs/SettingsDialog/tabs/GOG.vala @@ -6,6 +6,9 @@ namespace GameHub.UI.Dialogs.SettingsDialog.Tabs { public class GOG: SettingsDialogTab { + private Settings.Auth.GOG gog_auth; + private Box enabled_box; + public GOG(SettingsDialog dlg) { Object(orientation: Orientation.VERTICAL, dialog: dlg); @@ -15,9 +18,9 @@ namespace GameHub.UI.Dialogs.SettingsDialog.Tabs { var paths = FSUtils.Paths.Settings.get_instance(); - var gog_auth = Settings.Auth.GOG.get_instance(); + gog_auth = Settings.Auth.GOG.get_instance(); - add_switch(_("Enabled"), gog_auth.enabled, v => { gog_auth.enabled = v; dialog.show_restart_message(); }); + enabled_box = add_switch(_("Enabled"), gog_auth.enabled, v => { gog_auth.enabled = v; update(); dialog.show_restart_message(); }); add_separator(); @@ -25,6 +28,15 @@ namespace GameHub.UI.Dialogs.SettingsDialog.Tabs add_file_chooser(_("Games directory"), FileChooserAction.SELECT_FOLDER, paths.gog_games, v => { paths.gog_games = v; dialog.show_restart_message(); }); #endif add_cache_directory(_("Installers cache"), FSUtils.Paths.GOG.Installers); + + update(); + } + + private void update() + { + this.foreach(w => { + if(w != enabled_box) w.sensitive = gog_auth.enabled; + }); } } diff --git a/src/ui/dialogs/SettingsDialog/tabs/Humble.vala b/src/ui/dialogs/SettingsDialog/tabs/Humble.vala index 1d2524b3..678f3b9e 100644 --- a/src/ui/dialogs/SettingsDialog/tabs/Humble.vala +++ b/src/ui/dialogs/SettingsDialog/tabs/Humble.vala @@ -6,6 +6,9 @@ namespace GameHub.UI.Dialogs.SettingsDialog.Tabs { public class Humble: SettingsDialogTab { + private Settings.Auth.Humble humble_auth; + private Box enabled_box; + public Humble(SettingsDialog dlg) { Object(orientation: Orientation.VERTICAL, dialog: dlg); @@ -15,9 +18,9 @@ namespace GameHub.UI.Dialogs.SettingsDialog.Tabs { var paths = FSUtils.Paths.Settings.get_instance(); - var humble_auth = Settings.Auth.Humble.get_instance(); + humble_auth = Settings.Auth.Humble.get_instance(); - add_switch(_("Enabled"), humble_auth.enabled, v => { humble_auth.enabled = v; dialog.show_restart_message(); }); + enabled_box = add_switch(_("Enabled"), humble_auth.enabled, v => { humble_auth.enabled = v; update(); dialog.show_restart_message(); }); add_separator(); @@ -25,6 +28,15 @@ namespace GameHub.UI.Dialogs.SettingsDialog.Tabs add_file_chooser(_("Games directory"), FileChooserAction.SELECT_FOLDER, paths.humble_games, v => { paths.humble_games = v; dialog.show_restart_message(); }); #endif add_cache_directory(_("Installers cache"), FSUtils.Paths.Humble.Installers); + + update(); + } + + private void update() + { + this.foreach(w => { + if(w != enabled_box) w.sensitive = humble_auth.enabled; + }); } } diff --git a/src/ui/dialogs/SettingsDialog/tabs/Steam.vala b/src/ui/dialogs/SettingsDialog/tabs/Steam.vala index 9ac999f8..d9e22a80 100644 --- a/src/ui/dialogs/SettingsDialog/tabs/Steam.vala +++ b/src/ui/dialogs/SettingsDialog/tabs/Steam.vala @@ -6,6 +6,9 @@ namespace GameHub.UI.Dialogs.SettingsDialog.Tabs { public class Steam: SettingsDialogTab { + private Settings.Auth.Steam steam_auth; + private Box enabled_box; + public Steam(SettingsDialog dlg) { Object(orientation: Orientation.VERTICAL, dialog: dlg); @@ -15,18 +18,28 @@ namespace GameHub.UI.Dialogs.SettingsDialog.Tabs { var paths = FSUtils.Paths.Settings.get_instance(); - var steam_auth = Settings.Auth.Steam.get_instance(); + steam_auth = Settings.Auth.Steam.get_instance(); - add_switch(_("Enabled"), steam_auth.enabled, v => { steam_auth.enabled = v; dialog.show_restart_message(); }); + enabled_box = add_switch(_("Enabled"), steam_auth.enabled, v => { steam_auth.enabled = v; update(); dialog.show_restart_message(); }); add_separator(); add_steam_apikey_entry(); add_labeled_link(_("Steam API keys have limited number of uses per day"), _("Generate key"), "steam://openurl/https://steamcommunity.com/dev/apikey"); + #if !FLATPAK add_separator(); - add_file_chooser(_("Installation directory"), FileChooserAction.SELECT_FOLDER, paths.steam_home, v => { paths.steam_home = v; dialog.show_restart_message(); }, false); + #endif + + update(); + } + + private void update() + { + this.foreach(w => { + if(w != enabled_box) w.sensitive = steam_auth.enabled; + }); } protected void add_steam_apikey_entry() diff --git a/src/ui/dialogs/SettingsDialog/tabs/UI.vala b/src/ui/dialogs/SettingsDialog/tabs/UI.vala index 4e4e5e90..9360ceb2 100644 --- a/src/ui/dialogs/SettingsDialog/tabs/UI.vala +++ b/src/ui/dialogs/SettingsDialog/tabs/UI.vala @@ -15,8 +15,12 @@ namespace GameHub.UI.Dialogs.SettingsDialog.Tabs { var ui = Settings.UI.get_instance(); - add_switch(_("Use dark theme"), ui.dark_theme, e => { ui.dark_theme = e; }); - add_switch(_("Compact list"), ui.compact_list, e => { ui.compact_list = e; }); + add_switch(_("Use dark theme"), ui.dark_theme, v => { ui.dark_theme = v; }); + add_switch(_("Compact list"), ui.compact_list, v => { ui.compact_list = v; }); + + add_separator(); + + add_switch(_("Merge games from different sources"), ui.merge_games, v => { ui.merge_games = v; dialog.show_restart_message(); }); } } diff --git a/src/ui/views/GameDetailsView/GameDetailsPage.vala b/src/ui/views/GameDetailsView/GameDetailsPage.vala new file mode 100644 index 00000000..baa6acd4 --- /dev/null +++ b/src/ui/views/GameDetailsView/GameDetailsPage.vala @@ -0,0 +1,453 @@ +using Gtk; +using Gdk; +using Gee; +using Granite; +using GameHub.Data; +using GameHub.Utils; +using GameHub.UI.Widgets; +using WebKit; + +namespace GameHub.UI.Views +{ + public class GameDetailsPage: Grid + { + public Game game { get; construct; } + + public GameDetailsPage(Game game) + { + Object(game: game); + } + + private bool is_dialog = false; + + private Stack stack; + private Spinner spinner; + + private ScrolledWindow content_scrolled; + public Box content; + private Box actions; + + private Label title; + private Label status; + private ProgressBar download_progress; + private AutoSizeImage icon; + private Image src_icon; + + private Downloader.Download? download; + + private Button action_pause; + private Button action_resume; + private Button action_cancel; + + private ActionButton action_install; + private ActionButton action_run; + private ActionButton action_open_directory; + private ActionButton action_open_store_page; + private ActionButton action_uninstall; + + private Granite.HeaderLabel description_header; + private WebView description; + + private Box custom_info; + + private const string CSS_LIGHT = "background: rgb(245, 245, 245); color: rgb(66, 66, 66)"; + private const string CSS_DARK = "background: rgb(59, 63, 69); color: white"; + + construct + { + stack = new Stack(); + stack.transition_type = StackTransitionType.NONE; + stack.vexpand = true; + + spinner = new Spinner(); + spinner.active = true; + spinner.set_size_request(36, 36); + spinner.halign = Align.CENTER; + spinner.valign = Align.CENTER; + + content_scrolled = new ScrolledWindow(null, null); + #if GTK_3_22 + content_scrolled.propagate_natural_width = true; + content_scrolled.propagate_natural_height = true; + #endif + + content = new Box(Orientation.VERTICAL, 0); + content.margin_start = content.margin_end = 8; + + var title_hbox = new Box(Orientation.HORIZONTAL, 15); + title_hbox.margin_start = title_hbox.margin_end = 7; + + icon = new AutoSizeImage(); + icon.set_constraint(48, 48, 1); + icon.set_size_request(48, 48); + + title = new Label(null); + title.halign = Align.START; + title.hexpand = true; + title.get_style_context().add_class(Granite.STYLE_CLASS_H2_LABEL); + + status = new Label(null); + status.halign = Align.START; + status.hexpand = true; + + download_progress = new ProgressBar(); + download_progress.hexpand = true; + download_progress.fraction = 0d; + download_progress.get_style_context().add_class(Gtk.STYLE_CLASS_OSD); + download_progress.hide(); + + src_icon = new Image(); + src_icon.icon_size = IconSize.DIALOG; + src_icon.opacity = 0.1; + + var title_vbox = new Box(Orientation.VERTICAL, 0); + var vbox_labels = new Box(Orientation.VERTICAL, 0); + vbox_labels.hexpand = true; + + var hbox_inner = new Box(Orientation.HORIZONTAL, 8); + var hbox_actions = new Box(Orientation.HORIZONTAL, 0); + hbox_actions.vexpand = false; + hbox_actions.valign = Align.CENTER; + + action_pause = new Button.from_icon_name("media-playback-pause-symbolic"); + action_pause.set_size_request(36, 36); + action_pause.tooltip_text = _("Pause download"); + action_pause.get_style_context().add_class(Gtk.STYLE_CLASS_FLAT); + action_pause.visible = false; + + action_resume = new Button.from_icon_name("media-playback-start-symbolic"); + action_resume.set_size_request(36, 36); + action_resume.tooltip_text = _("Resume download"); + action_resume.get_style_context().add_class(Gtk.STYLE_CLASS_FLAT); + action_resume.visible = false; + + action_cancel = new Button.from_icon_name("process-stop-symbolic"); + action_cancel.set_size_request(36, 36); + action_cancel.tooltip_text = _("Cancel download"); + action_cancel.get_style_context().add_class(Gtk.STYLE_CLASS_FLAT); + action_cancel.visible = false; + + vbox_labels.add(title); + vbox_labels.add(status); + + hbox_inner.add(vbox_labels); + hbox_inner.add(hbox_actions); + + hbox_actions.add(action_pause); + hbox_actions.add(action_resume); + hbox_actions.add(action_cancel); + + title_vbox.add(hbox_inner); + title_vbox.add(download_progress); + + title_hbox.add(icon); + title_hbox.add(title_vbox); + title_hbox.add(src_icon); + + description_header = new Granite.HeaderLabel(_("Description")); + description_header.margin_start = description_header.margin_end = 7; + description_header.get_style_context().add_class("description-header"); + + description = new WebView(); + description.hexpand = true; + description.vexpand = false; //(!is_dialog); + description.sensitive = false; + description.get_settings().hardware_acceleration_policy = HardwareAccelerationPolicy.NEVER; + + custom_info = new Box(Orientation.VERTICAL, 0); + custom_info.hexpand = false; + custom_info.margin_start = custom_info.margin_end = 8; + + var ui_settings = GameHub.Settings.UI.get_instance(); + ui_settings.notify["dark-theme"].connect(() => { + description.user_content_manager.remove_all_style_sheets(); + var style = ui_settings.dark_theme ? CSS_DARK : CSS_LIGHT; + description.user_content_manager.add_style_sheet(new UserStyleSheet(@"body{overflow: hidden; font-size: 0.8em; margin: 7px; line-height: 1.4; $(style)} h1,h2,h3{line-height: 1.2;} ul{padding: 4px 0 4px 16px;} img{max-width: 100%;}", UserContentInjectedFrames.TOP_FRAME, UserStyleLevel.USER, null, null)); + }); + ui_settings.notify_property("dark-theme"); + + actions = new Box(Orientation.HORIZONTAL, 0); + actions.margin_top = actions.margin_bottom = 16; + + content.add(title_hbox); + content.add(actions); + content.add(custom_info); + content.add(description_header); + content.add(description); + + content_scrolled.add(content); + + stack.add(spinner); + stack.add(content_scrolled); + + stack.set_visible_child(spinner); + + add(stack); + + action_install = add_action("go-down", _("Install"), install_game, true); + action_run = add_action("media-playback-start", _("Run"), run_game, true); + action_open_directory = add_action("folder", _("Open installation directory"), open_game_directory); + action_open_store_page = add_action("web-browser", _("Open store page"), open_game_store_page); + action_uninstall = add_action("edit-delete", _("Uninstall"), uninstall_game); + + action_cancel.clicked.connect(() => { + if(download != null) download.cancel(); + }); + + action_pause.clicked.connect(() => { + if(download != null && download is Downloader.PausableDownload) + { + ((Downloader.PausableDownload) download).pause(); + } + }); + + action_resume.clicked.connect(() => { + if(download != null && download is Downloader.PausableDownload) + { + ((Downloader.PausableDownload) download).resume(); + } + }); + } + + public void update() + { + update_game.begin(); + } + + private async void update_game() + { + is_dialog = !(get_toplevel() is GameHub.UI.Windows.MainWindow); + + #if GTK_3_22 + content_scrolled.max_content_height = is_dialog ? 640 : -1; + #endif + + stack.set_visible_child(spinner); + + if(_game == null) return; + + yield game.update_game_info(); + + if(_game == null) return; // game can be changed or nullified while updating async + + title.label = game.name; + src_icon.icon_name = game.source.icon + "-symbolic"; + + if(game.description != null) + { + description_header.show(); + description.show(); + description.set_size_request(-1, -1); + var desc = game.description + ""; + description.load_html(desc, null); + description.notify["title"].connect(e => { + description.set_size_request(-1, -1); + var height = int.parse(description.title); + description.set_size_request(-1, height); + }); + } + else + { + description_header.hide(); + description.hide(); + } + + game.status_change.connect(s => { + status.label = s.description; + download_progress.hide(); + if(s.state == Game.State.DOWNLOADING && s.download != null) + { + download = s.download; + var ds = download.status.state; + + download_progress.show(); + download_progress.fraction = s.download.status.progress; + + action_cancel.visible = true; + action_cancel.sensitive = ds == Downloader.DownloadState.DOWNLOADING || ds == Downloader.DownloadState.PAUSED; + action_pause.visible = download is Downloader.PausableDownload && ds != Downloader.DownloadState.PAUSED; + action_resume.visible = download is Downloader.PausableDownload && ds == Downloader.DownloadState.PAUSED; + } + else + { + action_cancel.visible = false; + action_pause.visible = false; + action_resume.visible = false; + } + action_install.visible = s.state != Game.State.INSTALLED; + action_install.sensitive = s.state == Game.State.UNINSTALLED; + action_run.visible = s.state == Game.State.INSTALLED; + action_open_directory.visible = s.state == Game.State.INSTALLED; + action_open_store_page.visible = game.store_page != null; + action_uninstall.visible = s.state == Game.State.INSTALLED; + }); + game.status_change(game.status); + + custom_info.foreach(w => custom_info.remove(w)); + if(game.custom_info.length > 0) + { + var root = Parser.parse_json(game.custom_info).get_object(); + + if(_game is GameHub.Data.Sources.GOG.GOGGame) + { + var sys_langs = Intl.get_language_names(); + var langs = root.get_object_member("languages"); + if(langs != null) + { + var langs_string = ""; + foreach(var l in langs.get_members()) + { + var lang = langs.get_string_member(l); + if(l in sys_langs) lang = @"$(lang)"; + langs_string += (langs_string.length > 0 ? ", " : "") + lang; + } + var langs_label = _("Language"); + if(langs_string.contains(",")) + { + langs_label = _("Languages"); + } + add_custom_info_label(langs_label, langs_string, false, true); + } + } + else if(_game is GameHub.Data.Sources.Steam.SteamGame) + { + var app = root.has_member(game.id) ? root.get_object_member(game.id) : null; + var data = app != null && app.has_member("data") ? app.get_object_member("data") : null; + if(data != null) + { + var categories = data.has_member("categories") ? data.get_array_member("categories") : null; + if(categories != null) + { + var categories_string = ""; + foreach(var c in categories.get_elements()) + { + var cat = c.get_object().get_string_member("description"); + categories_string += (categories_string.length > 0 ? ", " : "") + cat; + } + + var categories_label = _("Category"); + if(categories_string.contains(",")) + { + categories_label = _("Categories"); + } + add_custom_info_label(categories_label, categories_string, false, true); + } + + var genres = data.has_member("genres") ? data.get_array_member("genres") : null; + if(genres != null) + { + var genres_string = ""; + foreach(var g in genres.get_elements()) + { + var genre = g.get_object().get_string_member("description"); + genres_string += (genres_string.length > 0 ? ", " : "") + genre; + } + + var genres_label = _("Genre"); + if(genres_string.contains(",")) + { + genres_label = _("Genres"); + } + add_custom_info_label(genres_label, genres_string, false, true); + } + + var langs = data.has_member("supported_languages") ? data.get_string_member("supported_languages") : null; + if(langs != null) + { + langs = langs.split("
*")[0].replace("strong>", "b>"); + var langs_label = _("Language"); + if(langs.contains(",")) + { + langs_label = _("Languages"); + } + add_custom_info_label(langs_label, langs, false, true); + } + } + } + + custom_info.show_all(); + } + + yield Utils.load_image(icon, game.icon, "icon"); + + stack.set_visible_child(content_scrolled); + } + + private void install_game() + { + if(_game != null && game.status.state == Game.State.UNINSTALLED) + { + game.install.begin(); + } + } + + private void open_game_directory() + { + if(_game != null && game.status.state == Game.State.INSTALLED) + { + Utils.open_uri(game.install_dir.get_uri()); + } + } + + private void open_game_store_page() + { + if(_game != null && game.store_page != null) + { + Utils.open_uri(game.store_page); + } + } + + private void run_game() + { + if(_game != null && game.status.state == Game.State.INSTALLED) + { + game.run.begin(); + } + } + + private void uninstall_game() + { + if(_game != null && game.status.state == Game.State.INSTALLED) + { + game.uninstall.begin(); + } + } + + private delegate void Action(); + private ActionButton add_action(string icon, string title, Action action, bool primary=false) + { + var button = new ActionButton(new Image.from_icon_name(icon, IconSize.DIALOG), title, primary); + button.hexpand = primary; + actions.add(button); + button.clicked.connect(() => action()); + return button; + } + + private void add_custom_info_label(string title, string? text, bool multiline=true, bool markup=false) + { + if(text == null || text == "") return; + + var title_label = new Granite.HeaderLabel(title); + title_label.set_size_request(multiline ? -1 : 128, -1); + title_label.valign = Align.START; + + var text_label = new Label(text); + text_label.halign = Align.START; + text_label.hexpand = false; + text_label.wrap = true; + text_label.xalign = 0; + text_label.max_width_chars = is_dialog ? 80 : -1; + text_label.use_markup = markup; + + if(!multiline) + { + text_label.get_style_context().add_class("gameinfo-singleline-value"); + } + + var box = new Box(multiline ? Orientation.VERTICAL : Orientation.HORIZONTAL, 0); + box.add(title_label); + box.add(text_label); + custom_info.add(box); + } + } +} diff --git a/src/ui/views/GameDetailsView/GameDetailsView.vala b/src/ui/views/GameDetailsView/GameDetailsView.vala index 6b17a2ca..13cb2900 100644 --- a/src/ui/views/GameDetailsView/GameDetailsView.vala +++ b/src/ui/views/GameDetailsView/GameDetailsView.vala @@ -12,451 +12,89 @@ namespace GameHub.UI.Views public class GameDetailsView: BaseView { private Game? _game; - private ulong _game_status_handler_id = 0; + + public int content_margin = 8; public Game? game { get { return _game; } set { - if(_game != null && _game_status_handler_id > 0) - { - SignalHandler.disconnect(_game, _game_status_handler_id); - } _game = value; - update_game.begin(); + Idle.add(update); } } - public GameDetailsView(Game? game=null) + public HashMap> merged_games { get; construct; } + + public GameDetailsView(Game? game=null, HashMap> merged_games) { - Object(game: game); + Object(game: game, merged_games: merged_games); } - private bool is_dialog = false; - private Stack stack; - private Spinner spinner; - - private ScrolledWindow content_scrolled; - public Box content; - private Box actions; - - private Label title; - private Label status; - private ProgressBar download_progress; - private AutoSizeImage icon; - private Image src_icon; - - private Downloader.Download? download; - - private Button action_pause; - private Button action_resume; - private Button action_cancel; - - private ActionButton action_install; - private ActionButton action_run; - private ActionButton action_open_directory; - private ActionButton action_open_store_page; - private ActionButton action_uninstall; - - private Granite.HeaderLabel description_header; - private WebView description; - - private Box custom_info; - - private const string CSS_LIGHT = "background: rgb(245, 245, 245); color: rgb(66, 66, 66)"; - private const string CSS_DARK = "background: rgb(59, 63, 69); color: white"; + private StackSwitcher stack_switcher; construct { - stack = new Stack(); - stack.transition_type = StackTransitionType.NONE; - stack.vexpand = true; - - spinner = new Spinner(); - spinner.active = true; - spinner.set_size_request(36, 36); - spinner.halign = Align.CENTER; - spinner.valign = Align.CENTER; - - content_scrolled = new ScrolledWindow(null, null); - #if GTK_3_22 - content_scrolled.propagate_natural_width = true; - content_scrolled.propagate_natural_height = true; - #endif - - content = new Box(Orientation.VERTICAL, 0); - content.margin_start = content.margin_end = 8; - - var title_hbox = new Box(Orientation.HORIZONTAL, 15); - title_hbox.margin_start = title_hbox.margin_end = 7; - - icon = new AutoSizeImage(); - icon.set_constraint(48, 48, 1); - icon.set_size_request(48, 48); - - title = new Label(null); - title.halign = Align.START; - title.hexpand = true; - title.get_style_context().add_class(Granite.STYLE_CLASS_H2_LABEL); - - status = new Label(null); - status.halign = Align.START; - status.hexpand = true; - - download_progress = new ProgressBar(); - download_progress.hexpand = true; - download_progress.fraction = 0d; - download_progress.get_style_context().add_class(Gtk.STYLE_CLASS_OSD); - download_progress.hide(); - - src_icon = new Image(); - src_icon.icon_size = IconSize.DIALOG; - src_icon.opacity = 0.1; - - var title_vbox = new Box(Orientation.VERTICAL, 0); - var vbox_labels = new Box(Orientation.VERTICAL, 0); - vbox_labels.hexpand = true; - - var hbox_inner = new Box(Orientation.HORIZONTAL, 8); - var hbox_actions = new Box(Orientation.HORIZONTAL, 0); - hbox_actions.vexpand = false; - hbox_actions.valign = Align.CENTER; - - action_pause = new Button.from_icon_name("media-playback-pause-symbolic"); - action_pause.set_size_request(36, 36); - action_pause.tooltip_text = _("Pause download"); - action_pause.get_style_context().add_class(Gtk.STYLE_CLASS_FLAT); - action_pause.visible = false; - - action_resume = new Button.from_icon_name("media-playback-start-symbolic"); - action_resume.set_size_request(36, 36); - action_resume.tooltip_text = _("Resume download"); - action_resume.get_style_context().add_class(Gtk.STYLE_CLASS_FLAT); - action_resume.visible = false; + var overlay = new Overlay(); - action_cancel = new Button.from_icon_name("process-stop-symbolic"); - action_cancel.set_size_request(36, 36); - action_cancel.tooltip_text = _("Cancel download"); - action_cancel.get_style_context().add_class(Gtk.STYLE_CLASS_FLAT); - action_cancel.visible = false; - - vbox_labels.add(title); - vbox_labels.add(status); - - hbox_inner.add(vbox_labels); - hbox_inner.add(hbox_actions); - - hbox_actions.add(action_pause); - hbox_actions.add(action_resume); - hbox_actions.add(action_cancel); - - title_vbox.add(hbox_inner); - title_vbox.add(download_progress); - - title_hbox.add(icon); - title_hbox.add(title_vbox); - title_hbox.add(src_icon); - - description_header = new Granite.HeaderLabel(_("Description")); - description_header.margin_start = description_header.margin_end = 7; - description_header.get_style_context().add_class("description-header"); - - description = new WebView(); - description.hexpand = true; - description.vexpand = false; //(!is_dialog); - description.sensitive = false; - description.get_settings().hardware_acceleration_policy = HardwareAccelerationPolicy.NEVER; - - custom_info = new Box(Orientation.VERTICAL, 0); - custom_info.hexpand = false; - custom_info.margin_start = custom_info.margin_end = 8; - - var ui_settings = GameHub.Settings.UI.get_instance(); - ui_settings.notify["dark-theme"].connect(() => { - description.user_content_manager.remove_all_style_sheets(); - var style = ui_settings.dark_theme ? CSS_DARK : CSS_LIGHT; - description.user_content_manager.add_style_sheet(new UserStyleSheet(@"body{overflow: hidden; font-size: 0.8em; margin: 7px; line-height: 1.4; $(style)} h1,h2,h3{line-height: 1.2;} ul{padding: 4px 0 4px 16px;} img{max-width: 100%;}", UserContentInjectedFrames.TOP_FRAME, UserStyleLevel.USER, null, null)); - }); - ui_settings.notify_property("dark-theme"); - - actions = new Box(Orientation.HORIZONTAL, 0); - actions.margin_top = actions.margin_bottom = 16; - - content.add(title_hbox); - content.add(actions); - content.add(custom_info); - content.add(description_header); - content.add(description); - - content_scrolled.add(content); - - stack.add(spinner); - stack.add(content_scrolled); + stack = new Stack(); + stack.transition_type = StackTransitionType.SLIDE_LEFT_RIGHT; + stack.expand = true; - stack.set_visible_child(spinner); + stack_switcher = new StackSwitcher(); + stack_switcher.valign = Align.START; + stack_switcher.halign = Align.CENTER; + stack_switcher.margin = 8; + stack_switcher.visible = false; + stack_switcher.stack = stack; + stack_switcher.get_style_context().add_class(Gtk.STYLE_CLASS_BACKGROUND); - add(stack); + overlay.add(stack); + overlay.add_overlay(stack_switcher); - action_install = add_action("go-down", _("Install"), install_game, true); - action_run = add_action("media-playback-start", _("Run"), run_game, true); - action_open_directory = add_action("folder", _("Open installation directory"), open_game_directory); - action_open_store_page = add_action("web-browser", _("Open store page"), open_game_store_page); - action_uninstall = add_action("edit-delete", _("Uninstall"), uninstall_game); + add(overlay); - action_cancel.clicked.connect(() => { - if(download != null) download.cancel(); + stack.notify["visible-child"].connect(() => { + var page = stack.visible_child as GameDetailsPage; + if(page != null) page.update(); }); - action_pause.clicked.connect(() => { - if(download != null && download is Downloader.PausableDownload) - { - ((Downloader.PausableDownload) download).pause(); - } - }); - - action_resume.clicked.connect(() => { - if(download != null && download is Downloader.PausableDownload) - { - ((Downloader.PausableDownload) download).resume(); - } - }); + Idle.add(update); } - private async void update_game() + private bool update() { - is_dialog = !(get_toplevel() is GameHub.UI.Windows.MainWindow); - - #if GTK_3_22 - content_scrolled.max_content_height = is_dialog ? 640 : -1; - #endif + stack.foreach(p => stack.remove(p)); - stack.set_visible_child(spinner); + if(_game == null) return Source.REMOVE; - if(_game == null) return; + bool merged = merged_games.has_key(game); - yield _game.update_game_info(); + stack_switcher.visible = merged; - if(_game == null) return; // game can be changed or nullified while updating async + add_page(_game); - title.label = _game.name; - src_icon.icon_name = _game.source.icon + "-symbolic"; - if(_game.description != null) + if(merged) { - description_header.show(); - description.show(); - description.set_size_request(-1, -1); - var desc = _game.description + ""; - description.load_html(desc, null); - description.notify["title"].connect(e => { - description.set_size_request(-1, -1); - var height = int.parse(description.title); - description.set_size_request(-1, height); - }); - } - else - { - description_header.hide(); - description.hide(); - } - - _game_status_handler_id = _game.status_change.connect(s => { - status.label = s.description; - download_progress.hide(); - if(s.state == Game.State.DOWNLOADING && s.download != null) - { - download = s.download; - var ds = download.status.state; - - download_progress.show(); - download_progress.fraction = s.download.status.progress; - - action_cancel.visible = true; - action_cancel.sensitive = ds == Downloader.DownloadState.DOWNLOADING || ds == Downloader.DownloadState.PAUSED; - action_pause.visible = download is Downloader.PausableDownload && ds != Downloader.DownloadState.PAUSED; - action_resume.visible = download is Downloader.PausableDownload && ds == Downloader.DownloadState.PAUSED; - } - else - { - action_cancel.visible = false; - action_pause.visible = false; - action_resume.visible = false; - } - action_install.visible = s.state != Game.State.INSTALLED; - action_install.sensitive = s.state == Game.State.UNINSTALLED; - action_run.visible = s.state == Game.State.INSTALLED; - action_open_directory.visible = s.state == Game.State.INSTALLED; - action_open_store_page.visible = _game.store_page != null; - action_uninstall.visible = s.state == Game.State.INSTALLED; - }); - _game.status_change(_game.status); - - custom_info.forall(w => custom_info.remove(w)); - if(_game.custom_info.length > 0) - { - var root = Parser.parse_json(_game.custom_info).get_object(); - - if(_game is GameHub.Data.Sources.GOG.GOGGame) - { - var sys_langs = Intl.get_language_names(); - var langs = root.get_object_member("languages"); - if(langs != null) - { - var langs_string = ""; - foreach(var l in langs.get_members()) - { - var lang = langs.get_string_member(l); - if(l in sys_langs) lang = @"$(lang)"; - langs_string += (langs_string.length > 0 ? ", " : "") + lang; - } - var langs_label = _("Language"); - if(langs_string.contains(",")) - { - langs_label = _("Languages"); - } - add_custom_info_label(langs_label, langs_string, false, true); - } - } - else if(_game is GameHub.Data.Sources.Steam.SteamGame) + foreach(var g in merged_games.get(game)) { - var app = root.has_member(_game.id) ? root.get_object_member(_game.id) : null; - var data = app != null && app.has_member("data") ? app.get_object_member("data") : null; - if(data != null) - { - var categories = data.has_member("categories") ? data.get_array_member("categories") : null; - if(categories != null) - { - var categories_string = ""; - foreach(var c in categories.get_elements()) - { - var cat = c.get_object().get_string_member("description"); - categories_string += (categories_string.length > 0 ? ", " : "") + cat; - } - - var categories_label = _("Category"); - if(categories_string.contains(",")) - { - categories_label = _("Categories"); - } - add_custom_info_label(categories_label, categories_string, false, true); - } - - var genres = data.has_member("genres") ? data.get_array_member("genres") : null; - if(genres != null) - { - var genres_string = ""; - foreach(var g in genres.get_elements()) - { - var genre = g.get_object().get_string_member("description"); - genres_string += (genres_string.length > 0 ? ", " : "") + genre; - } - - var genres_label = _("Genre"); - if(genres_string.contains(",")) - { - genres_label = _("Genres"); - } - add_custom_info_label(genres_label, genres_string, false, true); - } - - var langs = data.has_member("supported_languages") ? data.get_string_member("supported_languages") : null; - if(langs != null) - { - langs = langs.split("
*")[0].replace("strong>", "b>"); - var langs_label = _("Language"); - if(langs.contains(",")) - { - langs_label = _("Languages"); - } - add_custom_info_label(langs_label, langs, false, true); - } - } + add_page(g); } - - custom_info.show_all(); - } - - yield Utils.load_image(icon, _game.icon, "icon"); - - stack.set_visible_child(content_scrolled); - } - - private void install_game() - { - if(_game != null && _game.status.state == Game.State.UNINSTALLED) - { - _game.install.begin(); - } - } - - private void open_game_directory() - { - if(_game != null && _game.status.state == Game.State.INSTALLED) - { - Utils.open_uri(_game.install_dir.get_uri()); - } - } - - private void open_game_store_page() - { - if(_game != null && _game.store_page != null) - { - Utils.open_uri(_game.store_page); - } - } - - private void run_game() - { - if(_game != null && _game.status.state == Game.State.INSTALLED) - { - _game.run.begin(); } - } - private void uninstall_game() - { - if(_game != null && _game.status.state == Game.State.INSTALLED) - { - _game.uninstall.begin(); - } - } + stack.show_all(); - private delegate void Action(); - private ActionButton add_action(string icon, string title, Action action, bool primary=false) - { - var button = new ActionButton(new Image.from_icon_name(icon, IconSize.DIALOG), title, primary); - button.hexpand = primary; - actions.add(button); - button.clicked.connect(() => action()); - return button; + return Source.REMOVE; } - private void add_custom_info_label(string title, string? text, bool multiline=true, bool markup=false) + private void add_page(Game g) { - if(text == null || text == "") return; - - var title_label = new Granite.HeaderLabel(title); - title_label.set_size_request(multiline ? -1 : 128, -1); - title_label.valign = Align.START; - - var text_label = new Label(text); - text_label.halign = Align.START; - text_label.hexpand = false; - text_label.wrap = true; - text_label.xalign = 0; - text_label.max_width_chars = is_dialog ? 80 : -1; - text_label.use_markup = markup; - - if(!multiline) - { - text_label.get_style_context().add_class("gameinfo-singleline-value"); - } - - var box = new Box(multiline ? Orientation.VERTICAL : Orientation.HORIZONTAL, 0); - box.add(title_label); - box.add(text_label); - custom_info.add(box); + var page = new GameDetailsPage(g); + page.content.margin = content_margin; + page.content.margin_top = stack_switcher.visible ? 40 : content_margin; + stack.add_titled(page, g.source.name, g.source.name); } } } diff --git a/src/ui/views/GamesView/GameCard.vala b/src/ui/views/GamesView/GameCard.vala index d6fdfcba..0b77eb12 100644 --- a/src/ui/views/GamesView/GameCard.vala +++ b/src/ui/views/GamesView/GameCard.vala @@ -1,5 +1,6 @@ using Gtk; using Gdk; +using Gee; using Granite; using GameHub.Data; using GameHub.Utils; @@ -9,15 +10,18 @@ namespace GameHub.UI.Views { public class GameCard: FlowBoxChild { - public Game game; + public Game game { get; construct; } + public HashMap> merged_games { get; construct; } private Frame card; private Overlay content; private AutoSizeImage image; - private Image src_icon; private Label label; private Label status_label; + private Box src_icons; + private Image src_icon; + private Box actions; private const int CARD_WIDTH_MIN = 320; @@ -43,14 +47,16 @@ namespace GameHub.UI.Views image = new AutoSizeImage(); image.set_constraint(CARD_WIDTH_MIN, CARD_WIDTH_MAX, CARD_RATIO); + src_icons = new Box(Orientation.HORIZONTAL, 4); + src_icons.valign = Align.START; + src_icons.halign = Align.START; + src_icons.margin = 8; + src_icons.set_events(0); + src_icon = new Image(); src_icon.icon_size = IconSize.LARGE_TOOLBAR; - src_icon.valign = Align.START; - src_icon.halign = Align.START; - src_icon.margin = 8; src_icon.opacity = 0.6; - src_icon.set_events(0); - + label = new Label(""); label.xpad = 8; label.ypad = 4; @@ -86,7 +92,7 @@ namespace GameHub.UI.Views content.add(image); content.add_overlay(actions); content.add_overlay(info); - content.add_overlay(src_icon); + content.add_overlay(src_icons); content.add_overlay(progress_bar); card.add(content); @@ -109,7 +115,7 @@ namespace GameHub.UI.Views break; case 3: - new Dialogs.GameDetailsDialog(game).show_all(); + new Dialogs.GameDetailsDialog(game, merged_games).show_all(); break; } }); @@ -117,14 +123,16 @@ namespace GameHub.UI.Views show_all(); } - public GameCard(Game game) + public GameCard(Game game, HashMap> merged_games) { - this.game = game; + Object(game: game, merged_games: merged_games); label.label = game.name; src_icon.icon_name = game.source.icon + "-symbolic"; + update(); + card.get_style_context().add_class("installed"); game.status_change.connect(s => { @@ -166,5 +174,23 @@ namespace GameHub.UI.Views Utils.load_image.begin(image, game.image, "image"); } + + public void update() + { + src_icons.foreach(w => src_icons.remove(w)); + src_icons.add(src_icon); + if(merged_games.has_key(game)) + { + foreach(var g in merged_games.get(game)) + { + var icon = new Image(); + icon.icon_name = g.source.icon + "-symbolic"; + icon.icon_size = IconSize.LARGE_TOOLBAR; + icon.opacity = 0.6; + src_icons.add(icon); + } + } + src_icons.show_all(); + } } } diff --git a/src/ui/views/GamesView/GameListRow.vala b/src/ui/views/GamesView/GameListRow.vala index c61747bb..3846b92d 100644 --- a/src/ui/views/GamesView/GameListRow.vala +++ b/src/ui/views/GamesView/GameListRow.vala @@ -55,7 +55,7 @@ namespace GameHub.UI.Views notify["is-selected"].connect(update_icon); ui_settings = GameHub.Settings.UI.get_instance(); - ui_settings.notify["compact-list"].connect(update_view); + ui_settings.notify["compact-list"].connect(update); show_all(); } @@ -63,10 +63,10 @@ namespace GameHub.UI.Views public override void show_all() { base.show_all(); - update_view(); + update(); } - private void update_view() + public void update() { var compact = ui_settings.compact_list; var image_size = compact ? 16 : 36; diff --git a/src/ui/views/GamesView/GamesView.vala b/src/ui/views/GamesView/GamesView.vala index 40c0eea1..f631fad5 100644 --- a/src/ui/views/GamesView/GamesView.vala +++ b/src/ui/views/GamesView/GamesView.vala @@ -42,13 +42,17 @@ namespace GameHub.UI.Views private ListBox downloads_list; private int downloads_count = 0; + private Settings.UI ui_settings; private Settings.SavedState saved_state; + private bool merging_thread_running = false; + private HashMap> merged_games = new HashMap>(Game.hash, Game.is_equal); + construct { instance = this; - var ui_settings = Settings.UI.get_instance(); + ui_settings = Settings.UI.get_instance(); saved_state = Settings.SavedState.get_instance(); foreach(var src in GameSources) @@ -82,8 +86,8 @@ namespace GameHub.UI.Views games_list = new ListBox(); games_list.selection_mode = SelectionMode.BROWSE; - games_list_details = new GameDetailsView(); - games_list_details.content.margin = 16; + games_list_details = new GameDetailsView(null, merged_games); + games_list_details.content_margin = 16; var games_list_scrolled = new ScrolledWindow(null, null); games_list_scrolled.hscrollbar_policy = PolicyType.EXTERNAL; @@ -342,7 +346,7 @@ namespace GameHub.UI.Views src.load_games.begin(g => { update_view(); - games_grid.add(new GameCard(g)); + games_grid.add(new GameCard(g, merged_games)); games_list.add(new GameListRow(g)); games_grid.show_all(); games_list.show_all(); @@ -366,6 +370,7 @@ namespace GameHub.UI.Views downloads.set_sensitive(downloads_count > 0); }); g.status_change(g.status); + merge_game(g); }, (obj, res) => { loading_sources--; spinner.active = loading_sources > 0; @@ -428,7 +433,23 @@ namespace GameHub.UI.Views var f = filter.selected; GameSource? src = null; if(f > 0) src = sources[f - 1]; - return (src == null || game == null || src == game.source) && search.text.strip().casefold() in game.name.casefold(); + bool same_src = (src == null || game == null || src == game.source); + bool merged_src = false; + if(!same_src && ui_settings.merge_games) + { + if(merged_games.has_key(game)) + { + foreach(var g in merged_games.get(game)) + { + if(g.source == src) + { + merged_src = true; + break; + } + } + } + } + return (same_src || merged_src) && Utils.strip_name(search.text).casefold() in Utils.strip_name(game.name).casefold(); } private void games_list_select_first_visible_row() @@ -461,5 +482,72 @@ namespace GameHub.UI.Views return bar; } + + private void remove_game(Game game) + { + games_list.foreach(r => { + var gr = r as GameListRow; + if(gr.game == game) + { + games_list.remove(gr); + return; + } + }); + games_grid.foreach(c => { + var gc = c as GameCard; + if(gc.game == game) + { + games_grid.remove(gc); + return; + } + }); + } + + private void merge_games() + { + if(!ui_settings.merge_games) return; + Idle.add(() => { + foreach(var src1 in GameSources) + { + foreach(var game in src1.games) + { + merge_game(game); + } + } + return Source.REMOVE; + }); + } + + private void merge_game(Game game) + { + if(!ui_settings.merge_games) return; + Idle.add(() => { + foreach(var src in GameSources) + { + if(game.source == src) continue; + foreach(var game2 in src.games) + { + if(merged_games.has_key(game2)) continue; + bool name_match_exact = Utils.strip_name(game.name).casefold() == Utils.strip_name(game2.name).casefold(); + bool name_match_fuzzy_prefix = Utils.strip_name(game.name, ":").casefold().has_prefix(Utils.strip_name(game2.name).casefold() + ":") + || Utils.strip_name(game2.name, ":").casefold().has_prefix(Utils.strip_name(game.name).casefold() + ":"); + if(name_match_exact || name_match_fuzzy_prefix) + { + if(!merged_games.has_key(game)) + { + merged_games.set(game, new ArrayList(Game.is_equal)); + } + merged_games.get(game).add(game2); + debug(@"[Merge] Merging '$(game.name)' ($(game.source.name):$(game.id)) with '$(game2.name)' ($(game2.source.name):$(game2.id))"); + remove_game(game2); + } + } + } + + games_list.foreach(r => { (r as GameListRow).update(); }); + games_grid.foreach(c => { (c as GameCard).update(); }); + return Source.REMOVE; + }); + } } } diff --git a/src/utils/FSUtils.vala b/src/utils/FSUtils.vala index 5d0da5d2..34466fa9 100644 --- a/src/utils/FSUtils.vala +++ b/src/utils/FSUtils.vala @@ -42,7 +42,16 @@ namespace GameHub.Utils public class Steam { - public static string Home { get { return FSUtils.Paths.Settings.get_instance().steam_home; } } + public static string Home { + get + { + #if FLATPAK + return Environment.get_user_data_dir() + "/.var/app/com.valvesoftware.Steam"; + #else + return FSUtils.Paths.Settings.get_instance().steam_home; + #endif + } + } public static string Config { owned get { return FSUtils.Paths.Steam.Home + "/steam/config"; } } public static string LoginUsersVDF { owned get { return FSUtils.Paths.Steam.Config + "/loginusers.vdf"; } } diff --git a/src/utils/Settings.vala b/src/utils/Settings.vala index 75c4cc35..29ba6210 100644 --- a/src/utils/Settings.vala +++ b/src/utils/Settings.vala @@ -48,6 +48,8 @@ namespace GameHub.Settings public bool dark_theme { get; set; } public bool compact_list { get; set; } + public bool merge_games { get; set; } + public UI() { base(ProjectConfig.PROJECT_NAME + ".ui"); diff --git a/src/utils/Utils.vala b/src/utils/Utils.vala index 123b157c..460cbd1c 100644 --- a/src/utils/Utils.vala +++ b/src/utils/Utils.vala @@ -167,4 +167,27 @@ namespace GameHub.Utils catch(Error e){} image.queue_draw(); } + + private const string NAME_CHARS_TO_STRIP = "!@#$%^&*()-_+=:~`;?'\"<>,./\\|’“”„«»™℠®©"; + public static string strip_name(string name, string? keep=null) + { + if(name == null) return name; + var n = name.strip(); + if(n == "") return n; + unichar c; + for(int i = 0; NAME_CHARS_TO_STRIP.get_next_char(ref i, out c);) + { + if(keep != null && keep != "") + { + unichar k; + for(int j = 0; keep.get_next_char(ref j, out k);) + { + if(k == c) break; + } + if(k == c) break; + } + n = n.replace(c.to_string(), ""); + } + return new Regex(" {2,}").replace(n, n.length, 0, " ").strip(); + } }