gnome-games r8550 - in trunk: aisleriot gnomine
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8550 - in trunk: aisleriot gnomine
- Date: Sat, 10 Jan 2009 15:35:51 +0000 (UTC)
Author: chpe
Date: Sat Jan 10 15:35:51 2009
New Revision: 8550
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8550&view=rev
Log:
Bug 567103 â Migrate gnome-games to use msgctxt
Modified:
trunk/aisleriot/window.c
trunk/gnomine/gnomine.c
Modified: trunk/aisleriot/window.c
==============================================================================
--- trunk/aisleriot/window.c (original)
+++ trunk/aisleriot/window.c Sat Jan 10 15:35:51 2009
@@ -1690,7 +1690,7 @@
* then translate this string to "%I6d", else to "%6d".
* Do not translate it to anything else!
*/
- g_snprintf (str, sizeof (str), Q_("score|%6d"), score);
+ g_snprintf (str, sizeof (str), C_("score", "%6d"), score);
gtk_label_set_text (GTK_LABEL (priv->score_label), str);
}
Modified: trunk/gnomine/gnomine.c
==============================================================================
--- trunk/gnomine/gnomine.c (original)
+++ trunk/gnomine/gnomine.c Sat Jan 10 15:35:51 2009
@@ -649,6 +649,8 @@
GtkWidget *overmine_toggle;
GtkWidget *xentry;
GtkWidget *yentry;
+ GSList *group;
+ int i;
table = gtk_table_new (3, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
@@ -659,41 +661,20 @@
vbox = gtk_vbox_new (FALSE, 6);
- button = gtk_radio_button_new_with_label (NULL, _("Small"));
- if (fsize == 0)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
- g_signal_connect (GTK_OBJECT (button), "clicked",
- G_CALLBACK (size_radio_callback),
- GINT_TO_POINTER (0));
- gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-
- button = gtk_radio_button_new_with_label
- (gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)),
- Q_ ("gnomine|Medium"));
- if (fsize == 1)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
- g_signal_connect (GTK_OBJECT (button), "clicked",
- G_CALLBACK (size_radio_callback),
- GINT_TO_POINTER (1));
- gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-
- button = gtk_radio_button_new_with_label
- (gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)), _("Large"));
- if (fsize == 2)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
- g_signal_connect (GTK_OBJECT (button), "clicked",
- G_CALLBACK (size_radio_callback),
- GINT_TO_POINTER (2));
- gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
-
- button = gtk_radio_button_new_with_label
- (gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)), _("Custom"));
- if (fsize == 3)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
- g_signal_connect (GTK_OBJECT (button), "clicked",
- G_CALLBACK (size_radio_callback),
- GINT_TO_POINTER (3));
- gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+ group = NULL;
+ for (i = 0; i < G_N_ELEMENTS (scorecats); ++i) {
+ button = gtk_radio_button_new_with_label (group, g_dpgettext2 (NULL, "board size", scorecats[i].name));
+ if (fsize == i) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
+ }
+
+ g_signal_connect (GTK_OBJECT (button), "clicked",
+ G_CALLBACK (size_radio_callback),
+ GINT_TO_POINTER (i));
+ gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+
+ group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
+ }
gtk_container_add (GTK_CONTAINER (frame), vbox);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]