GNOME Bugzilla – Bug 740282
'atk_value_get_current_value' is deprecated
Last modified: 2015-07-10 21:07:55 UTC
jawvalue.c: In function 'jaw_value_get_minimum_increment': Use 'atk_value_get_value_and_text' instead
Created attachment 290874 [details] [review] Patch to address problem
Silly question: - atk_value_get_current_value(obj, &curValue); + atk_value_get_current_value_and_text(obj, &curValue); Does java-atk-wrapper even build with that change?
(In reply to comment #2) > Silly question: > > - atk_value_get_current_value(obj, &curValue); > + atk_value_get_current_value_and_text(obj, &curValue); > > Does java-atk-wrapper even build with that change? Yes.
Okie dokie. Since I don't see a method named atk_value_get_current_value_and text in ATK (the new method as you stated in the opening report is atk_value_get_value_and_text), and since that new method takes three arguments instead of two, I figured it wouldn't compile. Apologies.
(In reply to comment #4) > Okie dokie. > > Since I don't see a method named atk_value_get_current_value_and text in ATK > (the new method as you stated in the opening report is > atk_value_get_value_and_text), and since that new method takes three arguments > instead of two, I figured it wouldn't compile. Apologies. Ah, ok. Thanks for the explanation. It seems odd that this compiles now you mention that. I was struggling to find documents so I just went off a proposal about this method. I think it's probably better to use atk_value_get_value_and_text under the circumstances. I'll reopen this bug. [1] https://developer.gnome.org/atk/stable/AtkValue.html#atk-value-get-value-and-text [2] https://mail.gnome.org/archives/gnome-accessibility-devel/2013-December/msg00005.html
I think the method calling this probably wants to be using atk_value_get_increment () on looking into it a bit further. It does not seem to want to do anything with the text. The method making the call is called jaw_value_get_minimum_increment() but looking at the ATK API it seems like for ATK, this method is deprecated and urges the use of atk_value_get_increment instead[1,2] i.e. I think that: static void jaw_value_get_minimum_increment (AtkValue *obj, GValue *value) { if (!value) { return; } GValue curValue = {0,}; atk_value_get_increment(obj); if (G_TYPE_IS_FUNDAMENTAL (G_VALUE_TYPE (&curValue))) { switch (curValue.g_type) { case G_TYPE_CHAR: case G_TYPE_INT: case G_TYPE_INT64: { g_value_init(value, G_TYPE_INT); g_value_set_int(value, 1); return; } default: break; } } Should be something a bit more like: static gdouble jaw_value_get_increment (AtkValue *obj) { return atk_value_get_increment(obj); } [1] https://developer.gnome.org/atk/stable/AtkValue.html#atk-value-get-minimum-increment [2] https://developer.gnome.org/atk/stable/AtkValue.html#atk-value-get-increment
Created attachment 290887 [details] [review] Patch to address problem I think this patch should work better with the current API.
[Moving at-spi/java-atk-wrapper bugs to separate product. See bug 740075]
I dunno what was happening in this bug, but it's safe to say atk_value_get_value_and_text is no longer implemented as recommended and the increment train relates to another issue altogether: https://git.gnome.org/browse/atk/tree/atk/atkvalue.h#n143 Closing!