----Next_Part(Thu_Jul_15_07:05:18_1999_893)-- Content-Type: Text/Plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit ¤¤¤¬¤é¤·¤Ç¤¹¡£ ¡Ö[ruby-ext:00312] Re: ruby-gtk-0.19 patch¡×¤Ç ¡¢ Hiroshi Igarashi <igarashi / ueda.info.waseda.ac.jp>¤µ¤ó¤Ï ¤Þ¤·¤¿¡¨Â ¤É¤¦¤â¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£¼è¤ê¹þ¤ß¤Þ¤·¤¿¡£ > ¥¹¥¯¥ê¥×¥È¤È¥Ñ¥Ã¥Á¼«ÂΤˤÏÌäÂê¤Ï¤Ê¤¤¤È»×¤¤¤Þ¤¹¤¬¡¢ > ư¤«¤·¤Æ¤ß¤¿¤éRuby/GTK¤Î¥Ð¥°¤¬¸«¤Ä¤«¤ê¤Þ¤·¤¿¡£ ¥Ñ¥Ã¥Á¤ò ¹¤Î¤ò˺¤ì¤Æ¤Þ¤·¤¿¡¨Â ¸Þ ¨Â ¹¨ (Hiroshi IGARASHI) ----Next_Part(Thu_Jul_15_07:05:18_1999_893)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=ruby-gtk-0.19-19990715.patch --- rbgtkbutton.c~ Mon Jun 21 00:53:43 1999 +++ rbgtkbutton.c Thu Jul 15 03:03:56 1999 @@ -136,7 +136,7 @@ VALUE self, state; { gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(get_widget(self)), - NUM2INT(state)); + RTEST(state)); return self; } @@ -173,10 +173,12 @@ rb_define_method(gTButton, "initialize", tbtn_initialize, -1); rb_define_method(gTButton, "set_mode", tbtn_set_mode, 1); - rb_define_method(gTButton, "set_state", tbtn_set_state, 1); + rb_define_method(gTButton, "set_state", tbtn_set_state, 1); /* back-compat. */ rb_define_method(gTButton, "toggled", tbtn_toggled, 0); rb_define_method(gTButton, "active", tbtn_is_active, 0); rb_define_method(gTButton, "active?", tbtn_is_active, 0); + rb_define_method(gTButton, "set_active", tbtn_set_active, 1); + rb_define_method(gTButton, "active tbtn_set_active, 1); } @@ -207,8 +209,6 @@ gCButton b_define_class_under(mGtk, "CheckButton", gTButton); rb_define_method(gCButton, "initialize", cbtn_initialize, -1); - rb_define_method(gCButton, "set_active", tbtn_set_active, 1); - rb_define_method(gCButton, "active tbtn_set_active, 1); } --- rbgtkwidget.c~ Sun Jun 27 15:16:18 1999 +++ rbgtkwidget.c Thu Jul 15 03:31:24 1999 @@ -158,7 +158,7 @@ VALUE self, event; { int i tk_widget_event(get_widget(self), get_gdkevent(event)); - return NUM2INT(i); + return INT2NUM(i); } static VALUE @@ -208,7 +208,7 @@ int i tk_widget_intersect(get_widget(self), get_gdkrectangle(area), get_gdkrectangle(intersect)); - return NUM2INT(i); + return INT2NUM(i); } /* 1.2.x static VALUE @@ -400,7 +400,7 @@ VALUE self; { int i tk_widget_get_events(get_widget(self)); - return NUM2INT(i); + return INT2NUM(i); } static VALUE @@ -409,7 +409,7 @@ { GdkExtensionMode m; m tk_widget_get_extension_events(get_widget(self)); - return NUM2INT((int)m); + return INT2NUM((int)m); } static VALUE --- rbgdk.c~ Wed Jul 14 02:43:00 1999 +++ rbgdk.c Thu Jul 15 03:44:42 1999 @@ -614,7 +614,7 @@ VALUE self, owner_events, event_mask, confine_to, cursor, time; { gdk_pointer_grab(get_gdkwindow(self), - NUM2INT(owner_events), + RTEST(owner_events), NUM2INT(event_mask), NULL, /*get_gdkwindow(confine_to),*/ NULL, /*get_gdkcursor(cursor),*/ ----Next_Part(Thu_Jul_15_07:05:18_1999_893)----