After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682204 - Add the gamepads plugin
Add the gamepads plugin
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks: 682205
 
 
Reported: 2012-08-19 19:32 UTC by Zan Dobersek
Modified: 2019-03-20 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (59.39 KB, patch)
2012-08-19 19:37 UTC, Zan Dobersek
needs-work Details | Review

Description Zan Dobersek 2012-08-19 19:32:19 UTC
A gamepads plugin for the GNOME Settings Daemon was part of my GSoC 2012 project.
https://live.gnome.org/SummerOfCode2012/Projects/ZanDobersek_Gamepad_API

Its task is to update the supported gamepads (and/or joysticks) devices list and apply properly working buttons and axes mappings to any supported device when it is connected.

The device is also updated with any previous calibration data. The plugin exposes a set of DBus methods that the GNOME Control Center uses to query device support status and calibration data as well as set the new calibration data when the user performs the calibration. Any performed calibration is also saved via GSettings and applied to that device when it's connected.

The device list is written in JSON and currently stored in an external repository at GitHub[1] but should probably be merged into GSD repository. Because of that the plugin uses libsoup to gather the data and JsonGlib to parse the JSON.
Comment 1 Zan Dobersek 2012-08-19 19:37:30 UTC
Created attachment 221754 [details] [review]
Patch

This is the current patch, generated by diffing the master branch of the gnome-settings-daemon repository at git.gnome.org and the master branch of my GitHub fork[1].

[1] https://github.com/zdobersek/gsd-gamepads-plugin
Comment 2 Zan Dobersek 2012-08-19 19:38:08 UTC
(In reply to comment #0)
> The device list is written in JSON and currently stored in an external
> repository at GitHub[1] but should probably be merged into GSD repository.

Here's that repository:
https://github.com/zdobersek/gamepads-json
Comment 3 Bastien Nocera 2012-08-20 16:46:02 UTC
A quick review from the description:

(In reply to comment #0)
> Its task is to update the supported gamepads (and/or joysticks) devices list
> and apply properly working buttons and axes mappings to any supported device
> when it is connected.

OK.

> The device is also updated with any previous calibration data. The plugin
> exposes a set of DBus methods that the GNOME Control Center uses to query
> device support status and calibration data as well as set the new calibration
> data when the user performs the calibration. Any performed calibration is also
> saved via GSettings and applied to that device when it's connected.

Why can't the gnome-control-center share code with gnome-settings-daemon (through a library or cut'n'paste code) to know how to read and write the settings itself? That way, the only thing that the gnome-settings-daemon plugin has to do is look for new pads, and apply the settings, or re-apply the settings when they change.

No need to add another D-Bus API for this.

> The device list is written in JSON and currently stored in an external
> repository at GitHub[1] but should probably be merged into GSD repository.
> Because of that the plugin uses libsoup to gather the data and JsonGlib to
> parse the JSON.

Using libsoup to auto-update the file is out of the question, you can remove that code from the g-s-d plugin straight away.
Comment 4 Bastien Nocera 2016-05-31 09:09:59 UTC
Putting on NEEDINFO until bug 682205 is sorted.
Comment 5 GNOME Infrastructure Team 2019-03-20 11:02:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/187.