diff --git a/chinese/reciteword/files/patch-src_reciteword.cpp b/chinese/reciteword/files/patch-src_reciteword.cpp new file mode 100644 index 000000000000..2a1e9eac4946 --- /dev/null +++ b/chinese/reciteword/files/patch-src_reciteword.cpp @@ -0,0 +1,14 @@ +--- src/reciteword.cpp.orig 2006-03-26 16:32:27.000000000 +0800 ++++ src/reciteword.cpp 2007-07-30 16:38:45.000000000 +0800 +@@ -1375,7 +1375,11 @@ + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + // gtk_widget_pop_visual (); + // gtk_widget_pop_colormap (); ++#ifdef G_OS_WIN32 ++ gtk_widget_set_events(window,GDK_SCROLL_MASK | GDK_BUTTON_PRESS_MASK); ++#else + gtk_widget_set_events(window,GDK_SCROLL_MASK); ++#endif + gtk_window_set_decorated (GTK_WINDOW (window), FALSE); + gtk_widget_set_app_paintable(window,TRUE); + gtk_window_set_resizable(GTK_WINDOW(window),FALSE); diff --git a/chinese/reciteword/files/patch-src_revise.cpp b/chinese/reciteword/files/patch-src_revise.cpp new file mode 100644 index 000000000000..225e51fd220f --- /dev/null +++ b/chinese/reciteword/files/patch-src_revise.cpp @@ -0,0 +1,98 @@ +--- src/revise.cpp.orig 2006-03-26 16:33:14.000000000 +0800 ++++ src/revise.cpp 2007-07-30 16:38:45.000000000 +0800 +@@ -240,7 +240,7 @@ + static void + on_revise_group_plane_clicked (gpointer data) + { +- gint index = (gint) data; ++ glong index = (glong) data; + gint zu_index = g_pReciteWord->revise_group->revise_zu_index[index]; + + gint i, tmpint, last_zu_wordcount = 25, now_wordcount = 0; +@@ -326,7 +326,7 @@ + "revise_group", "disorder", + &order); + order_ckbutton.set_status(order); +- gint found_group = 0; ++ glong found_group = 0; + gint found = TRUE; + gint zu_index = 0, revise_times; + gchar tmpstr[256]; +@@ -370,7 +370,7 @@ + if (zu_index > g_pReciteWord->max_zu_index) //the current book is search over....will try old books. + found = FALSE; + } +- sprintf(tmpstr,_("found %d groups in total"),found_group); ++ sprintf(tmpstr,_("found %ld groups in total"),found_group); + total_groups_label = gtk_label_new(tmpstr); + gtk_fixed_put (GTK_FIXED (g_pReciteWord->fixed), total_groups_label, + Skin->revise_group.total_groups_label.x[0], Skin->revise_group.total_groups_label.y[0]); +@@ -378,7 +378,7 @@ + } + + void +-CRevise_group::create_plane (gint x, gint y) ++CRevise_group::create_plane (glong x, glong y) + { + gchar tmpstr[246]; + sprintf(tmpstr,_("G%d"),revise_zu_index[y]+1); +@@ -396,7 +396,7 @@ + Skin->revise_group.plane_button_p.p[1], + tmpstr, + on_revise_group_plane_clicked, +- GINT_TO_POINTER (y)); ++ (gpointer)y); + plane[y] = new tPixButton; + plane[y]->create (g_pReciteWord->fixed, + Skin->revise_group.plane[x][y].x[0], +@@ -404,7 +404,7 @@ + Skin->revise_group.plane[x][y].p[0], + Skin->revise_group.plane[x][y].p[1], + (GdkPixmap *) NULL, on_revise_group_plane_clicked, +- GINT_TO_POINTER (y)); ++ (gpointer)y); + const gchar tooltips[5][3]={"F1","F2","F3","F4","F5"}; + gtk_tooltips_set_tip (g_pReciteWord->tooltips, plane[y]->event_box,tooltips[y],""); + if (Skin->revise_group.plane_h[x][y].w) +@@ -588,7 +588,6 @@ + gdk_colormap_alloc_color (parent->cmap, &(parent->color), FALSE, + TRUE); + //gdk_color_change(parent->cmap,&(parent->color)); +- parent->draw (3); + if (parent->color.red == 0x0000) + { + parent->refresh(); +@@ -610,8 +609,10 @@ + parent->disappear_timer = 0; + return FALSE; + } +- else ++ else { ++ parent->draw (3); + return TRUE; ++ } + } + + tViewer::tViewer () +@@ -676,13 +677,17 @@ + str2 = str_m; + if (layout_w) + pango_layout_set_text(layout_w,str1,-1); +- else +- { ++ else { + layout_w=gtk_widget_create_pango_layout (text_area, str1); + pango_layout_set_font_description(layout_w,Skin->reciteword.b_font); + } +- if (layout_m) +- pango_layout_set_text(layout_m,str2,-1); ++ if (layout_m) { ++ if (str2) { ++ pango_layout_set_text(layout_m,str2,-1); ++ } else { ++ pango_layout_set_text(layout_m,"",-1); ++ } ++ } + else + layout_m=gtk_widget_create_pango_layout (text_area, str2); + if (g_pReciteWord->revise_skim->readword_ckbutton.status) diff --git a/chinese/reciteword/files/patch-src_revise.h b/chinese/reciteword/files/patch-src_revise.h new file mode 100644 index 000000000000..9cbb4ba44d57 --- /dev/null +++ b/chinese/reciteword/files/patch-src_revise.h @@ -0,0 +1,11 @@ +--- src/revise.h.orig 2003-07-01 17:57:45.000000000 +0800 ++++ src/revise.h 2007-07-30 16:38:45.000000000 +0800 +@@ -51,7 +51,7 @@ + + void init (); + void show (); +- void create_plane (gint x, gint y); ++ void create_plane (glong x, glong y); + void close (); + }; + diff --git a/chinese/reciteword/files/patch-src_shooting.cpp b/chinese/reciteword/files/patch-src_shooting.cpp new file mode 100644 index 000000000000..ce6a98dbe35b --- /dev/null +++ b/chinese/reciteword/files/patch-src_shooting.cpp @@ -0,0 +1,101 @@ +--- src/shooting.cpp.orig 2005-10-06 15:32:10.000000000 +0800 ++++ src/shooting.cpp 2007-07-30 16:38:45.000000000 +0800 +@@ -93,7 +93,7 @@ + void + tLabelItem::create (GtkWidget * pfixed, gint x, gint y, gint w, gint h, + GdkPixmap * pix_1, GdkPixmap * pix_2, gchar * str, +- void (*func1) (gint), void (*func2) (gint), gint data) ++ void (*func1) (glong), void (*func2) (glong), gint data) + { + init (); + +@@ -512,7 +512,7 @@ + draw_right_pixmap (gpointer data) + { + CShooting *parent = g_pReciteWord->shooting; +- gint index = (gint) data; ++ glong index = (glong) data; + GtkWidget *right_pixmap = + parent->right_pixmap[parent-> + tested_wordlist_item[parent-> +@@ -563,7 +563,7 @@ + draw_shooting (gpointer data) + { + CShooting *parent = g_pReciteWord->shooting; +- gint index = (gint) data; ++ glong index = (glong) data; + GtkWidget *shoot_pixmap = parent->shoot_pixmap[index]; + GtkWidget *wordlist_head = parent->wordlist_head[index].event_box; + +@@ -620,7 +620,7 @@ + } + + static void +-draw_shoot_pixmap (gint type, gint index) ++draw_shoot_pixmap (gint type, glong index) + { + CShooting *parent = g_pReciteWord->shooting; + parent->timer_type = type; +@@ -664,7 +664,7 @@ + } + + static void +-on_shooting_wordlistitem_clicked (gint index) ++on_shooting_wordlistitem_clicked (glong index) + { + CShooting *parent = g_pReciteWord->shooting; + +@@ -697,7 +697,7 @@ + } + + static void +-on_shooting_wordlistitem_active (gint index) ++on_shooting_wordlistitem_active (glong index) + { + if (g_pReciteWord->shooting->wordlist_item[g_pReciteWord->shooting->active_wordlist_item].active) + { +@@ -733,7 +733,7 @@ + static void + on_shooting_wordlisthead_button_press (gpointer data) + { +- on_shooting_wordlistitem_clicked ((gint) data); ++ on_shooting_wordlistitem_clicked ((glong) data); + } + + +@@ -743,7 +743,7 @@ + { + if (g_pReciteWord->shooting->shoot_pixmap_timer) //when mouse button press and release,the enter_notify and leave_notift event will happen too. + return true; +- gint index = (gint) func_data; ++ glong index = (glong) func_data; + if (!g_pReciteWord->shooting->wordlist_head[index].enable) + return true; + on_shooting_wordlistitem_active (index); +@@ -758,7 +758,7 @@ + { + if (g_pReciteWord->shooting->shoot_pixmap_timer) + return true; +- gint index = (gint) func_data; ++ glong index = (glong) func_data; + if (!g_pReciteWord->shooting->wordlist_head[index].enable) + return true; + g_pReciteWord->shooting->wordlist_item[index].active = FALSE; +@@ -999,7 +999,7 @@ + Skin->shooting.wordlist_head[3].p[0], NULL, NULL, + on_shooting_wordlisthead_button_press, + GINT_TO_POINTER (3)); +- int i; ++ glong i; + for (i = 0; i < 4; i++) + { + g_signal_connect (G_OBJECT (wordlist_head[i].event_box), +@@ -1014,7 +1014,7 @@ + (void *) i); + } + /* +- int i; ++ glong i; + GtkWidget *pixmap_widget; + for (i=0;i<4;i++) + { diff --git a/chinese/reciteword/files/patch-src_shooting.h b/chinese/reciteword/files/patch-src_shooting.h new file mode 100644 index 000000000000..ae5becdca9ae --- /dev/null +++ b/chinese/reciteword/files/patch-src_shooting.h @@ -0,0 +1,21 @@ +--- src/shooting.h.orig 2002-12-28 19:42:09.000000000 +0800 ++++ src/shooting.h 2007-07-30 16:38:45.000000000 +0800 +@@ -16,15 +16,15 @@ + int mousein; + int enable; + int active; +- void (*runfunc1) (gint); +- void (*runfunc2) (gint); ++ void (*runfunc1) (glong); ++ void (*runfunc2) (glong); + gint funcdata; + + tLabelItem (); + void init (); + void create (GtkWidget * pfixed, gint x, gint y, gint w, gint h, + GdkPixmap * pix_1, GdkPixmap * pix_2, gchar * str, +- void (*func1) (gint), void (*func2) (gint), gint data); ++ void (*func1) (glong), void (*func2) (glong), gint data); + void set_label (gchar * str); + void set_enable (gint a); + void draw (); diff --git a/chinese/reciteword/files/patch-src_tools_getBdcSound.c b/chinese/reciteword/files/patch-src_tools_getBdcSound.c new file mode 100644 index 000000000000..70721081cbaa --- /dev/null +++ b/chinese/reciteword/files/patch-src_tools_getBdcSound.c @@ -0,0 +1,22 @@ +--- src/tools/getBdcSound.c.orig 2003-03-06 19:03:19.000000000 +0800 ++++ src/tools/getBdcSound.c 2007-07-30 16:38:45.000000000 +0800 +@@ -16,8 +16,8 @@ + static unsigned char c2[21],b1[21]; + int i,j,len; + +- strcpy(b1,str); +- len = strlen(b1); ++ strcpy((char *)b1,(char *)str); ++ len = strlen((char *)b1); + + if (len==1) + { +@@ -262,7 +262,7 @@ + wav[57]= (((wavweight) & 0xff000000)>>24); + fseek(wordwavFile,wavbegin,0); + fread(&wav[0x3a], wavweight,1,wordwavFile); +- str = get_word_str(idxbuf); ++ str = (char *)get_word_str(idxbuf); + dirchar = tolower(str[0]); + sprintf(wavfilename,"BdcSound/%c/%s.wav",dirchar,str); + if (!stat(wavfilename, &st)) diff --git a/chinese/reciteword/files/patch-src_widget.cpp b/chinese/reciteword/files/patch-src_widget.cpp new file mode 100644 index 000000000000..47a5045ef36f --- /dev/null +++ b/chinese/reciteword/files/patch-src_widget.cpp @@ -0,0 +1,11 @@ +--- src/widget.cpp.orig 2005-10-06 15:32:10.000000000 +0800 ++++ src/widget.cpp 2007-07-30 16:38:45.000000000 +0800 +@@ -817,7 +817,7 @@ + default: + return_val = TRUE; + if ((length < parent->max_length) && (event->keyval >= 0x20) +- && (event->keyval <= 0xFF)) ++ && (event->keyval <= 0x7E)) + { + gchar key; + key = event->keyval;