String changes for gnome-games



Hi gang,

Attached are a few patches I'd like to throw into gnome-games, mainly
bug fixes with string changes included.

If the i18n team say "no!" then I'll just fix the bugs without changing
strings.

Regards,
Ross
-- 
Ross Burton                                 mail: ross@burtonini.com
                                           jabber: ross@nerdfest.org
                                    www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-games/aisleriot/ChangeLog,v
retrieving revision 1.189
diff -u -r1.189 ChangeLog
--- ChangeLog	19 Jul 2002 11:12:15 -0000	1.189
+++ ChangeLog	18 Aug 2002 20:48:44 -0000
@@ -1,3 +1,8 @@
+2002-08-18  Ross Burton  <ross@burtonini.com>
+
+	* sol.c (quit_app): Fix the callbacks for the Quit handler, and
+	correct a typo.
+
 2002-07-12  Samuel Stringham <sams@e-sa.com>
 
 	* sol.c (quit_app): Display a comfirmation dialog when quitting.
Index: sol.c
===================================================================
RCS file: /cvs/gnome/gnome-games/aisleriot/sol.c,v
retrieving revision 1.68
diff -u -r1.68 sol.c
--- sol.c	19 Jul 2002 11:12:15 -0000	1.68
+++ sol.c	18 Aug 2002 20:48:46 -0000
@@ -355,7 +355,7 @@
 		      GTK_SIGNAL_FUNC (button_press_event), NULL);
 }
 
-void quit_app (GtkWidget *app)
+gboolean quit_app (GtkMenuItem *menuitem)
 {
   GtkWidget *box;
   gint response;
@@ -365,7 +365,7 @@
             GTK_DIALOG_MODAL,
             GTK_MESSAGE_QUESTION,
             GTK_BUTTONS_NONE,
-            _("Really exit gataxx?"));
+            _("Really exit Aisleriot?"));
     gtk_dialog_add_buttons (GTK_DIALOG (box),
             GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
             GTK_STOCK_QUIT, GTK_RESPONSE_ACCEPT,
Index: sol.h
===================================================================
RCS file: /cvs/gnome/gnome-games/aisleriot/sol.h,v
retrieving revision 1.14
diff -u -r1.14 sol.h
--- sol.h	15 Jun 1999 23:50:31 -0000	1.14
+++ sol.h	18 Aug 2002 20:48:46 -0000
@@ -62,7 +62,7 @@
 
 gchar* game_file_to_name(const gchar* file);
 void new_game(gchar* file, guint *seed);
-void quit_app (GtkWidget*);
+gboolean quit_app (GtkMenuItem*);
 void set_score( void );
 void timer_start( void );
 void timer_stop( void );
? src/freecell.schemas
Index: src/ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-games/freecell/src/ChangeLog,v
retrieving revision 1.40
diff -u -r1.40 ChangeLog
--- src/ChangeLog	11 Aug 2002 12:53:53 -0000	1.40
+++ src/ChangeLog	18 Aug 2002 21:00:51 -0000
@@ -1,3 +1,8 @@
+2002-08-18  Ross Burton  <ross@burtonini.com>
+
+	* io-gtk.c (callback_exit): HIG-ify the Quit dialog. Based on a
+	patch from Samuel Stringham <sams@e-sa.com>, fixing #73031.
+
 2002-08-11  Ross Burton  <ross@burtonini.com>
 
 	* io-gtk.c (to_destination_auto): Actually check the response from
Index: src/io-gtk.c
===================================================================
RCS file: /cvs/gnome/gnome-games/freecell/src/io-gtk.c,v
retrieving revision 1.42
diff -u -r1.42 io-gtk.c
--- src/io-gtk.c	11 Aug 2002 11:38:06 -0000	1.42
+++ src/io-gtk.c	18 Aug 2002 21:00:53 -0000
@@ -621,24 +621,28 @@
       mb = gtk_message_dialog_new (GTK_WINDOW (main_window),
 		      GTK_DIALOG_MODAL,
 		      GTK_MESSAGE_QUESTION,
-		      GTK_BUTTONS_YES_NO,
-		      _("Exit this game?"),
+		      GTK_BUTTONS_NONE,
+		      _("Really exit GNOME Freecell?"),
 		      NULL);
-
+      gtk_dialog_add_buttons (GTK_DIALOG (mb),
+			      GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+			      GTK_STOCK_QUIT, GTK_RESPONSE_ACCEPT, 
+			      NULL);
       gtk_dialog_set_default_response (GTK_DIALOG (mb),
-		      GTK_RESPONSE_YES);
+		      GTK_RESPONSE_REJECT);
       response = gtk_dialog_run (GTK_DIALOG(mb));
       gtk_widget_destroy (mb);
 
-      if (response == GTK_RESPONSE_YES)
+      if (response == GTK_RESPONSE_REJECT)
       {
-	      callback_exit_with_lose();
-      } else {
-        return TRUE;
+	return TRUE;
       }
+      callback_exit_with_lose();
     }
   else
+  {
     callback_exit_really();
+  }
 }
 
 void
? gataxx.schemas
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-games/gataxx/ChangeLog,v
retrieving revision 1.35
diff -u -r1.35 ChangeLog
--- ChangeLog	17 Aug 2002 17:23:17 -0000	1.35
+++ ChangeLog	18 Aug 2002 20:53:40 -0000
@@ -1,3 +1,8 @@
+2002-08-18  Ross Burton  <ross@burtonini.com>
+
+	* gataxx.c (quit_game_cb): Make the Quit dialog conform to the
+	HIG. Patch from Samuel Stringham <sams@e-sa.com>, fixing #73031.
+
 2002-08-17  Juan Pablo Mendoza  <jpablo@gnome.org>
 
         * sunmoon.png: New file by DarkAlloy.
Index: gataxx.c
===================================================================
RCS file: /cvs/gnome/gnome-games/gataxx/gataxx.c,v
retrieving revision 1.25
diff -u -r1.25 gataxx.c
--- gataxx.c	22 Jul 2002 15:29:00 -0000	1.25
+++ gataxx.c	18 Aug 2002 20:53:42 -0000
@@ -229,16 +229,22 @@
     gint response;
 
     box = gtk_message_dialog_new (GTK_WINDOW (window),
-                                 GTK_DIALOG_DESTROY_WITH_PARENT,
+                                 GTK_DIALOG_MODAL,
                                  GTK_MESSAGE_QUESTION,
-                                 GTK_BUTTONS_YES_NO,
-                                 _("Do you really want to quit?"));
-    gtk_dialog_set_default_response (GTK_DIALOG (box), GTK_RESPONSE_YES);
+                                 GTK_BUTTONS_NONE,
+                                 _("Really exit Gataxx?"));
+    gtk_dialog_add_buttons (GTK_DIALOG (box),
+            GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+            GTK_STOCK_QUIT, GTK_RESPONSE_ACCEPT,
+            NULL);
+
+    
+    gtk_dialog_set_default_response (GTK_DIALOG (box), GTK_RESPONSE_REJECT);
 
     response = gtk_dialog_run (GTK_DIALOG (box));
     gtk_widget_destroy (box);
 
-    if (response == GTK_RESPONSE_NO)
+    if (response == GTK_RESPONSE_REJECT)
       return TRUE;
   }
 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-games/gnobots2/ChangeLog,v
retrieving revision 1.25
diff -u -r1.25 ChangeLog
--- ChangeLog	6 Jul 2002 16:28:59 -0000	1.25
+++ ChangeLog	20 Aug 2002 16:36:57 -0000
@@ -1,3 +1,7 @@
+2002-08-20  Ross Burton  <ross@burtonini.com>
+
+	* menu.c: Rewrite the Quit and New callbacks. Fixes #90984.
+
 2002-07-06  Ross Burton  <ross@burtonini.com>
 
 	* keyboard.c (keyboard_cb): Allow the menu keyboard navigation
Index: menu.c
===================================================================
RCS file: /cvs/gnome/gnome-games/gnobots2/menu.c,v
retrieving revision 1.9
diff -u -r1.9 menu.c
--- menu.c	6 Jul 2002 16:28:59 -0000	1.9
+++ menu.c	20 Aug 2002 16:36:58 -0000
@@ -76,28 +76,6 @@
 /**********************************************************************/
 
 /**
- * really_new_cb
- * @widget: Pointer to widget
- * @data: Callback data
- *
- * Description:
- * Callback to really start new game
- *
- * Returns:
- **/
-static void really_new_cb(
-GtkWidget *widget,
-gpointer  data
-){
-  gint button = GPOINTER_TO_INT(data);
-    
-  if(button != 0) return;
-
-  start_new_game();
-}
-
-
-/**
  * new_cb
  * @widget: Pointer to widget
  * @data: Callback data
@@ -113,12 +91,21 @@
 ){
 
   if(game_state != STATE_NOT_PLAYING){
-    gnome_app_ok_cancel_modal (GNOME_APP(app),
-                               _("Applying this change to Player Selection\nwill end the current game"),
-                               (GnomeReplyCallback)really_new_cb,
-                               NULL);
+    GtkWidget *mb;
+    int response;
+    mb = gtk_message_dialog_new (GTK_WINDOW(app), 
+				 GTK_DIALOG_MODAL,
+				 GTK_MESSAGE_WARNING,
+				 GTK_BUTTONS_YES_NO,
+				 _("Do you really want to restart the current game?"),
+				 NULL);
+    response = gtk_dialog_run (GTK_DIALOG(mb));
+    gtk_widget_destroy (mb);
+    if (response == GTK_RESPONSE_YES) {
+      start_new_game();
+    }
   } else {
-    really_new_cb(widget, (gpointer)0);
+    start_new_game();
   }
 }
 
@@ -160,28 +147,6 @@
 
 
 /**
- * really_exit_cb
- * @widget: Pointer to widget
- * @data: Callback data
- *
- * Description:
- * Callback to really exit game
- *
- * Returns:
- **/
-void really_exit_cb(
-GtkWidget *widget,
-gpointer  data
-){
-  gint button = GPOINTER_TO_INT(data);
-    
-  if(button != 0) return;
-
-  gtk_main_quit();
-}
-
-
-/**
  * exit_cb
  * @widget: Pointer to widget
  * @data: Callback data
@@ -191,18 +156,28 @@
  *
  * Returns:
  **/
-void exit_cb(
-GtkWidget *widget,
-gpointer  data
-){
-
-  if(game_state != STATE_NOT_PLAYING){
-    gnome_app_ok_cancel_modal (GNOME_APP(app),
-                               _("Do you really want to quit the game?"),
-                               (GnomeReplyCallback)really_exit_cb,
-                               NULL);
+void
+exit_cb(GtkWidget *widget, gpointer  data)
+{
+  if(game_state != STATE_NOT_PLAYING) {
+    GtkWidget *mb;
+    int response;
+    mb = gtk_message_dialog_new (GTK_WINDOW(app), 
+				 GTK_DIALOG_MODAL,
+				 GTK_MESSAGE_QUESTION,
+				 GTK_BUTTONS_NONE,
+				 _("Do you really want to quit the game?"),
+				 NULL);
+    gtk_dialog_add_buttons (GTK_DIALOG(mb), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+			    GTK_STOCK_QUIT, GTK_RESPONSE_ACCEPT,
+			    NULL);
+    response = gtk_dialog_run (GTK_DIALOG(mb));
+    gtk_widget_destroy (mb);
+    if (response == GTK_RESPONSE_ACCEPT) {
+      gtk_main_quit();
+    }
   } else {
-    really_exit_cb(widget, (gpointer)0);
+    gtk_main_quit();
   }
 }
 
? iagno.schemas
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-games/iagno/ChangeLog,v
retrieving revision 1.59
diff -u -r1.59 ChangeLog
--- ChangeLog	17 Aug 2002 17:23:18 -0000	1.59
+++ ChangeLog	18 Aug 2002 21:22:29 -0000
@@ -1,3 +1,8 @@
+2002-08-18  Ross Burton  <ross@burtonini.com>
+
+	* gnothello.c (quit_game_cb): HIG-ify the Quit dialog. Based on
+	work by Samuel Stringham <sams@e-sa.com>, fixing #73031.
+
 2002-08-17  Juan Pablo Mendoza  <jpablo@gnome.org>
 
 	* sunmoon.png: New file by DarkAlloy.
Index: gnothello.c
===================================================================
RCS file: /cvs/gnome/gnome-games/iagno/gnothello.c,v
retrieving revision 1.97
diff -u -r1.97 gnothello.c
--- gnothello.c	7 Jul 2002 21:19:17 -0000	1.97
+++ gnothello.c	18 Aug 2002 21:22:32 -0000
@@ -248,18 +248,16 @@
 	if(game_in_progress) {
 		gint response;
 
-		dialog = gtk_dialog_new_with_buttons (NULL,
-				GTK_WINDOW (window),
+		dialog = gtk_message_dialog_new (GTK_WINDOW (window),
 				GTK_DIALOG_MODAL,
-				GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
-				GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
-				NULL);
-		{
-			GtkWidget *label = gtk_label_new (_("Do you really want to quit?"));
-			gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
-					label);
-		}
+				GTK_MESSAGE_QUESTION,
+				GTK_BUTTONS_NONE,
+				_("Really quit GNOME Iagno?"), NULL);
 
+		gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+					GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+					GTK_STOCK_QUIT, GTK_RESPONSE_ACCEPT, 
+					NULL);
 		gtk_dialog_set_default_response (GTK_DIALOG (dialog),
 				GTK_RESPONSE_REJECT);
 
@@ -268,15 +266,15 @@
 		gtk_widget_destroy (dialog);
 
 		if (response == GTK_RESPONSE_ACCEPT)
-        {
+		{
 			quit_game_maybe(NULL, 0);
-            return FALSE;
-        } else {
-            return TRUE;
-        }
+			return FALSE;
+		} else {
+			return TRUE;
+		}
 	} else {
-		quit_game_maybe(NULL, 0);
-        return FALSE;
+	  quit_game_maybe(NULL, 0);
+	  return FALSE;
 	}
 }
 

This is a digitally signed message part



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