[java-atk-wrapper] fix jfieldID in get_extents
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] fix jfieldID in get_extents
- Date: Fri, 16 Jan 2015 15:26:36 +0000 (UTC)
commit 15a15aca8300fc205544cedcd5e9437e8c8af629
Author: Magdalen Berns <m berns thismagpie com>
Date: Fri Jan 16 15:21:12 2015 +0000
fix jfieldID in get_extents
Also give classRectangle as a more appropriate name
https://bugzilla.gnome.org/show_bug.cgi?id=743050
jni/src/jawcomponent.c | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/jni/src/jawcomponent.c b/jni/src/jawcomponent.c
index d018f95..bf1697f 100644
--- a/jni/src/jawcomponent.c
+++ b/jni/src/jawcomponent.c
@@ -302,11 +302,6 @@ jaw_component_set_extents (AtkComponent *component,
AtkCoordType coord_type)
{
- if (&x == NULL || &y == NULL || &width == NULL || &height == NULL)
- {
- return FALSE;
- }
-
JawObject *jaw_obj = JAW_OBJECT(component);
ComponentData *data = jaw_object_get_interface_data(jaw_obj, INTERFACE_COMPONENT);
jobject atk_component = data->atk_component;
@@ -331,30 +326,30 @@ jaw_component_set_extents (AtkComponent *component,
return FALSE;
}
- jclass componentClass = (*jniEnv)->FindClass(jniEnv, "java/awt/Rectangle");
+ jclass classRectangle = (*jniEnv)->FindClass(jniEnv, "java/awt/Rectangle");
// Get Field IDs
jfieldID jfidX = (*jniEnv)->GetFieldID(jniEnv,
- componentClass,
+ atk_component,
"x",
"I");
jfieldID jfidY = (*jniEnv)->GetFieldID(jniEnv,
- componentClass,
+ atk_component,
"y",
"I");
jfieldID jfidWidth = (*jniEnv)->GetFieldID(jniEnv,
- componentClass,
+ atk_component,
"width",
"I");
jfieldID jfidHeight = (*jniEnv)->GetFieldID(jniEnv,
- componentClass,
+ atk_component,
"height",
"I");
- jint jwidth = (*jniEnv)->GetIntField(jniEnv, componentClass, jfidWidth);
- jint jheight = (*jniEnv)->GetIntField(jniEnv, componentClass, jfidHeight);
- jint jx = (*jniEnv)->GetIntField(jniEnv, componentClass, jfidX);
- jint jy = (*jniEnv)->GetIntField(jniEnv, componentClass, jfidY);
+ jint jwidth = (*jniEnv)->GetIntField(jniEnv, classRectangle, jfidWidth);
+ jint jheight = (*jniEnv)->GetIntField(jniEnv, classRectangle, jfidHeight);
+ jint jx = (*jniEnv)->GetIntField(jniEnv, classRectangle, jfidX);
+ jint jy = (*jniEnv)->GetIntField(jniEnv, classRectangle, jfidY);
width = (gint)jwidth;
height = (gint)jheight;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]