diff options
author | Felipe Heidrich <fheidric> | 2006-12-19 00:36:06 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2006-12-19 00:36:06 +0000 |
commit | 48c6107564896d466448d735033d9e2439b7c153 (patch) | |
tree | c293c658d50092e98d3edac8213ca0f399e742a6 | |
parent | d90ce82c4bd1df73e3b8427cbe02d4f5420c1576 (diff) | |
download | eclipse.platform.swt-48c6107564896d466448d735033d9e2439b7c153.tar.gz eclipse.platform.swt-48c6107564896d466448d735033d9e2439b7c153.tar.xz eclipse.platform.swt-48c6107564896d466448d735033d9e2439b7c153.zip |
*** empty log message ***
2 files changed, 24 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties index 5753c2f2d5..49a39b976f 100644 --- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties +++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties @@ -1234,6 +1234,10 @@ OS__g_source_remove_0=cast=guint OS__g_strfreev= OS__g_strfreev_0=cast=(gchar **) +OS__g_strtod= +OS__g_strtod_0=cast=const gchar * +OS__g_strtod_1=cast=gchar ** + OS__g_thread_init= OS__g_thread_init_0=cast=GThreadFunctions * @@ -3633,13 +3637,16 @@ OS__gtk_spin_button_set_range_1= OS__gtk_spin_button_set_range_2= OS__gtk_spin_button_set_value= -OS__gtk_spin_button_set_value_0=cast=GtkSpinButton* +OS__gtk_spin_button_set_value_0=cast=(GtkSpinButton*) OS__gtk_spin_button_set_value_1= OS__gtk_spin_button_set_wrap= -OS__gtk_spin_button_set_wrap_0=cast=GtkSpinButton* +OS__gtk_spin_button_set_wrap_0=cast=(GtkSpinButton*) OS__gtk_spin_button_set_wrap_1= +OS__gtk_spin_button_update= +OS__gtk_spin_button_update_0=cast=(GtkSpinButton*) + OS__gtk_style_get_base= OS__gtk_style_get_base_0=cast=(GtkStyle *) OS__gtk_style_get_base_1= diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java index f1b2c768c3..19d5692813 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java @@ -482,6 +482,21 @@ int /*long*/ gtk_activate (int /*long*/ widget) { } int /*long*/ gtk_changed (int /*long*/ widget) { + int /*long*/ str = OS.gtk_entry_get_text (handle); + int length = OS.strlen (str); + if (length > 0) { + int /*long*/ [] endptr = new int /*long*/ [1]; + double value = OS.g_strtod (str, endptr); + if (endptr [0] == str + length) { + int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); + GtkAdjustment adjustment = new GtkAdjustment (); + OS.memmove (adjustment, hAdjustment); + if (value != adjustment.value && adjustment.lower <= value && value <= adjustment.upper) { + OS.gtk_spin_button_update (handle); + } + } + } + /* * Feature in GTK. When the user types, GTK positions * the caret after sending the changed signal. This |