Kekun / gnome-games

Moving to gnome.org — A game manager application for GNOME
https://git.gnome.org/browse/gnome-games/
GNU General Public License v3.0
21 stars 4 forks source link

Add gamepad support #306

Closed meghprkh closed 8 years ago

meghprkh commented 8 years ago

I split everything into individual commits since as you said "it is easier to merge then split" =)

(This includes splitting the callback delegates)

Kekun commented 8 years ago

Great job! :)

I just see two tiny things to fix:

Kekun commented 8 years ago

Actually there are still some things to fix we forgot about, the patch is introducing these compile time warnings:

gamepad/gamepad-mappings-manager.vala:39.24-39.47: warning: unhandled error `GLib.IOError'
        var mapping_string = data_stream.read_line ();
                             ^^^^^^^^^^^^^^^^^^^^^^^^
gamepad/gamepad-mappings-manager.vala:42.21-42.44: warning: unhandled error `GLib.IOError'
            mapping_string = data_stream.read_line ();
                             ^^^^^^^^^^^^^^^^^^^^^^^^
gamepad/gamepad-mappings-manager.vala:34.26-34.79: warning: unhandled error `GLib.Error'
        add_from_input_stream (resources_open_stream (path, ResourceLookupFlags.NONE));
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gamepad/gamepad-mappings-manager.vala:19.3-19.70: warning: unhandled error `GLib.IOError'
        add_from_resource ("/org/gnome/Games/gamepads/gamecontrollerdb.txt");
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gamepad/gamepad-mappings-manager.vala:30.26-30.37: warning: unhandled error `GLib.Error'
        add_from_input_stream (file.read ());
                               ^^^^^^^^^^^^
gamepad/gamepad-monitor.vala:43.14-43.38: warning: unhandled error `GLib.FileError'
            gamepad = new Gamepad (raw_gamepad);
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
gamepad/gamepad-mappings-manager.vala:28.2-28.26: warning: method `Games.GamepadMappingsManager.add_from_file' never used
    public void add_from_file (string file_name) throws IOError {
    ^^^^^^^^^^^^^^^^^^^^^^^^^
gamepad/gamepad-mappings-manager.vala:67.2-67.24: warning: method `Games.GamepadMappingsManager.get_name' never used
    public string? get_name (string guid) {
    ^^^^^^^^^^^^^^^^^^^^^^^

If you don't know how to fix you patch set without rewritting everything or loosing anything don't hesitate to ask.

meghprkh commented 8 years ago

SHould I remove each of the unused functions and add throwing at each of the the functions?

On Mon, Jul 18, 2016 at 11:35 PM, Adrien Plazas notifications@github.com wrote:

Actually there are still some things to fix we forgot about, the patch is introducing these compile time warnings:

gamepad/gamepad-mappings-manager.vala:39.24-39.47: warning: unhandled error GLib.IOError' var mapping_string = data_stream.read_line (); ^^^^^^^^^^^^^^^^^^^^^^^^ gamepad/gamepad-mappings-manager.vala:42.21-42.44: warning: unhandled errorGLib.IOError' mapping_string = data_stream.read_line (); ^^^^^^^^^^^^^^^^^^^^^^^^ gamepad/gamepad-mappings-manager.vala:34.26-34.79: warning: unhandled error GLib.Error' add_from_input_stream (resources_open_stream (path, ResourceLookupFlags.NONE)); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gamepad/gamepad-mappings-manager.vala:19.3-19.70: warning: unhandled errorGLib.IOError' add_from_resource ("/org/gnome/Games/gamepads/gamecontrollerdb.txt"); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gamepad/gamepad-mappings-manager.vala:30.26-30.37: warning: unhandled error GLib.Error' add_from_input_stream (file.read ()); ^^^^^^^^^^^^ gamepad/gamepad-monitor.vala:43.14-43.38: warning: unhandled errorGLib.FileError' gamepad = new Gamepad (raw_gamepad); ^^^^^^^^^^^^^^^^^^^^^^^^^ gamepad/gamepad-mappings-manager.vala:28.2-28.26: warning: method Games.GamepadMappingsManager.add_from_file' never used public void add_from_file (string file_name) throws IOError { ^^^^^^^^^^^^^^^^^^^^^^^^^ gamepad/gamepad-mappings-manager.vala:67.2-67.24: warning: methodGames.GamepadMappingsManager.get_name' never used public string? get_name (string guid) { ^^^^^^^^^^^^^^^^^^^^^^^

If you don't know how to fix you patch set without rewritting everything or loosing anything don't hesitate to ask.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kekun/gnome-games/pull/306#issuecomment-233409119, or mute the thread https://github.com/notifications/unsubscribe-auth/AFs91QoDFheIYn6sI-iTJED5lB3XLXXZks5qW8B3gaJpZM4JO8Ts .

meghprkh commented 8 years ago

Closing with https://github.com/Kekun/gnome-games/commit/74d21695aa23957509ee69e507f3a2bdd92c5045