r12034 - packages/trunk/kanatest/debian/patches

Evgeni Golov evgeni at alioth.debian.org
Mon Mar 28 10:00:43 UTC 2011


Author: evgeni
Date: 2011-03-28 10:00:33 +0000 (Mon, 28 Mar 2011)
New Revision: 12034

Modified:
   packages/trunk/kanatest/debian/patches/003_gtk_ftbfs_fix.patch
Log:
fix patch, my mistake


Modified: packages/trunk/kanatest/debian/patches/003_gtk_ftbfs_fix.patch
===================================================================
--- packages/trunk/kanatest/debian/patches/003_gtk_ftbfs_fix.patch	2011-03-28 09:24:30 UTC (rev 12033)
+++ packages/trunk/kanatest/debian/patches/003_gtk_ftbfs_fix.patch	2011-03-28 10:00:33 UTC (rev 12034)
@@ -1,68 +1,28 @@
 From: Tomasz Maka <pasp at users.sourceforge.net>
 Subject: Compilation fixes (based on patch by Miyako Miyamura)
 Origin: upstream, http://svn.gna.org/viewcvs/kanatest?view=rev&revision=60
+ Slightly modified to apply on 0.4.8
 
-Index: src/stats.c
-===================================================================
---- kanatest/src/stats.c	(revision 59)
-+++ kanatest/src/stats.c	(revision 60)
-@@ -106,7 +106,7 @@
-     info_dialog = gtk_message_dialog_new (GTK_WINDOW(appGUI->sts->stat_window),
-                                           GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
-                                           GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, 
--										  "\n%s:", _("Please select options"));
-+                                          "\n%s:", _("Please select options"));
- 
-     gtk_window_set_title(GTK_WINDOW(info_dialog), _("Question"));
-     gtk_widget_show (info_dialog);
-@@ -214,7 +214,7 @@
-     MESSAGE *msg = (MESSAGE *)user_data;
- 
-     msg->appGUI->sts->old_column = config.stats_sort_column;
--    config.stats_sort_column = (gint) msg->data;
-+    config.stats_sort_column = (size_t) msg->data;
- 
-     if (msg->appGUI->sts->disable_dir == FALSE) {
- 
-@@ -484,7 +484,11 @@
-     gtk_container_add (GTK_CONTAINER (appGUI->sts->stat_window), vbox1);
- 
-     appGUI->sts->notebook = gtk_notebook_new ();
-+#if (GTK_MINOR_VERSION >= 22)
-+    gtk_widget_set_can_focus(appGUI->sts->notebook, FALSE);
-+#else
-     GTK_WIDGET_UNSET_FLAGS(appGUI->sts->notebook, GTK_CAN_FOCUS);
-+#endif
-     gtk_widget_show (appGUI->sts->notebook);
-     gtk_box_pack_start (GTK_BOX (vbox1), appGUI->sts->notebook, TRUE, TRUE, 4);
- 
-@@ -537,7 +541,7 @@
-                                 stats_renderer, "text", i, NULL);
-         gtk_tree_view_column_set_sort_column_id (stats_column[i], i);
-         gtk_tree_view_append_column (GTK_TREE_VIEW(stats_treeview), stats_column[i]);
--        msg[i].data = (gpointer)i;
-+        msg[i].data = (gpointer)((size_t)i);
-         msg[i].appGUI = appGUI;
-         g_signal_connect (G_OBJECT(stats_column[i]), "clicked",
-                           G_CALLBACK(stats_column_clicked_cb), &msg[i]);
-@@ -746,8 +750,12 @@
+diff -Nrwu kanatest-0.4.8/src/about.c kanatest-0.4.8.patched/src/about.c
+--- kanatest-0.4.8/src/about.c	2009-04-12 21:10:45.000000000 +0200
++++ kanatest-0.4.8.patched/src/about.c	2011-03-28 11:29:41.474534374 +0200
+@@ -430,7 +430,12 @@
      g_signal_connect (G_OBJECT (close_button), "clicked",
-                         G_CALLBACK (stats_window_close_cb), appGUI);
+                         G_CALLBACK (about_close_button_cb), appGUI);
      gtk_container_add (GTK_CONTAINER (hbuttonbox), close_button);
++
 +#if (GTK_MINOR_VERSION >= 22)
 +    gtk_widget_set_can_default (close_button, TRUE);
 +#else
      GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
- #endif
-+#endif
-     if (appGUI->sts->active_tab != -1) {
-         gtk_notebook_set_current_page (GTK_NOTEBOOK (appGUI->sts->notebook), appGUI->sts->active_tab);
-     }
-Index: src/chart.c
-===================================================================
---- kanatest/src/chart.c	(revision 59)
-+++ kanatest/src/chart.c	(revision 60)
-@@ -287,7 +287,12 @@
++#endif 
+ 
+     gtk_widget_grab_default (close_button);
+ 
+diff -Nrwu kanatest-0.4.8/src/chart.c kanatest-0.4.8.patched/src/chart.c
+--- kanatest-0.4.8/src/chart.c	2009-04-12 21:10:45.000000000 +0200
++++ kanatest-0.4.8.patched/src/chart.c	2011-03-28 11:29:41.474534374 +0200
+@@ -260,7 +260,12 @@
      g_signal_connect (G_OBJECT (close_button), "clicked",
                          G_CALLBACK (chart_close_button_cb), appGUI);
      gtk_container_add (GTK_CONTAINER (hbuttonbox), close_button);
@@ -75,168 +35,21 @@
  
      chart_display_kanas(HIRAGANA, appGUI);
  
-Index: src/gui_utils.c
-===================================================================
---- kanatest/src/gui_utils.c	(revision 59)
-+++ kanatest/src/gui_utils.c	(revision 60)
-@@ -69,14 +69,14 @@
- static gchar browser_cmd[PATH_MAX];
+diff -Nrwu kanatest-0.4.8/src/gui.c kanatest-0.4.8.patched/src/gui.c
+--- kanatest-0.4.8/src/gui.c	2009-04-12 21:10:45.000000000 +0200
++++ kanatest-0.4.8.patched/src/gui.c	2011-03-28 11:55:23.361872656 +0200
+@@ -121,7 +121,7 @@
+     GUI *appGUI = (GUI *)user_data;
  
- gchar *browsers[] = {
--	"xdg-open",    
--	"firefox",      
--	"opera",        
--	"x-www-browser",    
--	"htmlview",
-+    "xdg-open",    
-+    "firefox",      
-+    "opera",        
-+    "x-www-browser",    
-+    "htmlview",
-     "epiphany",     
--	"konqueror",    
--	"netscape"
-+    "konqueror",    
-+    "netscape"
- };
+     appGUI->tst->test_state = TRUE;
+-    g_timeout_add (1000, (GtkFunction) time_handler, appGUI);
++    g_timeout_add (1000, time_handler, appGUI);
  
- gint i;
-@@ -106,7 +106,7 @@
- static gchar client_cmd[PATH_MAX];
- 
- gchar *clients[] = {
--	"xdg-email",    "",
-+    "xdg-email",    "",
-     "claws-mail",   "--compose",
-     "thunderbird",  "mailto:",
-     "sylpheed",     "--compose",
-@@ -297,7 +297,7 @@
- GSList *tags = NULL, *tagp = NULL;
- GtkTextTag *tag;
- gchar *link;
--gint slink;
-+size_t slink;
- 
-     if (ev->type != GDK_BUTTON_RELEASE) {
-         return FALSE;
-@@ -325,7 +325,7 @@
-     for (tagp = tags;  tagp != NULL;  tagp = tagp->next) {
- 
-         tag = tagp->data;
--        slink = (gint) g_object_get_data (G_OBJECT (tag), "link");
-+        slink = (size_t)g_object_get_data (G_OBJECT (tag), "link");
- 
-         if (slink != 0) {
-             link = g_slist_nth_data (links_list, slink);
-Index: src/about.c
-===================================================================
---- kanatest/src/about.c	(revision 59)
-+++ kanatest/src/about.c	(revision 60)
-@@ -230,15 +233,15 @@
-     gtk_text_buffer_get_iter_at_offset (entry_buffer, &iter, 0);
- 
-     gtk_text_buffer_create_tag (entry_buffer, "bold",
--								"weight", PANGO_WEIGHT_ULTRABOLD, NULL);
-+                                "weight", PANGO_WEIGHT_ULTRABOLD, NULL);
-     gtk_text_buffer_create_tag (entry_buffer, "big",
--								"size", 16 * PANGO_SCALE, NULL);
-+                                "size", 16 * PANGO_SCALE, NULL);
-     gtk_text_buffer_create_tag (entry_buffer, "italic",
--								"style", PANGO_STYLE_ITALIC, NULL);
-+                                "style", PANGO_STYLE_ITALIC, NULL);
-     gtk_text_buffer_create_tag (entry_buffer, "center",
--								"justification", GTK_JUSTIFY_CENTER, NULL);
-+                                "justification", GTK_JUSTIFY_CENTER, NULL);
-     gtk_text_buffer_create_tag (entry_buffer, "fixed",
--								"family", "monospace", NULL);
-+                                "family", "monospace", NULL);
- 
-     gtk_text_buffer_get_iter_at_offset (entry_buffer, &iter, 0);
- #ifdef MAEMO
-@@ -273,7 +276,7 @@
- 
-     gtk_text_buffer_insert (entry_buffer, &iter, "\n", -1);
-     gui_url_insert_link(&appGUI->about_links_list, &appGUI->about_link_index, appGUI->about_textview,
--						&iter, NULL, 0, "http://clayo.org/kanatest", TRUE, appGUI);
-+                        &iter, NULL, 0, "http://clayo.org/kanatest", TRUE, appGUI);
-     gtk_text_buffer_insert (entry_buffer, &iter, "\n", -1);
-     g_snprintf (buffer, BUFFER_SIZE, "\n(%s %s, %s)\n\n", _("compiled on"), __DATE__, __TIME__);
-     gtk_text_buffer_insert_with_tags_by_name (entry_buffer, &iter, buffer, -1, "center", "italic", NULL);
-@@ -282,18 +285,18 @@
-     gtk_text_buffer_insert_with_tags_by_name (entry_buffer, &iter, buffer, -1, "bold", NULL);
-     gtk_text_buffer_insert (entry_buffer, &iter, "     Tomasz Mąka <", -1);
-     gui_url_insert_link (&appGUI->about_links_list, &appGUI->about_link_index, appGUI->about_textview,
--						 &iter, NULL, 0, "pasp at users.sourceforge.net", TRUE, appGUI);
-+                         &iter, NULL, 0, "pasp at users.sourceforge.net", TRUE, appGUI);
-     gtk_text_buffer_insert (entry_buffer, &iter, ">\n", -1);
- 
-     g_snprintf (buffer, BUFFER_SIZE, "\n%s:\n", _("Graphics"));
-     gtk_text_buffer_insert_with_tags_by_name (entry_buffer, &iter, buffer, -1, "bold", NULL);
-     gtk_text_buffer_insert (entry_buffer, &iter, "     Maja Kocoń (", -1);
-     gui_url_insert_link (&appGUI->about_links_list, &appGUI->about_link_index, appGUI->about_textview,
--						 &iter, NULL, 0, "http://pinky-babble.org", TRUE, appGUI);
-+                         &iter, NULL, 0, "http://pinky-babble.org", TRUE, appGUI);
-     gtk_text_buffer_insert (entry_buffer, &iter, ")\n", -1);
-     gtk_text_buffer_insert (entry_buffer, &iter, "     Piotr Mąka <", -1);
-     gui_url_insert_link (&appGUI->about_links_list, &appGUI->about_link_index, appGUI->about_textview,
--						 &iter, NULL, 0, "silloz at users.sourceforge.net", TRUE, appGUI);
-+                         &iter, NULL, 0, "silloz at users.sourceforge.net", TRUE, appGUI);
-     gtk_text_buffer_insert (entry_buffer, &iter, ">\n", -1);
- 
-     g_snprintf (buffer, BUFFER_SIZE, "\n%s:\n", _("Translators"));
-@@ -339,9 +342,9 @@
-     entry_buffer = gtk_text_buffer_new (NULL);
-     gtk_text_buffer_get_iter_at_offset (entry_buffer, &iter, 0);
-     gtk_text_buffer_create_tag (entry_buffer, "underline",
--								"underline", PANGO_UNDERLINE_SINGLE, NULL);
-+                                "underline", PANGO_UNDERLINE_SINGLE, NULL);
-     gtk_text_buffer_create_tag (entry_buffer, "big",
--								"size", 12 * PANGO_SCALE, NULL);
-+                                "size", 12 * PANGO_SCALE, NULL);
-     gtk_text_buffer_get_iter_at_offset (entry_buffer, &iter, 0);
- #ifdef MAEMO
-     text_sheet = hildon_text_view_new ();
-@@ -359,7 +362,7 @@
-     gtk_container_add (GTK_CONTAINER (viewport), text_sheet);
- 
-     g_snprintf (buffer, BUFFER_SIZE, "%s\n\n",
--				_("We would like to thank the following people for suggestions, bug reports and patches:"));
-+                _("We would like to thank the following people for suggestions, bug reports and patches:"));
-     gtk_text_buffer_insert (entry_buffer, &iter, buffer, -1);
- 
-     gtk_text_buffer_insert (entry_buffer, &iter, text_contributors, -1);
-@@ -453,9 +456,9 @@
-     entry_buffer = gtk_text_buffer_new (NULL);
-     gtk_text_buffer_get_iter_at_offset (entry_buffer, &iter, 0);
-     gtk_text_buffer_create_tag (entry_buffer, "underline",
--								"underline", PANGO_UNDERLINE_SINGLE, NULL);
-+                                "underline", PANGO_UNDERLINE_SINGLE, NULL);
-     gtk_text_buffer_create_tag (entry_buffer, "big",
--								"size", 12 * PANGO_SCALE, NULL);
-+                                "size", 12 * PANGO_SCALE, NULL);
- #ifdef MAEMO
-     text_sheet = hildon_text_view_new ();
-     hildon_text_view_set_buffer (HILDON_TEXT_VIEW (text_sheet), entry_buffer);
-@@ -492,7 +495,12 @@
-     g_signal_connect (G_OBJECT (close_button), "clicked",
-                         G_CALLBACK (about_close_button_cb), appGUI);
-     gtk_container_add (GTK_CONTAINER (hbuttonbox), close_button);
-+
-+#if (GTK_MINOR_VERSION >= 22)
-+    gtk_widget_set_can_default (close_button, TRUE);
-+#else
-     GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
-+#endif 
- 
-     gtk_widget_grab_default (close_button);
- #endif
-Index: src/gui.c
-===================================================================
---- kanatest/src/gui.c	(revision 59)
-+++ kanatest/src/gui.c	(revision 60)
-@@ -686,7 +686,11 @@
+     gtk_widget_show (appGUI->char_label);
+     gtk_widget_hide (appGUI->logo_area);
+@@ -561,7 +561,11 @@
      gtk_box_pack_start (GTK_BOX (hbox2), appGUI->timer_label, TRUE, TRUE, 0);
- #ifndef MAEMO
+ 
      appGUI->stat_button = gui_stock_label_button(NULL, KANATEST_STOCK_BUTTON_STATISTICS);
 +#if (GTK_MINOR_VERSION >= 22)
 +    gtk_widget_set_can_focus (appGUI->stat_button, FALSE);
@@ -246,7 +59,7 @@
      g_signal_connect (G_OBJECT (appGUI->stat_button), "clicked",
                          G_CALLBACK (show_statistics_window_cb), appGUI);
      gtk_widget_show (appGUI->stat_button);
-@@ -695,7 +699,11 @@
+@@ -570,7 +574,11 @@
      gtk_widget_set_tooltip_text (appGUI->stat_button, _("Statistics"));
  
      appGUI->chart_button = gui_stock_label_button(NULL, KANATEST_STOCK_BUTTON_CHART);
@@ -258,7 +71,7 @@
      g_signal_connect (G_OBJECT (appGUI->chart_button), "clicked",
                          G_CALLBACK (show_chart_window_cb), appGUI);
      gtk_widget_show (appGUI->chart_button);
-@@ -704,7 +712,11 @@
+@@ -579,7 +587,11 @@
      gtk_widget_set_tooltip_text (appGUI->chart_button, _("Kana chart"));
  
      appGUI->prefs_button = gui_stock_label_button(NULL, KANATEST_STOCK_BUTTON_OPTIONS);
@@ -270,7 +83,7 @@
      g_signal_connect (G_OBJECT (appGUI->prefs_button), "clicked",
                          G_CALLBACK (show_options_window_cb), appGUI);
      gtk_widget_show (appGUI->prefs_button);
-@@ -713,7 +725,11 @@
+@@ -588,7 +600,11 @@
      gtk_widget_set_tooltip_text (appGUI->prefs_button, _("Options"));
  
      appGUI->about_button = gui_stock_label_button(NULL, KANATEST_STOCK_BUTTON_ABOUT);
@@ -282,7 +95,7 @@
      g_signal_connect (G_OBJECT (appGUI->about_button), "clicked",
                          G_CALLBACK (show_about_window_cb), appGUI);
      gtk_widget_show (appGUI->about_button);
-@@ -829,13 +845,21 @@
+@@ -660,33 +676,57 @@
      gtk_box_set_spacing (GTK_BOX (hbuttonbox), 5);
  
      appGUI->start_button = gui_stock_label_button(_("Start"), GTK_STOCK_EXECUTE);
@@ -302,11 +115,7 @@
      GTK_WIDGET_SET_FLAGS (appGUI->start_button, GTK_CAN_DEFAULT);
 +#endif
      gtk_widget_set_tooltip_text (appGUI->start_button, _("Press to begin testing..."));
- #ifdef MAEMO
-      appGUI->stat_button = gui_stock_label_button(NULL, KANATEST_STOCK_BUTTON_STATISTICS);
-@@ -881,23 +905,39 @@
-      gtk_widget_set_tooltip_text (appGUI->about_button, _("About"));
- #endif
+ 
      appGUI->stop_button = gui_stock_label_button(_("Stop"), GTK_STOCK_STOP);
 +#if (GTK_MINOR_VERSION >= 22)
 +    gtk_widget_set_can_focus (appGUI->stop_button, FALSE);
@@ -344,11 +153,31 @@
      gtk_widget_set_tooltip_text (appGUI->quit_button, _("Exit!"));
  
      gui_disable_test (appGUI);
-Index: src/options.c
-===================================================================
---- kanatest/src/options.c	(revision 59)
-+++ kanatest/src/options.c	(revision 60)
-@@ -178,13 +178,13 @@
+diff -Nrwu kanatest-0.4.8/src/gui_utils.c kanatest-0.4.8.patched/src/gui_utils.c
+--- kanatest-0.4.8/src/gui_utils.c	2009-04-12 21:10:45.000000000 +0200
++++ kanatest-0.4.8.patched/src/gui_utils.c	2011-03-28 11:29:41.474534374 +0200
+@@ -294,7 +294,7 @@
+ GSList *tags = NULL, *tagp = NULL;
+ GtkTextTag *tag;
+ gchar *link;
+-gint slink;
++size_t slink;
+ 
+     if (ev->type != GDK_BUTTON_RELEASE) {
+         return FALSE;
+@@ -322,7 +322,7 @@
+     for (tagp = tags;  tagp != NULL;  tagp = tagp->next) {
+ 
+         tag = tagp->data;
+-        slink = (gint) g_object_get_data (G_OBJECT (tag), "link");
++        slink = (size_t)g_object_get_data (G_OBJECT (tag), "link");
+ 
+         if (slink != 0) {
+             link = g_slist_nth_data (links_list, slink);
+diff -Nrwu kanatest-0.4.8/src/options.c kanatest-0.4.8.patched/src/options.c
+--- kanatest-0.4.8/src/options.c	2009-04-12 21:10:45.000000000 +0200
++++ kanatest-0.4.8.patched/src/options.c	2011-03-28 11:39:35.223723345 +0200
+@@ -105,13 +105,13 @@
  void
  kana_selected_cb (GtkToggleButton *button, gpointer user_data) {
  
@@ -361,10 +190,10 @@
  
 -        pos = (int) msg->data;
 +        pos = (size_t) msg->data;
- #ifdef MAEMO
-         if (hildon_check_button_get_active (HILDON_CHECK_BUTTON (button)) == TRUE) {
- #else
-@@ -436,7 +436,7 @@
+ 
+         if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(button)) == TRUE) {
+             config.user_defined_lesson[pos] = '+';
+@@ -315,7 +315,7 @@
  row_button_select_cb (GtkWidget *widget, gpointer user_data) {
  
      MESSAGE *msg = (MESSAGE *)user_data;
@@ -373,7 +202,7 @@
  }
  
  /*--------------------------------------------------------------------*/
-@@ -445,7 +445,7 @@
+@@ -324,7 +324,7 @@
  row_button_deselect_cb (GtkWidget *widget, gpointer user_data) {
  
      MESSAGE *msg = (MESSAGE *)user_data;
@@ -382,27 +211,9 @@
  }
  
  /*--------------------------------------------------------------------*/
-@@ -525,7 +525,7 @@
- #endif
-             } else {
-                 g_snprintf (buffer, BUFFER_SIZE, "%s ",
--							get_kana_sign(i, hiragana_mode == TRUE ? HIRAGANA:KATAKANA, TRUE));
-+                            get_kana_sign(i, hiragana_mode == TRUE ? HIRAGANA:KATAKANA, TRUE));
-                 gtk_text_buffer_insert (textbuffer, &iter_start, buffer, -1);
-                 n++;
-             }
-@@ -649,7 +649,7 @@
-     gtk_window_set_modal (GTK_WINDOW(appGUI->opt->auto_selection_window), TRUE);
-     gtk_window_set_default_size (GTK_WINDOW(appGUI->opt->auto_selection_window), 300, 400);
-     gtk_window_move (GTK_WINDOW (appGUI->opt->auto_selection_window),
--					 config.options_window_x + 100, config.options_window_y + 80);
-+                     config.options_window_x + 100, config.options_window_y + 80);
- #endif
-     g_signal_connect (G_OBJECT (appGUI->opt->auto_selection_window), "delete_event",
-                       G_CALLBACK(auto_select_delete_event_cb), appGUI);
-@@ -680,7 +680,11 @@
-     gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON (appGUI->opt->hiragana_radiobutton), FALSE);
- #endif
+@@ -521,7 +521,11 @@
+ 
+     appGUI->opt->hiragana_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Hiragana"));
      gtk_widget_show (appGUI->opt->hiragana_radiobutton);
 +#if (GTK_MINOR_VERSION >= 22)
 +    gtk_widget_set_can_focus (appGUI->opt->hiragana_radiobutton, FALSE);
@@ -412,9 +223,9 @@
      gtk_box_pack_start (GTK_BOX (hbox1), appGUI->opt->hiragana_radiobutton, FALSE, FALSE, 0);
      gtk_radio_button_set_group (GTK_RADIO_BUTTON (appGUI->opt->hiragana_radiobutton), radiobutton_group);
      radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (appGUI->opt->hiragana_radiobutton));
-@@ -692,7 +696,11 @@
-     gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON (katakana_radiobutton), FALSE); 
- #endif
+@@ -530,7 +534,11 @@
+ 
+     katakana_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Katakana"));
      gtk_widget_show (katakana_radiobutton);
 +#if (GTK_MINOR_VERSION >= 22)
 +    gtk_widget_set_can_focus (katakana_radiobutton, FALSE);
@@ -424,7 +235,7 @@
      gtk_box_pack_start (GTK_BOX (hbox1), katakana_radiobutton, FALSE, FALSE, 0);
      gtk_radio_button_set_group (GTK_RADIO_BUTTON (katakana_radiobutton), radiobutton_group);
      radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (katakana_radiobutton));
-@@ -897,14 +905,22 @@
+@@ -669,14 +677,22 @@
      g_signal_connect (G_OBJECT (cancel_button), "clicked",
                          G_CALLBACK (auto_select_close_button_cb), appGUI);
      gtk_container_add (GTK_CONTAINER (hbuttonbox), cancel_button);
@@ -444,10 +255,10 @@
 +#else
      GTK_WIDGET_SET_FLAGS (appGUI->opt->select_button, GTK_CAN_DEFAULT);
 +#endif
- #else
-     appGUI->opt->select_button = gtk_button_new_with_label ("dummy");   
- #endif
-@@ -1000,7 +1016,11 @@
+ 
+     if (config.hiragana_mode == TRUE) {
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->hiragana_radiobutton), TRUE);
+@@ -746,7 +762,11 @@
      gtk_container_add (GTK_CONTAINER (appGUI->opt->options_window), vbox1);
  
      appGUI->opt->notebook = gtk_notebook_new();
@@ -459,34 +270,7 @@
      gtk_widget_show (appGUI->opt->notebook);
      gtk_notebook_set_tab_pos (GTK_NOTEBOOK(appGUI->opt->notebook), GTK_POS_TOP);
      gtk_box_pack_start (GTK_BOX (vbox1), appGUI->opt->notebook, TRUE, TRUE, 0);
-@@ -1064,7 +1084,7 @@
-     gtk_container_set_border_width (GTK_CONTAINER (appGUI->opt->rna_radio_button), 8);
-     gtk_widget_show (appGUI->opt->rna_radio_button);
-     gtk_widget_set_tooltip_text (appGUI->opt->rna_radio_button, 
--								 _("When this option is enabled the kanatest will display every question once"));
-+                                 _("When this option is enabled the kanatest will display every question once"));
-     g_signal_connect (G_OBJECT (appGUI->opt->rna_radio_button), "toggled",
-                       G_CALLBACK (options_repeat_mode_changed_cb), appGUI);
- 
-@@ -1077,7 +1097,7 @@
-     gtk_container_set_border_width (GTK_CONTAINER (appGUI->opt->rwa_radio_button), 8);
-     gtk_widget_show (appGUI->opt->rwa_radio_button);
-     gtk_widget_set_tooltip_text (appGUI->opt->rwa_radio_button,
--								 _("When this option is enabled the kanatest will repeat all wrongly answered questions at the end of test"));
-+                                 _("When this option is enabled the kanatest will repeat all wrongly answered questions at the end of test"));
-     g_signal_connect (G_OBJECT (appGUI->opt->rwa_radio_button), "toggled",
-                       G_CALLBACK (options_repeat_mode_changed_cb), appGUI);
- 
-@@ -1090,7 +1110,7 @@
-     gtk_container_set_border_width (GTK_CONTAINER (appGUI->opt->raa_radio_button), 8);
-     gtk_widget_show (appGUI->opt->raa_radio_button);
-     gtk_widget_set_tooltip_text (appGUI->opt->raa_radio_button,
--								 _("When this option is enabled the kanatest will repeat all questions forever"));
-+                                 _("When this option is enabled the kanatest will repeat all questions forever"));
-     g_signal_connect (G_OBJECT (appGUI->opt->raa_radio_button), "toggled",
-                       G_CALLBACK (options_repeat_mode_changed_cb), appGUI);
- 
-@@ -1137,7 +1157,11 @@
+@@ -823,7 +843,11 @@
                      (GtkAttachOptions) (0), 0, 0);
  
      combobox_ca_timeout = gtk_combo_box_new_text ();
@@ -498,7 +282,7 @@
      gtk_widget_show (combobox_ca_timeout);
      g_signal_connect (G_OBJECT (combobox_ca_timeout), "changed",
                        G_CALLBACK (options_combobox_ca_timeout_handler_cb), NULL);
-@@ -1331,12 +1355,16 @@
+@@ -959,12 +983,16 @@
  
                  gtk_widget_show (appGUI->opt->check_buttons[pos]);
  
@@ -516,7 +300,7 @@
                  gtk_container_add (GTK_CONTAINER (frames[pos]), appGUI->opt->check_buttons[pos]);
  
                  if(config.user_defined_lesson[pos] == '+') {
-@@ -1355,14 +1383,18 @@
+@@ -980,14 +1008,18 @@
  
          appGUI->opt->row_button_s[j] = gui_stock_label_button (NULL, GTK_STOCK_APPLY);
          gtk_button_set_relief (GTK_BUTTON (appGUI->opt->row_button_s[j]), GTK_RELIEF_NONE);
@@ -536,7 +320,7 @@
          msg2[j].appGUI = appGUI;
          g_signal_connect (G_OBJECT (appGUI->opt->row_button_s[j]), "clicked",
                            G_CALLBACK (row_button_select_cb), &msg2[j]);
-@@ -1371,7 +1403,11 @@
+@@ -996,7 +1028,11 @@
  
          appGUI->opt->row_button_c[j] = gui_stock_label_button (NULL, GTK_STOCK_CLEAR);
          gtk_button_set_relief (GTK_BUTTON (appGUI->opt->row_button_c[j]), GTK_RELIEF_NONE);
@@ -548,9 +332,9 @@
          gtk_widget_set_tooltip_text (appGUI->opt->row_button_c[j], _("Deselect all kanas in row"));
          gtk_widget_show (appGUI->opt->row_button_c[j]);
          gtk_table_attach (GTK_TABLE (table), appGUI->opt->row_button_c[j], i, i+1, j, j+1,
-@@ -1425,7 +1461,11 @@
-     gtk_box_pack_end (GTK_BOX (hbox), combobox_dtf, FALSE, FALSE, 0);
- #else
+@@ -1026,7 +1062,11 @@
+     gtk_misc_set_padding (GTK_MISC (appGUI->opt->number_of_kanas_label), 4, 0);
+ 
      auto_select_button = gtk_button_new_with_label (_("Statistics based selection"));
 +#if (GTK_MINOR_VERSION >= 22)
 +    gtk_widget_set_can_focus (auto_select_button, FALSE);
@@ -560,7 +344,7 @@
      gtk_widget_show (auto_select_button);
      gtk_box_pack_end (GTK_BOX (hbox), auto_select_button, FALSE, FALSE, 0);
      g_signal_connect (G_OBJECT (auto_select_button), "clicked",
-@@ -1443,7 +1483,11 @@
+@@ -1044,7 +1084,11 @@
      gtk_misc_set_padding (GTK_MISC (label), 4, 0);
  
      combobox_dtf = gtk_combo_box_new_text ();
@@ -572,7 +356,7 @@
      gtk_widget_show (combobox_dtf);
      gtk_box_pack_start (GTK_BOX (hbox), combobox_dtf, FALSE, FALSE, 0);
      g_signal_connect (G_OBJECT (combobox_dtf), "changed",
-@@ -1469,21 +1513,33 @@
+@@ -1068,21 +1112,33 @@
      gtk_misc_set_padding (GTK_MISC (label), 4, 0);
  
      select_all_button = gtk_button_new_with_label (_("All"));
@@ -606,7 +390,7 @@
      gtk_widget_show (select_none_button);
      gtk_widget_show (invert_selection_button);
      gtk_container_add (GTK_CONTAINER (hbuttonbox_s), invert_selection_button);
-@@ -1504,8 +1560,12 @@
+@@ -1103,7 +1159,11 @@
      g_signal_connect (G_OBJECT (close_button), "clicked",
                        G_CALLBACK (options_close_button_cb), appGUI);
      gtk_container_add (GTK_CONTAINER (hbuttonbox), close_button);
@@ -614,17 +398,53 @@
 +    gtk_widget_set_can_default (close_button, TRUE);
 +#else
      GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
- #endif
 +#endif
+ 
      switch(config.repeat_mode) {
          case REPEAT_ALL:
-             gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(appGUI->opt->raa_radio_button), TRUE);
-@@ -1521,7 +1581,7 @@
+diff -Nrwu kanatest-0.4.8/src/stats.c kanatest-0.4.8.patched/src/stats.c
+--- kanatest-0.4.8/src/stats.c	2009-04-12 21:10:45.000000000 +0200
++++ kanatest-0.4.8.patched/src/stats.c	2011-03-28 11:36:40.450921732 +0200
+@@ -148,7 +148,7 @@
+     MESSAGE *msg = (MESSAGE *)user_data;
  
-     if (appGUI->opt->active_tab != -1) {
-         gtk_notebook_set_current_page (GTK_NOTEBOOK (appGUI->opt->notebook), appGUI->opt->active_tab);
--	}
-+    }
+     msg->appGUI->sts->old_column = config.stats_sort_column;
+-    config.stats_sort_column = (gint) msg->data;
++    config.stats_sort_column = (size_t) msg->data;
  
-     gtk_widget_show (appGUI->opt->options_window);
+     if (msg->appGUI->sts->disable_dir == FALSE) {
  
+@@ -405,7 +405,11 @@
+     gtk_container_add (GTK_CONTAINER (appGUI->sts->stat_window), vbox1);
+ 
+     appGUI->sts->notebook = gtk_notebook_new ();
++#if (GTK_MINOR_VERSION >= 22)
++    gtk_widget_set_can_focus(appGUI->sts->notebook, FALSE);
++#else
+     GTK_WIDGET_UNSET_FLAGS(appGUI->sts->notebook, GTK_CAN_FOCUS);
++#endif
+     gtk_widget_show (appGUI->sts->notebook);
+     gtk_box_pack_start (GTK_BOX (vbox1), appGUI->sts->notebook, TRUE, TRUE, 4);
+ 
+@@ -449,7 +453,7 @@
+                                 stats_renderer, "text", i, NULL);
+         gtk_tree_view_column_set_sort_column_id (stats_column[i], i);
+         gtk_tree_view_append_column (GTK_TREE_VIEW(stats_treeview), stats_column[i]);
+-        msg[i].data = (gpointer)i;
++        msg[i].data = (gpointer)((size_t)i);
+         msg[i].appGUI = appGUI;
+         g_signal_connect (G_OBJECT(stats_column[i]), "clicked",
+                           G_CALLBACK(stats_column_clicked_cb), &msg[i]);
+@@ -638,8 +642,11 @@
+     g_signal_connect (G_OBJECT (close_button), "clicked",
+                         G_CALLBACK (stats_window_close_cb), appGUI);
+     gtk_container_add (GTK_CONTAINER (hbuttonbox), close_button);
++#if (GTK_MINOR_VERSION >= 22)
++    gtk_widget_set_can_default (close_button, TRUE);
++#else
+     GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT);
+-
++#endif
+     if (appGUI->sts->active_tab != -1) {
+         gtk_notebook_set_current_page (GTK_NOTEBOOK (appGUI->sts->notebook), appGUI->sts->active_tab);
+     }




More information about the Pkg-games-commits mailing list