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 732934 - Display a warning dialog if no chess engines are installed
Display a warning dialog if no chess engines are installed
Status: RESOLVED FIXED
Product: gnome-chess
Classification: Applications
Component: General
git master
Other Linux
: High enhancement
: ---
Assigned To: Sahil Sareen
gnome-chess-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-09 03:49 UTC by Michael Catanzaro
Modified: 2015-07-11 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Display a dialog at the start of the game (1.68 KB, patch)
2015-07-10 15:10 UTC, Sahil Sareen
accepted-commit_now Details | Review
Display a dialog at the start of the game (1.65 KB, patch)
2015-07-10 18:46 UTC, Sahil Sareen
accepted-commit_now Details | Review

Description Michael Catanzaro 2014-07-09 03:49:58 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.
Comment 1 Sahil Sareen 2015-07-10 15:10:17 UTC
Created attachment 307229 [details] [review]
Display a dialog at the start of the game
Comment 2 Michael Catanzaro 2015-07-10 16:23:57 UTC
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!
Comment 3 Sahil Sareen 2015-07-10 18:14:57 UTC
Thanks for reviewing quickly Michael!

I'll update the BUG with another patch shortly.
Comment 4 Sahil Sareen 2015-07-10 18:46:05 UTC
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
Comment 5 Sahil Sareen 2015-07-10 18:53:34 UTC
Pushed to master.

To ssh://ssareen@git.gnome.org/git/gnome-chess
   b7f99ec..826a8fd  master -> master
Comment 6 Michael Catanzaro 2015-07-10 19:24:32 UTC
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."
Comment 7 Sahil Sareen 2015-07-11 11:30:29 UTC
Thanks for improving the error message.
Fixed and pushed to master.

To ssh://ssareen@git.gnome.org/git/gnome-chess
   826a8fd..b3c5a87  master -> master