GNOME Bugzilla – Bug 732934
Display a warning dialog if no chess engines are installed
Last modified: 2015-07-11 11:30:29 UTC
A user came onto #gnome-games when I wasn't paying attention today and reported that he couldn't play against the computer. He thought it was a bug, but surely he just did not have a chess engine installed. This is definitely worth a run-once warning dialog.
Created attachment 307229 [details] [review] Display a dialog at the start of the game
Review of attachment 307229 [details] [review]: Thanks, this is good to push with fixes: ::: src/gnome-chess.vala @@ +124,3 @@ + { + var no_engine_dialog = new Gtk.MessageDialog (window, + Gtk.DialogFlags.MODAL, It looks like all the arguments after the first one are misaligned (looks like they are one space too close to the left, aligned with the opening parentheses instead of the w in window). @@ +201,3 @@ + if (ai_profiles == null) + run_no_engine_dialog ("No chess engine is installed."); I don't think it makes sense to pass the string message as the parameter, since this is the only error message that will ever be used. Also, don't forget to mark it for translation!
Thanks for reviewing quickly Michael! I'll update the BUG with another patch shortly.
Created attachment 307259 [details] [review] Display a dialog at the start of the game (mcatanzaro) Fix whitespace alignment. (mcatanzaro) Remove function parameter - error_message as it doesn't change
Pushed to master. To ssh://ssareen@git.gnome.org/git/gnome-chess b7f99ec..826a8fd master -> master
Oh, I wasn't thinking: we should use a bit more descriptive error message: "No chess engine is installed. You will not be able to play against the computer."
Thanks for improving the error message. Fixed and pushed to master. To ssh://ssareen@git.gnome.org/git/gnome-chess 826a8fd..b3c5a87 master -> master