gnome-games r7731 - trunk/gnomine



Author: jclinton
Date: Mon Jun 23 18:00:24 2008
New Revision: 7731
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7731&view=rev

Log:
Allow user to flag a mine by holding the control key. (Emil Andersson. Bug #539725)


Modified:
   trunk/gnomine/minefield.c

Modified: trunk/gnomine/minefield.c
==============================================================================
--- trunk/gnomine/minefield.c	(original)
+++ trunk/gnomine/minefield.c	Mon Jun 23 18:00:24 2008
@@ -1077,6 +1077,8 @@
       mfield->action = SHOW_ACTION;
       if ((event->state & GDK_SHIFT_MASK) || (mfield->bdown[2]) || (mfield->mines[c].shown))
         mfield->action = CLEAR_ACTION;
+      if (event->state & GDK_CONTROL_MASK)
+        mfield->action = FLAG_ACTION;
       break;
     case 2:
       mfield->action = CLEAR_ACTION;
@@ -1092,7 +1094,7 @@
      * is done in the button_release handler. */
     if (mfield->action == CLEAR_ACTION) {
       gtk_minefield_multi_press (mfield, x, y, c);
-    } else if (mfield->action == FLAG_ACTION && mfield->bdown[2] == 1) {
+    } else if (mfield->action == FLAG_ACTION) {
       gtk_minefield_toggle_mark (mfield, x, y);
     }
     if (mfield->action != FLAG_ACTION) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]