...
 
Commits (58)
Adrien Plazas <kekun.plazas@laposte.net>
Abhinav Singh <theawless@gmail.com>
Adrien Plazas <kekun.plazas@laposte.net>
Alexander Mikhaylenko <exalm7659@gmail.com>
Andrei Lisita <andreii.lisita@gmail.com>
Jakub Steiner <jimmac@gmail.com>
Megh Parikh <meghprkh@gmail.com>
Ricard Gascons <gascons1995@gmail.com>
Saurabh Singh <saurabhsingh412@gmail.com>
Sebastien Nicouleaud <sebn@users.noreply.github.com>
Ricard Gascons <gascons1995@gmail.com>
Tobias Bernard <tbernard@gnome.org>
==============
Version 3.32.0
==============
* Translation updates
Friulian
German
===============
Version 3.31.92
===============
* Fixes
- Fix compile-time warnings when building with recent librsvg and gtk.
- Fix compile-time warning introduced in the 3.31.91.
* Various cleanups.
* Translation updates
Danish
Dutch
Finnish
Indonesian
Italian
Russian
===============
Version 3.31.91
===============
* New application icons from GNOME Design team.
* Collection loading is now paused in game, leading to vastly improved
performance when opening a game from file manager.
* Binding directional pads should work for more gamepads now.
* Fixes
- It's not possible to open multiple main windows anymore.
- Invalid discs in PlayStation disc selector are now disabled.
* Dependencies:
- Minimum libhandy version has been increased to 0.0.8.
* Translation updates
Italian
Slovenian
===============
Version 3.31.90
===============
......
Games is a game manager application for GNOME.
More information on https://wiki.gnome.org/Design/Playground/Games
More information on https://wiki.gnome.org/Apps/Games
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="org.gnome.Games-symbolic.svg"
height="16.03125"
id="svg7384"
inkscape:version="0.91 r13725"
version="1.1"
width="16.03125">
<metadata
id="metadata90">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer9"
inkscape:cx="0.80568524"
inkscape:cy="11.329028"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#555753"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="false"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="1016"
inkscape:window-maximized="1"
inkscape:window-width="1920"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="1">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="apps"
style="display:inline"
transform="translate(-62.96895,-174.96875)">
<path
inkscape:connector-curvature="0"
d="m 67.034392,176.98408 c -1.053316,-0.001 -2.301472,0.53924 -2.621093,1.35156 -0.444693,1.1302 -1.509079,5.60889 -1.423828,7.9668 0.0809,2.23745 0.438684,2.70137 1.261718,2.68164 0.0459,-0.005 0.09091,-0.0116 0.134766,-0.0176 -0.005,0.002 -0.009,0.006 -0.01367,0.008 1.76646,-0.22922 1.945219,-1.00387 3.191406,-1.99217 1.193617,-0.9466 1.667508,-1.03248 3.423828,-0.99805 1.75631,-0.0344 2.230211,0.0554 3.423828,1.00195 1.250517,0.99175 1.367678,1.74075 3.167969,1.98243 0,0 -0.002,-0.002 -0.002,-0.002 0.0423,0.006 0.08474,0.0108 0.128906,0.0156 0.832855,0.025 1.192087,-0.42977 1.273438,-2.67969 0.08535,-2.35788 -0.977135,-6.83852 -1.421828,-7.96871 -0.444692,-1.13021 -2.685126,-1.73033 -3.701172,-1.08398 -0.836164,0.53192 -1.751467,0.73437 -2.871094,0.73437 -1.119636,0 -2.034929,-0.20244 -2.871093,-0.73437 -0.285762,-0.18179 -0.667916,-0.26514 -1.080079,-0.26563 z m 8.451172,2 a 0.50000062,0.50000102 0 0 1 0.5,0.5 0.50000062,0.50000102 0 0 1 -0.5,0.5 0.50000062,0.50000102 0 0 1 -0.5,-0.5 0.50000062,0.50000102 0 0 1 0.5,-0.5 z m -9,0.25 a 1.2500026,1.2500025 0 0 1 1.25,1.25 1.2500026,1.2500025 0 0 1 -1.25,1.25 1.2500026,1.2500025 0 0 1 -1.25,-1.25 1.2500026,1.2500025 0 0 1 1.25,-1.25 z m 4.5,0.75 a 0.75001009,0.75000152 0 0 1 0.75,0.75 0.75001009,0.75000152 0 0 1 -0.75,0.75 0.75001009,0.75000152 0 0 1 -0.75,-0.75 0.75001009,0.75000152 0 0 1 0.75,-0.75 z m 3.5,0 a 0.50000062,0.50000102 0 0 1 0.5,0.5 0.50000062,0.50000102 0 0 1 -0.5,0.5 0.50000062,0.50000102 0 0 1 -0.5,-0.5 0.50000062,0.50000102 0 0 1 0.5,-0.5 z m 2,0 a 0.50000062,0.50000102 0 0 1 0.5,0.5 0.50000062,0.50000102 0 0 1 -0.5,0.5 0.50000062,0.50000102 0 0 1 -0.5,-0.5 0.50000062,0.50000102 0 0 1 0.5,-0.5 z m -1,1 a 0.50000062,0.50000102 0 0 1 0.5,0.5 0.50000062,0.50000102 0 0 1 -0.5,0.5 0.50000062,0.50000102 0 0 1 -0.5,-0.5 0.50000062,0.50000102 0 0 1 0.5,-0.5 z m -8.458984,1 0.917969,0 c 0.0196,0 0.04102,0.0214 0.04102,0.041 l 0,0.875 c 0,0.0393 0.04469,0.084 0.08398,0.084 l 0.875,0 c 0.0208,0 0.04102,0.0202 0.04102,0.041 l 0,0.91797 c 0,0.0208 -0.02022,0.041 -0.04102,0.041 l -0.875,0 c -0.0393,0 -0.08398,0.0447 -0.08398,0.084 l 0,0.875 c 0,0.0196 -0.02142,0.041 -0.04102,0.041 l -0.917969,0 c -0.0196,0 -0.04102,-0.0214 -0.04102,-0.041 l 0,-0.875 c 0,-0.0393 -0.04468,-0.084 -0.08398,-0.084 l -0.875,0 c -0.0196,0 -0.04102,-0.0214 -0.04102,-0.041 l 0,-0.91797 c 0,-0.0196 0.02142,-0.041 0.04102,-0.041 l 0.875,0 c 0.0393,0 0.08398,-0.0447 0.08398,-0.084 l 0,-0.875 c 0,-0.0196 0.02142,-0.041 0.04102,-0.041 z m 7.458984,0.25 a 1.2500037,1.2499962 0 0 1 1.25,1.25 1.2500037,1.2499962 0 0 1 -1.25,1.25 1.2500037,1.2499962 0 0 1 -1.25,-1.25 1.2500037,1.2499962 0 0 1 1.25,-1.25 z"
id="path4213"
style="fill:#bebebe" />
</g>
</svg>
icon_sizes = ['16x16', '22x22', '24x24', '32x32', '48x48', '256x256', '512x512']
hicolor_dir = join_paths(datadir, 'icons', 'hicolor')
foreach icon_size: icon_sizes
hicolor_dir = join_paths('hicolor', icon_size, 'apps')
install_data(
join_paths(hicolor_dir, 'org.gnome.Games.png'),
install_dir: join_paths(datadir, 'icons', hicolor_dir),
rename: '@0@.png'.format(application_id)
)
endforeach
hicolor_dir = join_paths('hicolor', 'symbolic', 'apps')
scalable_dir = join_paths('scalable', 'apps')
install_data(
join_paths(scalable_dir, 'org.gnome.Games.svg'),
install_dir: join_paths(hicolor_dir, scalable_dir),
rename: '@0@.svg'.format(application_id)
)
symbolic_dir = join_paths('symbolic', 'apps')
install_data(
join_paths(hicolor_dir, 'org.gnome.Games-symbolic.svg'),
install_dir: join_paths(datadir, 'icons', hicolor_dir),
join_paths(symbolic_dir, 'org.gnome.Games-symbolic.svg'),
install_dir: join_paths(hicolor_dir, symbolic_dir),
rename: '@0@-symbolic.svg'.format(application_id)
)
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128" version="1.0"><defs><linearGradient id="h"><stop offset="0" stop-color="#9a999d"/><stop offset="1" stop-color="#87848e"/></linearGradient><linearGradient id="g"><stop offset="0" stop-color="#dddcdb"/><stop offset="1" stop-color="#b5b4b1" stop-opacity=".969"/></linearGradient><linearGradient id="f"><stop offset="0" stop-color="#dddcdb"/><stop offset="1" stop-color="#c0bfbc" stop-opacity=".971"/></linearGradient><linearGradient id="i"><stop offset="0" stop-color="#9a9996"/><stop offset="1" stop-color="#9a9996" stop-opacity="0"/></linearGradient><linearGradient id="e"><stop offset="0" stop-color="#deddda"/><stop offset="1" stop-color="#9a9996"/></linearGradient><linearGradient id="d"><stop offset="0" stop-color="#918e97"/><stop offset="1" stop-color="#5e5c64"/></linearGradient><linearGradient id="a"><stop offset="0" stop-color="#d5d3cf"/><stop offset="1" stop-color="#f6f5f4"/></linearGradient><linearGradient id="b"><stop offset="0" stop-color="#d5d3cf"/><stop offset="1" stop-color="#949390"/></linearGradient><linearGradient id="c"><stop offset="0" stop-color="#9a9996"/><stop offset="1" stop-color="#77767b"/></linearGradient><linearGradient xlink:href="#i" id="j" x1="38" y1="248" x2="50" y2="248" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.33333 0 0 1.33333 -306.667 -414.667)"/><linearGradient xlink:href="#i" id="k" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.33333 0 0 1.33333 -306.667 -374.783)" x1="38" y1="248" x2="50" y2="248"/></defs><g transform="translate(0 -172)"><g fill="#77767b" stroke="none" color="#000" font-weight="400" font-family="sans-serif"><path d="M89.179 213.97l6.084 7.563 22.648-4.67 9.875 47.907a16.002 16.002 0 0 1-28.135 13.26l-35.404-44zM39.182 213.97l-6.084 7.563-22.649-4.67L.574 264.77a16.002 16.002 0 0 0 28.135 13.26l35.405-44z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" overflow="visible"/></g><path fill="#77767b" d="M41.116 200h46v32h-46z"/><path d="M60.45 231.28l-31.985 39.75a16.002 16.002 0 0 1-28.07-6.577l-.065.317a16.002 16.002 0 0 0 28.135 13.26l35.404-44zm7.1 0l-3.42 2.75 35.405 44a16.002 16.002 0 0 0 28.135-13.26l-.065-.317a16.002 16.002 0 0 1-28.07 6.576z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" color="#000" font-weight="400" font-family="sans-serif" overflow="visible" fill="#5e5c64" fill-opacity=".235"/><circle r="22" cy="221" cx="32.116" fill="#c0bfbc"/><path fill="#c0bfbc" d="M46.116 204h36v52h-36z"/><circle cx="96.116" cy="221" r="22" fill="#c0bfbc"/><path fill="#deddda" d="M46.116 204h36v48h-36z"/><circle style="marker:none" cx="44.116" cy="252" r="13.884" fill="#c0bfbc"/><circle r="13.884" cy="250" cx="44.116" style="marker:none" fill="#deddda"/><circle r="13.884" cy="252" cx="84.116" style="marker:none" fill="#c0bfbc"/><circle style="marker:none" cx="84.116" cy="250" r="13.884" fill="#deddda"/><circle cx="32.116" cy="219" r="22" fill="#deddda"/><circle r="22" cy="219" cx="96.116" fill="#deddda"/><path d="M30 208c-1.108 0-2 .892-2 2v6h-6c-1.108 0-2 .892-2 2v4c0 1.108.892 2 2 2h6v6c0 1.108.892 2 2 2h4c1.108 0 2-.892 2-2v-6h6c1.108 0 2-.892 2-2v-4c0-1.108-.892-2-2-2h-6v-6c0-1.108-.892-2-2-2z" fill="#3d3846"/><path d="M30 206c-1.108 0-2 .892-2 2v6h-6c-1.108 0-2 .892-2 2v4c0 1.108.892 2 2 2h6v6c0 1.108.892 2 2 2h4c1.108 0 2-.892 2-2v-6h6c1.108 0 2-.892 2-2v-4c0-1.108-.892-2-2-2h-6v-6c0-1.108-.892-2-2-2z" fill="#5e5c64"/><g transform="matrix(-1 0 0 1 -28.492 -180.773)"><g transform="translate(-208.492 146.773)"><path d="M70 256v2c0 3.324 2.676 6 6 6s6-2.676 6-6v-2z" fill="#c01c28"/><circle cy="256" cx="76" r="6" fill="#ed333b"/></g><path d="M-122.492 394.773v2c0 3.324 2.676 6 6 6s6-2.676 6-6v-2z" fill="#1a5fb4"/><circle r="6" cx="-116.492" cy="394.773" fill="#3584e4"/></g><circle style="marker:none" cx="44.116" cy="250" r="10" fill="#241f31"/><circle r="10" cy="250" cx="84.116" style="marker:none" fill="#241f31"/><circle r="10" cy="248" cx="44.116" style="marker:none" fill="#3d3846"/><circle style="marker:none" cx="84.116" cy="248" r="10" fill="#3d3846"/><circle transform="matrix(0 -1 -1 0 0 0)" r="8" cy="-84" cx="-248" style="marker:none" fill="url(#j)"/><circle style="marker:none" cx="-248" cy="-44.116" r="8" transform="matrix(0 -1 -1 0 0 0)" fill="url(#k)"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.0"><defs><linearGradient id="h"><stop offset="0" stop-color="#9a999d"/><stop offset="1" stop-color="#87848e"/></linearGradient><linearGradient id="g"><stop offset="0" stop-color="#dddcdb"/><stop offset="1" stop-color="#b5b4b1" stop-opacity=".969"/></linearGradient><linearGradient id="f"><stop offset="0" stop-color="#dddcdb"/><stop offset="1" stop-color="#c0bfbc" stop-opacity=".971"/></linearGradient><linearGradient id="e"><stop offset="0" stop-color="#deddda"/><stop offset="1" stop-color="#9a9996"/></linearGradient><linearGradient id="d"><stop offset="0" stop-color="#918e97"/><stop offset="1" stop-color="#5e5c64"/></linearGradient><linearGradient id="a"><stop offset="0" stop-color="#d5d3cf"/><stop offset="1" stop-color="#f6f5f4"/></linearGradient><linearGradient id="b"><stop offset="0" stop-color="#d5d3cf"/><stop offset="1" stop-color="#949390"/></linearGradient><linearGradient id="c"><stop offset="0" stop-color="#9a9996"/><stop offset="1" stop-color="#77767b"/></linearGradient></defs><path style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1" d="M3 2.988a1.986 1.986 0 0 0-1.988 2l.002 7.551c.019 1.542 2.162 2.018 2.851.639L4.951 11h6.178l1.086 2.178c.689 1.38 2.766.903 2.785-.639l-.02-7.55c0-1.109-.892-2-2-2zM4 4h2v2h2v2H6v2H4V8H2V6h2zm6.494.53a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm2 3a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" color="#000" font-weight="400" font-family="sans-serif" overflow="visible"/></svg>
\ No newline at end of file
......@@ -40,6 +40,36 @@
<image width="800" height="450">https://gitlab.gnome.org/GNOME/gnome-games/raw/master/data/appdata/3-30-gamepad-test.png</image>
</screenshot>
</screenshots>
<releases>
<release version="3.32.0" type="stable" date="2019-03-10" urgency="medium">
<description>
<p>Improvements</p>
<ul>
<li>Collection loading is now paused in game, leading to vastly improved performance when opening a game from file manager.</li>
<li>Disable MAME plugin because of major performance and reliability problems.</li>
<li>Revert to non-portal file chooser for Flatpak, to allow adding games consisting of multiple files.</li>
<li>Update primary menu layout according to app menu retirement initiative.</li>
<li>Allow to switch between gamepad and keyboard input in standalone Libretro games.</li>
<li>New application icons from GNOME Design team, symbolic icon is now used for HighContrast.</li>
<li>Many refinements in preferences window.</li>
</ul>
<p>Fixes</p>
<ul>
<li>It's not possible to open multiple main windows anymore.</li>
<li>Binding directional pads should work for more gamepads now.</li>
<li>Keyboard doesn't control every player in multiplayer games anymore.</li>
<li>Invalid discs in PlayStation disc selector are now disabled.</li>
<li>Quit dialog now actually appears when exiting a game that doesn't support snapshots.</li>
<li>pening a game by double-clicking while another game is running now quits the previous game correctly.</li>
<li>Database file is now correctly created even if data directory didn't exist.</li>
<li>During search, developers and platforms without any games to show are now hidden.</li>
<li>Steam plugin reliability improvements.</li>
</ul>
</description>
</release>
</releases>
<provides>
<binary>gnome-games</binary>
</provides>
......
......@@ -8,6 +8,7 @@ Exec=gnome-games %U
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=@icon@
Terminal=false
X-GNOME-SingleWindow=true
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Player;Game;
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<template class="GamesCheckmarkItem" parent="GtkBox">
<property name="margin">6</property>
<property name="spacing">12</property>
<template class="GamesCheckmarkItem" parent="GtkListBoxRow">
<property name="visible">true</property>
<child>
<object class="GtkLabel" id="title_label">
<object class="GtkBox">
<property name="margin">6</property>
<property name="spacing">12</property>
<property name="visible">true</property>
<property name="vexpand">true</property>
<property name="wrap">true</property>
</object>
</child>
<child>
<object class="GtkImage" id="checkmark_image">
<property name="visible">False</property>
<property name="icon-name">object-select-symbolic</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel" id="title_label">
<property name="visible">true</property>
<property name="vexpand">true</property>
<property name="wrap">true</property>
</object>
</child>
<child>
<object class="GtkImage" id="checkmark_image">
<property name="visible">False</property>
<property name="icon-name">object-select-symbolic</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</template>
......
......@@ -2,7 +2,6 @@
<interface>
<!-- interface-requires gtk+ 3.8 -->
<template class="GamesPreferencesWindow" parent="GtkWindow">
<property name="visible">True</property>
<property name="title" translatable="yes">Preferences</property>
<property name="default-width">800</property>
<property name="default-height">500</property>
......
gnome-games-app (3.32.0-1) experimental; urgency=medium
* New upstream release
* Bump minimum libhandy-0.0-dev to 0.0.8
* Add Revert-gamepad-view-Stop-accessing-Rsvg.Handle-fields.patch:
- Revert commit that requires librsvg 2.45 (not in Debian yet)
-- Jeremy Bicha <jbicha@debian.org> Sun, 17 Mar 2019 08:50:32 -0400
gnome-games-app (3.31.90-1) experimental; urgency=medium
* New upstream development release
......
......@@ -14,7 +14,7 @@ Build-Depends: debhelper-compat (= 12),
libarchive-dev,
libgrilo-0.3-dev,
libgtk-3-dev,
libhandy-0.0-dev,
libhandy-0.0-dev (>= 0.0.8),
libmanette-0.2-dev,
libretro-gtk-0.14-dev (>= 0.15.3),
librsvg2-dev,
......
......@@ -10,7 +10,7 @@ Build-Depends: debhelper-compat (= 12),
libarchive-dev,
libgrilo-0.3-dev,
libgtk-3-dev,
libhandy-0.0-dev,
libhandy-0.0-dev (>= 0.0.8),
libmanette-0.2-dev,
libretro-gtk-0.14-dev (>= 0.15.3),
librsvg2-dev,
......
From: Jeremy Bicha <jbicha@debian.org>
Date: Sun, 17 Mar 2019 08:46:34 -0400
Subject: Revert "gamepad-view: Stop accessing Rsvg.Handle fields"
This reverts commit 3c33d1aa3b2e177ed055e6865b3fc6229cf911d6.
---
src/ui/gamepad-view.vala | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/ui/gamepad-view.vala b/src/ui/gamepad-view.vala
index 8649413..f917f78 100644
--- a/src/ui/gamepad-view.vala
+++ b/src/ui/gamepad-view.vala
@@ -26,11 +26,7 @@ private class Games.GamepadView : Gtk.DrawingArea {
critical ("Could not set up gamepad view: %s", e.message);
}
- Rsvg.Rectangle rect = {};
- if (!handle.get_geometry_sub (null, out rect, null))
- assert_not_reached ();
-
- set_size_request ((int) rect.width, (int) rect.height);
+ set_size_request (handle.width, handle.height);
input_highlights = new bool[value.input_paths.length];
reset ();
@@ -105,13 +101,9 @@ private class Games.GamepadView : Gtk.DrawingArea {
double w = get_allocated_width ();
double h = get_allocated_height ();
- Rsvg.Rectangle rect = {};
- if (!handle.get_geometry_sub (null, out rect, null))
- assert_not_reached ();
-
- scale = double.min (h / rect.height, w / rect.width);
+ scale = double.min (h / handle.height, w / handle.width);
- x = (w - rect.width * scale) / 2;
- y = (h - rect.height * scale) / 2;
+ x = (w - handle.width * scale) / 2;
+ y = (h - handle.height * scale) / 2;
}
}
Revert-gamepad-view-Stop-accessing-Rsvg.Handle-fields.patch
version=4
https://download.gnome.org/sources/gnome-games/([\d\.]+)/ \
https://download.gnome.org/sources/gnome-games/([\d\.]+[02468])/ \
gnome-games@ANY_VERSION@\.tar\.xz
project('gnome-games',
['vala', 'c'],
version: '3.31.90',
version: '3.32.0',
license: 'GPL3+',
meson_version: '>= 0.46.1'
)
......@@ -31,12 +31,13 @@ valac = meson.get_compiler ('vala')
glib_min_version = '2.38'
manette_min_version = '0.2.0'
retro_gtk_min_version = '0.15.3'
handy_min_version = '0.0.8'
gio_dep = dependency ('gio-2.0', version: '>=' + glib_min_version)
glib_dep = dependency ('glib-2.0', version: '>=' + glib_min_version)
grilo_dep = dependency ('grilo-0.3')
gtk_dep = dependency ('gtk+-3.0')
handy_dep = dependency ('libhandy-0.0')
handy_dep = dependency ('libhandy-0.0', version: '>=' + handy_min_version)
manette_dep = dependency ('manette-0.2', version: '>=' + manette_min_version)
retro_gtk_dep = dependency ('retro-gtk-0.14', version: '>=' + retro_gtk_min_version)
rsvg_dep = dependency ('librsvg-2.0')
......
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.DesktopUid: Object, Uid {
private class Games.DesktopUid : Object, Uid {
private string uid;
private DesktopAppInfo app_info;
......
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.DreamcastUid: Object, Uid {
private class Games.DreamcastUid : Object, Uid {
private DreamcastHeader header;
private string uid;
......
// This file is part of GNOME Games. License: GPL-3.0+.
// Documentation: http://www.gc-forever.com/yagcd/chap13.html
private class Games.GameCubeHeader: Object {
private class Games.GameCubeHeader : Object {
private const size_t MAGIC_OFFSET = 0x1c;
private const string MAGIC_VALUE = "\xc2\x33\x9f\x3d";
......
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.GameCubeUid: Object, Uid {
private class Games.GameCubeUid : Object, Uid {
private GameCubeHeader header;
private string uid;
......
// This file is part of GNOME Games. License: GPL-3.0+.
public class Games.LibretroInputCapabilities : Object, InputCapabilities {
public bool get_allow_classic_gamepads () throws Error {
return true;
......
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.PlayStationUid: Object, Uid {
private class Games.PlayStationUid : Object, Uid {
private string disc_set_id;
private string uid;
......
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.SegaSaturnUid: Object, Uid {
private class Games.SegaSaturnUid : Object, Uid {
private SegaSaturnHeader header;
private string uid;
......
......@@ -140,11 +140,11 @@ private class Games.SteamRegistry {
}
}
private abstract class Games.SteamRegistryValue: Object {
private abstract class Games.SteamRegistryValue : Object {
public string tag { construct; get; }
}
private class Games.SteamRegistryNode: SteamRegistryValue {
private class Games.SteamRegistryNode : SteamRegistryValue {
private List<SteamRegistryValue> children;
public SteamRegistryNode (string tag) {
......@@ -172,7 +172,7 @@ private class Games.SteamRegistryNode: SteamRegistryValue {
}
}
private class Games.SteamRegistryData: SteamRegistryValue {
private class Games.SteamRegistryData : SteamRegistryValue {
public string data { construct; get; }
public SteamRegistryData (string tag, string data) {
......
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.SteamUid: Object, Uid {
private class Games.SteamUid : Object, Uid {
private string uid;
private string prefix;
private string game_id;
......
// This file is part of GNOME Games. License: GPL-3.0+.
// Documentation: https://www.planetvb.com/content/downloads/documents/stsvb.html
private class Games.VirtualBoyHeader: Object {
private class Games.VirtualBoyHeader : Object {
private const size_t MAGIC_OFFSET = 0x20C;
private const uint8[] MAGIC_VALUE = { 0, 0, 0, 0, 0 };
......
// This file is part of GNOME Games. License: GPL-3.0+.
// Documentation: http://wiibrew.org/wiki/Wii_Disc
private class Games.WiiHeader: Object {
private class Games.WiiHeader : Object {
private const size_t MAGIC_OFFSET = 0x18;
private const string MAGIC_VALUE = "\x5d\x1c\x9e\xa3";
......
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.WiiUid: Object, Uid {
private class Games.WiiUid : Object, Uid {
private WiiHeader header;
private string uid;
......
# Please keep this list sorted alphabetically.
ca
cs
da
de
el
es
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -7,20 +7,20 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-games gnome-3-26\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-games/issues\n"
"POT-Creation-Date: 2018-10-08 22:21+0000\n"
"PO-Revision-Date: 2018-11-15 23:29+0700\n"
"POT-Creation-Date: 2018-12-11 09:49+0000\n"
"PO-Revision-Date: 2019-02-28 14:01+0700\n"
"Last-Translator: Kukuh Syafaat <kukuhsyafaat@gnome.org>\n"
"Language-Team: Indonesian <gnome-l10n-id@googlegroups.com>\n"
"Language: id\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
"X-Generator: Poedit 2.2.1\n"
#: data/org.gnome.Games.appdata.xml.in.in:6
#: data/org.gnome.Games.desktop.in.in:3 data/ui/collection-box.ui:40
#: data/ui/collection-header-bar.ui:67 data/ui/display-header-bar.ui:6
#: src/ui/application.vala:26
#: src/ui/application.vala:25
msgid "Games"
msgstr "Permainan"
......@@ -70,6 +70,10 @@ msgstr "Mainkan permainan"
msgid "Resume your game to where you left it"
msgstr "Lanjutkan permainan Anda dimana Anda meninggalkannya"
#: data/org.gnome.Games.appdata.xml.in.in:53
msgid "The GNOME Project"
msgstr "Proyek GNOME"
#: data/org.gnome.Games.desktop.in.in:4
msgid "Video game player"
msgstr "Pemain video game"
......@@ -199,20 +203,28 @@ msgstr ""
"Pasag permainan atau tambahkan direktori yang berisi permainan untuk mencari "
"sumber."
#: data/ui/input-mode-switcher.ui:16
msgid "Gamepad Input"
msgstr "Masukan Gamepad"
#: data/ui/input-mode-switcher.ui:36
msgid "Keyboard Input"
msgstr "Masukan Papan Tik"
#: data/ui/media-menu-button.ui:11
msgid "Media"
msgstr "Media"
#: data/ui/preferences-page-controllers.ui:28
#: data/ui/preferences-page-controllers.ui:9
msgid "Gamepads"
msgstr "Gamepad"
#: data/ui/preferences-page-controllers.ui:51
#: src/ui/preferences-page-controllers.vala:76
#: data/ui/preferences-page-controllers.ui:32
#: src/ui/preferences-page-controllers.vala:75
msgid "Keyboard"
msgstr "Papan Tik"
#: data/ui/preferences-page-video.ui:28
#: data/ui/preferences-page-video.ui:9
msgid "Filter"
msgstr "Penyaring"
......@@ -239,18 +251,6 @@ msgstr "Lewati"
msgid "Cancel"
msgstr "Batal"
#: data/ui/preferences-window.ui:95
msgid "Video"
msgstr "Video"
#: data/ui/preferences-window.ui:104
msgid "Controllers"
msgstr "Pengendali"
#: data/ui/preferences-window.ui:113
msgid "Extensions"
msgstr "Tambahan"
#: data/ui/quit-dialog.ui:9
msgid "Are you sure you want to quit?"
msgstr "Anda yakin ingin keluar?"
......@@ -501,6 +501,10 @@ msgstr "Id permainan MAME tidak valid \"%s\" untuk \"%s\"."
msgid "Arcade"
msgstr "Arcade"
#: plugins/ms-dos/src/ms-dos-plugin.vala:7
msgid "MS-DOS"
msgstr "MS-DOS"
#: plugins/nintendo-ds/src/nintendo-ds-plugin.vala:7
msgid "Nintendo DS"
msgstr "Nintendo DS"
......@@ -645,11 +649,11 @@ msgstr "Berkas tidak memiliki header Wii."
msgid "Wii"
msgstr "Wii"
#: src/command/command-runner.vala:34
#: src/command/command-runner.vala:39
msgid "The game doesn’t have a valid command."
msgstr "Permainan tidak memiliki perintah yang valid."
#: src/command/command-runner.vala:60
#: src/command/command-runner.vala:65
#, c-format
msgid "Couldn’t run “%s”: execution failed."
msgstr "Tak bisa menjalankan \"%s\": eksekusi gagal."
......@@ -740,21 +744,21 @@ msgstr ""
"Permainan ini membutuhkan berkas perangkat tegar (firmware) %s dengan sidik "
"jari SHA-512 dari %s untuk menjalankan."
#: src/retro/retro-runner.vala:241
#: src/retro/retro-runner.vala:255
#, c-format
msgid "No module found for “%s”."
msgstr "Tidak ada modul yang ditemukan untuk \"%s\"."
#: src/retro/retro-runner.vala:541
#: src/retro/retro-runner.vala:561
msgid "Unknown platform"
msgstr "Platform tidak dikenal"
#: src/retro/retro-runner.vala:586
#: src/retro/retro-runner.vala:604
#, c-format
msgid "The system “%s” isn’t supported yet, but full support is planned."
msgstr "Sistem \"%s\" tidak didukung, tapi dukungan penuh direncanakan."
#: src/retro/retro-runner.vala:589
#: src/retro/retro-runner.vala:606
msgid "The system isn’t supported yet, but full support is planned."
msgstr "Sistem ini belum didukung, tetapi dukungan penuh direncanakan."
......@@ -805,101 +809,97 @@ msgid "Master System"
msgstr "Master System"
#: src/retro/retro-simple-type.vala:37
msgid "MS-DOS"
msgstr "MS-DOS"
#: src/retro/retro-simple-type.vala:39
msgid "Neo Geo Pocket"
msgstr "Neo Geo Pocket"
#: src/retro/retro-simple-type.vala:41
#: src/retro/retro-simple-type.vala:39
msgid "Neo Geo Pocket Color"
msgstr "Warna Neo Geo Pocket"
#. translators: known as "Famicom" in eastern Asia
#: src/retro/retro-simple-type.vala:44
#: src/retro/retro-simple-type.vala:42
msgid "Nintendo Entertainment System"
msgstr "Nintendo Entertainment System"
#: src/retro/retro-simple-type.vala:46
#: src/retro/retro-simple-type.vala:44
msgid "Nintendo 64"
msgstr "Nintendo 64"
#. translators: known as "Mega Drive 32X", "Mega 32X" or "Super 32X" in other places
#: src/retro/retro-simple-type.vala:49
#: src/retro/retro-simple-type.vala:47
msgid "Genesis 32X"
msgstr "Genesis 32X"
#. translators: known as "Mega Drive" in most of the world
#: src/retro/retro-simple-type.vala:52
#: src/retro/retro-simple-type.vala:50
msgid "Sega Genesis"
msgstr "Sega Genesis"
#: src/retro/retro-simple-type.vala:54
#: src/retro/retro-simple-type.vala:52
msgid "Sega Pico"
msgstr "Sega Pico"
#: src/retro/retro-simple-type.vala:56
#: src/retro/retro-simple-type.vala:54
msgid "SG-1000"
msgstr "SG-1000"
#. translators: known as "Super Famicom" in eastern Asia
#: src/retro/retro-simple-type.vala:59
#: src/retro/retro-simple-type.vala:57
msgid "Super Nintendo Entertainment System"
msgstr "Super Nintendo Entertainment System"
#. translators: known as "PC Engine" in eastern Asia and France
#: src/retro/retro-simple-type.vala:62
#: src/retro/retro-simple-type.vala:60
msgid "TurboGrafx-16"
msgstr "TurboGrafx-16"
#: src/retro/retro-simple-type.vala:64
#: src/retro/retro-simple-type.vala:62
msgid "WiiWare"
msgstr "WiiWare"
#: src/retro/retro-simple-type.vala:66
#: src/retro/retro-simple-type.vala:64
msgid "WonderSwan"
msgstr "WonderSwan"
#: src/retro/retro-simple-type.vala:68
#: src/retro/retro-simple-type.vala:66
msgid "WonderSwan Color"
msgstr "WonderSwan Color"
#: src/ui/application.vala:174
#: src/ui/application.vala:169
msgid "Select game files"
msgstr "Pilih berkas permainan"
#: src/ui/application.vala:175
#: src/ui/application.vala:170
msgid "_Add"
msgstr "T_ambah"
#: src/ui/application.vala:175
#: src/ui/application.vala:170
msgid "_Cancel"
msgstr "_Batal"
#: src/ui/application.vala:389
#: src/ui/application.vala:367
msgid "GNOME Games"
msgstr "Permainan GNOME"
#: src/ui/application.vala:391
#: src/ui/application.vala:369
msgid "A video game player for GNOME"
msgstr "Player permainan video untuk GNOME"
#: src/ui/application.vala:395
#: src/ui/application.vala:373
msgid "Learn more about GNOME Games"
msgstr "Pelajari lebih lanjut mengenai Permainan GNOME"
#: src/ui/application.vala:402
#: src/ui/application.vala:380
msgid "translator-credits"
msgstr ""
"Lorenz Adam Damara <lorenzadam@resolution-consulting.co.id>, 2016.\n"
"Kukuh Syafaat <kukuhsyafaat@gnome.org>, 2017, 2018."
"Kukuh Syafaat <kukuhsyafaat@gnome.org>, 2017, 2018, 2019."
#: src/ui/application-window.vala:380
#: src/ui/application-window.vala:383
msgid "An unexpected error occurred."
msgstr "Kesalahan yang tidak terduga terjadi."
#: src/ui/application-window.vala:660 src/ui/application-window.vala:677
#: src/ui/application-window.vala:663 src/ui/application-window.vala:680
msgid "Playing a game"
msgstr "Mainkan permainan"
......@@ -933,19 +933,31 @@ msgstr "Tekan tombol yang sesuai pada papan tik Anda"
msgid "Media %d"
msgstr "Media %d"
#: src/ui/preferences-page-controllers.vala:24
msgid "Controllers"
msgstr "Pengendali"
#: src/ui/preferences-page-plugins.vala:12
msgid "Extensions"
msgstr "Tambahan"
#. same as video-filters in gschema
#: src/ui/preferences-page-video.vala:24
#: src/ui/preferences-page-video.vala:22
msgid "Smooth"
msgstr "Halus"
#: src/ui/preferences-page-video.vala:24
#: src/ui/preferences-page-video.vala:22
msgid "Sharp"
msgstr "Tajam"
#: src/ui/preferences-page-video.vala:24
#: src/ui/preferences-page-video.vala:22
msgid "CRT"
msgstr "CRT"
#: src/ui/preferences-page-video.vala:36
msgid "Video"
msgstr "Video"
#. translators: testing a gamepad, %s is its name
#: src/ui/preferences-subpage-gamepad.vala:78
#, c-format
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// This file is part of GNOME Games. License: GPL-3.0+.
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
namespace Config {
public const string APPLICATION_ID;
......
......@@ -10,6 +10,8 @@ private class Games.GameCollection : Object {
private HashTable<string, Array<UriGameFactory>> factories_for_mime_type;
private HashTable<string, Array<UriGameFactory>> factories_for_scheme;
public bool paused { get; set; }
construct {
games = new GenericSet<Game> (Game.hash, Game.equal);
factories_for_mime_type = new HashTable<string, Array<UriGameFactory>> (str_hash, str_equal);
......@@ -61,10 +63,16 @@ private class Games.GameCollection : Object {
return games[0];
}
public async void search_games () {
public async bool search_games () {
foreach (var source in sources)
foreach (var uri in source)
foreach (var uri in source) {
if (paused)
return false;
yield add_uri (uri);
}
return true;
}
private async UriGameFactory[] get_factories_for_uri (Uri uri) {
......
// This file is part of GNOME Games. License: GPL-3.0+.
public enum Games.InputMode {
NONE,
KEYBOARD,
......
......@@ -2,18 +2,21 @@
namespace Games.Credits {
private const string[] AUTHORS = {
"Adrien Plazas <kekun.plazas@laposte.net>",
"Abhinav Singh <theawless@gmail.com>",
"Adrien Plazas <kekun.plazas@laposte.net>",
"Alexander Mikhaylenko <exalm7659@gmail.com>",
"Andrei Lisita <andreii.lisita@gmail.com>",
"Megh Parikh <meghprkh@gmail.com>",
"Ricard Gascons <gascons1995@gmail.com>",
"Saurabh Singh <saurabhsingh412@gmail.com>",
"Sebastien Nicouleaud <sebn@users.noreply.github.com>",
"Ricard Gascons <gascons1995@gmail.com>",
null
};
private const string[] ARTISTS = {
"Adrien Plazas <kekun.plazas@laposte.net>",
"Jakub Steiner <jimmac@gmail.com>",
"Tobias Bernard <tbernard@gnome.org>",
null
};
......
......@@ -35,12 +35,19 @@ private class Games.GamepadMappingBuilder : Object {
string destination_string;
}
private struct GamepadAxisMapping {
bool positive_mapped;
bool negative_mapped;
}
private GamepadInputMapping[] mappings;
private GamepadDPad[] dpads;
private HashTable<string, GamepadAxisMapping?> axes;
construct {
mappings = new GamepadInputMapping[]{};
dpads = new GamepadDPad[]{};
axes = new HashTable<string, GamepadAxisMapping?> (str_hash, str_equal);
}
public string build_sdl_string () {
......@@ -56,8 +63,34 @@ private class Games.GamepadMappingBuilder : Object {
return add_destination (@"b$(hardware_index)", source);
}
public bool set_axis_mapping (uint8 hardware_index, GamepadInput source) {
return add_destination (@"a$(hardware_index)", source);
// FIXME: range should have Manette.MappingRange type
public bool set_axis_mapping (uint8 hardware_index, int range, GamepadInput source) {
var destination = @"a$(hardware_index)";
var positive = range >= 0;
var negative = range <= 0;
if (!(destination in axes))
axes[destination] = { false, false };
var mapping = axes[destination];
if ((positive && mapping.positive_mapped) ||
(negative && mapping.negative_mapped))
return false;
axes[destination] = {
mapping.positive_mapped || positive,
mapping.negative_mapped || negative
};
if (range > 0)
return add_destination (@"+$(destination)", source);
if (range < 0)
return add_destination (@"-$(destination)", source);
return add_destination (destination, source);
}
public bool set_hat_mapping (uint8 hardware_index, int32 value, GamepadInput source) {
......
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.RetroGamepad: Object, Retro.Controller {
private class Games.RetroGamepad : Object, Retro.Controller {
public Manette.Device device { get; construct; }
public bool present_analog_sticks { get; construct; }
......
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.RetroOptions: Object {
private class Games.RetroOptions : Object {
public const string OPTIONS_GROUP = "Options";
private KeyFile keyfile;
......
......@@ -38,6 +38,9 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
break;
}
assert (application is Application);
(application as Application).set_pause_loading (ui_state != UiState.COLLECTION);
konami_code.reset ();
}
}
......@@ -104,12 +107,18 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
private KonamiCode konami_code;
public ApplicationWindow (ListModel collection) {
collection_box.collection = collection;
collection.items_changed.connect (() => {
is_collection_empty = collection.get_n_items () == 0;
});
is_collection_empty = collection.get_n_items () == 0;
public ListModel collection {
construct {
collection_box.collection = value;
value.items_changed.connect (() => {
is_collection_empty = value.get_n_items () == 0;
});
is_collection_empty = value.get_n_items () == 0;
}
}
public ApplicationWindow (Application application, ListModel collection) {
Object (application: application, collection: collection);
}
construct {
......
......@@ -219,6 +219,7 @@ public class Games.Application : Gtk.Application {
var provider = load_css ("gtk-style.css");
Gtk.StyleContext.add_provider_for_screen (screen, provider, 600);
init_game_sources ();
load_game_list.begin ();
ListStore list_store = new ListStore (typeof (Game));
game_collection.game_added.connect ((game) => {
......@@ -228,8 +229,12 @@ public class Games.Application : Gtk.Application {
list_store.append (game);
});
window = new ApplicationWindow (list_store);
this.add_window (window);
if (window != null) {
window.present_with_time (Gtk.get_current_event_time ());
return;
}
window = new ApplicationWindow (this, list_store);
window.destroy.connect (() => {
quit_application ();
});
......@@ -334,25 +339,29 @@ public class Games.Application : Gtk.Application {
}
internal async void load_game_list () {
init_game_sources ();
yield game_collection.search_games ();
if (!yield game_collection.search_games ())
return;
game_list_loaded = true;
if (window != null)
window.loading_notification = false;
}
private void preferences () {
if (preferences_window != null) {
preferences_window.present ();
public void set_pause_loading (bool paused) {
game_collection.paused = paused;
return;
load_game_list.begin ();
}
private void preferences () {
if (preferences_window == null) {
preferences_window = new PreferencesWindow ();
preferences_window.destroy.connect (() => {
preferences_window = null;
});
}
preferences_window = new PreferencesWindow ();
preferences_window.destroy.connect (() => {
preferences_window = null;
});
preferences_window.present_with_time (Gtk.get_current_event_time ());
}
private void help () {
......@@ -390,7 +399,7 @@ public class Games.Application : Gtk.Application {
dialog.hide_on_delete ();
});
dialog.present ();
dialog.present_with_time (Gtk.get_current_event_time ());
}
private void quit_application () {
......
// This file is part of GNOME Games. License: GPL-3.0+.
[GtkTemplate (ui = "/org/gnome/Games/ui/checkmark-item.ui")]
private class Games.CheckmarkItem: Gtk.Box {
private class Games.CheckmarkItem : Gtk.ListBoxRow {
[GtkChild]
private Gtk.Label title_label;
[GtkChild]
......@@ -10,8 +10,14 @@ private class Games.CheckmarkItem: Gtk.Box {
public bool checkmark_visible { get; set; }
private Binding checkmark_visible_binding;
public CheckmarkItem (string name) {
title_label.label = name;
public string label {
construct {
title_label.label = value;
}
}
public CheckmarkItem (string label) {
Object (label: label);
}
construct {
......
......@@ -44,7 +44,7 @@ private class Games.CollectionBox : Gtk.Box {
private Binding search_binding;
private Binding loading_notification_binding;
public CollectionBox (ListStore collection) {
public CollectionBox (ListModel collection) {
Object (collection: collection);
}
......
private class Games.DeveloperListItem: Games.SidebarListItem {
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.DeveloperListItem : Games.SidebarListItem {
private Developer _developer;
public Developer developer {
get { return _developer; }
......
......@@ -5,18 +5,13 @@ private class Games.GameIconView : Gtk.Box {
private Game _game;
public Game game {
get { return _game; }
set {
if (value == game)
return;
construct {
_game = value;
thumbnail.uid = game.get_uid ();
thumbnail.icon = game.get_icon ();
thumbnail.cover = game.get_cover ();
title.label = game.name;
queue_draw ();
}
}
......@@ -26,6 +21,6 @@ private class Games.GameIconView : Gtk.Box {
private Gtk.Label title;
public GameIconView (Game game) {
this.game = game;
Object (game: game);
}
}
// This file is part of GNOME Games. License: GPL-3.0+.
private class Games.GameThumbnail: Gtk.DrawingArea {
private class Games.GameThumbnail : Gtk.DrawingArea {
private const Gtk.CornerType[] right_corners = { Gtk.CornerType.TOP_RIGHT, Gtk.CornerType.BOTTOM_RIGHT };
private const Gtk.CornerType[] bottom_corners = { Gtk.CornerType.BOTTOM_LEFT, Gtk.CornerType.BOTTOM_RIGHT };
......
......@@ -7,7 +7,6 @@ private class Games.GamepadMapper : Gtk.Bin {
[GtkChild]
private GamepadView gamepad_view;
private Manette.Device device;
private GamepadMappingBuilder mapping_builder;
private GamepadInput[] mapping_inputs;
private GamepadInput input;
......@@ -17,15 +16,20 @@ private class Games.GamepadMapper : Gtk.Bin {
private ulong gamepad_event_handler_id;
public Manette.Device device { get; construct; }
private GamepadViewConfiguration _configuration;
public GamepadViewConfiguration configuration {
get { return _configuration; }
construct {
_configuration = value;
gamepad_view.configuration = value;
}
}
public GamepadMapper (Manette.Device device, GamepadViewConfiguration configuration, GamepadInput[] mapping_inputs) {
this.device = device;
Object (device: device, configuration: configuration);
this.mapping_inputs = mapping_inputs;
try {
gamepad_view.set_configuration (configuration);
}
catch (Error e) {
critical ("Could not set up gamepad view: %s", e.message);
}
}
public void start () {
......@@ -76,8 +80,16 @@ private class Games.GamepadMapper : Gtk.Bin {
if (-0.8 < value < 0.8)
return;
int range = 0;
if (input.code == EventCode.BTN_DPAD_UP ||
input.code == EventCode.BTN_DPAD_DOWN ||
input.code == EventCode.BTN_DPAD_LEFT ||
input.code == EventCode.BTN_DPAD_RIGHT)
range = value > 0 ? 1 : -1;
if (!mapping_builder.set_axis_mapping ((uint8) event.get_hardware_index (),
input))
range, input))
return;
break;
......
......@@ -5,22 +5,25 @@ private class Games.GamepadTester : Gtk.Bin {
[GtkChild]
private GamepadView gamepad_view;
private Manette.Device device;
private ulong gamepad_button_press_event_handler_id;
private ulong gamepad_button_release_event_handler_id;
private ulong gamepad_axis_event_handler_id;
public GamepadTester (Manette.Device device, GamepadViewConfiguration configuration) {
this.device = device;
try {
gamepad_view.set_configuration (configuration);
}
catch (Error e) {
critical ("Could not set up gamepad view: %s", e.message);
public Manette.Device device { get; construct; }
private GamepadViewConfiguration _configuration;
public GamepadViewConfiguration configuration {
get { return _configuration; }
construct {
_configuration = value;
gamepad_view.configuration = value;
}
}
public GamepadTester (Manette.Device device, GamepadViewConfiguration configuration) {
Object (device: device, configuration: configuration);
}
public void start () {
gamepad_view.reset ();
connect_to_gamepad ();
......