summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ext/tk/sample/demos-en/msgbox2.rb4
-rw-r--r--ext/tk/sample/demos-jp/msgbox2.rb4
-rw-r--r--ext/tk/tcltklib.c10
3 files changed, 12 insertions, 6 deletions
diff --git a/ext/tk/sample/demos-en/msgbox2.rb b/ext/tk/sample/demos-en/msgbox2.rb
index 6fe6c778b..136a723c7 100644
--- a/ext/tk/sample/demos-en/msgbox2.rb
+++ b/ext/tk/sample/demos-en/msgbox2.rb
@@ -42,7 +42,7 @@ TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
text 'Message Box'
- command proc{showMessageBox $msgbox2_demo}
+ command proc{showMessageBox2 $msgbox2_demo}
}.pack('side'=>'left', 'expand'=>'yes')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
@@ -79,7 +79,7 @@ $msgboxType = TkVariable.new('ok')
'anchor'=>'w', 'fill'=>'x')
}
-def showMessageBox(w)
+def showMessageBox2(w)
button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
'title'=>'Message', 'parent'=>w,
'message'=>"\"#{$msgboxType.value}\" Type MessageBox",
diff --git a/ext/tk/sample/demos-jp/msgbox2.rb b/ext/tk/sample/demos-jp/msgbox2.rb
index d61f25129..e2944c59e 100644
--- a/ext/tk/sample/demos-jp/msgbox2.rb
+++ b/ext/tk/sample/demos-jp/msgbox2.rb
@@ -41,7 +41,7 @@ TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
text 'メッセージボックス'
- command proc{showMessageBox $msgbox2_demo}
+ command proc{showMessageBox2 $msgbox2_demo}
}.pack('side'=>'left', 'expand'=>'yes')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
@@ -78,7 +78,7 @@ $msgboxType = TkVariable.new('ok')
'anchor'=>'w', 'fill'=>'x')
}
-def showMessageBox(w)
+def showMessageBox2(w)
button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
'title'=>'Message', 'parent'=>w,
'message'=>"\"#{$msgboxType.value}\"タイプのメッセージボックス",
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index e337894f4..0297b175c 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -4,7 +4,7 @@
* Oct. 24, 1997 Y. Matsumoto
*/
-#define TCLTKLIB_RELEASE_DATE "2008-06-11"
+#define TCLTKLIB_RELEASE_DATE "2008-06-12"
#include "ruby.h"
@@ -116,7 +116,7 @@ fprintf(stderr, ARG1, ARG2, ARG3); fprintf(stderr, "\n"); fflush(stderr); }
*/
/* release date */
-const const char tcltklib_release_date[] = TCLTKLIB_RELEASE_DATE;
+static const char tcltklib_release_date[] = TCLTKLIB_RELEASE_DATE;
/* finalize_proc_name */
static char *finalize_hook_name = "INTERP_FINALIZE_HOOK";
@@ -424,9 +424,15 @@ Tcl_Interp *current_interp;
: USE_TOGGLE_WINDOW_MODE_FOR_IDLE 0
: DO_THREAD_SCHEDULE_AT_CALLBACK_DONE 0
*/
+#ifdef RUBY_USE_NATIVE_THREAD
+#define CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE 1
+#define USE_TOGGLE_WINDOW_MODE_FOR_IDLE 0
+#define DO_THREAD_SCHEDULE_AT_CALLBACK_DONE 1
+#else /* ! RUBY_USE_NATIVE_THREAD */
#define CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE 1
#define USE_TOGGLE_WINDOW_MODE_FOR_IDLE 0
#define DO_THREAD_SCHEDULE_AT_CALLBACK_DONE 0
+#endif
#if CONTROL_BY_STATUS_OF_RB_THREAD_WAITING_FOR_VALUE
static int have_rb_thread_waiting_for_value = 0;